From bfaf2b9547e215b5b81d7b6a6630fe11dde4fdae Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 22 Dec 2022 16:59:47 -0300 Subject: If the Monster King was hit, he now tends to his wounds in his castle before SPREADING TERROR!!¡¡¡!!! MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npc/functions/mkbot.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/npc/functions/mkbot.txt b/npc/functions/mkbot.txt index f396d823a..e1f7d01be 100644 --- a/npc/functions/mkbot.txt +++ b/npc/functions/mkbot.txt @@ -112,6 +112,19 @@ OnTimer90000: end; } + // Check if MK is hurt, and if so, respawn it in boss map (summon cleanup) + if (getunitdata($@MK, UDT_HP) < getunitdata($@MK, UDT_MAXHP)) { + unitwarp($@MK, "boss", 45, 45); + sleep(50); // No exp for hitters + unitkill($@MK); + sleep(50); // No exp for hitters + $@MK=monster("boss", 45, 45, "The Monster King", MonsterKing, 1, "Monster King::OnBourneAgain"); + // Monster King shall keep tending to his wounds in the keep for a cycle + initnpctimer; + end; + } + + // 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", "009-1", "010-1", "010-1-1", "010-2", "011-1", -- cgit v1.2.3-60-g2f50