From c3d9873fbf3a5076a3b435e312e748e7e440353c Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 13 Jan 2021 19:05:20 -0300 Subject: Add some progress to Fortress Island. Kinda. Okay, that is a half lie. --- npc/025-1/ctrl.c | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'npc/025-1/ctrl.c') diff --git a/npc/025-1/ctrl.c b/npc/025-1/ctrl.c index 7c0090069..483f70c5f 100644 --- a/npc/025-1/ctrl.c +++ b/npc/025-1/ctrl.c @@ -11,9 +11,9 @@ // 0 - Locked // 1 - Unlocked // $@FORTRESS_STATUE = bitmask -// 1,2,4,8... broken statues +// 1,2,4,8,16 - broken statues +// 1024 - Fortress Gate // TODO: Use bg() - maybe with dummysd? What will increase allies count? -// mapwarp() everyone outside when FTCleanup(false) // TODO: Gate control during siege (not $FORTRESS_STATE). Gate monster. // TODO: Spawn the monster general for each statue. Count their deaths. // TODO: Spawn Monster Governor (and add it) once statue is broken. ::OnConquest @@ -119,19 +119,52 @@ function script FTStatue { // Hey, you can assault the town! mesc ".:: "+l("THE FORTRESS ISLAND TOWN") + " ::.", 1; mes l("Behind this gate, lies the Fortress Island Town."); - //monster(FortressGate, ::OnOpenGate) + next; + mesc ".:: "+l("THE FORTRESS ISLAND TOWN") + " ::.", 1; + mes l("Assault?"); + mesc l("Lorem ipsum dolor sit amet"), 1; + next; + if (askyesno() == ASK_NO) + close; + + // FIRE THE EVENT + disablenpc .name$; + initnpctimer; + + // Spawn the gate + monster("025-1", 99, 113, "Fortress Gate", FortressGate, 1, .name$+"::OnOpenGate"); + // TODO: Initial defending waves + // TODO: Enable the statues + // TODO: Summon reinforcements close; +///////////////////////////////////////////////////////// +OnOpenGate: + // FIXME Broken + $@FORTRESS_STATUE = $@FORTRESS_STATUE|1024; + donpcevent "#025-1_99_112::OnDisable"; + kamibroadcast("The Fortress Town Gate has been breached!"); + close; + +OnTimer30000: + // TODO: Spawn mobs + .@breach=($@FORTRESS_STATUE & 1024); + initnpctimer; + end; + +///////////////////////////////////////////////////////// OnInit: FTCleanup($FORTRESS_STATE); end; OnTue0000: FTCleanup(false); + enablenpc .name$; end; OnConquest: FTCleanup(true); + disablenpc .name$; end; } -- cgit v1.2.3-70-g09d2