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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
|
// TMW2 Script
// Authors:
// Jesusalva
// Description:
// Dungeon utilities
- script #DungeonCore NPC_HIDDEN,{
end;
// Main initialization
OnInit:
setarray .heatmap$, "007-2", "026-3", "001-15";
setarray .cursemap$, "006-4", "006-4-1", "025-1", "026-2", "001-15";
setarray .sickmap$, "029-5", "001-15";
setarray .bleedmap$, "006-9", "026-6", "026-7", "001-15";
setarray .clockmap$, "017-0", "032-2", "001-15";
setarray .windymap$, "001-15";
setarray .leechmap$, "001-15";
setarray .frostmap$, "001-15";
end;
/////////////////////////////////////////
// Heartbeat for Heat effects
OnHeat:
// Did you left?
.@i=array_find(.heatmap$, getmap());
if (.@i < 0) {
@heat$="";
end;
}
// First time seeing this
if (@heat$ != getmap()) {
@heat$=getmap();
dispbottom l("This is a hot map, you're suffering damage over time.");
}
// You are in a HEATMAP$, so suffer damage from heat
if (@coolio > gettimetick(2) || Class == Redy)
percentheal -1, 0;
else
percentheal -5, 0;
// New tick (dies in 140~180 seconds)
addtimer2 rand2(7000, 9000), .name$+"::OnHeat";
end;
/////////////////////////////////////////
// Heartbeat for Cursed Land map effects
OnCurse:
// Did you left?
.@i=array_find(.cursemap$, getmap());
if (.@i < 0) {
@curse$="";
end;
}
// First time seeing this
if (@curse$ != getmap()) {
@curse$=getmap();
dispbottom l("This is a Cursed Lands map, you'll lose mana over time and may also incurr in debuffs if mana is low (may cause death).");
}
// You are in a CURSEMAP$, so suffer damage from the curse
if (@purifio > gettimetick(2) || Class == Savior)
heal 0, -1;
else if (islegendary())
percentheal 0, -2;
else
percentheal 0, -4;
// MP is below 20%, you'll get cursed
if (Sp*100 < MaxSp*20)
SC_Bonus(15, SC_CURSE, 1);
// MP is below 1%, you'll get start losing HP rapidly
if (Sp*100 < MaxSp)
percentheal -9, 0;
// New tick (cycles every 15 seconds in average)
addtimer2 rand2(14000, 15000), .name$+"::OnCurse";
end;
/////////////////////////////////////////
// Heartbeat for Disease effects
OnSick:
// Did you left?
.@i=array_find(.sickmap$, getmap());
if (.@i < 0) {
if (@forced_sick$ != getmap()) {
@sick$="";
end;
}
}
// First time seeing this
if (@sick$ != getmap()) {
@sick$=getmap();
dispbottom l("This map contains poisonous gas and may cause diseases.");
}
// The effect is based on HP
if (Hp*10 > MaxHp*7)
.@eff = SC_BLOODING;
else if (Hp*10 > MaxHp*4)
.@eff = SC_POISON;
else
.@eff = SC_DPOISON;
// You are in a SICKMAP$, so suffer damage from disease
if (@sickio > gettimetick(2) || Class == Raijin) {
heal -50, 0;
} else {
heal -rand2(50, 200), 0;
SC_Bonus(10, .@eff, 1);
}
// New tick (20 seconds fixed cycle)
addtimer2 20000, .name$+"::OnSick";
end;
/////////////////////////////////////////
// Heartbeat for Bleed effects
OnBleed:
// Did you left?
.@i=array_find(.bleedmap$, getmap());
if (.@i < 0) {
@bleed$="";
end;
}
// First time seeing this
if (@bleed$ != getmap()) {
@bleed$=getmap();
dispbottom l("This is a Blood Pact map, HP won't recover naturally, and bleeding may start.");
}
// You are in a BLEEDMAP$, HP regeneration is disabled
if (@bleedio <= gettimetick(2))
SC_Bonus(15, SC_HALT_REGENERATION, 1);
// You may bleed at 2% chance per 15 seconds (except heroes)
if (rand2(50) == 25 && !islegendary())
SC_Bonus(15, SC_BLOODING, 1);
// New tick (15 seconds fixed cycle)
addtimer2 15000, .name$+"::OnBleed";
end;
/////////////////////////////////////////
// Heartbeat for Clocked effects
function syndroCheck {
.@k = getarg(0);
.@t = getarg(1, 2000);
sleep2(.@t);
if (!playerattached()) return false;
if (BaseExp != .@k) return true;
return false;
}
OnClocked:
// Not Applicable
if ($CAPTCHA & 4)
end;
// Did you left?
.@i=array_find(.clockmap$, getmap());
if (.@i < 0) {
@clocked$="";
end;
}
// First time seeing this
if (@clocked$ != getmap()) {
@clocked$=getmap();
dispbottom l("This is an OverClocked map, excessive combat will cause Botter's Syndrome Disease, which reduces EXP Gain and drops.");
}
// Prepare the variables we'll be studying
.@mpk = MONSTERS_KILLED; .@k = BaseExp;
// We'll now wait in some intervals. Killing in them cause
// the K variables to be set, and contribute towards bot score.
.@k1 = syndroCheck(.@k); .@k = BaseExp;
.@k2 = syndroCheck(.@k); .@k = BaseExp;
.@k3 = syndroCheck(.@k); .@k = BaseExp;
.@k4 = syndroCheck(.@k); .@k = BaseExp;
.@k5 = syndroCheck(.@k); .@k = BaseExp;
.@k6 = syndroCheck(.@k); .@k = BaseExp;
.@k7 = syndroCheck(.@k); .@k = BaseExp;
.@k8 = syndroCheck(.@k); .@k = BaseExp;
// Determine if you'll be afflicted, base chance is 100%
.@chance = 100;
// Every 2 seconds you spent without killing is -10%
if (!.@k1)
.@chance -= 10;
if (!.@k2)
.@chance -= 10;
if (!.@k3)
.@chance -= 10;
if (!.@k4)
.@chance -= 10;
if (!.@k5)
.@chance -= 10;
if (!.@k6)
.@chance -= 10;
if (!.@k7)
.@chance -= 10;
if (!.@k8)
.@chance -= 10;
// You killed less than 7 monsters, so zero the chance
if (.@mpk + 7 > MONSTERS_KILLED)
.@chance -= 20;
// (If you killed less than 12 monsters, potentially go to 10%
else if (.@mpk + 12 > MONSTERS_KILLED)
.@chance -= 10;
// Determine whenever you'll be afflicted with the Syndrome
// The syndrome duration is 30 seconds
if (rand2(100) < .@chance) {
// If you have a Homunculus active, the effect is smaller (5~10%)
if (gethominfo(0))
.@homun = (homstatus() ? 10 : 20);
else
.@homun = 10;
// Calculate the effect based on your score (5~15%)
.@eff = 5 + (.@chance / .@homun);
// If you already have one running (!!), increase the effect
if (getstatus(SC_BOTTER_SYNDROME)) {
.@eff += min(100, getstatus(SC_BOTTER_SYNDROME, 1));
}
// Sanitize the effect (it cannot go past 30%)
// (Note it reaches the cap if it fires at 100% rate twice w/o Homun)
.@cap = (getmap() == "017-0" ? 30 : 40);
.@eff = min(.@cap, .@eff);
SC_Bonus(30, SC_BOTTER_SYNDROME, .@eff);
}
// New tick (14~30 seconds fixed cycle)
addtimer2 rand(14000,30000), .name$+"::OnClocked";
end;
/////////////////////////////////////////
// Heartbeat for Windy effects
OnWindy:
// Did you left?
.@i=array_find(.windymap$, getmap());
if (.@i < 0) {
@windy$="";
end;
}
// First time seeing this
if (@windy$ != getmap()) {
@windy$=getmap();
dispbottom l("This is a Windy map, walk speed and agility may be reduced.");
}
// You are in a WINDYMAP$, Move speed is impacted until it is neutered
.@penalty = 40 - (max(100, rand2(readparam2(bVit))) / 5);
if (@windyio <= gettimetick(2) && Class != Orc)
SC_Bonus(15, SC_MOVESLOW_POTION, .@penalty);
else
SC_Bonus(15, SC_MOVESLOW_POTION, 5);
// You may lose agility at 4% chance per 15 seconds
if (rand2(25) == 12)
sc_start2 SC_DEC_AGI, 15000, 20, 20, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK|SCFLAG_FIXEDRATE;
// New tick (15 seconds fixed cycle)
addtimer2 15000, .name$+"::OnWindy";
end;
/////////////////////////////////////////
// Heartbeat for Leech effects
OnLeech:
// Did you left?
.@i=array_find(.leechmap$, getmap());
if (.@i < 0) {
@windy$="";
end;
}
// First time seeing this
if (@leech$ != getmap()) {
@leech$=getmap();
dispbottom l("This map is infested by Parasites, your HP will be periodically leeched to enemies!");
}
// You are in a LEECHMAP$ so you lose HP and leech it to mobs
if (@leechio <= gettimetick(2) && Class != Tritan) {
percentheal -3, 0;
callfunc("grenade", 14, -500, false); // Won't recover HP for bosses
} else if (rand2(3)) {
// 67% chances of you still losing some HP
percentheal -1, 0;
}
// New tick (15 seconds fixed cycle)
addtimer2 15000, .name$+"::OnLeech";
end;
/////////////////////////////////////////
// Heartbeat for Frost effects
OnFrost:
// Did you left?
.@i=array_find(.frostmap$, getmap());
if (.@i < 0) {
@frost$="";
end;
}
// First time seeing this
if (@frost$ != getmap()) {
@frost$=getmap();
dispbottom l("This map is extremely cold, and may cause frostbites.");
}
// You are in a FROSTMAP$ and may get frostbites
if (@frostio <= gettimetick(2) && (Class != Elf && Class != Ukar)) {
// You get Frostbites at 100% probability
percentheal any(-1, -2), 0;
// You may get cold at ~8% chance
if (rand2(12) == 10)
SC_Bonus(15, SC_COLD, 5);
// You may freeze at ~2% chance
if (rand2(50) == 25)
SC_Bonus(15, SC_FREEZE, 5);
} else {
// Only 25% chance of a frostbite
if (rand2(4) == 2)
percentheal -1, 0;
}
// New tick (15 seconds fixed cycle)
addtimer2 15000, .name$+"::OnFrost";
end;
}
//////////////////////////////
007-2 mapflag nosave 007-1,99,189
006-4 mapflag nosave 006-3,54,36
006-4-1 mapflag nosave 006-3,54,36
029-5 mapflag nosave 029-4,21,97
006-9 mapflag nosave 006-6,46,27
|