From 528ff341c65ebb1fcf8332e611eca89c5e89aa6a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 29 Apr 2020 05:51:13 -0300 Subject: Hopefully it'll work, now --- npc/042-2/boss.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'npc/042-2/boss.txt') diff --git a/npc/042-2/boss.txt b/npc/042-2/boss.txt index b506e90f4..3c7c40ff7 100644 --- a/npc/042-2/boss.txt +++ b/npc/042-2/boss.txt @@ -13,7 +13,7 @@ OnTouch: .@label$=instance_npcname(.name$)+"::OnKillBoss"; .@g=getcharid(2); if (($KAMELOT_QUEST[.@g] & 4) && !mobcount(getmap(), .@label$)) { - warp "042-2@"+.@g, 58, 139; + warp "042-3@"+.@g, 58, 139; } else { dispbottom l("Powerful magic repels you!"); percentheal -5, -5; @@ -23,6 +23,7 @@ OnTouch: OnArrival: debugmes "Arrival detected"; + .@m$=instance_mapname("042-2"); .@g=getcharid(2); if (.@g < 1) percentheal -100, -100; @@ -30,7 +31,7 @@ OnArrival: if (getmap() != "042-2@"+.@g) end; debugmes $@KAMELOT_WAVE[.@g]; - if ($@KAMELOT_WAVE[.@g] < 3) + if ($@KAMELOT_WAVE[.@g] > 3) end; $@KAMELOT_WAVE[.@g]=100; setd("$@GTEMP2_"+.@m$, $KAMELOT_PC[.@g]); @@ -147,15 +148,18 @@ OnTimer180000: end; OnTimer185000: + debugmes "Timer Running"; .@m$=instance_mapname("042-2"); .@mob=getd("$@GTEMP_"+.@m$); .@gdcount=getd("$@GTEMP2_"+.@m$); .@ratio=getunitdata(.@mob, UDT_HP)*10/getunitdata(.@mob, UDT_MAXHP); + debugmes "Ratio %d/%d", .@ratio, getd("$@GTEMP1_"+.@m$); if (.@ratio < getd("$@GTEMP1_"+.@m$)) { mapannounce .@m$, "General Krukan : "+any("Charge!", "To the Abyss with you already!", "Kill them already!", "More of them are coming!", "Minions, ATTACK!"), 0; kdoor0422Spawn(.@gcount*2, 20, 24, 59, 59); setd("$@GTEMP1_"+.@m$, .@ratio); } + debugmes "Restart timer"; setnpctimer 180001; end; @@ -226,6 +230,7 @@ OnKillBoss: end; function kdoor0422Spawn { + debugmes "Spawning"; .@label$=instance_npcname(.name$)+"::OnKillMob"; .@gcount=getarg(0); .@x1=getarg(1); @@ -234,6 +239,7 @@ function kdoor0422Spawn { .@y2=getarg(4); .@avg=getd("$@GTEMP3_"+.@m$); .@m$=instance_mapname("042-2"); + debugmes "Total %d, map %s (power %d)", .@gcount, .@m$, .@avg; freeloop(true); for (.@i=0; .@i < .@gcount; .@i++) { .@mobId=any(CursedSoldier, CursedArcher); // 50-50 ratio @@ -264,6 +270,7 @@ function kdoor0422Spawn { // Loop through } freeloop(false); + debugmes "Done spawn 042-2"; return; } -- cgit v1.2.3-60-g2f50