summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-04-08 08:44:07 -0300
committerJesusaves <cpntb1@ymail.com>2019-04-08 08:44:07 -0300
commit1b6ef8f9b16448afcce73a2269f3cf0849b7eb2d (patch)
treed1141b19e2028b171a5c58f3709f3a5f7d25245e
parente8d2149b4b3c6780197933369f836315491d20bc (diff)
downloadserverdata-1b6ef8f9b16448afcce73a2269f3cf0849b7eb2d.tar.gz
serverdata-1b6ef8f9b16448afcce73a2269f3cf0849b7eb2d.tar.bz2
serverdata-1b6ef8f9b16448afcce73a2269f3cf0849b7eb2d.tar.xz
serverdata-1b6ef8f9b16448afcce73a2269f3cf0849b7eb2d.zip
The monster king now automatically sieges Tulimshar, and @toevent works when
that is set ^.^ This means a new degree in how events are handled
-rw-r--r--db/constants.conf5
-rw-r--r--npc/001-1/eventmaster.txt6
-rw-r--r--npc/003-1/lieutenantdausen.txt23
-rw-r--r--npc/commands/event.txt7
-rw-r--r--npc/functions/gmbot.txt19
5 files changed, 50 insertions, 10 deletions
diff --git a/db/constants.conf b/db/constants.conf
index f84fde3a9..8eeaf5985 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -4260,6 +4260,11 @@ constants_db: {
COLLECT_PETS: 131072
// Maximum 32 collectibles, currently used: 19
+ comment__: "Monster King Events"
+ MK_NONE: 0
+ MK_LOCKED: 1
+ MK_SIEGE_TULIM: 2
+
comment__: "Being actions"
ACTION_STAND: 0
ACTION_MOVE: 1
diff --git a/npc/001-1/eventmaster.txt b/npc/001-1/eventmaster.txt
index 4abc9b5fa..14a9a85e8 100644
--- a/npc/001-1/eventmaster.txt
+++ b/npc/001-1/eventmaster.txt
@@ -823,10 +823,14 @@ L_EventHandler:
if($@GM_EVENT) {
announce ("The event is over!"), bc_all|bc_npc; // I haven't tested this yet.
$@GM_EVENT=0;
- } else {
+ } else if (!$@MK_SCENE) {
announce ("The mana bridge to Aeros is open! To participate on event, talk to ##BSoul Menhir##b!"), bc_all|bc_npc;
channelmes("#world", "An event is happening on Aeros! Hurry up!");
$@GM_EVENT=1;
+ $@MK_SCENE=MK_LOCKED;
+ } else {
+ mesc("Operation not permitted: Monster King event is in progress.", 1);
+ mesc("You MUST wait.", 1);
}
close;
diff --git a/npc/003-1/lieutenantdausen.txt b/npc/003-1/lieutenantdausen.txt
index 788cb993d..c578f6c2e 100644
--- a/npc/003-1/lieutenantdausen.txt
+++ b/npc/003-1/lieutenantdausen.txt
@@ -124,6 +124,19 @@ L_MKControl:
l("Abort"), -;
close;
+OnMKSiege:
+ addmapmask "003-1", MASK_MATTACK;
+ 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/30); // Each 30 aggro raises difficulty in 1
+ pvpon("003-1");
+ pvpon("004-1");
+ announce(("##1WARNING! WARNING! Siege starting at Tulimshar!!"), bc_all);
+ areamonster("004-1", 0, 0, 79, 81, l("Black Scorpion"), BlackScorpion, 10, "Lieutenant Dausen::OnBlackScorpionDeath");
+ initnpctimer;
+ end;
+
L_MKSmall:
addmapmask "003-1", MASK_MATTACK;
addmapmask "004-1", MASK_MATTACK;
@@ -132,7 +145,7 @@ L_MKSmall:
$@SIEGE_TULIM=0; // factor zero
pvpon("003-1");
pvpon("004-1");
- announce(l("##1WARNING! WARNING! Siege starting at Tulimshar!!"), bc_all);
+ announce(("##1WARNING! WARNING! Siege starting at Tulimshar!!"), bc_all);
areamonster("004-1", 0, 0, 79, 81, l("Black Scorpion"), BlackScorpion, 10, "Lieutenant Dausen::OnBlackScorpionDeath");
initnpctimer;
close;
@@ -145,7 +158,7 @@ L_MKMedium:
$@SIEGE_TULIM=1; // factor one
pvpon("003-1");
pvpon("004-1");
- announce(l("##1WARNING! WARNING! Siege starting at Tulimshar!!"), bc_all);
+ announce(("##1WARNING! WARNING! Siege starting at Tulimshar!!"), bc_all);
areamonster("004-1", 0, 0, 79, 81, l("Black Scorpion"), BlackScorpion, 15, "Lieutenant Dausen::OnBlackScorpionDeath");
initnpctimer;
close;
@@ -158,7 +171,7 @@ L_MKHuge:
$@SIEGE_TULIM=5; // factor five
pvpon("003-1");
pvpon("004-1");
- announce(l("##1WARNING! WARNING! Siege starting at Tulimshar!!"), bc_all);
+ announce(("##1WARNING! WARNING! Siege starting at Tulimshar!!"), bc_all);
areamonster("004-1", 0, 0, 79, 81, l("Black Scorpion"), BlackScorpion, 30, "Lieutenant Dausen::OnBlackScorpionDeath");
initnpctimer;
close;
@@ -345,6 +358,8 @@ OnTimer540000:
end;
OnTimer600000:
+ $@MK_SCENE=MK_NONE;
+ $@MK_AGGRO=$@MK_AGGRO/20;
mapannounce("003-1", "##1The Monster King army is preparing to withdraw!", bc_map);
end;
@@ -353,7 +368,7 @@ OnTimer630000:
removemapmask "004-1", MASK_MATTACK;
changemusic "003-1", "bartk_adventure.ogg"; // Restore to default
enablenpc("Mana Stone");
- $@SIEGE_TULIM$=0;
+ $@SIEGE_TULIM=0;
killmonsterall("003-1", 0);
killmonsterall("004-1", 0);
pvpoff("003-1");
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index 4e1fef6ee..1e11e51f4 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -260,6 +260,13 @@ OnCall:
else if (getmapname() == "boss" || getmapname() == "sec_pri" || getmapname() ~= "000-*" || getmapname() ~= "008-*" || getmapname() ~= "sore*")
dispbottom l("The Mana Plane is currently out of reach.");
else {
+ // Monster King events take precedence over Aeros Event
+ if ($@MK_SCENE == MK_SIEGE_TULIM) {
+ warp "003-1", 40, 49;
+ specialeffect(63, AREA, getcharid(3));
+ end;
+ }
+
.@gt=$@AEROS_SPWN;
if (.@gt == 2)
.@gt=rand(0,1);
diff --git a/npc/functions/gmbot.txt b/npc/functions/gmbot.txt
index e4985cbeb..b8695f6c6 100644
--- a/npc/functions/gmbot.txt
+++ b/npc/functions/gmbot.txt
@@ -28,9 +28,6 @@ OnInit:
.aid="200000";
.cid="150002";
// Constants
- .MK_SIEGE=1;
- .MK_BONUS=2;
- .MK_MANAF=3;
// We should jump straight to loop (it runs every 62 seconds)
OnTimer62000:
@@ -42,7 +39,7 @@ OnTimer62000:
}
// We are on an event, so skip this loop
- if ($@MK_SCENE)
+ if ($@MK_SCENE || $@GM_EVENT)
initnpctimer;
// The Monster King is online. This loop is not needed
@@ -100,6 +97,18 @@ OnTimer62000:
end;
}
+ // Tulimshar Siege event
+ if (.mp$ ~= "003-*" && $@MK_AGGRO >= 30){
+ announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
+ $@MK_SCENE=MK_SIEGE_TULIM;
+ if ($@MK_AGGRO >= 90)
+ donpcevent("Lieutenant Dausen::OnMKSiege");
+ else if ($@MK_AGGRO >= 90)
+ donpcevent("Lieutenant Dausen::OnMKSiege");
+ else
+ donpcevent("Lieutenant Dausen::OnMKSiege");
+ }
+
// Decide if we should have an event here
if (.nearby > 1 && $@MK_AGGRO >= rand(0,100)){
// We should decide event kind, but that's NYI
@@ -112,7 +121,7 @@ OnTimer62000:
// Spawn stuff
areamonster(.@m$, .@x-20, .@y-20, .@x+20, .@y+20, "Monster", ManaGhost, ($@MK_AGGRO/10)+.nearby, "Monster King::OnSlaveDie");
- $@MK_AGGRO=0;
+ $@MK_AGGRO=$@MK_AGGRO/5;
}
// We're done, restart loop timer