diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-05-04 19:00:38 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-05-04 19:00:38 -0300 |
commit | 08f0fe566e7a5d3aedfaaac17c5523b2dc890deb (patch) | |
tree | 24c855b71073995374a1d09bceff1cd264e73299 | |
parent | 5c39c8f3f49105a1e330a63a9e72d1df62e77526 (diff) | |
download | serverdata-08f0fe566e7a5d3aedfaaac17c5523b2dc890deb.tar.gz serverdata-08f0fe566e7a5d3aedfaaac17c5523b2dc890deb.tar.bz2 serverdata-08f0fe566e7a5d3aedfaaac17c5523b2dc890deb.tar.xz serverdata-08f0fe566e7a5d3aedfaaac17c5523b2dc890deb.zip |
[DESIGN] Limit how far the options level can go depending on how much game needs.
If the game global storyline requires low power, do not allow high power.
This avoids it from getting broken OP levels when game is not designed for that.
-rw-r--r-- | db/constants.conf | 4 | ||||
-rw-r--r-- | npc/craft/options.txt | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/db/constants.conf b/db/constants.conf index ad78a0850..3a5de2d65 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -2436,7 +2436,9 @@ constants_db: { PVP_WAITTIME: 1800 // 30 minutes PCBLOCK_HARD: 255 // Move+Attack+Skill+Item+Chat+Immune+SitStand+Commands PCBLOCK_SOFT: 47 // Move+Attack+Skill+Item+Immune - CRAFT_MAXLV: 200 + CRAFT_MAXLV1: 200 // Moubootaur cap + CRAFT_MAXLV2: 100 // Monster King cap + CRAFT_MAXLV3: 50 // Fires of Steam cap BCONFN_SPAWN: 70 BCONFD_SPAWN: 100 BCONFN_MOBHP: 95 // TODO: Maybe we don't want this constant? (ie. variable) diff --git a/npc/craft/options.txt b/npc/craft/options.txt index f8948b614..ce0658617 100644 --- a/npc/craft/options.txt +++ b/npc/craft/options.txt @@ -1112,9 +1112,17 @@ function script csysGUI_RaiseOpt { .@sk=getarg(0); .@pc=csysGUI_OptPrice(.@sk); .@lv=getd("CRAFTSYS["+.@sk+"]"); + // Check the current skill cap + if ($GAME_STORYLINE >= 5) + .@mx = CRAFT_MAXLV1; + else if ($GAME_STORYLINE >= 4) + .@mx = CRAFT_MAXLV2; + else + .@mx = CRAFT_MAXLV3; + // Check if you can upgrade the skill if (csysGUI_OptReq(.@sk)) { - if (.@lv > CRAFT_MAXLV) { - mesc l("You cannot raise crafting skills beyond level @@!", CRAFT_MAXLV), 1; + if (.@lv > .@mx) { + mesc l("You cannot raise crafting skills beyond level @@!", .@mx), 1; return false; } if (Mobpt >= .@pc) { |