summaryrefslogtreecommitdiff
path: root/npc/002-1
diff options
context:
space:
mode:
Diffstat (limited to 'npc/002-1')
-rw-r--r--npc/002-1/peter.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/npc/002-1/peter.txt b/npc/002-1/peter.txt
index 40cb6b375..8589912e8 100644
--- a/npc/002-1/peter.txt
+++ b/npc/002-1/peter.txt
@@ -26,6 +26,7 @@
// @peter = Accepted Task ID
// @pt_mob = ID of the monster you were tasked with killing
+// FIXME: ugly workaround, causes lots of bugs
002-1,35,24,0 script AreaNPC#Peter NPC_HIDDEN,0,1,{
end;
OnTouch:
@@ -175,7 +176,10 @@ OnStartOutside:
.@ID=getcharid(0);
@MAP_NAME$="nard@"+str(.@ID); // Max 4 chars for map name
.@INSTID = instance_create("002-2@a"+(.@ID), getcharid(3), IOT_CHAR);
- .@instanceMapName$ = instance_attachmap("002-2", .@INSTID, 0, @MAP_NAME$);
+ if (.@INSTID < 0)
+ .@instanceMapName$ = "";
+ else
+ .@instanceMapName$ = instance_attachmap("002-2", .@INSTID, 0, @MAP_NAME$);
// Instance already exists, or something went wrong
if (.@instanceMapName$ == "") {