summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/012-1/_import.txt1
-rw-r--r--npc/012-1/guards.txt282
2 files changed, 283 insertions, 0 deletions
diff --git a/npc/012-1/_import.txt b/npc/012-1/_import.txt
index f9c6ef80f..70918df18 100644
--- a/npc/012-1/_import.txt
+++ b/npc/012-1/_import.txt
@@ -4,6 +4,7 @@
"npc/012-1/_warps.txt",
"npc/012-1/andrei.txt",
"npc/012-1/dyrinthetraveler.txt",
+"npc/012-1/guards.txt",
"npc/012-1/gwendolyn.txt",
"npc/012-1/jack.txt",
"npc/012-1/locamit.txt",
diff --git a/npc/012-1/guards.txt b/npc/012-1/guards.txt
new file mode 100644
index 000000000..acbaa2713
--- /dev/null
+++ b/npc/012-1/guards.txt
@@ -0,0 +1,282 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Protect Hurnscald
+
+012-1,71,24,0 script Lieutenant Paul NPC_PLAYER,{
+ // The Monster King guild have a special menu
+ if (strcharinfo(2) == "Monster King") goto L_MKControl;
+ mesn;
+ mesq l("Sorry, the path to Hurnscald has been locked due to monsters.");
+ next;
+ mesn;
+ mesq l("Andrei Sakar is on the other side of this gate, killing monsters, as we speak.");
+ next;
+ mesn;
+ mesq l("The path will be open when it's safe again for heavily armed travellers.");
+ if (GHQUEST)
+ GHQ_Assign(Snake, "Hurnscald", "250.000 GP");
+ end;
+
+L_MKControl:
+ mesn;
+ mes l("Oh noes! You've found the Hurnscald control panel!");
+ menu
+ l("Initiate small siege (lv. 20)"), L_MKSmall,
+ l("Initiate medium siege (lv. 30)"), L_MKMedium,
+ l("Initiate huge siege (lv. 40)"), L_MKHuge,
+ l("Abort"), -;
+ close;
+
+L_MKSmall:
+ addmapmask "012-1", 2;
+ changemusic "012-1", "mythica.ogg";
+ disablenpc("Mana Stone");
+ $@SIEGE_HALI=0; // factor zero
+ pvpon("012-1");
+ pvpon("010-2");
+ announce(l("##1WARNING! WARNING! Siege starting at Hurnscald!!"), bc_all);
+ areamonster("010-2", 0, 0, 79, 81, l("Black Scorpion"), 1074, 15, "Lieutenant Jacob::OnBlackScorpionDeath");
+ initnpctimer;
+ close;
+
+L_MKMedium:
+ addmapmask "012-1", 2;
+ changemusic "012-1", "eric matyas - ghoulish fun.ogg";
+ disablenpc("Mana Stone");
+ $@SIEGE_HALI=1; // factor one
+ pvpon("012-1");
+ pvpon("010-2");
+ announce(l("##1WARNING! WARNING! Siege starting at Hurnscald!!"), bc_all);
+ areamonster("010-2", 0, 0, 79, 81, l("Black Scorpion"), 1074, 25, "Lieutenant Jacob::OnBlackScorpionDeath");
+ initnpctimer;
+ close;
+
+L_MKHuge:
+ addmapmask "012-1", 2;
+ changemusic "012-1", "misuse.ogg";
+ disablenpc("Mana Stone");
+ $@SIEGE_HALI=5; // factor five
+ pvpon("012-1");
+ pvpon("010-2");
+ announce(l("##1WARNING! WARNING! Siege starting at Hurnscald!!"), bc_all);
+ areamonster("010-2", 0, 0, 79, 81, l("Black Scorpion"), 1074, 40, "Lieutenant Jacob::OnBlackScorpionDeath");
+ initnpctimer;
+ close;
+
+OnBlackScorpionDeath:
+ areamonster("010-2", 0, 0, 79, 81, l("Black Scorpion"), 1074, 1, "Lieutenant Jacob::OnBlackScorpionDeath");
+ if (rand(10000) <= 90+($@SIEGE_HALI*10))
+ getitem StrangeCoin, 1;
+ end;
+
+OnBlackScorpion2Death:
+ areamonster("012-1", 0, 0, 120, 155, l("Black Scorpion"), 1074, 1, "Lieutenant Jacob::OnBlackScorpion2Death");
+ if (rand(10000) <= 850+($@SIEGE_HALI*100))
+ getitem StrangeCoin, 1;
+ end;
+
+OnGreenSlimeDeath:
+ areamonster("012-1", 0, 0, 120, 155, l("Green Slime"), 1085, 1, "Lieutenant Jacob::OnGreenSlimeDeath");
+ if (rand(10000) <= 200+($@SIEGE_HALI*100))
+ getitem StrangeCoin, 1;
+ end;
+
+OnCandiedSlimeDeath:
+ areamonster("012-1", 0, 0, 120, 155, l("Candied Slime"), 1089, 1, "Lieutenant Jacob::OnCandiedSlimeDeath");
+ if (rand(10000) <= 150+($@SIEGE_HALI*100))
+ getitem StrangeCoin, 1;
+ end;
+
+OnManaGhostDeath:
+ areamonster("012-1", 0, 0, 120, 155, l("Mana Ghost"), 1068, 1, "Lieutenant Jacob::OnManaGhostDeath");
+ if (rand(10000) <= 900+($@SIEGE_HALI*100))
+ getitem StrangeCoin, 1;
+ end;
+
+OnLieutenantDeath:
+ getitem StrangeCoin, 1;
+ Karma=Karma+1;
+ mapannounce("012-1", l("##2The Monster Lieutenant was defeated by @@!", strcharinfo(0)), bc_map);
+ end;
+
+OnColonelDeath:
+ getitem StrangeCoin, 1;
+ Karma=Karma+1;
+ $MOST_HEROIC$=strcharinfo(0);
+ mapannounce("012-1", l("##2The Monster Colonel was defeated by @@!", strcharinfo(0)), bc_map);
+ end;
+
+OnTimer5000:
+ areamonster("010-2", 0, 0, 79, 81, "Black Scorpion", 1074, 5+$@SIEGE_HALI, "Lieutenant Jacob::OnBlackScorpionDeath");
+ areamonster("012-1", 0, 0, 120, 155, "Black Scorpion", 1074, 5+$@SIEGE_HALI, "Lieutenant Jacob::OnBlackScorpion2Death");
+ mapannounce("012-1", "##2Message to all Hurnscald NPCs: Take shelter!", bc_map);
+ disablenpc "Lynn The Traveler";
+ end;
+
+OnTimer15000:
+ areamonster("010-2", 0, 0, 79, 81, ("Black Scorpion"), 1074, 5, "Lieutenant Jacob::OnBlackScorpionDeath");
+ areamonster("012-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 10, "Lieutenant Jacob::OnBlackScorpion2Death");
+ end;
+
+OnTimer60000:
+ if ($@SIEGE_HALI == 1) {
+ mapannounce("012-1", "##1The Monster Lieutenant arrived!", bc_map);
+ areamonster("012-1", 0, 0, 120, 155, ("Monster Lieutenant"), 1077, 1, "Lieutenant Jacob::OnLieutenantDeath");
+ }
+ areamonster("012-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 3, "Lieutenant Jacob::OnBlackScorpion2Death");
+ areamonster("012-1", 0, 0, 120, 155, ("Green Slime"), 1085, 10+$@SIEGE_HALI, "Lieutenant Jacob::OnGreenSlimeDeath");
+ areamonster("012-1", 0, 0, 120, 155, ("Candied Slime"), 1089, 1+$@SIEGE_HALI, "Lieutenant Jacob::OnCandiedSlimeDeath");
+ end;
+
+OnTimer120000:
+ if ($@SIEGE_HALI == 5) {
+ mapannounce("012-1", "##1The Monster Colonel arrived!", bc_map);
+ areamonster("012-1", 0, 0, 120, 155, ("Monster Colonel"), 1036, 1, "Lieutenant Jacob::OnColonelDeath");
+ }
+ areamonster("012-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 15);
+ areamonster("012-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 1, "Lieutenant Jacob::OnBlackScorpion2Death");
+ areamonster("012-1", 0, 0, 120, 155, ("Green Slime"), 1085, 10, "Lieutenant Jacob::OnGreenSlimeDeath");
+ areamonster("012-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 2, "Lieutenant Jacob::OnManaGhostDeath");
+ end;
+
+OnTimer180000:
+ areamonster("012-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 25);
+ areamonster("012-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 1, "Lieutenant Jacob::OnBlackScorpion2Death");
+ areamonster("012-1", 0, 0, 120, 155, ("Candied Slime"), 1089, 10, "Lieutenant Jacob::OnCandiedSlimeDeath");
+ areamonster("012-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 2, "Lieutenant Jacob::OnManaGhostDeath");
+ end;
+
+OnTimer240000:
+ areamonster("012-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 25);
+ areamonster("012-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 1, "Lieutenant Jacob::OnBlackScorpion2Death");
+ areamonster("012-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 2, "Lieutenant Jacob::OnManaGhostDeath");
+ end;
+
+OnTimer300000:
+ areamonster("012-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 5);
+ areamonster("012-1", 0, 0, 120, 155, ("Candied Slime"), 1089, 1, "Lieutenant Jacob::OnCandiedSlimeDeath");
+ areamonster("012-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 1, "Lieutenant Jacob::OnManaGhostDeath");
+ end;
+
+OnTimer360000:
+OnTimer420000:
+OnTimer480000:
+ areamonster("012-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 5+$@SIEGE_HALI);
+ areamonster("012-1", 0, 0, 120, 155, ("Red Slime"), 1092, 1+$@SIEGE_HALI);
+ end;
+
+OnTimer540000:
+ mapannounce("012-1", "##1The Monster Army is getting tired of resistance!", bc_map);
+ areamonster("012-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 5+$@SIEGE_HALI);
+ areamonster("012-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 1, "Lieutenant Jacob::OnManaGhostDeath");
+ end;
+
+OnTimer600000:
+ mapannounce("012-1", "##1The Monster King army is preparing to withdraw!", bc_map);
+ end;
+
+OnTimer630000:
+ removemapmask "012-1", 2;
+ changemusic "012-1", "dragon_and_toast.ogg"; // Restore to default
+ enablenpc("Mana Stone");
+ $@SIEGE_HALI$=0;
+ killmonsterall("012-1", 0);
+ killmonsterall("010-2", 0);
+ pvpoff("012-1");
+ announce(("Hurnscald siege is over!"), bc_all);
+ enablenpc "Lynn The Traveler";
+ stopnpctimer;
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 4;
+
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, Bull);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, LegionTrainingShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_SHIELD, LousyMoccasins); // TODO FIXME: Display Boots
+ setunitdata(.@npcId, UDT_WEAPON, ArtisBacksword);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 12);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 15);
+
+ end;
+}
+
+// Handle Guard's logic
+function script CheckpointGuard {
+ mesn;
+ mesq l("I am stationed here to protect Hurnscald from monsters.");
+ next;
+ mesn;
+ mesq l("If the Monster King attack, I will try to control inbound monsters here.");
+ close;
+ return;
+}
+
+012-1,81,18,0 script Checkpoint Guard#1 NPC_GUARD2,{
+ CheckpointGuard();
+ end;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+
+
+012-1,26,60,0 script Checkpoint Guard#2 NPC_GUARD1,{
+ CheckpointGuard();
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
+012-1,80,98,0 script Checkpoint Guard#3 NPC_GUARD2,{
+ CheckpointGuard();
+ end;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+
+
+012-1,134,98,0 script Checkpoint Guard#4 NPC_GUARD1,{
+ CheckpointGuard();
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
+012-1,94,56,0 script Guard#012-1.1 NPC_GUARD1,{
+ legiontalk;
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
+
+012-1,112,65,0 script Guard#012-1.2 NPC_GUARD2,{
+ legiontalk;
+ end;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
+