summaryrefslogtreecommitdiff
path: root/npc/functions/gmbot.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-08-18 01:30:57 -0300
committerJesusaves <cpntb1@ymail.com>2019-08-18 01:30:57 -0300
commit40a2b01de1698487d63e4b87eba58abab8a9906a (patch)
tree71d02f9f752832a51cebbf37b44502a9aa6d6585 /npc/functions/gmbot.txt
parent960dee60bbd65262c951bfed1f8eea067d26a35f (diff)
downloadserverdata-40a2b01de1698487d63e4b87eba58abab8a9906a.tar.gz
serverdata-40a2b01de1698487d63e4b87eba58abab8a9906a.tar.bz2
serverdata-40a2b01de1698487d63e4b87eba58abab8a9906a.tar.xz
serverdata-40a2b01de1698487d63e4b87eba58abab8a9906a.zip
Change MK rule when siege stage is over.
During stage 3, a side event may happen until throttle time is fulfilled. This side event will eat 2/5 of whatever he accumulated.
Diffstat (limited to 'npc/functions/gmbot.txt')
-rw-r--r--npc/functions/gmbot.txt20
1 files changed, 11 insertions, 9 deletions
diff --git a/npc/functions/gmbot.txt b/npc/functions/gmbot.txt
index 8ad416cce..b04c40002 100644
--- a/npc/functions/gmbot.txt
+++ b/npc/functions/gmbot.txt
@@ -149,31 +149,36 @@ OnTimer90000:
// Siege events (req. 300 aggro, 3 users, and 70% chances to begin)
if ($@MK_AGGRO >= 300 && .users >= 3 && rand(0,100) < 70 &&
is_between(1, 3, $GAME_STORYLINE) && $@MK_THROTTLE < gettimetick(2)){
+ // Delta handles the compulsory wait time between waves.
+ // 6 hours normally, 12 hours if the army is in disarray.
+ .@delta=6;
+ if ($GAME_STORYLINE == 3)
+ .@delta=12;
// Tulimshar
if (.mp$ ~= "003-*") {
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
- $@MK_THROTTLE=gettimetick(2)+8*60*60;
+ $@MK_THROTTLE=gettimetick(2)+.@delta*60*60;
$@MK_SCENE=MK_SIEGE_TULIM;
donpcevent("Lieutenant Dausen::OnMKSiege");
}
// Halinarzo
else if (.mp$ ~= "009-*") {
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
- $@MK_THROTTLE=gettimetick(2)+8*60*60;
+ $@MK_THROTTLE=gettimetick(2)+.@delta*60*60;
$@MK_SCENE=MK_SIEGE_HALIN;
donpcevent("Lieutenant Jacob::OnMKSiege");
}
// Hurnscald
else if (.mp$ ~= "012-*") {
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
- $@MK_THROTTLE=gettimetick(2)+8*60*60;
+ $@MK_THROTTLE=gettimetick(2)+.@delta*60*60;
$@MK_SCENE=MK_SIEGE_HURNS;
donpcevent("#HurnscaldSiege::OnMKSiege");
}
// Nivalis
else if (.mp$ ~= "020-*") {
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
- $@MK_THROTTLE=gettimetick(2)+8*60*60;
+ $@MK_THROTTLE=gettimetick(2)+.@delta*60*60;
$@MK_SCENE=MK_SIEGE_NIVAL;
donpcevent("Lieutenant Joshua::OnMKSiege");
}
@@ -182,18 +187,15 @@ OnTimer90000:
// 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)){
+ ($GAME_STORYLINE == 1 || ($GAME_STORYLINE == 3 && $@MK_THROTTLE >= gettimetick(2)) )){
// We should decide event kind, but that's NYI
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
getmapxy(.@m$, .@x, .@y, UNITTYPE_MOB, $@MK);
- // 50% more monsters at night time
- if (is_night())
- $@MK_AGGRO=$@MK_AGGRO*3/2;
// Spawn stuff
areamonster(.@m$, .@x-20, .@y-20, .@x+20, .@y+20, "Monster", ManaGhost, ($@MK_AGGRO/10)+.nearby, "Monster King::OnSlaveDie");
- $@MK_AGGRO=$@MK_AGGRO/5;
+ $@MK_AGGRO=($@MK_AGGRO*$GAME_STORYLINE)/5;
}
// Maybe, just maybe, game storyline must be updated here