// TMW2 scripts.
// Authors:
// Jesusalva
// Description:
// Protect Halinarzo
009-1,71,24,0 script Lieutenant Jacob NPC_PLAYER,{
// The Monster King guild have a special menu
if (strcharinfo(2) == "Monster King") goto L_MKControl;
mesn;
mesq l("Halt! Beyond this gate, is the Great River and the Eternal Swamps.");
next;
mesn;
mesq l("Was not it only flooded constantly, the graveyard is not too far. If you stray away from the path, you'll get lost.");
next;
.@fd=!(getmapmask("011-3")&1024); // .@fd - is flooded?
if (!.@fd && $GAME_STORYLINE >= 1) {
mesn;
// There's a limit on how much info I can send with @@
mesq l("Various people already went missing, including GMs. This is why if you plan to cross, ") + b(l("You won't be allowed to walk sideways, except to avoid a monster or two."));
mesc l("If you try to walk west or east too much, you'll hit an \"invisible wall\" to prevent you from getting lost.");
next;
select
l("I'm fine, thanks."),
l("My equipment is good, let me through!");
mes "";
if (@menu == 2) {
if (BaseLevel < 20) {
mesn;
.@palgal$=lg("gal", "pal");
mesq l("It might be, but your level isn't. Sorry @@. No going to Hurnscald before level 20.", .@palgal$);
close;
}
warp "011-3", 37, 219;
closedialog;
close;
}
} else {
mesn;
mesq l("In fact, it is flooded at the moment. Come back later.");
next;
}
if (GHQUEST)
GHQ_Assign(Snake, "Halinarzo");
close;
L_MKControl:
mesn;
mes l("Oh noes! You've found the Halinarzo control panel!");
next;
select
l("Abort"),
l("Initiate a siege");
mes "";
if (@menu == 2) {
doevent "Lieutenant Jacob::OnStartSiege";
closedialog;
}
close;
OnMKSiege:
$@SIEGE_HALIN=rand(1,10);
OnStartSiege:
siege_setup("010-2");
kamibroadcast(col("WARNING! WARNING! Monster Army marching towards Halinarzo!!",1));
siege_cast("010-2", .name$, 0, TP_TULIM);
disablenpc "Sawis";
initnpctimer;
end;
// Timers
OnTimer35000:
siege_setup("009-1");
siege_cast("010-2", .name$, $@SIEGE_HALIN, TP_TULIM);
mapannounce("009-1", "##2Message to all Halinarzo NPCs: Take shelter!", bc_map);
disablenpc "Fisherman";
disablenpc "Charles, Trader King";
disablenpc "Lynn The Traveler";
disablenpc "Enliven Reva Foxhound";
disablenpc "Ryan";
disablenpc "Bella, the Scholar";
disablenpc "Book Keeper";
disablenpc "Yumi";
disablenpc "Halinarzo's Nurse";
disablenpc "Joaquim";
disablenpc "Alvasus";
disablenpc "Luanna";
end;
OnTimer65000:
siege_cast("009-1", .name$, 0, TP_TULIM);
siege_cast("010-2", .name$, $@SIEGE_HALIN, TP_TULIM);
disablenpc "Dang Rostra";
disablenpc "Kevin";
disablenpc "Barzil";
end;
OnTimer96000:
siege_cast("009-1", .name$, $@SIEGE_HALIN, TP_TULIM);
end;
OnTimer180000:
siege_boss("009-1", $@SIEGE_HALIN);
siege_cast("009-1", .name$, $@SIEGE_HALIN, TP_TULIM);
end;
// At certain moments, the difficulty rises
OnTimer210000:
OnTimer420000:
OnTimer540000:
$@SIEGE_HALIN+=1;
// Spawn each 45s after timer 120, difficulty raisers exempt (same for boss)
OnTimer120000:
OnTimer165000:
//Timer 180000: BOSS WAVE
//OnTimer210000: difficulty raiser
OnTimer255000:
OnTimer300000:
OnTimer345000:
OnTimer390000:
//Timer 420000: difficulty raiser
OnTimer435000:
OnTimer480000:
OnTimer525000:
//OnTimer540000: difficulty raiser
OnTimer570000:
siege_cast("009-1", .name$, $@SIEGE_HALIN, TP_TULIM);
end;
OnTimer600000:
mapannounce("009-1", "##1The Monster Army is getting tired of resistance!", bc_map);
siege_cast("009-1", .name$, $@SIEGE_HALIN, TP_TULIM);
end;
OnTimer660000:
$@MK_SCENE=MK_NONE;
$@MK_AGGRO=$@MK_AGGRO/20;
mapannounce("009-1", "##1The Monster King army is preparing to withdraw!", bc_map);
end;
OnTimer690000:
siege_revert("009-1");
siege_revert("010-2");
enablenpc("Mana Stone");
$@SIEGE_HALIN=0;
announce(("Halinarzo siege is over!"), bc_all);
enablenpc "Sawis";
enablenpc "Fisherman";
enablenpc "Charles, Trader King";
enablenpc "Lynn The Traveler";
enablenpc "Enliven Reva Foxhound";
enablenpc "Ryan";
enablenpc "Bella, the Scholar";
enablenpc "Book Keeper";
enablenpc "Yumi";
enablenpc "Halinarzo's Nurse";
enablenpc "Joaquim";
enablenpc "Alvasus";
enablenpc "Luanna";
enablenpc "Dang Rostra";
enablenpc "Kevin";
enablenpc "Barzil";
stopnpctimer;
end;
OnInit:
.sex = G_MALE;
.distance = 4;
// Check items.xml for info about this.
.@npcId = getnpcid();
setunitdata(.@npcId, UDT_HEADTOP, Bull);
setunitdata(.@npcId, UDT_HEADMIDDLE, LieutenantArmor);
setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
setunitdata(.@npcId, UDT_SHIELD, LousyMoccasins); // TODO FIXME: Display Boots
setunitdata(.@npcId, UDT_WEAPON, Backsword);
setunitdata(.@npcId, UDT_HAIRSTYLE, 12);
setunitdata(.@npcId, UDT_HAIRCOLOR, 15);
end;
}
// Handle Guard's logic
function script HaliGuardHandler {
legiontalk;
return;
}
009-1,100,30,0 script Guard Corina NPC_GUARD2,{
HaliGuardHandler();
end;
OnInit:
.sex = G_OTHER;
.distance = 5;
end;
}
009-1,111,48,0 script Guard Jhon NPC_GUARD1,{
HaliGuardHandler();
end;
OnInit:
.sex = G_OTHER;
.distance = 5;
end;
}
009-1,41,56,0 script Guard Laurie NPC_GUARD2,{
HaliGuardHandler();
end;
OnInit:
.sex = G_OTHER;
.distance = 5;
end;
}
009-1,62,74,0 script Guard Amy NPC_GUARD2,{
HaliGuardHandler();
end;
OnInit:
.sex = G_OTHER;
.distance = 5;
end;
}