summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-04-26 00:50:51 -0300
committerJesusaves <cpntb1@ymail.com>2019-04-26 00:50:51 -0300
commitb7e223c55e272e99cd0a01a60979e3e79a888f62 (patch)
treef500637a77c21dd8b5f4258fd976f1ae0315b4ed /npc
parent808378d0e4f6615b6ac55bd76c17e4ff507398c1 (diff)
downloadserverdata-b7e223c55e272e99cd0a01a60979e3e79a888f62.tar.gz
serverdata-b7e223c55e272e99cd0a01a60979e3e79a888f62.tar.bz2
serverdata-b7e223c55e272e99cd0a01a60979e3e79a888f62.tar.xz
serverdata-b7e223c55e272e99cd0a01a60979e3e79a888f62.zip
Game Storyline Interface, past event transitions accounted!
Diffstat (limited to 'npc')
-rw-r--r--npc/001-1/portal.txt5
-rw-r--r--npc/003-1/lieutenantdausen.txt4
-rw-r--r--npc/003-3/malindou.txt9
-rw-r--r--npc/012-1/guards.txt4
-rw-r--r--npc/023-2/mk.txt5
-rw-r--r--npc/commands/kami.txt43
-rw-r--r--npc/functions/gmbot.txt62
7 files changed, 125 insertions, 7 deletions
diff --git a/npc/001-1/portal.txt b/npc/001-1/portal.txt
index e652285fa..c8dbe2e65 100644
--- a/npc/001-1/portal.txt
+++ b/npc/001-1/portal.txt
@@ -65,6 +65,11 @@ L_TranslationFix:
mes l("This item cannot be auctioned.");
mes l("This item cannot be traded.");
mes l("This item cannot be stored.");
+ mes l("I can't handle it anymore! NO MORE!");
+ mes l("Come, my minions! Lay siege to towns! LEAVE NO OPPOSITION TO ME!");
+ mes l("Burn, destroy, do whatever you need, until your last breath, my lieutenants and colonels!");
+
+ mes l("sample");
close;
L_Close:
diff --git a/npc/003-1/lieutenantdausen.txt b/npc/003-1/lieutenantdausen.txt
index 496f25993..46803c7cc 100644
--- a/npc/003-1/lieutenantdausen.txt
+++ b/npc/003-1/lieutenantdausen.txt
@@ -129,7 +129,7 @@ OnMKSiege:
addmapmask "004-1", MASK_MATTACK;
changemusic "003-1", any("mythica.ogg", "eric_matyas_ghouls.ogg", "misuse.ogg", "Arabesque.ogg");
disablenpc("Mana Stone");
- $@SIEGE_TULIM=($@MK_AGGRO/45); // Each 45 aggro raises difficulty in 1
+ $@SIEGE_TULIM=rand(0,10);
pvpon("003-1");
pvpon("004-1");
announce(("##1WARNING! WARNING! Siege starting at Tulimshar!!"), bc_all);
@@ -218,6 +218,7 @@ OnLieutenantDeath:
getitem StrangeCoin, 1;
Karma=Karma+1;
mapannounce("003-1", l("##2The Monster Lieutenant was defeated by @@!", strcharinfo(0)), bc_map);
+ $MK_TEMPVAR+=1;
end;
OnColonelDeath:
@@ -225,6 +226,7 @@ OnColonelDeath:
Karma=Karma+1;
$MOST_HEROIC$=strcharinfo(0);
mapannounce("003-1", l("##2The Monster Colonel was defeated by @@!", strcharinfo(0)), bc_map);
+ $MK_TEMPVAR+=10;
end;
OnTimer5000:
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 697bf85ea..0e637368e 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -291,6 +291,15 @@ OnInit:
debugmes "* Soul Menhir Save Point replaced";
debugmes "";
}
+ // Current UPDATE value: Sex Abr 26 00:12:35 -03 2019
+ // Monster King & Main Storyline System
+ if ($UPDATE < 1556248355) {
+ $GAME_STORYLINE=2;
+ $UPDATE=1556248355;
+ debugmes "";
+ debugmes "* Main Storyline system updated";
+ debugmes "";
+ }
diff --git a/npc/012-1/guards.txt b/npc/012-1/guards.txt
index 49444b9ed..f6b3e1ef4 100644
--- a/npc/012-1/guards.txt
+++ b/npc/012-1/guards.txt
@@ -631,6 +631,7 @@ OnLieutenantDeath:
getitem StrangeCoin, 1;
Karma=Karma+1;
mapannounce("012-1", l("##2The Monster Lieutenant was defeated by @@!", strcharinfo(0)), bc_map);
+ $MK_TEMPVAR+=1;
end;
OnColonelDeath:
@@ -638,6 +639,7 @@ OnColonelDeath:
Karma=Karma+1;
$MOST_HEROIC$=strcharinfo(0);
mapannounce("012-1", l("##2The Monster Colonel was defeated by @@!", strcharinfo(0)), bc_map);
+ $MK_TEMPVAR+=10;
end;
OnMKSiege:
@@ -645,7 +647,7 @@ OnMKSiege:
addmapmask "014-3", MASK_MATTACK;
changemusic "012-1", any("mythica.ogg", "eric_matyas_ghouls.ogg", "misuse.ogg", "Arabesque.ogg");
disablenpc("Mana Stone");
- $@SIEGE_HURNS=($@MK_AGGRO/45); // Each 45 aggro raises difficulty in 1
+ $@SIEGE_HURNS=rand(0,10);
pvpon("012-1");
pvpon("014-3");
announce(("##1WARNING! WARNING! Siege starting at Hurnscald!!"), bc_all);
diff --git a/npc/023-2/mk.txt b/npc/023-2/mk.txt
index facdac748..4ad2d3eb1 100644
--- a/npc/023-2/mk.txt
+++ b/npc/023-2/mk.txt
@@ -9,6 +9,7 @@
end;
OnTouch:
+ npctalk3 get_race() + "!";
percentheal -100, -100;
end;
@@ -67,6 +68,10 @@ L_Finish2:
maptimer("023-2", 10, "The Monster King#NLib::OnReturn");
channelmes("#world", "*FINAL SCORE - PLAYERS "+.victory_count+" : "+.defeat_count+" MONSTERS*");
+ // Game Storyline advances: The Town Blockade Stage is now over
+ $GAME_STORYLINE=1;
+ $MK_TEMP=gettimeparam(GETTIME_DAYOFMONTH)+rand(30,35);
+
// Clean up the event
$NIVALIS_LIBDATE=gettimetick(2);
$NLIB_DAY=0;
diff --git a/npc/commands/kami.txt b/npc/commands/kami.txt
index fa17bc442..a9ff6656d 100644
--- a/npc/commands/kami.txt
+++ b/npc/commands/kami.txt
@@ -30,3 +30,46 @@ OnInit:
bindatcmd "k", "@k::OnCall", 80, 80, 1;
bindatcmd "servmsg", "@k::OnServMsg", 99, 99, 1;
}
+
+// kamibroadcast( message{, sender} )
+function script kamibroadcast {
+ .@msg$=getarg(0);
+ .@snd$=getarg(1, "");
+
+ // Send to #world
+ if (.@snd$ == "")
+ channelmes("#world", .@msg$);
+ else
+ channelmes("#world", "[ "+.@snd$+" ] : "+.@msg$);
+
+ // Make an announce
+ if (.@snd$ == "")
+ announce .@msg$, bc_all|bc_npc;
+ else
+ announce .@snd$+": "+.@msg$, bc_all|bc_npc;
+
+ return;
+}
+
+// Required for GM use in 2019-04-27
+- script @mkdbg 32767,{
+ end;
+OnMsg1to2:
+ detachrid();
+ // Game Story Change: Idle MK -> Active MK
+ kamibroadcast("I can't handle it anymore! NO MORE!", "Monster King");
+ sleep(2500);
+ kamibroadcast("Come, my minions! Lay siege to towns! LEAVE NO OPPOSITION TO ME!", "Monster King");
+ sleep(2500);
+ kamibroadcast("Burn, destroy, do whatever you need, until your last breath, my lieutenants and colonels!", "Monster King");
+ sleep(2500);
+ kamibroadcast("##4 .:: Game Story Instructions on #world ::.");
+ channelmes("#world", "##1 **GAME STORY CHANGE** - The Monster King minions will now attack cities and lay waste to them.");
+ channelmes("#world", "##1 Players must defeat the lieutenants and colonels in order to prevent sieges from continuing.");
+ end;
+
+OnInit:
+ bindatcmd "mkdbgjesus", "@mkdbg::OnMsg1to2", 99, 100, 0;
+ end;
+}
+
diff --git a/npc/functions/gmbot.txt b/npc/functions/gmbot.txt
index f47562a2c..1b6516d90 100644
--- a/npc/functions/gmbot.txt
+++ b/npc/functions/gmbot.txt
@@ -3,6 +3,30 @@
// Jesusalva
// Description:
// GM Bot for the Monster King.
+// VARIABLES
+// $GAME_STORYLINE - Current Storyline status
+// $@MK - Monster King Game ID
+// $@MK_SCENE - Current event being handled by the Monster King
+// $MK_TEMPVAR - Temporary Variable
+//
+// Storyline statuses:
+// 0 - The Monster King is inactive (leading sieges to Hurnscald and Nivalis)
+// 1 - The Monster King is known by players and is giving them a month break
+// 2 - The Monster King is currently sieging towns at random
+// 3 - The Monster King is preparing to perfom the Rite
+// 4 - The Rite is in progress. Players must walk to MK evil lair.
+//
+// $MK_TEMPVAR meaning depends on GAME STORYLINE
+// GS 0
+// Ignored
+// GS 1
+// Tracks the day since 1970 when the town was cleared. A month break.
+// GS 2
+// Player score (1pt per Lieutenant, 10pts per Colonel)
+// Affects the end of Game Story 2 and begin of Game Story 3
+// Because we must wait players...
+// GS 3
+// Stage TBD
000-0,0,0,0 script Monster King NPC_HIDDEN,{
OnSlaveDie:
@@ -63,6 +87,14 @@ OnTimer90000:
if (.mp$ == "011-1")
enablenpc "Mana Stone";
+ // The Monster King will not move anymore because story
+ if ($GAME_STORYLINE == 0 ||
+ $GAME_STORYLINE == 4) {
+ if (.mp$ != "boss")
+ unitwarp($@MK, "boss", 45, 45);
+ initnpctimer;
+ }
+
// Select a random map. Never shows up at Candor and cities, nor indoors. Not all maps either.
setarray .@m$, "boss", "boss", "001-1", "001-3", "001-4", "001-5", "001-6", "001-7", "001-10",
"003-1", "003-1-3", "004-1", "004-2", "007-1", "010-1", "010-1-1", "010-2", "011-1",
@@ -102,8 +134,9 @@ OnTimer90000:
end;
}
- // Siege events (req. 80 aggro, 3 users, and 70% chances to begin)
- if ($@MK_AGGRO >= 80 && .users >= 3 && rand(0,100) < 70) {
+ // Siege events (req. 300 aggro, 3 users, and 70% chances to begin)
+ if ($@MK_AGGRO >= 300 && .users >= 3 && rand(0,100) < 70 &&
+ $GAME_STORYLINE == 2){
// Tulimshar
if (.mp$ ~= "003-*") {
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
@@ -118,9 +151,10 @@ OnTimer90000:
}
}
- // If a player is nearby, MK might randomly make an event for said player
- // Of course, this is unlikely, unless we have too few players
- if (.nearby > 1 && $@MK_AGGRO >= 120){
+ // If a player is nearby while the Monster King prepares, event may happen
+ // Minimum 60 Aggro
+ if (.nearby > 1 && $@MK_AGGRO >= 80 &&
+ ($GAME_STORYLINE == 1 || $GAME_STORYLINE == 3)){
// We should decide event kind, but that's NYI
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
@@ -134,6 +168,24 @@ OnTimer90000:
$@MK_AGGRO=$@MK_AGGRO/5;
}
+ // Maybe, just maybe, game storyline must be updated here
+ if ($GAME_STORYLINE == 1 && $MK_TEMP &&
+ $MK_TEMP <= gettimeparam(GETTIME_DAYOFMONTH)) {
+ // Game Story Change: Idle MK -> Active MK
+ kamibroadcast("I can't handle it anymore! NO MORE!", "Monster King");
+ sleep(2500);
+ kamibroadcast("Come, my minions! Lay siege to towns! LEAVE NO OPPOSITION TO ME!", "Monster King");
+ sleep(2500);
+ kamibroadcast("Burn, destroy, do whatever you need, until your last breath, my lieutenants and colonels!", "Monster King");
+ sleep(2500);
+ kamibroadcast("##4 .:: Game Story Instructions on #world ::.");
+ channelmes("#world", "##1 **GAME STORY CHANGE** - The Monster King minions will now attack cities and lay waste to them.");
+ channelmes("#world", "##1 Players must defeat the lieutenants and colonels in order to prevent sieges from continuing.");
+
+ // Apply the changes
+ $GAME_STORYLINE=2;
+ }
+
// We're done, restart loop timer
initnpctimer;
end;