summaryrefslogtreecommitdiff
path: root/npc/items
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-06-18 13:56:58 -0300
committerJesusaves <cpntb1@ymail.com>2019-06-18 13:56:58 -0300
commitf76ab8cd4e54375fd9e87cdca7d772ae755ae7de (patch)
tree080beda483327b844d3aae1f6f3072b39ee82798 /npc/items
parentc2ea974045a9ce9b56972db1886d9de43d6b50f8 (diff)
downloadserverdata-f76ab8cd4e54375fd9e87cdca7d772ae755ae7de.tar.gz
serverdata-f76ab8cd4e54375fd9e87cdca7d772ae755ae7de.tar.bz2
serverdata-f76ab8cd4e54375fd9e87cdca7d772ae755ae7de.tar.xz
serverdata-f76ab8cd4e54375fd9e87cdca7d772ae755ae7de.zip
Smoke grenade now works too, by brute force. It only puts monsters to sleep for 500ms.
Diffstat (limited to 'npc/items')
-rw-r--r--npc/items/grenade.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/npc/items/grenade.txt b/npc/items/grenade.txt
index 218758b8a..13685f0a2 100644
--- a/npc/items/grenade.txt
+++ b/npc/items/grenade.txt
@@ -24,4 +24,19 @@ function script grenade {
}
return;
}
+// TODO: Should not affect boss
+
+// smoke_grenade(range, time) - defaults to 3x3 square, stun for 500ms.
+function script smoke_grenade {
+ .@r=getarg(0, 3);
+ .@d=getarg(1, 500);
+
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@c=getunits(BL_MOB, .@mbs, false, .@m$, .@x-.@r, .@y-.@r, .@x+.@r, .@y+.@r);
+ for (.@i = 0; .@i < .@c; .@i++) {
+ sc_start SC_SLEEP, .@d, 1;
+ specialeffect(FX_ATTACK, AREA, .@mbs[.@i]);
+ }
+ return;
+}