From 12f81ab4483724f8a363864196a484bf3089be8b Mon Sep 17 00:00:00 2001
From: Jesusaves <cpntb1@ymail.com>
Date: Mon, 17 Sep 2018 10:45:34 -0300
Subject: Update Ryan to be quest-log compatible

---
 npc/009-2/ryan.txt | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

(limited to 'npc/009-2/ryan.txt')

diff --git a/npc/009-2/ryan.txt b/npc/009-2/ryan.txt
index ed3c11ab1..4be079e38 100644
--- a/npc/009-2/ryan.txt
+++ b/npc/009-2/ryan.txt
@@ -7,7 +7,8 @@
 
 009-2,29,57,0	script	Ryan	NPC_PLAYER,{
     if (BaseLevel < 17) goto L_Weak;
-    .@q=getq(HalinarzoQuest_LifeDelight);
+    if (!getq(HalinarzoQuest_LifeDelight)) goto L_Prologue;
+    .@q=getq2(HalinarzoQuest_LifeDelight);
     .@a=(.@q**2)+20;
     // Maximum: 10'020 Delights
     if (.@q > 100) goto L_Complete;
@@ -37,6 +38,7 @@
     // Chef hat last stage: 120 Delights - 605 in total
     .@q=getq(HalinarzoQuest_LifeDelight);
     if (.@q == 11) {
+        setq1 HalinarzoQuest_LifeDelight, 2;
         getitem ChefHat, 1;
         getexp 13500, 10;
         next;
@@ -56,6 +58,7 @@
         getexp rand(.@q,.@a), rand(1, .@q);
     }        
     if (.@q == 100) {
+        setq1 HalinarzoQuest_LifeDelight, 3;
         getitem PlatinumIngot, 1;
         next;
         mesn;
@@ -74,6 +77,15 @@ L_Weak:
     mesq l("How did you even got here? There are dangerous swamps north, and dangerous deserts south...");
     close;
 
+L_Prologue:
+    setq HalinarzoQuest_LifeDelight, 1, 0;
+    mesn;
+    mesq l("Ah, I just wanted @@... Yummy, lovely @@...", getitemlink(TonoriDelight), getitemlink(TonoriDelight));
+    next;
+    mesn;
+    mesq l("There's a big prize in the end... Could you bring me some later?");
+    close;
+
 OnInit:
     .@npcId = getnpcid(0, .name$);
     setunitdata(.@npcId, UDT_HEADTOP, ChefHat);
-- 
cgit v1.2.3-70-g09d2