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
|
// TMW2 Scripts
// Author:
// Jesusalva
// Description:
// Advanced Spike Traps
/////////////////////////////
023-4,60,51,0 script #SpikeTrap NPC_TRAP_B,1,1,{
end;
OnInit:
.damage=0;
.time=0;
.goal=rand2(5,10);
initnpctimer;
end;
OnTouch:
OnTouchNPC:
if (.damage) {
if (playerattached()) {
percentheal -80, 0;
} else {
sc_start SC_WALKSPEED, 15000, 60;
sc_start SC_STUN, rand2(3000), 1;
}
}
specialeffect(11, AREA, strnpcinfo(0));
end;
OnTimer1000:
.time+=1;
if (.time > .goal) {
.damage = !(.damage);
.time = 0;
if (.damage)
setnpcdisplay strnpcinfo(0), NPC_TRAP_ONLINE_B;
else
setnpcdisplay strnpcinfo(0), NPC_TRAP_B;
}
initnpctimer;
end;
}
023-4,50,60,0 duplicate(#SpikeTrap) #SpikeTrap001 NPC_TRAP,1,1
023-4,31,59,0 duplicate(#SpikeTrap) #SpikeTrap002 NPC_TRAP,1,1
023-4,31,48,0 duplicate(#SpikeTrap) #SpikeTrap003 NPC_TRAP,1,1
023-4,22,50,0 duplicate(#SpikeTrap) #SpikeTrap004 NPC_TRAP,1,1
023-4,39,39,0 duplicate(#SpikeTrap) #SpikeTrap005 NPC_TRAP,1,1
023-4,42,42,0 duplicate(#SpikeTrap) #SpikeTrap006 NPC_TRAP,1,1
023-4,52,44,0 duplicate(#SpikeTrap) #SpikeTrap007 NPC_TRAP,1,1
023-4,50,46,0 duplicate(#SpikeTrap) #SpikeTrap008 NPC_TRAP,1,1
023-4,47,28,0 duplicate(#SpikeTrap) #SpikeTrap009 NPC_TRAP,1,1
023-4,44,28,0 duplicate(#SpikeTrap) #SpikeTrap010 NPC_TRAP,1,1
023-4,42,25,0 duplicate(#SpikeTrap) #SpikeTrap011 NPC_TRAP,1,1
023-4,39,24,0 duplicate(#SpikeTrap) #SpikeTrap012 NPC_TRAP,1,1
|