From fa967d0551d88456249c2fd09fdfd9064fe59f08 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 27 Jan 2020 17:14:32 -0300 Subject: @welcome - allows you to go back to where you was. Must be cast before temporary variable cleanup, and in Candor. Indoors and Ship will NOT be counted!! --- npc/commands/welcome.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/npc/commands/welcome.txt b/npc/commands/welcome.txt index 44aa4bb9e..bce0c58e9 100644 --- a/npc/commands/welcome.txt +++ b/npc/commands/welcome.txt @@ -20,6 +20,24 @@ OnCall: OnEffect: @toeventchk=0; removespecialeffect(FX_CIRCLE, SELF, getcharid(3)); + // Reversions (warp back) + // Not in Candor: Resave your @welcome reversion snippet + if (getmap() != "005-1") { + getmapxy(@welc_map$, @welc_x, @welc_y, 0); + } else { + // It's defined and you're in Candor, so: Warp back + if (@welc_x && @welc_y) { + warp @welc_map$, @welc_x, @welc_y; + @welc_map$=""; + @welc_x=0; + @welc_y=0; + dispbottom l("%s: Thanks for helping.", "Nard"); + end; + } + // There's no saved coordinates but you're in Candor. + // So warp you back to... Candor? I mean, what? + } + // Calculate if ($@WELCOME_TIMER < gettimetick(2)) { dispbottom l("There are no new players to welcome."); -- cgit v1.2.3-60-g2f50