summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/042-2/boss.txt11
-rw-r--r--npc/commands/kami.txt3
2 files changed, 11 insertions, 3 deletions
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;
}
diff --git a/npc/commands/kami.txt b/npc/commands/kami.txt
index 70acb00ee..982e8f10a 100644
--- a/npc/commands/kami.txt
+++ b/npc/commands/kami.txt
@@ -75,7 +75,8 @@ OnJustDoIt:
//dispbottom l("STR: %d AGI %d VIT %d", readparam2(bStr), readparam2(bAgi), readparam2(bVit));
//unitskilluseid(getcharid(3), GD_LEADERSHIP, 1, getcharid(3));
// This is only for testing
- doevent(instance_npcname("#KDoor0422", $@KAMELOT_ID[getcharid(2)])+"::OnEmergency");
+ $@KAMELOT_WAVE[getcharid(2)]=2;
+ //doevent(instance_npcname("#KDoor0422", $@KAMELOT_ID[getcharid(2)])+"::OnEmergency");
// areasc(range, time, skill code, who targets, power, filter)
//areasc(9, 20000, SC_MAGNIFICAT, BL_PC, 1, "filter_sameguild");