summaryrefslogtreecommitdiff
path: root/npc/functions/util.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-28 21:57:50 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-28 21:57:50 -0300
commit3c221076267ae3b6a8559bfa2047793e73a17e09 (patch)
treed7e454f268c1cf83ab2dd290bba61ae2545b26c2 /npc/functions/util.txt
parent6983ef990dad2faad1b0c65dc2ce4e3ca0eaee6f (diff)
downloadserverdata-3c221076267ae3b6a8559bfa2047793e73a17e09.tar.gz
serverdata-3c221076267ae3b6a8559bfa2047793e73a17e09.tar.bz2
serverdata-3c221076267ae3b6a8559bfa2047793e73a17e09.tar.xz
serverdata-3c221076267ae3b6a8559bfa2047793e73a17e09.zip
Move teleporthome() to utils
Diffstat (limited to 'npc/functions/util.txt')
-rw-r--r--npc/functions/util.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 125f60044..1b088cdcc 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -1005,6 +1005,17 @@ function script MapToLoc {
return $@LOCMASTER_LOC$[.@lx];
}
+// Warps home and updates LOCATION$
+function script teleporthome {
+ warp "Save", 0, 0;
+ .@i=array_find($@LOCMASTER_MAP$, getmap());
+ if (.@i >= 0)
+ EnterTown($@LOCMASTER_LOC$[.@i]);
+ else
+ debugmes("[ERROR] Invalid Town Map for Time Flask: %s", getmap());
+ return;
+}
+
// Returns TOP 3 Average Level
// TOP3AVERAGELVL( - )
function script TOP3AVERAGELVL {