From 3c221076267ae3b6a8559bfa2047793e73a17e09 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 28 Jul 2020 21:57:50 -0300 Subject: Move teleporthome() to utils --- npc/functions/savepoint.txt | 16 ---------------- npc/functions/util.txt | 11 +++++++++++ npc/scripts.conf | 1 - 3 files changed, 11 insertions(+), 17 deletions(-) delete mode 100644 npc/functions/savepoint.txt (limited to 'npc') diff --git a/npc/functions/savepoint.txt b/npc/functions/savepoint.txt deleted file mode 100644 index 767476030..000000000 --- a/npc/functions/savepoint.txt +++ /dev/null @@ -1,16 +0,0 @@ -// TMW2 Script -// Author: Jesusalva -// Description: Save utils - -// TODO: Implement elsewhere -// 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; -} - 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 { diff --git a/npc/scripts.conf b/npc/scripts.conf index af6eefdbd..da22cb3a1 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -65,7 +65,6 @@ "npc/functions/refine.txt", "npc/functions/resetstatus.txt", "npc/functions/riddle.txt", -"npc/functions/savepoint.txt", "npc/functions/shake.txt", "npc/functions/shops.txt", "npc/functions/siege.txt", -- cgit v1.2.3-60-g2f50