summaryrefslogtreecommitdiff
path: root/npc/025-1
diff options
context:
space:
mode:
Diffstat (limited to 'npc/025-1')
-rw-r--r--npc/025-1/ctrl.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/npc/025-1/ctrl.c b/npc/025-1/ctrl.c
index 71e11cf7a..e96a9ea53 100644
--- a/npc/025-1/ctrl.c
+++ b/npc/025-1/ctrl.c
@@ -53,10 +53,10 @@ function script FTCleanup {
//killmonsterall
// Main gate
if ($FORTRESS_STATE) {
- disablenpc "Fortress Gate";
+ disablenpc "Fortress";
donpcevent "#025-1_99_112::OnDisable";
} else {
- enablenpc "Fortress Gate";
+ enablenpc "Fortress";
donpcevent "#025-1_99_112::OnEnable";
mapwarp("025-1", "025-2", 100, 27);
}
@@ -108,7 +108,7 @@ function script FTStatue {
// NPC SCRIPTS
// Main gate - Also where the World Hero can begin the siege
-025-1,100,112,0 script Fortress Gate NPC_NO_SPRITE,{
+025-1,99,112,0 script Fortress NPC_NO_SPRITE,{
// Main Story block - WHAT
if ($GAME_STORYLINE < 3)
die();
@@ -145,7 +145,8 @@ function script FTStatue {
// TODO: Initial defending waves
// TODO: Enable the statues
// TODO: Summon reinforcements
- // TODO: Player blacklist (unable to use 025-2 warp)
+ // Player blacklist (unable to use 025-2 warp)
+ maptimer2("025-1", 10, "Fortress::OnMPBlacklist");
close;
/////////////////////////////////////////////////////////
@@ -158,10 +159,23 @@ OnOpenGate:
OnTimer30000:
.@breach=($@FORTRESS_STATUE & 1024);
+ .@ppl=getmapusers("025-1");
+ // Fail condition
+ if (.@ppl <= 0) {
+ kamibroadcast("Players failed to conquest the Fortress Island!");
+ FTCleanup($FORTRESS_STATE);
+ end;
+ }
+
// TODO: Spawn mobs
+ // TODO: Map Timer
initnpctimer;
end;
+/////////////////////////////////////////////////////////
+OnMPBlacklist:
+ array_push($@FORT_BLACKLIST, getcharid(0));
+ end;
/////////////////////////////////////////////////////////
OnInit:
@@ -170,12 +184,10 @@ OnInit:
OnTue0000:
FTCleanup(false);
- enablenpc .name$;
end;
OnConquest:
FTCleanup(true);
- disablenpc .name$;
end;
}