diff options
-rw-r--r-- | npc/002-1/alige.txt | 12 |
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; |