From ce20c7c97760915ae5ac838dc5b732ef6da50195 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 28 Jul 2020 21:54:34 -0300 Subject: Use EnterTown() on ships --- npc/functions/savepoint.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'npc/functions') diff --git a/npc/functions/savepoint.txt b/npc/functions/savepoint.txt index 90c190c32..df2bed34c 100644 --- a/npc/functions/savepoint.txt +++ b/npc/functions/savepoint.txt @@ -1,6 +1,21 @@ -// Deprecated +// TMW2 Script +// Author: Jesusalva +// Description: Save utils function script savepointparticle { debugmes "[ERROR] Usage of savepointparticle() is deprecated."; return; } + +// 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; +} + -- cgit v1.2.3-70-g09d2