diff options
-rw-r--r-- | npc/014-4/kamelot.txt | 23 | ||||
-rw-r--r-- | npc/042-2/boss.txt | 7 | ||||
-rw-r--r-- | npc/042-3/jail.txt | 14 |
3 files changed, 39 insertions, 5 deletions
diff --git a/npc/014-4/kamelot.txt b/npc/014-4/kamelot.txt index 254c83bb2..404df254a 100644 --- a/npc/014-4/kamelot.txt +++ b/npc/014-4/kamelot.txt @@ -97,7 +97,7 @@ OnTouch: instance_attachmap("042-9", .@inst, .@g, "042-9@"+.@g); instance_attachmap("042-10", .@inst, .@g, "042-10@"+.@g); instance_attachmap("042-11", .@inst, .@g, "042-11@"+.@g); - instance_set_timeout(0, 0, .@inst); + instance_set_timeout(0, 0, .@inst); // FIXME: Bad Idea? instance_init(.@inst); $@KAMELOT_ID[.@g] = .@inst; } @@ -138,7 +138,8 @@ OnDebug: l("Warp - Jump to Basement"), l("Warp - Jump to Jail"), l("Warp - Jump to Sewer Entrance"), - l("Warp - Jump to Cave Exit"); + l("Warp - Jump to Cave Exit"), + l("Warp - Arrest me!"); mes ""; switch (@menu) { case 2: @@ -183,6 +184,24 @@ OnDebug: warp "042-4@"+.@g, 60, 67; break; case 15: warp "042-10@"+.@g, 95, 52; break; + case 16: + .@t$="042-3@"+.@g; + .@n$=instance_npcname("#KSlimeSpawn", $KAMELOT_ID[.@g]); + setarray .@x, 33, 84, 41, 74, 36, 57, 79, 43, 24, 86, 59, 38; + setarray .@y, 135, 127, 119, 107, 96, 84, 63, 67, 67, 22, 49, 27; + specialeffect(FX_HIT, AREA, getcharid(3)); + .@v = (rand2(12) % 12); + .@r=attachrid(getcharid(3)); + if (.@r) { + warp .@t$, .@x[.@v], .@y[.@v]; + if (!countitem(Lockpicks)) + addtimer 700, .@n$+"::OnFirstSlime"; + setpcblock(255, false); + } else { + unitwarp(getcharid(3), .@t$, .@x[.@v], .@y[.@v]); // And good luck D: + debugmes "FATAL: Could not attach: %d", getcharid(3); + } + break; } close; diff --git a/npc/042-2/boss.txt b/npc/042-2/boss.txt index 84fca264e..280cbefba 100644 --- a/npc/042-2/boss.txt +++ b/npc/042-2/boss.txt @@ -253,6 +253,11 @@ OnTimer1002000: sc_start(SC_STUN, 15000, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, .@raz); unittalk(.@raz, "What is happening here??"); mapannounce .@m$, "General Razha : ##1What's happening here??", 0; + sleep(100); + sc_end(SC_STUN, .@raz); + unitwalk(.@raz, 41, 24); + sleep(200); + sc_start(SC_STUN, 15000, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, .@raz); end; OnTimer1007000: @@ -278,7 +283,7 @@ OnTimer1015000: .@m$=instance_mapname("042-2"); .@t$=instance_mapname("042-3"); .@g=getd("$@GTEMP_"+.@m$); - .@n$="#KSlimeSpawn"; //instance_npcname("#KSlimeSpawn", $KAMELOT_ID[.@g]); + .@n$=instance_npcname("#KSlimeSpawn", $KAMELOT_ID[.@g]); setarray .@x, 33, 84, 41, 74, 36, 57, 79, 43, 24, 86, 59, 38; setarray .@y, 135, 127, 119, 107, 96, 84, 63, 67, 67, 22, 49, 27; .@c=getunits(BL_PC, .@unt, false, .@m$, 20, 24, 59, 59); 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; |