From e6b4e0f1f88c63844a5b10c2d54ea9ddad8d50a5 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 29 Apr 2019 10:41:52 -0300 Subject: Okay, it works now --- npc/012-1/guards.txt | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'npc/012-1/guards.txt') diff --git a/npc/012-1/guards.txt b/npc/012-1/guards.txt index 1c1735bbf..8c3cc3f7a 100644 --- a/npc/012-1/guards.txt +++ b/npc/012-1/guards.txt @@ -708,16 +708,28 @@ OnTimer30000: OnTimer60000: debugmes "12k"; - if ($@SIEGE_HURNS >= 5) { - siege_selectmob(siege_calcdiff("012-1", 80), $@SIEGE_HURNS); - siege_spawn("012-1", any_of($@SIEGE_TMPMOBS), 1+$@SIEGE_HURNS, "#HurnscaldSiege::OnColonelDeath"); - mapannounce("012-1", "##1The Monster Colonel arrived!", bc_map); - } - else if ($@SIEGE_HURNS >= 1) { - siege_selectmob(siege_calcdiff("012-1", 40), $@SIEGE_HURNS); - siege_spawn("012-1", any_of($@SIEGE_TMPMOBS), 1+$@SIEGE_HURNS, "#HurnscaldSiege::OnLieutenantDeath"); - mapannounce("012-1", "##1The Monster Lieutenant arrived!", bc_map); - } + + // Setup the lieutenant/colonel level and event/designation + // It'll be 40 + Siege*5, meaning the cap is 90. + .@val=40+($@SIEGE_HURNS*5); + if (.@val > 100) + .@val=100; + if (.@val >= 80) + .@ts$="Colonel"; + else + .@ts$="Lieutenant"; + + // Select a type for them (saved as .@mobId) + siege_selectmob(siege_calcdiff("012-1", .@val), $@SIEGE_HURNS); + array_remove($@SIEGE_TMPMOBS, Bif); + array_remove($@SIEGE_TMPMOBS, CandiedSlime); + array_remove($@SIEGE_TMPMOBS, ManaGhost); + array_remove($@SIEGE_TMPMOBS, SlimeBlast); + .@mobId=any_of($@SIEGE_TMPMOBS); + + // Announce and spawn + siege_spawn("012-1", .@mobId, 1, "#HurnscaldSiege::On"+.@ts$+"Death"); + mapannounce("012-1", "##1The Monster "+.@ts$+" arrived! It is a "+strmobinfo(1, any_of($@SIEGE_TMPMOBS)), bc_map); // Clear $@SIEGE_TMPMOBS siege_selectmob(siege_calcdiff("012-1"), $@SIEGE_HURNS, TP_HURNS); @@ -767,7 +779,7 @@ OnTimer600000: $@MK_AGGRO=$@MK_AGGRO/20; mapannounce("012-1", "##1The Monster King army is preparing to withdraw!", bc_map); end; -OnTimer630000: +OnTimer150000: removemapmask "012-1", MASK_MATTACK; removemapmask "014-3", MASK_MATTACK; changemusic "012-1", "caketown.ogg"; // Restore to default -- cgit v1.2.3-60-g2f50