diff options
author | Jesusaves <cpntb1@ymail.com> | 2023-07-15 01:19:37 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2023-07-15 01:19:37 -0300 |
commit | 2bfc86d33bc0866fd983fa9403757064c965b982 (patch) | |
tree | bdef0ea4fa66e99c128900f2dae7fbfe92226692 /npc | |
parent | 7ff93f597891cce40123724a60a51b4c9e16806f (diff) | |
download | serverdata-2bfc86d33bc0866fd983fa9403757064c965b982.tar.gz serverdata-2bfc86d33bc0866fd983fa9403757064c965b982.tar.bz2 serverdata-2bfc86d33bc0866fd983fa9403757064c965b982.tar.xz serverdata-2bfc86d33bc0866fd983fa9403757064c965b982.zip |
Expand areasc3 so it can be used by NPCs
Diffstat (limited to 'npc')
-rw-r--r-- | npc/items/grenade.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/npc/items/grenade.txt b/npc/items/grenade.txt index 12a314b4b..57eca2fb2 100644 --- a/npc/items/grenade.txt +++ b/npc/items/grenade.txt @@ -78,7 +78,7 @@ function script areasc2 { return; } -// areasc3(range, time, sc, bl, val1, val2, filter) +// areasc3(range, time, sc, bl, val1, val2, filter, target) // 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 { @@ -89,8 +89,9 @@ function script areasc3 { .@v1=getarg(4, 1); .@v2=getarg(5, 1); .@f$=getarg(6, "filter_notme"); + .@t=getarg(7, playerattached()); - getmapxy(.@m$, .@x, .@y, 0); + getmapxy(.@m$, .@x, .@y, getunittype(.@t), .@t); .@c=getunits(.@b, .@mbs, false, .@m$, .@x-.@r, .@y-.@r, .@x+.@r, .@y+.@r); for (.@i = 0; .@i < .@c; .@i++) { // Filtering |