summaryrefslogtreecommitdiff
path: root/npc/items
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-07-13 02:22:55 -0300
committerJesusaves <cpntb1@ymail.com>2019-07-13 02:22:55 -0300
commit5c5ddfc208fcaf1387e5ef35b166fdce31093a3c (patch)
treeb4fd44aaa1598f4d23ddaf5b08bad3835dac6a6b /npc/items
parentaf6b207dffef9420388df5f1beb8e786c45c5d0e (diff)
downloadserverdata-5c5ddfc208fcaf1387e5ef35b166fdce31093a3c.tar.gz
serverdata-5c5ddfc208fcaf1387e5ef35b166fdce31093a3c.tar.bz2
serverdata-5c5ddfc208fcaf1387e5ef35b166fdce31093a3c.tar.xz
serverdata-5c5ddfc208fcaf1387e5ef35b166fdce31093a3c.zip
Improve smoke_grenade and rename it to areasc
Diffstat (limited to 'npc/items')
-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;