diff options
-rw-r--r-- | db/quest_db.conf | 4 | ||||
-rw-r--r-- | npc/029-1/valon.txt | 19 | ||||
-rw-r--r-- | npc/functions/clear_vars.txt | 11 | ||||
-rw-r--r-- | npc/functions/mob_points.txt | 4 | ||||
-rw-r--r-- | npc/functions/quests.txt | 6 |
5 files changed, 29 insertions, 15 deletions
diff --git a/db/quest_db.conf b/db/quest_db.conf index ecae46d6..1ac277da 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -39,6 +39,10 @@ quest_db: ( Id: 20 Name: "CandorQuest_Harasser" }, +{ + Id: 21 + Name: "CandorQuest_Valon" +}, // Tonori Quests (60~99) diff --git a/npc/029-1/valon.txt b/npc/029-1/valon.txt index eb168fee..91cb7892 100644 --- a/npc/029-1/valon.txt +++ b/npc/029-1/valon.txt @@ -12,7 +12,7 @@ OnInit: mes "Reset?"; if (askyesno() == ASK_YES) { - QL_VALON = 0; + setq CandorQuest_Valon, 0; STARTAREA = (STARTAREA & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT)); mes ""; mes "Reset!"; @@ -29,13 +29,14 @@ OnInit: if(@npc_check) end; ValonCount(); - if (QL_VALON >= 6) + .@q=getq(CandorQuest_Valon); + if (.@q >= 6) goto L_QuestComplete; - if (QL_VALON == 1) + if (.@q == 1) goto L_QuestAskAgain; if (@valon_count >= $@ValonMobCnt[@valon_mob]) goto L_NextMob; - if ((QL_VALON >= 2) && (QL_VALON < 6)) + if ((.@q >= 2) && (.@q < 6)) goto L_QuestStarted; goto L_QuestAsk; @@ -55,14 +56,14 @@ L_QuestAsk: mes "\"I should know I guard this gate from all manner of island beasts.\""; mes "\"Maybe you would like help and earn your stripes?\""; mes "\"The Council of Wizard's does offer a reward for helping...\""; - QL_VALON = 1; + setq CandorQuest_Valon, 1; ResetValonCntMask(); menu "YES!!! let me at them!", L_Accept, "Maybe some other time.", L_close; L_Accept: - QL_VALON = 2; + setq CandorQuest_Valon, 2; ValonCount(); goto L_NewMob; @@ -70,8 +71,8 @@ L_NextMob: getexp 40, 0; mesq l("I see you killed all the %s needed.", getmonsterlink(@valon_mob)); mesq l("The Wizard's thank thee as well."); - Zeny = Zeny + 25; - QL_VALON = (QL_VALON + 1); + Zeny += 25; + setq CandorQuest_Valon, (.@q + 1); ResetValonCntMask(); ValonCount(); if (@valon_mob == getarraysize($@ValonMob)) @@ -94,7 +95,7 @@ L_QuestOver: mesn; mesq l("Thanks once again for helping with the monsters in the island."); getexp 50, 0; - QL_VALON = (QL_VALON + 1); + setq CandorQuest_Valon, (.@q + 1); close; L_QuestComplete: diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt index 61268afd..4b85640c 100644 --- a/npc/functions/clear_vars.txt +++ b/npc/functions/clear_vars.txt @@ -1,8 +1,15 @@ function script ClearVariables { - if(@login_event != 1) goto L_Deprecated; + if (@login_event != 1) goto L_Deprecated; - if(#BankAccount >= 0) return; + if (QL_VALON) { + setq CandorQuest_Valon, QL_VALON; + QL_VALON=0; + } + + // Don't ask me what code below does + // ---------------------------------- + if (#BankAccount >= 0) return; if (Zeny >= -#BankAccount) { Zeny = Zeny + #BankAccount; #BankAccount = 0; diff --git a/npc/functions/mob_points.txt b/npc/functions/mob_points.txt index c80a5514..f4cbedf0 100644 --- a/npc/functions/mob_points.txt +++ b/npc/functions/mob_points.txt @@ -44,7 +44,9 @@ function script MobPoints { } ValonCount(); - if (((QL_VALON >= 2) && (QL_VALON < 6)) && (@mobId == $@ValonMob[@valon_mob])) + if (((getq(CandorQuest_Valon) >= 2) && + (getq(CandorQuest_Valon) < 6)) && + (@mobId == $@ValonMob[@valon_mob])) AddValonCntMask(); diff --git a/npc/functions/quests.txt b/npc/functions/quests.txt index fcdc13eb..657b7eff 100644 --- a/npc/functions/quests.txt +++ b/npc/functions/quests.txt @@ -37,8 +37,8 @@ function script elanore_decrease_exp { function script ValonCount { @valon_mob = 0; - if (QL_VALON >= 2) - @valon_mob = (QL_VALON - 2); + if (getq(CandorQuest_Valon) >= 2) + @valon_mob = (getq(CandorQuest_Valon) - 2); @valon_count = ((STARTAREA & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); return; } @@ -50,7 +50,7 @@ function script ResetValonCntMask { function script ValonProgress { ValonCount(); - if ((QL_VALON > 1) && (QL_VALON < 6)) + if ((getq(CandorQuest_Valon) > 1) && (getq(CandorQuest_Valon) < 6)) message strcharinfo(0), $@ValonMobName$[@valon_mob] + ": " + @valon_count + "/" + $@ValonMobCnt[@valon_mob]; return; } |