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
|
// TMW2 script
// Author: Jesusalva <admin@tmw2.org>
//
// Magic Script: TMW2_ZARKOR
//
// Spawns a Cave Maggot.
// This is to test stuff, more than to create anything really.
- script sk#zarkor 32767,{
end;
OnNone:
end;
OnCall:
// PRE EXECUTION
// Check Skill
if (getskilllv(TMW2_ZARKOR) < 1)
end;
// Check cooldown
/*
if (@skzarkor_cooldown > gettimetick(0)) {
dispbottom l("Cannot cast that now.");
end;
}
*/
// Check mana
if (readparam(Sp) < 400) {
dispbottom l("Insufficient mana.");
end;
}
// Other requeriments
if (countitem(ZarkorScroll) < 1) {
dispbottom l("You need @@ to cast this skill.", getitemlink(ZarkorScroll));
end;
}
// EXECUTION
// Apply costs
heal 0, -400;
// Cause effect
getmapxy(.@map$,.@x,.@y,0);
monster(.@map$, .@x, .@y, "Summoned Monster", CaveMaggot, 1, "sk#zarkor::OnNone", Size_Medium, 1);
dispbottom l("All monsters summoned!");
/*
<size> can be:
Size_Medium = medium (default)
Size_Small = small
Size_Large = big
<ai> can be:
0 = none (default)
1 = attack/friendly
2 = sphere (Alchemist skill)
3 = flora (Alchemist skill)
4 = zanzou (Kagerou/Oboro skill)
*/
// POST EXECUTION
// set cooldown
@skzarkor_cooldown=gettimetick(0)+20;
end;
OnInit:
bindatcmd "sk-zarkor", "sk#zarkor::OnCall", 0, 100, 0;
end;
}
|