From f92335a4c2024993899188d3548eaa7d6dbd7444 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 1 May 2021 14:27:33 -0300 Subject: Update Valon to new quest system --- npc/functions/clear_vars.txt | 11 +++++++++-- npc/functions/mob_points.txt | 4 +++- npc/functions/quests.txt | 6 +++--- 3 files changed, 15 insertions(+), 6 deletions(-) (limited to 'npc/functions') 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; } -- cgit v1.2.3-60-g2f50