From 05e6280646b3857d1658af738fc4521e8b4d573a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 1 May 2020 00:14:58 -0300 Subject: Improve the debug information level available to me. Can you believe I managed to get one of the worst drops on my test run? D: --- npc/014-4/kamelot.txt | 3 +++ npc/042-5/ctrl.txt | 3 ++- npc/042-6/ctrl.txt | 12 ++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'npc') diff --git a/npc/014-4/kamelot.txt b/npc/014-4/kamelot.txt index 305e7de92..9f0e270a7 100644 --- a/npc/014-4/kamelot.txt +++ b/npc/014-4/kamelot.txt @@ -121,6 +121,9 @@ OnDebug: .@g=getcharid(2); if (.@g < 1) end; mes "Kamelot Debug"; + mesf "Guild: %d", .@g; + mesf "Keys: %d", $KAMELOT_KEYMASK[.@g]; + mesf "Quest: %d", $KAMELOT_QUEST[.@g]; select l("Abort"), l("Reset"), diff --git a/npc/042-5/ctrl.txt b/npc/042-5/ctrl.txt index 08799a4f9..c8ef7c836 100644 --- a/npc/042-5/ctrl.txt +++ b/npc/042-5/ctrl.txt @@ -154,6 +154,7 @@ function script KamelotTreasure { mesc l("You find @@ inside!", getitemlink(.@loot)); + // TODO: If itemtype == Armor/Weapon, make it guild bound and put bonus getitem .@loot, 1; } else { mesc l("You find @@ inside!", l("nothing")); @@ -180,7 +181,7 @@ function script KamelotTreasure { ///////////////////////////////////////////////////////////////////////////// // KamelotBoss(Map, x, y, power, NPC) function script KamelotBoss { - .@label$=instance_npcname(getarg(4))+"::OnKillMob"; + .@label$=instance_npcname(getarg(4))+"::OnKillBoss"; .@gcount=1; .@x1=getarg(1); .@y1=getarg(2); diff --git a/npc/042-6/ctrl.txt b/npc/042-6/ctrl.txt index e718c37de..11d9767a8 100644 --- a/npc/042-6/ctrl.txt +++ b/npc/042-6/ctrl.txt @@ -60,6 +60,18 @@ OnInstanceInit: areamonster(.map$, 20, 20, 90, 90, strmobinfo(1, BronzeChest), BronzeChest, 3); end; +OnKillBoss: + if (!playerattached()) + goto OnRespawn; + // Maybe a reward is due + .@g=getcharid(2); + if (.@g < 1) percentheal -100, -100; + getitem GuildCoin, 2+min(13, $KAMELOT_MX[.@g]/10); + getexp $KAMELOT_MX[.@g]*14, $KAMELOT_MX[.@g]*8; + mapannounce getmap(), strcharinfo(0)+" has defeated the boss!", 0; + .@delay=max(3000, 21000-$KAMELOT_PC[.@g]*1000); + goto OnRespawn; + OnKillMob: if (!playerattached()) goto OnRespawn; -- cgit v1.2.3-70-g09d2