diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-06-04 01:44:59 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-06-04 01:44:59 -0300 |
commit | 6209e38538f2fc1418dd644862ff3c85af21c62a (patch) | |
tree | 8432fb5cc95c85b4931306c1c47d2dbe09ee6c1d /npc | |
parent | 3650b0b6c021f12922b2ba1624b971a5984c51f1 (diff) | |
download | serverdata-6209e38538f2fc1418dd644862ff3c85af21c62a.tar.gz serverdata-6209e38538f2fc1418dd644862ff3c85af21c62a.tar.bz2 serverdata-6209e38538f2fc1418dd644862ff3c85af21c62a.tar.xz serverdata-6209e38538f2fc1418dd644862ff3c85af21c62a.zip |
Refinery for Savior and Legendary items can go up to +12 and will never nerf.
Meaning a legendary or savior item will never lose refine levels.
They can still break.
Diffstat (limited to 'npc')
-rw-r--r-- | npc/functions/refine.txt | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/npc/functions/refine.txt b/npc/functions/refine.txt index e5c835070..dee5c36e0 100644 --- a/npc/functions/refine.txt +++ b/npc/functions/refine.txt @@ -60,8 +60,17 @@ function script refineMaster { return; } + // Savior items have different rules + .@savior = false; + if (compare("savior", strtolower(getitemname(getarg(0))))) + .@savior = true; + + // Legendary Weapons, this formula is hardcoded in C + if (is_between(3600, 3610, getarg(0))) + .@savior = true; + // Max refining level: 10 - if (getequiprefinerycnt(.@it) >= 10) { + if (getequiprefinerycnt(.@it) >= (.@savior ? 12 : 10)) { mesn; mesq l("This item cannot be refined further."); return; @@ -93,7 +102,8 @@ function script refineMaster { } mesn; mesq l("This @@ is a nice stuff. I can refine it for @@ GP and @@ @@.", getitemlink(.@item), .@price, .@amount, getitemlink(.@rg)); - mesc l("Success ratio is of aprox. @@ %", (100-(.@rlv*7))+rand2(-6,6)); + .@fake = (.@savior ? rand2(-1,1) : rand2(-6, 6)); + mesc l("Success ratio is of aprox. @@ %", (100-(.@rlv*7))+.@fake); next; if (askyesno() != ASK_YES) close; @@ -146,8 +156,8 @@ function script refineMaster { mesc l("Weapons: +8 attack, +8 magic attack"); mesc l("Armors: +3~5 defense"); next; - // Item is weakened. (1% per refine level) - } else if (rand2(100) < .@rlv) { + // Item is weakened. (1% per refine level) (Savior Immunity) + } else if (rand2(100) < .@rlv && !.@savior) { downrefitem .@it, 1; mesn; mesq l("A masterpiece!... Whaaaat, this stuff got ##Bweaker##b??"); |