From 8319f7dd320b82bbe52a0215df8282f01f6029dd Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Oct 2018 13:38:57 -0200 Subject: 021-1 Caves - Complete, including logic and quest. Missing: Random Yeti Spawn when a switch is pulled, 021-4 logic, Cindy, Angela. --- npc/021-1/logic.txt | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'npc/021-1/logic.txt') diff --git a/npc/021-1/logic.txt b/npc/021-1/logic.txt index 7908ad31f..3195be1d9 100644 --- a/npc/021-1/logic.txt +++ b/npc/021-1/logic.txt @@ -22,15 +22,32 @@ function script CindySwitch_Check_211 { } // Passages -021-1,155,196,0 script #MainCindyLogic NPC_NO_SPRITE,0,0,{ +021-1,155,196,0 script #0211Logic NPC_NO_SPRITE,0,0,{ end; OnTouch: .@q=getq(NivalisQuest_Cindy); if (.@q < 3) end; if ($@CINDY_STATE > gettimetick(2) || $@CINDY_STATE == 0) goto L_Safe; if ($@CINDY_STATE % 2 == 0) goto L_Blocked; - if (CindySwitch_Check_211() == 5) - warp "021-2", 80, 102; + if (CindySwitch_Check_211() == 5) { + .@pos=rand(0,8); + if (.@q == 4) + warp "021-1", .xp[.@pos], .yp[.@pos]; + else + warp "021-2", 80, 102; + } else { + switch (CindySwitch_Check_211()) { + case 0: + case 1: + end; + case 2: + case 3: + dispbottom l("A few switches aren't triggered yet."); break; + case 4: + case 5: + dispbottom l("A single switch is not online - Cannot pass without all of them on."); break; + } + } end; L_Blocked: @@ -40,6 +57,11 @@ L_Blocked: L_Safe: dispbottom l("There's no reason to enter these caves now."); end; + +OnInit: + setarray .xp, 25, 43, 97, 142, 274, 52, 36, 52, 120; + setarray .yp, 300, 300, 300, 300, 299, 176, 79, 77, 73; + end; } 021-1,136,29,0 script #FrostiaGateway NPC_NO_SPRITE,0,0,{ -- cgit v1.2.3-70-g09d2