From df5497d1c765251f0a1cc4fa3f29441086384cf2 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 29 Mar 2018 12:43:39 -0300 Subject: Prepare for Silvia upgrade --- npc/003-1/swezanne.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'npc') diff --git a/npc/003-1/swezanne.txt b/npc/003-1/swezanne.txt index 4c7d0f82a..2b02c961a 100644 --- a/npc/003-1/swezanne.txt +++ b/npc/003-1/swezanne.txt @@ -1,6 +1,7 @@ // TMW-2 Script // Author: // Jesusalva +// TODO IMPORTANT: ON NEXT UPDATE, set everyone with Swezanne on status (1,2) to status (3) 003-1,70,100,0 script Swezanne NPC_FEMALE,{ .@q=getq(TulimsharQuest_Swezanne); @@ -10,6 +11,7 @@ if (.@q == 0) goto L_Quest; if (.@q == 1 && gettimetick(2) >= SWEZANNE_TIMER + 60 * 60 * 24) setq TulimsharQuest_Swezanne, 2; else if (.@q == 2) goto L_Repeat; + else if (.@q == 3) goto L_Silvia; mesq l("I fight every day in hopes to meet Andrei, the famous hero who prevented Hurnscald from total destruction against a horde of monsters alone."); if ($MOST_HEROIC$ != "") goto L_Heroics; close; @@ -60,10 +62,15 @@ L_Finish: delitem CactusDrink, 5; getexp 60, 5; // 5 Job points! A great reward. Zeny = (Zeny + 150); // 5*25 = 125 base - setq TulimsharQuest_Swezanne, 1; + setq TulimsharQuest_Swezanne, 3; set SWEZANNE_TIMER, gettimetick(2); close; +L_Silvia: + mesn; + mesq l("Ah, my daughter Silvia is so far away... But I don't want to leave the shade of this tree..."); + goto L_Close; + L_Close: closedialog; goodbye; @@ -80,5 +87,13 @@ OnInit: .sex = G_FEMALE; .distance = 5; + + // Preventive check against faulty update + .@nb = query_sql("select `char_id` from `quest` WHERE ((`count1`=1 or `count1`=2) and `quest_id`=54) LIMIT 2", .@name$); + if (getarraysize(.@name$) > 0) { + debugmes "FATAL ERROR: Quest log not updated."; + debugmes "disabling Swezanne to prevent weirder bugs."; + disablenpc .name$; + } end; } -- cgit v1.2.3-60-g2f50