From bce38030b811df1b0ac1396049280b8b76c40708 Mon Sep 17 00:00:00 2001
From: Jesusaves <cpntb1@ymail.com>
Date: Sat, 7 Sep 2019 20:38:35 -0300
Subject: Update HUB to use compare()

---
 npc/functions/hub.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'npc/functions')

diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index eb535d9f6..b26c3baaa 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -44,12 +44,12 @@ function	script	HUB_Logout	{
         setq HurnscaldQuest_BloodDonor, 0, gettimetick(2)+3600; // one hour penalty
     }
     // Logout/Death on Nard's ship hold
-    if (.@mapa$ ~= "002-2" || .@mapa$ ~= "nard*") {
+    if (.@mapa$ ~= "002-2" || compare(.@mapa$,"nard")) {
         setq2 ShipQuests_Peter, 0;
         setq3 ShipQuests_Peter, -1;
     }
     // Logout on botcheck area
-    if (.@mapa$ ~= "botcheck" && !.@dead) {
+    if (compare(.@mapa$,"botcheck") && !.@dead) {
         if (!is_staff())
             atcommand "@jail "+strcharinfo(0);
     }
@@ -64,7 +64,7 @@ function	script	HUB_Logout	{
         callfunc("BSClearNest", @nestid);
     }
     // Died or logged out on Player Story 5 - Forgotten Throne Room
-    if (.@mapa$ ~= "hmc*") {
+    if (compare(.@mapa$, "hmc")) {
         .@n$=instance_npcname("#Core02331");
         deltimer(.@n$+"::OnW01");
         deltimer(.@n$+"::OnW02");
@@ -76,7 +76,7 @@ function	script	HUB_Logout	{
         deltimer(.@n$+"::OnE12");
     }
     // Died or logged out during Sagratha Fight
-    if (.@mapa$ ~= "sgt2*") {
+    if (compare(.@mapa$, "sgt2")) {
         setq1 HurnscaldQuest_Sagratha, 3;
         setq3 HurnscaldQuest_Sagratha, 0;
     }
@@ -90,9 +90,9 @@ function	script	HUB_Logout	{
         // Logged out? Correct your position to inside the ship
         // Of course, this is messy... But still better than Save Point
         if (!.@dead) {
-            if (.@mapa$ ~= "016-*")
+            if (compare(.@mapa$, "016-"))
                 warp "016-1", 28, 27;
-            else if (.@mapa$ ~= "002-*")
+            else if (compare(.@mapa$, "002-"))
                 warp "002-1", 55, 40;
             else
                 warp "Save", 0, 0;
-- 
cgit v1.2.3-70-g09d2