summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/level1-summon-maggots.txt
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-05-13 19:06:56 -0400
committermekolat <mekolat@users.noreply.github.com>2016-05-13 19:06:56 -0400
commit86eb5a8857b04c2479f1d46a65847336e6f01a23 (patch)
tree36ff112b93064e10c6de7938526c8f110e7fb8e2 /world/map/npc/magic/level1-summon-maggots.txt
parent6012e5bba5416d04ca3753fce60474b7d3e8c186 (diff)
downloadserverdata-86eb5a8857b04c2479f1d46a65847336e6f01a23.tar.gz
serverdata-86eb5a8857b04c2479f1d46a65847336e6f01a23.tar.bz2
serverdata-86eb5a8857b04c2479f1d46a65847336e6f01a23.tar.xz
serverdata-86eb5a8857b04c2479f1d46a65847336e6f01a23.zip
add caster checks to summon spells
Diffstat (limited to 'world/map/npc/magic/level1-summon-maggots.txt')
-rw-r--r--world/map/npc/magic/level1-summon-maggots.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/world/map/npc/magic/level1-summon-maggots.txt b/world/map/npc/magic/level1-summon-maggots.txt
index 49022635..28e99a87 100644
--- a/world/map/npc/magic/level1-summon-maggots.txt
+++ b/world/map/npc/magic/level1-summon-maggots.txt
@@ -27,6 +27,8 @@ OnCast:
end;
OnSummon:
+ if(get(Hp, .master) < 1) destroy; // destroy if master is missing
+ if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
specialeffect FX_PENTAGRAM_BURST;
set .@i, 0;
set .@x, getnpcx();
@@ -42,7 +44,7 @@ S_SummonAll:
summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1002, 2, .lifetime;
set .@i, .@i + 1;
if (.@i < .count) goto S_SummonAll;
- return;
+ destroy;
OnInit:
set .school, SKILL_MAGIC_ASTRAL;