diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-07-16 14:07:41 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-07-16 14:07:41 -0300 |
commit | 1c9b4896e5cb0bcd6cbadea966940eb5c7497f60 (patch) | |
tree | 1ac80c4dffaea544b55247dd6bb8885f2e4aea87 /npc/functions | |
parent | bf615f295f89a7a5e74c5ed1c572fd364516e112 (diff) | |
download | serverdata-1c9b4896e5cb0bcd6cbadea966940eb5c7497f60.tar.gz serverdata-1c9b4896e5cb0bcd6cbadea966940eb5c7497f60.tar.bz2 serverdata-1c9b4896e5cb0bcd6cbadea966940eb5c7497f60.tar.xz serverdata-1c9b4896e5cb0bcd6cbadea966940eb5c7497f60.zip |
Throttler - Only one siege every 12 hours maximum
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/gmbot.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/npc/functions/gmbot.txt b/npc/functions/gmbot.txt index 759860f94..9890bac8d 100644 --- a/npc/functions/gmbot.txt +++ b/npc/functions/gmbot.txt @@ -8,6 +8,7 @@ // $@MK - Monster King Game ID // $@MK_SCENE - Current event being handled by the Monster King // $MK_TEMPVAR - Temporary Variable +// $@MK_THROTTLE - Event Throttler // // Storyline statuses: // 0 - The Monster King is inactive (leading sieges to Hurnscald and Nivalis) @@ -147,28 +148,32 @@ OnTimer90000: // 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){ + $GAME_STORYLINE == 2 && $@MK_THROTTLE < gettimetick(2)){ // Tulimshar if (.mp$ ~= "003-*") { announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc; + $@MK_THROTTLE=gettimetick(2)+12*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)+12*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)+12*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)+12*60*60; $@MK_SCENE=MK_SIEGE_NIVAL; donpcevent("Lieutenant Joshua::OnMKSiege"); } |