diff options
Diffstat (limited to 'npc/functions/clear_vars.txt')
-rw-r--r-- | npc/functions/clear_vars.txt | 75 |
1 files changed, 70 insertions, 5 deletions
diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt index 9670134b..76f75054 100644 --- a/npc/functions/clear_vars.txt +++ b/npc/functions/clear_vars.txt @@ -38,14 +38,16 @@ function script ClearVariables { MAGIC_EXP = (MAGIC_EXPERIENCE & 65535); MAGIC_EXPERIENCE = 0; /* Convert the old magic system to new magic system */ + setq1(MagicQuest_DarkMage, + OrumQuest); setq1(MagicQuest_Healing, (QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT); //setq1(MagicQuest_Wyara, // (QUEST_MAGIC2 & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); //setq1(MagicQuest_Kadiya, // (QUEST_MAGIC2 & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); - //setq1(MagicQuest_Pauline, - // (QUEST_MAGIC2 & NIBBLE_4_MASK) >> NIBBLE_4_SHIFT); + setq1(MagicQuest_Pauline, + (QUEST_MAGIC2 & NIBBLE_4_MASK) >> NIBBLE_4_SHIFT); //setq1(MagicQuest_BrotherSword, // (QUEST_MAGIC2 & NIBBLE_6_MASK) >> NIBBLE_6_SHIFT); //setq1(MagicQuest_SisterSword, @@ -57,15 +59,78 @@ function script ClearVariables { //SAGATHA_ST = (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; // Unhappy //Saggy - 4+5 //Alchemist - 6+7 (War Quest - Swords again?) + + /* Update skill list */ + // Orum if (OrumQuest >= 37) learnskill SKILL_HELORP; if (OrumQuest >= 38) learnskill SKILL_PHLEX; if (OrumQuest >= 41) learnskill SKILL_HALHISS; - setq(MagicQuest_DarkMage, OrumQuest); - QUEST_MAGIC = 0; - QUEST_MAGIC2 = 0; + + // Pauline + if (getq(MagicQuest_Pauline) >= 3) + learnskill SKILL_KALBOO; + if (getq(MagicQuest_Pauline) >= 4) + learnskill SKILL_KALGINA; + + // Auldsbel + .@i=((QUEST_MAGIC & (NIBBLE_0_MASK | NIBBLE_1_MASK)) >> NIBBLE_0_SHIFT); + if ((.@i >> 5) >= 5) + learnskill SKILL_GOLE; + .@i = .@i & 31; + if (.@i >= 2) + learnskill SKILL_PARUM; + if (.@i >= 4) + learnskill SKILL_PATVILOREE; + if (.@i >= 5) + learnskill SKILL_PATLOREE; + if (.@i >= 6) + learnskill SKILL_PATMUPLOO; + if (.@i >= 7) + learnskill SKILL_KULARZUFRILL; + + // War Mage + .@i = (QUEST_MAGIC & NIBBLE_6_MASK) >> NIBBLE_6_SHIFT; + if (.@i >= 1) + learnskill SKILL_FLAR; + if (.@i >= 2) + learnskill SKILL_CHIZA; + if (.@i == 4) + learnskill SKILL_FRILLYAR; + if (.@i == 5) + learnskill SKILL_UPMARMU; + if (.@i >= 6) { + learnskill SKILL_FRILLYAR; + learnskill SKILL_UPMARMU; + } + if (.@i >= 7) + learnskill SKILL_INGRAV; + + // Healing magic + if (getq(MagicQuest_Healing) >= 1) + learnskill SKILL_LUM; + if (getq(MagicQuest_Healing) >= 3) + learnskill SKILL_INMA; + + // Light Mage + .@i=((QUEST_MAGIC & (NIBBLE_4_MASK | NIBBLE_5_MASK)) >> NIBBLE_4_SHIFT); + if (.@i >= 2) + learnskill SKILL_CHIPCHIP; + if (.@i >= 3) + learnskill ALL_INCCARRY; + if (.@i >= 4) + learnskill SKILL_ASORM; + if (.@i >= 5) + learnskill SKILL_KALRENK; + if (.@i >= 6) + learnskill SKILL_KALAKARENK; + if (.@i >= 7) + learnskill SKILL_BETSANC; + + //QUEST_MAGIC = 0; + //QUEST_MAGIC2 = 0; OrumQuest = 0; } return; |