summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-05-24 18:14:06 -0300
committerJesusaves <cpntb1@ymail.com>2018-05-24 18:14:06 -0300
commitbe082fe6ffd0dd4a4f033c9ecb36549a70df7b98 (patch)
tree2ba31f88c5a4d480229d35578343741b322e4cbf
parent5c8f962f3136d6cb724782e4d83ddcd8d6bc1f69 (diff)
downloadserverdata-be082fe6ffd0dd4a4f033c9ecb36549a70df7b98.tar.gz
serverdata-be082fe6ffd0dd4a4f033c9ecb36549a70df7b98.tar.bz2
serverdata-be082fe6ffd0dd4a4f033c9ecb36549a70df7b98.tar.xz
serverdata-be082fe6ffd0dd4a4f033c9ecb36549a70df7b98.zip
Check if Alige previous quest was removed
-rw-r--r--npc/002-1/alige.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/npc/002-1/alige.txt b/npc/002-1/alige.txt
index 862003290..0abdc1522 100644
--- a/npc/002-1/alige.txt
+++ b/npc/002-1/alige.txt
@@ -12,6 +12,7 @@
// food, water, and money for a hat.
002-1,45,26,0 script Alige NPC_ALIGE,{
+ .@q=getq(ShipQuests_Alige);
mesn;
mesq lg("Hey, dude! The guards are after me. I need your help, and I can reward you.");
next;
@@ -39,6 +40,17 @@ L_GoGo:
OnInit:
.sex = G_MALE;
.distance = 2;
+
+ // Preventive check against faulty update. Must be removed afterwards.
+ // UPDATE `quest` SET `count1` = '0' WHERE `quest`.`quest_id` = 2;
+ .@nb = query_sql("select `char_id` from `quest` WHERE (`count1`>=1 and `quest_id`=2) LIMIT 2", .@name$);
+ if (getarraysize(.@name$) > 0) {
+ debugmes "FATAL ERROR: Quest log not updated.";
+ debugmes "disabling Alige to prevent weirder bugs.";
+ debugmes "UPDATE `quest` SET `count1` = '0' WHERE `quest`.`quest_id` = 2";
+ disablenpc .name$;
+ }
+
end;