From 545e83916fcf78fd82033de0bc7a11e97fa3f144 Mon Sep 17 00:00:00 2001 From: Jesusaves <cpntb1@ymail.com> Date: Mon, 9 Sep 2019 17:33:00 -0300 Subject: Remove Artis and Esperia Teleporter Constants. Add LoF teleporter constant. Prepare POL_LocToTP --- db/constants.conf | 4 ++-- npc/009-1/teleporter.txt | 4 ++-- npc/018-5/teleporter.txt | 4 ++-- npc/024-1/teleporter.txt | 4 ++-- npc/functions/politics.txt | 26 ++++++++++++++++++++++++++ 5 files changed, 34 insertions(+), 8 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index b0db167c9..a5628a22e 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4288,8 +4288,8 @@ constants_db: { TP_TULIM: 4 TP_HURNS: 8 TP_NIVAL: 16 - TP_ARTIS: 32 - TP_ESPER: 64 + TP_LOF: 32 + TP_FORT: 64 TP_BOSSR: 128 TP_LILIT: 256 diff --git a/npc/009-1/teleporter.txt b/npc/009-1/teleporter.txt index 27eefc46a..f36abc917 100644 --- a/npc/009-1/teleporter.txt +++ b/npc/009-1/teleporter.txt @@ -29,8 +29,8 @@ OnTouch: rif(TELEPORTERS & TP_TULIM, l("Tulimshar")), rif(TELEPORTERS & TP_HURNS, l("Hurnscald")), rif(TELEPORTERS & TP_NIVAL, l("Nivalis")), - rif(TELEPORTERS & TP_ARTIS, l("Artis")), - rif(TELEPORTERS & TP_ESPER, l("Esperia")), + rif(TELEPORTERS & TP_LOF, l("Land Of Fire")), + rif(TELEPORTERS & TP_FORT, l("Fortress Island")), rif(TELEPORTERS & TP_BOSSR, l("The Monster King Fortress")), l("None"); mes ""; diff --git a/npc/018-5/teleporter.txt b/npc/018-5/teleporter.txt index 8a3dcdaff..7b3be840b 100644 --- a/npc/018-5/teleporter.txt +++ b/npc/018-5/teleporter.txt @@ -29,8 +29,8 @@ OnTouch: rif(TELEPORTERS & TP_TULIM, l("Tulimshar")), rif(TELEPORTERS & TP_HURNS, l("Hurnscald")), rif(TELEPORTERS & TP_NIVAL, l("Nivalis")), - rif(TELEPORTERS & TP_ARTIS, l("Artis")), - rif(TELEPORTERS & TP_ESPER, l("Esperia")), + rif(TELEPORTERS & TP_LOF, l("Land Of Fire")), + rif(TELEPORTERS & TP_FORT, l("Fortress Island")), rif(TELEPORTERS & TP_BOSSR, l("The Monster King Fortress")), l("None"); mes ""; diff --git a/npc/024-1/teleporter.txt b/npc/024-1/teleporter.txt index b24fb50fd..34595e695 100644 --- a/npc/024-1/teleporter.txt +++ b/npc/024-1/teleporter.txt @@ -29,8 +29,8 @@ OnTouch: rif(TELEPORTERS & TP_TULIM, l("Tulimshar")), rif(TELEPORTERS & TP_HURNS, l("Hurnscald")), rif(TELEPORTERS & TP_NIVAL, l("Nivalis")), - rif(TELEPORTERS & TP_ARTIS, l("Artis")), - rif(TELEPORTERS & TP_ESPER, l("Esperia")), + rif(TELEPORTERS & TP_LOF, l("Land Of Fire")), + rif(TELEPORTERS & TP_FORT, l("Fortress Island")), rif(TELEPORTERS & TP_BOSSR, l("The Monster King Fortress")), l("None"); mes ""; 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-70-g09d2