From 11e24e48f9e9016510c04c136c246fa939bb46b2 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 2 May 2020 06:07:50 -0300 Subject: Okay, this should fix the worse bugs --- npc/042-3/jail.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'npc/042-3/jail.txt') diff --git a/npc/042-3/jail.txt b/npc/042-3/jail.txt index be54ef435..197c29ef1 100644 --- a/npc/042-3/jail.txt +++ b/npc/042-3/jail.txt @@ -11,7 +11,6 @@ OnKillSlime: debugmes "Slime slain"; - .@label$=instance_npcname(.name$)+"::OnKillSlime"; if (!playerattached()) { debugmes "[ERROR] Player not Attached on Slime Death D:"; debugmes "[ERROR] Cannot retrieve coordinates!!"; @@ -27,6 +26,17 @@ OnKillSlime: end; OnFirstSlime: + // Yes, we just hope it works out of box + explode(.@map$, .map$, "@"); + .@g=atoi(.@map$[1]); + if (.@g < 1) { + debugmes "[ERROR] [KAMELOT] Unable to spawn for Kamelot %s", .map$; + debugmes "[ERROR] [KAMELOT] Using dummy data (returned: %d)", .@g; + .@g=0; + } + + // let's not trust .name$ + .@label$=instance_npcname("#KSlimeSpawn", $@KAMELOT_ID[.@g])+"::OnKillSlime"; if (!playerattached()) { debugmes "[ERROR] Player not Attached on Slime Spawn D:"; debugmes "[ERROR] Cannot retrieve coordinates!!"; @@ -36,7 +46,7 @@ OnFirstSlime: .@mob=monster(.@m$, .@x, .@y, strmobinfo(1, CopperSlime), CopperSlime, 1, .@label$); // This should wipe the monster experience value setunitdata(.@mob, UDT_LEVEL, 1); - debugmes "Slime is back"; + //if ($@GM_OVERRIDE) debugmes "Slime is back: %s [%d]", .@label$, .@mob; end; -- cgit v1.2.3-60-g2f50