-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTrimps Scripts.js
More file actions
168 lines (161 loc) · 6.37 KB
/
Trimps Scripts.js
File metadata and controls
168 lines (161 loc) · 6.37 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
var perked = false;
var prestiged = false;
var resetGenes = false;
enableDebug = false;
userscriptOn = false;
autoTrimpSettings["VoidMaps"].value = 510;
autoTrimpSettings["ExitSpireCell"].value = 40;
autoTrimpSettings["AutoStartDaily"].enabled = false;
setInterval(
function(){
//Windstacking stance dancing
if(game.global.world>=70) {
if (game.global.dailyChallenge.hasOwnProperty("mirrored") && game.global.world < 230) {
setFormation(1);
}
else if (getEmpowerment() !== "Wind" || game.global.mapsActive || game.empowerments.Wind.currentDebuffPower === 200) {
if (!(game.global.mapsActive && game.global.mapsOwnedArray[getMapIndex(game.global.currentMapId)].bonus === "lmc")) {
setFormation(2);
}
if (getEmpowerment() !== "Wind") {
MODULES["maps"].enoughDamageCutoff = 4;
}
}
else if (game.global.challengeActive === "Daily" && !game.global.spireActive) {
setFormation(4);
if (game.global.gridArray[game.global.lastClearedCell + 1].corrupted === "corruptBleed" || game.global.gridArray[game.global.lastClearedCell + 1].corrupted === "healthyBleed") {
setFormation(2);
}
MODULES["maps"].enoughDamageCutoff = 160;
}
}
//Misc Features
if (game.global.soldierHealth === 0 && !(game.global.spireActive || (game.global.mapsActive && getCurrentMapObject().location === "Void") || game.global.preMapsActive)) {
fightManual();
buyArmors();
}
if (game.global.antiStacks !== 45 && game.global.lastBreedTime >= 45000 && !game.global.spireActive) {
forceAbandonTrimps();
}
if ((needPrestige || !enoughDamage) && game.global.world>=200 && (getEmpowerment() === "Ice" || (getEmpowerment() === "Wind" && game.global.lastBreedTime >= 45000)) && !game.global.mapsActive && game.global.mapBonus !== 10 && game.global.world!==game.options.menu.mapAtZone.setZone) {
forceAbandonTrimps();
}
if (game.global.world === autoTrimpSettings["VoidMaps"].value && game.global.lastClearedCell >= 80 && getPageSetting('AutoMaps') === 0){
toggleAutoMaps();
}
if (game.global.world === 495 && !resetGenes)
{
game.global.genPaused = true;
numTab('6');
game.global.firing = true;
buyJob('Geneticist');
game.global.firing = false;
resetGenes = true;
}
//Raiding logic
if (game.global.world === game.options.menu.mapAtZone.setZone && game.options.menu.mapAtZone.enabled === 1) {
if (getPageSetting('AutoMaps') === 1 && game.global.mapsActive && !prestiged) {
toggleAutoMaps();
game.options.menu.repeatUntil.enabled = 2;
game.global.repeatMap = false;
}
else if (getPageSetting('AutoMaps') === 0 && game.global.preMapsActive && !prestiged) {
game.global.repeatMap = true;
plusPres();
buyMap();
selectMap(game.global.mapsOwnedArray[game.global.mapsOwnedArray.length - 1].id);
runMap();
prestiged = true;
}
else if (prestiged && game.global.preMapsActive) {
recycleMap();
toggleAutoMaps();
game.options.menu.mapAtZone.enabled = 0;
}
}
if (game.global.world === game.options.menu.mapAtZone.setZone + 1){
game.options.menu.mapAtZone.enabled = 1;
game.options.menu.mapAtZone.setZone = nextMapAtZone(game.options.menu.mapAtZone.setZone);
prestiged = false;
}
//Resetting values
if (game.global.world <= 10 && game.global.dailyChallenge.hasOwnProperty("mirrored")){
autoTrimpSettings["BuyWeapons"].enabled = false;
}
else if (game.global.world===230){
perked = false;
prestiged = false;
resetGenes = false;
game.options.menu.mapAtZone.setZone = 495;
game.options.menu.mapAtZone.enabled = 1;
autoTrimpSettings["BuyWeapons"].enabled = true;
autoTrimpSettings["AutoMaps"].value = 1;
}
//AutoAllocate Looting II
if (!perked && game.global.world !== 230){
viewPortalUpgrades();
game.global.lastCustomAmt = 100000;
numTab(5, true);
if (getPortalUpgradePrice("Looting_II")+game.resources.helium.totalSpentTemp <= game.resources.helium.respecMax){
buyPortalUpgrade('Looting_II');
activateClicked();
message("Bought 100k Looting II","Notices");
}
else{
perked = true;
cancelPortal();
message("Done buying Looting II","Notices");
}
}
},500);
function buyArmors(){
numTab(3);
buyEquipment('Boots');
buyEquipment('Helmet');
buyEquipment('Pants');
buyEquipment('Shoulderguards');
buyEquipment('Breastplate')
buyEquipment('Gambeson')
}
function plusPres(){
document.getElementById("biomeAdvMapsSelect").value = "Random";
document.getElementById('advExtraLevelSelect').value = plusMapToRun(game.global.world);
document.getElementById('advSpecialSelect').value = "p";
document.getElementById("lootAdvMapsRange").value = 0;
document.getElementById("difficultyAdvMapsRange").value = 9;
document.getElementById("sizeAdvMapsRange").value = 9;
document.getElementById('advPerfectCheckbox').checked = false;
updateMapCost();
}
function plusMapToRun(zone) {
var currentModifier = (zone - 235) % 15;
if (currentModifier === 1) {
if (zone % 10 === 1) {
return 4;
}
else if (zone % 10 === 6) {
return 5;
}
}
else if (currentModifier === 5) {
if (zone % 10 === 5) {
return 6;
}
else if (zone % 10 === 0) {
return 5;
}
}
return 0;
}
function nextMapAtZone(zone) {
var currentModifier = (zone - 235) % 15;
if (currentModifier === 1) {
return zone + 4;
}
else if (currentModifier === 5) {
return zone + 11;
}
else {
return -1;
}
}