From b01eab62b5ec0f1c7bb423937744f051d1ad381b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 5 Jun 2019 15:38:57 -0300 Subject: Cap item option level to 50 --- npc/craft/options.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'npc') diff --git a/npc/craft/options.txt b/npc/craft/options.txt index b71dcfbbd..794001a0f 100644 --- a/npc/craft/options.txt +++ b/npc/craft/options.txt @@ -354,6 +354,7 @@ function script csys_Multiplier { case SP_DRAIN: case IOPT_DOUBLEATTACK: case VAR_PLUSAVOIDSUCCESSVALUE: + case IOPT_EXPGAIN: return 5; case IOPT_SCRESIST_POISON: case IOPT_SCRESIST_SILENCE: @@ -735,6 +736,7 @@ function script csysGUI_OptPrice { .@lv+=((.@lv/25)*5); // Every 99 skills levels (including the 0), price raises in 7 + // (Which will never happen) .@lv+=((.@lv/99)*7); switch (.@sk) { @@ -782,10 +784,17 @@ function script csysGUI_OptLearnMenu { // csysGUI_RaiseOpt( cr ) // Returns true if can raise group, false otherwise +// You can't raise if max level (50) is exceeded +// A level 50 average would result to: 5 Splash Radius , 25% EXP, 125 HP function script csysGUI_RaiseOpt { .@sk=getarg(0); .@pc=csysGUI_OptPrice(.@sk); + .@lv=getd("CRAFTSYS["+.@sk+"]"); if (csysGUI_OptReq(.@sk)) { + if (.@lv > 50) { + mesc l("You cannot raise crafting skills beyond level 50!"), 1; + return false; + } if (Mobpt >= .@pc) { Mobpt-=.@pc; .@lv=getd("CRAFTSYS["+.@sk+"]"); -- cgit v1.2.3-60-g2f50