This repository was archived by the owner on Jun 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.js
More file actions
70 lines (63 loc) · 1.87 KB
/
main.js
File metadata and controls
70 lines (63 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*jsl:import gui/gui.js*/
/*jsl:import bot/util.js*/
/*jsl:import bot/bonds.js*/
/*jsl:import bot/attack.js*/
/*jsl:import bot/build.js*/
/*jsl:import bot/train.js*/
/*jsl:import bot/parser.js*/
/*jsl:import bot/armor.js*/
/*jsl:import bot/bailout.js*/
/*jsl:import bot/bot.js*/
/*jsl:import bot/cityscape.js*/
/*jsl:import bot/collect.js*/
/*jsl:import bot/debug.js*/
/*jsl:import bot/item.js*/
/*jsl:import bot/prize.js*/
/*jsl:import bot/options.js*/
/*jsl:import bot/queue.js*/
/*jsl:import bot/report.js*/
/*jsl:import bot/research.js*/
/*jsl:import bot/ajax.js*/
/*jsl:import bot/financier.js*/
/*jsl:import res/attack_units.js*/
/*jsl:import res/buildings.js*/
/*jsl:import res/defense_units.js*/
/*jsl:import res/items.js*/
/*jsl:import res/research.js*/
/*jsl:import res/underboss.css.js*/
/*jsl:import util/combine.js*/
/*jsl:import util/convert.js*/
/*jsl:import util/frame.js*/
/*jsl:import util/inject.js*/
// Adds the CSS
GM_addStyle (css);
//Insert into the right iframe
if(window.location.href.indexOf("platforms/facebook/game") != -1) {
console.debug("Injecting Godfather Bot script");
//Combine all the bots into one object
combine(bot, attackBot,
bondsBot, buildBot,
itemBot, cityscapeBot,
reportBot, trainBot,
bailoutBot, collectBot,
prizeBot, researchBot,
optionsBot, parserBot,
queueBot, debugBot,
utilBot, armorBot,
ajaxBot, financierBot);
if(guiBot) {
combine(bot, guiBot);
}
//Add all the variables
bot.attackUnits = attackUnits;
bot.defenseUnits = defenseUnits;
bot.buildings = buildings;
bot.research = research;
bot.items = items;
//Convert the obj to source
var src = convertToSource(bot);
src = "var underboss = " + src + ";\n";
src += "underboss.start();";
// Inject main script
inject(src);
}