summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-01-27 17:14:32 -0300
committerJesusaves <cpntb1@ymail.com>2020-01-27 17:14:32 -0300
commitfa967d0551d88456249c2fd09fdfd9064fe59f08 (patch)
treed9b72576b15c2cadeba866f6ab3910ff126d5549 /npc
parent11fd15115d72dad070373336ad6eabf1d2c9521f (diff)
downloadserverdata-fa967d0551d88456249c2fd09fdfd9064fe59f08.tar.gz
serverdata-fa967d0551d88456249c2fd09fdfd9064fe59f08.tar.bz2
serverdata-fa967d0551d88456249c2fd09fdfd9064fe59f08.tar.xz
serverdata-fa967d0551d88456249c2fd09fdfd9064fe59f08.zip
@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!!
Diffstat (limited to 'npc')
-rw-r--r--npc/commands/welcome.txt18
1 files changed, 18 insertions, 0 deletions
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.");