From 545e83916fcf78fd82033de0bc7a11e97fa3f144 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 9 Sep 2019 17:33:00 -0300 Subject: Remove Artis and Esperia Teleporter Constants. Add LoF teleporter constant. Prepare POL_LocToTP --- npc/functions/politics.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'npc/functions') diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt index b1c92a726..ba7cd4a90 100644 --- a/npc/functions/politics.txt +++ b/npc/functions/politics.txt @@ -68,6 +68,32 @@ function script SaleTaxes { return; } +// Convert LOC (uppercase) to a TP variable +// POL_LocToTP( {TOWNCODE} ) +function script POL_LocToTP { + .@tw$=strtoupper(getarg(0, LOCATION$)); + + if (.@tw$ == "TULIM") + return TP_TULIM; + + if (.@tw$ == "HALIN") + return TP_HALIN; + + if (.@tw$ == "HURNS") + return TP_HURNS; + + if (.@tw$ == "LOF") + return TP_LOF; + + if (.@tw$ == "NIVAL") + return TP_NIVAL; + + if (.@tw$ == "FROSTIA") + return TP_FROSTIA; + + return Exception("Invalid town requested / POL_LocToTP", RB_DEFAULT|RB_SPEECH, -1); +} + - script Politics NPC_HIDDEN,{ OnSun0000: -- cgit v1.2.3-60-g2f50