From 6209e38538f2fc1418dd644862ff3c85af21c62a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 4 Jun 2022 01:44:59 -0300 Subject: 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. --- npc/functions/refine.txt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'npc') 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??"); -- cgit v1.2.3-70-g09d2