summaryrefslogtreecommitdiff
path: root/npc/items/grenade.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/items/grenade.txt')
-rw-r--r--npc/items/grenade.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/npc/items/grenade.txt b/npc/items/grenade.txt
index c9379bbff..0fdd5ea05 100644
--- a/npc/items/grenade.txt
+++ b/npc/items/grenade.txt
@@ -26,15 +26,18 @@ function script grenade {
return;
}
-// smoke_grenade(range, time) - defaults to 3x3 square, stun for 500ms.
-function script smoke_grenade {
+// areasc(range, time, sc, bl) - defaults to 3x3 square, sleep mob for 500ms.
+// before was: smoke_grenade(). Valid BL: BL_MOB | BL_PC | BL_HOM | BL_MER
+function script areasc {
.@r=getarg(0, 3);
.@d=getarg(1, 500);
+ .@s=getarg(2, SC_SLEEP);
+ .@b=getarg(3, BL_MOB);
getmapxy(.@m$, .@x, .@y, 0);
- .@c=getunits(BL_MOB, .@mbs, false, .@m$, .@x-.@r, .@y-.@r, .@x+.@r, .@y+.@r);
+ .@c=getunits(.@b, .@mbs, false, .@m$, .@x-.@r, .@y-.@r, .@x+.@r, .@y+.@r);
for (.@i = 0; .@i < .@c; .@i++) {
- sc_start SC_SLEEP, .@d, 1, 10000, SCFLAG_NONE, .@mbs[.@i];
+ sc_start .@s, .@d, 1, 10000, SCFLAG_NONE, .@mbs[.@i];
specialeffect(FX_BUFF, AREA, .@mbs[.@i]);
}
return;