From d9fc1b9e39d08f002ac488fee12bd27b1b27bd8c Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 27 Feb 2020 13:05:38 -0300 Subject: [MQ2.5] Trigger conditions --- npc/003-0/mainquest.txt | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'npc') diff --git a/npc/003-0/mainquest.txt b/npc/003-0/mainquest.txt index db737a704..be32fc935 100644 --- a/npc/003-0/mainquest.txt +++ b/npc/003-0/mainquest.txt @@ -10,7 +10,24 @@ OnTouch: .@m$=getmap(); .@n$=instance_npcname(.name$); - .@ni=is_night(); + if (is_night()) + doevent instance_npcname(.name$)+"::OnBegin"; + else + addtimer 1000, instance_npcname(.name$)+"::OnCheck"; + end; + +// Checks if you are in designated ambush zone. If not, keep hidden +OnCheck: + .@m$=getmap(); + .@n$=instance_npcname(.name$); + if (!isin(.@m$, 44, 24, 54, 34)) + end; + // goto OnBegin; + +// Begin +OnBegin: + .@m$=getmap(); + .@n$=instance_npcname(.name$); dispbottom col(l("SCRIPT ERROR (%s/%s)", .@m$, .@n$), 1); end; @@ -27,7 +44,11 @@ OnInstanceInit: } 003-0,49,24,4 script Professor#003-0 NPC_PLAYER,{ - studenttalk(); + npctalkonce l("I wonder if it'll take too long for the ship to arrive..."); + end; + +OnTouchNPC: + npctalk ("SCRIPT ERROR (OnTouch Game Over)"); end; OnInit: -- cgit v1.2.3-60-g2f50