From 1b6ef8f9b16448afcce73a2269f3cf0849b7eb2d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 8 Apr 2019 08:44:07 -0300 Subject: The monster king now automatically sieges Tulimshar, and @toevent works when that is set ^.^ This means a new degree in how events are handled --- npc/functions/gmbot.txt | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'npc/functions/gmbot.txt') 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 -- cgit v1.2.3-60-g2f50