summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-28 21:50:18 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-28 21:50:18 -0300
commit08268b51173bdc1ae12d359b24b0e0562156a8d2 (patch)
treefdbe106a9665b28cf89b1e4a2473d4e779c18d0a /npc
parent8d53b8a7641a500d03363c7f104c9d705a761cee (diff)
downloadserverdata-08268b51173bdc1ae12d359b24b0e0562156a8d2.tar.gz
serverdata-08268b51173bdc1ae12d359b24b0e0562156a8d2.tar.bz2
serverdata-08268b51173bdc1ae12d359b24b0e0562156a8d2.tar.xz
serverdata-08268b51173bdc1ae12d359b24b0e0562156a8d2.zip
Move POL_LocToTP from Politics to Utils
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/politics.txt26
-rw-r--r--npc/functions/util.txt27
2 files changed, 27 insertions, 26 deletions
diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt
index 3e6cdc31a..44d26b6ab 100644
--- a/npc/functions/politics.txt
+++ b/npc/functions/politics.txt
@@ -61,32 +61,6 @@ 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);
-}
-
// Adjusts prices for crafts
// POL_AdjustPrice( price, {TOWNCODE} )
function script POL_AdjustPrice {
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index e0c1b93d8..125f60044 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -921,6 +921,33 @@ function script gettimeparam {
}
+// 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);
+}
+
+
// Upon entering a town
// EnterTown( LocName )
function script EnterTown {