From 3494e50116dfaed4499b9570ef7365a5e2b1d233 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 20 Sep 2021 20:46:50 -0300 Subject: Catch an error at Peter but ignore others --- npc/002-1/peter.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'npc/002-1') 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$ == "") { -- cgit v1.2.3-60-g2f50