// TMW2 Script
// Notes: The Monster King will retake the town every
// OnTue0000
// (Tuesday, midnight)
// Only the world hero may begin a siege.
// Only one siege per day is allowed
// Writes to MK Temp Var. This variable will unlock the castle gates
// Then the inner gates, and finally, will be a co-requisite to the floors
// Variables:
// $FORTRESS_STATE = int
// 0 - Locked
// 1 - Unlocked
// MAPFLAGS
025-1 mapflag zone MMO
025-1 mapflag nosave 025-2 100 27
/////////////////////////////////////////
// FUNCTIONS
// FTCleanup(status)
function script FTCleanup {
$FORTRESS_STATE=getarg(0);
//enablenpc
//killmonsterall
return;
}
/////////////////////////////////////////
// NPC SCRIPTS
// Main gate - Also where the World Hero can begin the siege
025-1,100,113,0 script #FortressTown NPC_NO_SPRITE,1,0,{
// Main Story block - WHAT
if ($GAME_STORYLINE < 3)
die();
// Still open
if ($FORTRESS_STATE)
end;
// Only World Hero may interact
if (strcharinfo(0) != $MOST_HEROIC$) {
dispbottom l("I will not assault the Fortress Island. I'll wait for %s.", $MOST_HEROIC$);
end;
}
// Hey, you can assault the town!
mesc ".:: "+l("THE FORTRESS ISLAND TOWN") + " ::.", 1;
mes l("Behind this gate, lies the Fortress Island Town.");
close;
OnTouch:
if ($FORTRESS_STATE)
slide 100, 110;
else
dispbottom l("The fortress is sealed!!");
end;
OnInit:
end;
OnTue0000:
FTCleanup(false);
end;
OnConquest:
FTCleanup(true);
end;
}
// Exit - always work
025-1,99,111,0 script #FortressTownOut NPC_HIDDEN,1,0,{
end;
OnTouch:
slide 100, 114;
end;
}