summaryrefslogtreecommitdiff
path: root/npc/020-1/guards.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-04-29 12:46:44 -0300
committerJesusaves <cpntb1@ymail.com>2019-04-29 12:46:44 -0300
commit0fb884a5ba541d4ef0d5b319110fa547b77998bd (patch)
treee647de3ba1142dead8bd067bfac897c5e4bae2d5 /npc/020-1/guards.txt
parent41323ac303dc7debeb185950577ec68b7f97cfec (diff)
downloadserverdata-0fb884a5ba541d4ef0d5b319110fa547b77998bd.tar.gz
serverdata-0fb884a5ba541d4ef0d5b319110fa547b77998bd.tar.bz2
serverdata-0fb884a5ba541d4ef0d5b319110fa547b77998bd.tar.xz
serverdata-0fb884a5ba541d4ef0d5b319110fa547b77998bd.zip
Sieges at Halinarzo and Nivalis are now possible in theory.
Diffstat (limited to 'npc/020-1/guards.txt')
-rw-r--r--npc/020-1/guards.txt141
1 files changed, 141 insertions, 0 deletions
diff --git a/npc/020-1/guards.txt b/npc/020-1/guards.txt
new file mode 100644
index 000000000..15d8b2122
--- /dev/null
+++ b/npc/020-1/guards.txt
@@ -0,0 +1,141 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Protect Nivalis
+
+020-1,49,48,0 script Lieutenant Joshua NPC_PLAYER,{
+ // The Monster King guild have a special menu
+ if (strcharinfo(2) == "Monster King") goto L_MKControl;
+
+ if ($NIVALIS_LIBDATE) {
+ mesn;
+ mesq l("Nivalis was liberated @@ ago.", FuzzyTime($NIVALIS_LIBDATE));
+ close;
+ } else {
+ legiontalk; end;
+ }
+
+// Respawn monster from $@SIEGE_TMPMOBS memory
+OnRespawn:
+ getmapxy(.@m$,.@x,.@y,0);
+ siege_spawn(.@m$, any_of($@SIEGE_TMPMOBS), 1, .name$+"::OnRespawn");
+ if (rand(10000) <= $coinsrate+($@SIEGE_NIVAL*50))
+ makeitem StrangeCoin, 1, .@m$, .@x, .@y;
+ end;
+
+
+L_MKControl:
+ mesn;
+ mes "Oh noes! You've found the Nivalis control panel!";
+ next;
+ select
+ l("Abort"),
+ l("Initiate a siege");
+ mes "";
+ if (@menu == 2) {
+ doevent "Lieutenant Joshua::OnStartSiege";
+ closedialog;
+ }
+ close;
+
+
+OnMKSiege:
+ $@SIEGE_NIVAL=rand(1,10);
+OnStartSiege:
+ siege_setup("019-2");
+ kamibroadcast(col("WARNING! WARNING! Monster Army marching towards Nivalis!!",1));
+ siege_cast("019-2", .name$, 0, TP_NIVAL);
+ initnpctimer;
+ end;
+
+// Timers
+OnTimer35000:
+ siege_setup("020-1");
+ siege_cast("019-2", .name$, $@SIEGE_NIVAL, TP_NIVAL);
+ mapannounce("020-1", "##2Message to all Nivalis NPCs: Take shelter!", bc_map);
+ disablenpc "Serge";
+ disablenpc "Knox The Traveler";
+ disablenpc "Camilot";
+ disablenpc "Mede";
+ disablenpc "Gambler#020-4";
+ disablenpc "Gambling Xan";
+ disablenpc "Baktar";
+ disablenpc "Bracco";
+ disablenpc "Agostine";
+ end;
+
+OnTimer65000:
+ siege_cast("020-1", .name$, 0, TP_NIVAL);
+ siege_cast("019-2", .name$, $@SIEGE_NIVAL, TP_NIVAL);
+ disablenpc "Ben#NivBanker";
+ end;
+
+OnTimer96000:
+ siege_cast("020-1", .name$, $@SIEGE_NIVAL, TP_NIVAL);
+ end;
+
+OnTimer180000:
+ siege_boss("020-1", $@SIEGE_NIVAL);
+ siege_cast("020-1", .name$, $@SIEGE_NIVAL, TP_NIVAL);
+ end;
+
+// At certain moments, the difficulty rises
+OnTimer210000:
+OnTimer420000:
+OnTimer540000:
+ $@SIEGE_NIVAL+=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("020-1", .name$, $@SIEGE_NIVAL, TP_NIVAL);
+ end;
+
+OnTimer600000:
+ mapannounce("020-1", "##1The Monster Army is getting tired of resistance!", bc_map);
+ siege_cast("020-1", .name$, $@SIEGE_NIVAL, TP_NIVAL);
+ end;
+
+OnTimer660000:
+ $@MK_SCENE=MK_NONE;
+ $@MK_AGGRO=$@MK_AGGRO/20;
+ mapannounce("020-1", "##1The Monster King army is preparing to withdraw!", bc_map);
+ end;
+
+OnTimer690000:
+ siege_revert("020-1");
+ siege_revert("019-2");
+ enablenpc("Mana Stone");
+ $@SIEGE_NIVAL=0;
+ announce(("Nivalis siege is over!"), bc_all);
+ enablenpc "Serge";
+ enablenpc "Knox The Traveler";
+ enablenpc "Camilot";
+ enablenpc "Mede";
+ enablenpc "Gambler#020-4";
+ enablenpc "Gambling Xan";
+ enablenpc "Baktar";
+ enablenpc "Bracco";
+ enablenpc "Agostine";
+ enablenpc "Ben#NivBanker";
+ stopnpctimer;
+ end;
+
+OnInit:
+ end;
+
+
+}
+