From fab305565f4621cbf44912b97276d8ba27501f6d Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Sat, 3 Sep 2011 11:36:19 +0200 Subject: add check of return value from attachrid in several scripts --- world/map/npc/042-1/hasan.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'world/map/npc/042-1') diff --git a/world/map/npc/042-1/hasan.txt b/world/map/npc/042-1/hasan.txt index 1d5a67fd..5e9dfdc5 100644 --- a/world/map/npc/042-1/hasan.txt +++ b/world/map/npc/042-1/hasan.txt @@ -193,7 +193,8 @@ OnTimer5000: goto L_Clean; set $@ScorpionTimer, $@ScorpionTimer + 5; if ($@ScorpionTimer >= 300) goto L_Clean; - attachrid(getcharid(3,$@ScorpionFighter$)); + if (attachrid(getcharid(3,$@ScorpionFighter$)) == 0) + end; if (PC_DIE_COUNTER > $@ScorpDeath) goto L_Clean; setnpctimer 0; end; @@ -224,11 +225,11 @@ OnInit: OnTouch: end; - if ($@scorp && $@ScorpionFighter$ == strcharinfo(0)) + if ($@scorp && $@ScorpionFighter$ == strcharinfo(0)) end; if ((FLAGS & FLAG_TUTORIAL_DONE) || (hasan == 4)) end; - if ($@scorp && $@ScorpionFighter$ != strcharinfo(0)) + if ($@scorp && $@ScorpionFighter$ != strcharinfo(0)) goto L_Scared; L_Normal: -- cgit v1.2.3-60-g2f50