diff options
-rw-r--r-- | db/re/item_db.conf | 15 | ||||
-rw-r--r-- | npc/items/grenade.txt | 17 |
2 files changed, 32 insertions, 0 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf index a3b3ed0ae..c3458b69b 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -15966,6 +15966,21 @@ item_db: ( doevent "rand_mp_heal::OnUse"; "> }, +{ + Id: 8019 + AegisName: "ScentGrenade" + Name: "Scented Grenade" + Type: "IT_USABLE" + Buy: 700 + Sell: 350 + Weight: 40 + Refine: false + Delay: 500 + UseEffect: "FX_SMOKEBOMB" + Script: <" + callfunc "massprovoke", rand(3,9); + "> +}, ) diff --git a/npc/items/grenade.txt b/npc/items/grenade.txt index 40959ad94..226712691 100644 --- a/npc/items/grenade.txt +++ b/npc/items/grenade.txt @@ -65,3 +65,20 @@ function script areasc2 { return; } +// massprovoke(range, {map, x, y}) - player only +function script massprovoke { + getmapxy(.@m$, .@x, .@y, 0); + .@r=getarg(0, 3); + .@m$=getarg(1, .@m$); + .@x=getarg(2, .@x); + .@y=getarg(3, .@y); + + .@c=getunits(BL_MOB, .@mbs, false, .@m$, .@x-.@r, .@y-.@r, .@x+.@r, .@y+.@r); + for (.@i = 0; .@i < .@c; .@i++) { + //sc_start .@s, .@d, 1, 10000, SCFLAG_NONE, .@mbs[.@i]; + aggravate .@mbs[.@i]; + specialeffect(FX_MAGIC, AREA, .@mbs[.@i]); + } + return; +} + |