summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-04 17:08:04 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-04 17:08:04 -0300
commitacccacb1dd80c3fb61c00e071b3eaa47e3194107 (patch)
tree1f62b7749248399280025d7369719fb937c076f2 /npc/functions
parent22524d2f042d3645a7cd0b0aaa6bee13fea61cd8 (diff)
downloadserverdata-acccacb1dd80c3fb61c00e071b3eaa47e3194107.tar.gz
serverdata-acccacb1dd80c3fb61c00e071b3eaa47e3194107.tar.bz2
serverdata-acccacb1dd80c3fb61c00e071b3eaa47e3194107.tar.xz
serverdata-acccacb1dd80c3fb61c00e071b3eaa47e3194107.zip
How did it miss the whole file =/
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/teleporter.txt54
1 files changed, 54 insertions, 0 deletions
diff --git a/npc/functions/teleporter.txt b/npc/functions/teleporter.txt
new file mode 100644
index 000000000..40376eee5
--- /dev/null
+++ b/npc/functions/teleporter.txt
@@ -0,0 +1,54 @@
+// TMW2 Script
+// Authors:
+// Jesusalva
+// Description:
+// Link portals to soul menhirs like the teleporters from old
+// The price is temporary. This feature got in because no ship in Nivalis Port
+// PS. Anise => “Aisen” Anagram
+
+// TeleporterGate(TP_CURRENT)
+function script TeleporterGate {
+ .@TP=getarg(0);
+
+ // Validate
+ .@x=array_find($@LOCMASTER_TP, .@TP);
+ if (.@x < 0)
+ return Exception("Invalid Teleport Point: "+.@TP);
+
+ // Obtain current Teleport Point (.@IF)
+ .@x=array_find($@LOCMASTER_MAP$, getmap());
+ .@IF=$@LOCMASTER_TP[.@x];
+
+ if (!(TELEPORTERS & .@TP)) {
+ TELEPORTERS=TELEPORTERS|.@TP;
+ mesn "Anise Inc.";
+ mesc l("Location Registered. You are now capable to use this warp gate.");
+ next;
+ }
+ mesc l("Where should I warp to?");
+ mesc l("Cost: 1 @@", getitemlink(PileOfAsh)), 1;
+ if (!countitem(PileOfAsh))
+ close;
+ next;
+ menuint
+ rif(TELEPORTERS & TP_FROST && .@IF != TP_FROST, l("Frostia")), TP_FROST,
+ rif(TELEPORTERS & TP_HALIN && .@IF != TP_FROST, l("Halinarzo")), TP_HALIN,
+ rif(TELEPORTERS & TP_LILIT && .@IF != TP_FROST, l("Lilit")), TP_LILIT,
+ rif(TELEPORTERS & TP_TULIM && .@IF != TP_FROST, l("Tulimshar")), TP_TULIM,
+ rif(TELEPORTERS & TP_HURNS && .@IF != TP_FROST, l("Hurnscald")), TP_HURNS,
+ rif(TELEPORTERS & TP_NIVAL && .@IF != TP_FROST, l("Nivalis")), TP_NIVAL,
+ rif(TELEPORTERS & TP_LOF && .@IF != TP_LOF, l("Land Of Fire")), TP_LOF,
+ rif(TELEPORTERS & TP_FORT && .@IF != TP_FORT, l("Fortress Island")), TP_FORT,
+ rif(TELEPORTERS & TP_BOSSR && .@IF != TP_BOSSR, l("Moubootaur Maze")), TP_BOOSR,
+ l("None"), -1;
+ mes "";
+ if (@menu != -1)
+ delitem PileOfAsh, 1;
+ closedialog;
+
+ // Retrieve location specifics and warp
+ .@x=array_find($@LOCMASTER_TP, .@TP);
+ warp $@LOCMASTER_MAP$[.@x], $@LOCMASTER_X[.@x], $@LOCMASTER_Y[.@x];
+ return;
+}
+