From 370a52cf55826372d4ba3a4bedd73eb0ac62a8b9 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 18 Jun 2019 12:44:18 -0300 Subject: Let's hope it works. --- npc/023-3-1/logic.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'npc/023-3-1/logic.txt') diff --git a/npc/023-3-1/logic.txt b/npc/023-3-1/logic.txt index d7b62acea..092e5ac02 100644 --- a/npc/023-3-1/logic.txt +++ b/npc/023-3-1/logic.txt @@ -19,12 +19,12 @@ OnTouch: percentheal -100, -100; return false; } - if (.@q < 3) { // TODO: mobcount()? + if (.@q < 3) { dispbottom l("The magic power outflowing in the room prevents you from leaving."); end; } if (mobcount(.@m$, "#Core02331::OnMobDie")) { - dispbottom l("These assassins will catch to me if I do that now!"); + dispbottom l("These assassins will catch me if I do that now!"); end; } @@ -79,11 +79,13 @@ OnTouch: // Main event core 023-3-1,45,52,0 script #Core02331 NPC_HIDDEN,10,0,{ OnTouch: + if (instance_id() < 0) + end; .@n$=instance_npcname(.name$); .@q=getq3(FrostiaQuest_Homunculus); - if (.@q == 1) { + if (!('c02331init)) { // Begin the event core - setq3 FrostiaQuest_Homunculus, 2; + 'c02331init=true; addtimer(1100, .@n$+"::OnEvent01"); initnpctimer; } @@ -266,9 +268,12 @@ OnMobDie: end; OnTimer1000: - if (getmapusers(instance_mapname("023-3-1"))) + .@m$=instance_mapname("023-3-1"); + if (getmapusers(.@m$)) initnpctimer; - // TODO: Cleanup + // Cleanup - you fail. + 'c02331init=false; + killmonsterall(.@m$); end; } -- cgit v1.2.3-70-g09d2