From abc641103183d7580a09fe4610ebb37f1a45912a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 26 Jul 2019 19:47:14 -0300 Subject: Tweak the skill deleting system. It may grant now more scholarship badges. Divine Protection is now removed, and granted again because it is now an FFA skill. --- npc/functions/clientversion.txt | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'npc/functions') diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt index fea43b6da..c3c48e4d9 100644 --- a/npc/functions/clientversion.txt +++ b/npc/functions/clientversion.txt @@ -319,19 +319,24 @@ function script clientupdater { if (@skilllist_flag[.@i] != 0) continue; // Only “paid” skills will result in a Scholarship Badge - switch (@skilllist_id[.@i]) { + .@id=@skilllist_id[.@i]; + .@am=0; + switch (.@id) { case SM_BASH: + case TMW2_DEMURE: + case MG_FIREBALL: + case MG_SRECOVERY: + case AL_DP: + .@am=1; case SM_ENDURE: case KN_AUTOCOUNTER: case KN_TWOHANDQUICKEN: - case TMW2_DEMURE: case AL_ANGELUS: case CR_TRUST: case CR_DEFENDER: case AL_HOLYLIGHT: case TF_DETOXIFY: case ALL_RESURRECTION: - case MG_SRECOVERY: case SM_RECOVERY: case PR_ASPERSIO: case AB_HIGHNESSHEAL: @@ -342,7 +347,6 @@ function script clientupdater { case SA_FROSTWEAPON: case SA_LIGHTNINGLOADER: case SA_SEISMICWEAPON: - case MG_FIREBALL: case MG_ENERGYCOAT: case MG_NAPALMBEAT: case MG_FIREBOLT: @@ -350,7 +354,10 @@ function script clientupdater { case MG_LIGHTNINGBOLT: case WZ_EARTHSPIKE: mesc l("A skill has been replaced with an @@.", getitemlink(ScholarshipBadge)); - getitem ScholarshipBadge, 1; + if (!.@am) + .@am=min(5, @skilllist_lv[.@i]); + + getitem ScholarshipBadge, .@am; skill @skilllist_id[.@i], 0, 0; getexp 5, (@skilllist_lv[.@i]-1)*1000; break; @@ -370,6 +377,11 @@ function script clientupdater { break; } } + // Grant you AL_DP based on magic level + if (MAGIC_LVL) { + skill AL_DP, MAGIC_LVL, 0; + mesc l("You have learnt \"Divine Protection\" level @@.", MAGIC_LVL), 3; + } // Cleanup deletearray RNGTREASURE_DATE; } -- cgit v1.2.3-70-g09d2