diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-07-25 23:43:07 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-07-25 23:43:07 -0300 |
commit | dbbf74820460507dc354eaf9cc1d4b4dd4671f95 (patch) | |
tree | fa6ea704fc7fc6386cd84d0352f8e5ab0fc7d152 /npc | |
parent | c814b4ebd094ab7d1bc419106386bb64b8d2266e (diff) | |
download | serverdata-dbbf74820460507dc354eaf9cc1d4b4dd4671f95.tar.gz serverdata-dbbf74820460507dc354eaf9cc1d4b4dd4671f95.tar.bz2 serverdata-dbbf74820460507dc354eaf9cc1d4b4dd4671f95.tar.xz serverdata-dbbf74820460507dc354eaf9cc1d4b4dd4671f95.zip |
This will be the loop for removing skills
Diffstat (limited to 'npc')
-rw-r--r-- | npc/functions/clientversion.txt | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt index 0db2905f3..9fb238dfd 100644 --- a/npc/functions/clientversion.txt +++ b/npc/functions/clientversion.txt @@ -297,17 +297,43 @@ function script clientupdater { } if (getskilllv(ALL_INCCARRY)) { skill TF_STEAL, getskilllv(ALL_INCCARRY); - setskill ALL_INCCARRY, 0; + skill ALL_INCCARRY, 0, 0; mesc l("Increase Weight skill replaced with Stealing."); } // NEW MAGIC SYSTEM if (getskilllv(SN_SHARPSHOOTING)) { skill AC_CHARGEARROW, getskilllv(SN_SHARPSHOOTING); - setskill AC_CHARGEARROW, 0; + skill AC_CHARGEARROW, 0, 0; getexp 2000, 150; mesc l("Sharpshooting skill replaced with Charged Arrow."); mesc l("You've got 2000 xp and 150 job xp in apology tokens."); } + getskilllist(); + for (.@i=0; .@i < @skilllist_count; .@i++) { + // skip temporary skills + if (@skilllist_flag[.@i] != 0) + continue; + // Only “paid” skills will result in a Scholarship Badge + switch (@skilllist_id[.@i]) { + case SM_BASH: + case MG_FIREBALL: + mesc l("A skill has been replaced with an @@.", getitemlink(ScholarshipBadge)); + getitem ScholarshipBadge, 1; + skill @skilllist_id[.@i], 0, 0; + break; + // Free skills (AL_HEAL and provokes) will result in XP + // Only AL_HEAL with level 3+ will result in a badge + case AL_HEAL: + if (@skilllist_lv[.@i] >= 3) + getitem ScholarshipBadge, 1; + case EVOL_MASS_PROVOKE: + .@delval=@skilllist_lv[.@i]; + mesc l("A skill has been removed, you got @@ job exp and @@ Strange Coin as an apology token.", .@delval*100, .@delval); + getexp .@delval, .@delval*100; + getitem StrangeCoin, .@delval; + break; + } + } // Cleanup deletearray RNGTREASURE_DATE; } |