From 060ec1de20f7cd131157883e8dcbbc3bcd68ce29 Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Tue, 1 Apr 2025 00:26:49 +0200 Subject: candor underground: check if player is still there before warping them Note: only top warp, I want approval of this logic first before fixing the other two. --- npc/006-0/core.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/npc/006-0/core.txt b/npc/006-0/core.txt index 21a2e5c0e..2cb7abf7a 100644 --- a/npc/006-0/core.txt +++ b/npc/006-0/core.txt @@ -13,10 +13,17 @@ OnTouch: specialeffect(5000, SELF, getcharid(3)); dispbottom l("The power which lies in Candor acknowledges your strength."); + sleep2(2500); - warp "006-3", 49, 52; - sleep2(500); - specialeffect(5001, SELF, getcharid(3)); + + // Check if player is still here + getmapxy(.@pm$, .@px, .@py); + getmapxy(.@nm$, .@nx, .@ny, UNITTYPE_NPC); + if (.@px == .@nx && .@py == .@ny) { + warp "006-3", 49, 52; + sleep2(500); + specialeffect(5001, SELF, getcharid(3)); + } end; L_Reject: -- cgit v1.2.3-70-g09d2