diff options
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/util.txt | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt index f41c343fc..0e50e2d30 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -590,8 +590,10 @@ function script sk_maxpoints { .@val=(MAGIC_LVL)*2; // 1 point every twice magic level .@val+=(MAGIC_LVL/2); - // Excluding first 15, 1 point every 10 job levels - .@val+=((JobLevel-15)/10); + // Excluding first 15, 1 point every 12 job levels (Up to JL 75) + .@val+=min(5, ((JobLevel-15)/12)); + // 1 point per being a player + .@val+=1; // 1 point per skill permit level .@val+=getskilllv(TMW2_SKILLPERMIT); return .@val; @@ -630,21 +632,29 @@ function script mlearn { .@ap=getarg(2); .@it=getarg(3); .@am=getarg(4); + .@learn$=l("learn"); if (getskilllv(.@sk) >= .@ff) { mesc l("You've reached the maximum level for this skill."), 1; return true; } - mesc l("To learn @@ you'll need @@/@@ point(s).", .@sk, .@ap, sk_points()); + if (getskilllv(.@sk)) { + .@ap=1; + .@learn$=l("upgrade"); + } + mesc l("To @@ @@ you'll need @@/@@ point(s).", .@learn$, .@sk, .@ap, sk_points()); mesc l("You'll also need to pay a fee of @@x @@", .@am, getitemlink(.@it)); next; if (askyesno() == ASK_NO) return true; - if (countitem(.@it) < .@am) + if (countitem(.@it) < .@am && !(countitem(ScholarshipBadge))) return false; if (!sk_canlvup(.@ap)) return false; - delitem .@it, .@am; + if (countitem(.@it) < .@am) + delitem ScholarshipBadge, 1; + else + delitem .@it, .@am; sk_lvup(.@sk, .@ap); return true; } |