diff options
Diffstat (limited to 'npc/items/grenade.txt')
-rw-r--r-- | npc/items/grenade.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/npc/items/grenade.txt b/npc/items/grenade.txt index f2e749ba9..0275606b4 100644 --- a/npc/items/grenade.txt +++ b/npc/items/grenade.txt @@ -74,6 +74,30 @@ function script areasc2 { return; } +// areasc3(range, time, sc, bl, val1, val2, filter) +// Defaults to 3x3 square, sleep mob for 500ms. Ignores you. +// Need a player caster. Valid BL: BL_MOB | BL_PC | BL_HOM | BL_MER +function script areasc3 { + .@r=getarg(0, 3); + .@d=getarg(1, 500); + .@s=getarg(2, SC_SLEEP); + .@b=getarg(3, BL_MOB); + .@v1=getarg(4, 1); + .@v2=getarg(5, 1); + .@f$=getarg(6, "filter_notme"); + + getmapxy(.@m$, .@x, .@y, 0); + .@c=getunits(.@b, .@mbs, false, .@m$, .@x-.@r, .@y-.@r, .@x+.@r, .@y+.@r); + for (.@i = 0; .@i < .@c; .@i++) { + // Filtering + if (!callfunc(.@f$, .@mbs[.@i])) + continue; + sc_start2 .@s, .@d, .@v1, .@v2, 10000, SCFLAG_NONE, .@mbs[.@i]; + specialeffect(FX_BUFF, AREA, .@mbs[.@i]); + } + return; +} + // massprovoke(range, {map, x, y}) - player only function script massprovoke { getmapxy(.@m$, .@x, .@y, 0); |