From bb6e583a0375cef7c2a4c75e4a9a3ca0a8d8c01b Mon Sep 17 00:00:00 2001 From: Atemo Date: Thu, 10 Oct 2019 21:34:09 +0200 Subject: [PATCH] Added game ID check for Horror toy factory instance (#4383) * Some parts of the script needed to check if the monster still exists --- npc/re/instances/HorrorToyFactory.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/npc/re/instances/HorrorToyFactory.txt b/npc/re/instances/HorrorToyFactory.txt index 8d5d3848f2..17bcd17524 100644 --- a/npc/re/instances/HorrorToyFactory.txt +++ b/npc/re/instances/HorrorToyFactory.txt @@ -1214,7 +1214,7 @@ OnStart: OnStart: .@event$ = instance_npcname( strnpcinfo(0) ) + "::OnMyMobDead"; killmonster 'xm_d_map$, .@event$; - while (1) { + while (unitexists('celene_id) == true) { getunitdata 'celene_id, .@data; .@x = .@data[UMOB_X] + rand(1,20) - 10; .@y = .@data[UMOB_Y] + rand(1,20) - 10; @@ -1542,7 +1542,8 @@ OnTimer1000: 1@xm_d,3,1,3 script #adsw2 CLEAR_NPC,{ if (callfunc("F_GM_NPC",1854,0) == 1) { - getunitdata 'Antonio, .@mob; + if (unitexists('Antonio) == true) + getunitdata 'Antonio, .@mob; mapannounce 'xm_d_map$, "Factory announcement: Exist in " + .@mob[UMOB_X] + " - " + .@mob[UMOB_Y] + ".",bc_map,"0x00ff44"; } end; @@ -1601,7 +1602,6 @@ OnInstanceInit: hideonnpc instance_npcname("#eff_f0" + .@i); disablenpc instance_npcname("#bssk01"); disablenpc instance_npcname("#bssk02"); - hideonnpc instance_npcname("#bssk02"); for ( .@i = 1; .@i < 5; ++.@i ) hideonnpc instance_npcname("#crssk" + .@i); disablenpc instance_npcname("#kimion1");