From da6dffb6547d439278b702a3239f6363baea384b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 3 Jan 2023 13:49:08 -0300 Subject: Fix indent --- npc/020-5/bracco.txt | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/npc/020-5/bracco.txt b/npc/020-5/bracco.txt index cc34d405c..3716642d6 100644 --- a/npc/020-5/bracco.txt +++ b/npc/020-5/bracco.txt @@ -57,25 +57,27 @@ break; } - // "Unique" items are never refunded - if (.@recipe_qty <= 1) continue; + // "Unique" items are never refunded + if (.@recipe_qty <= 1) continue; - // Coal is NEVER refunded - if (.@recipe_item == Coal) continue; + // Coal is NEVER refunded + if (.@recipe_item == Coal) continue; - // New rates - .@mini = .@recipe_qty * 3 / 10 + 1; // Minimum: 30% + 1 - .@maxi = .@recipe_qty / 2; // Maximum: 50% + 1 + // TODO: Maybe give Coal as (item level / 20)? - // Some sanitizing (should never happen but you can never be sure) - // (Could only happen if qty == 1, which is skipped) - if (.@mini > .@maxi) - .@maxi = .@mini; + // New rates + .@mini = .@recipe_qty * 3 / 10 + 1; // Minimum: 30% + 1 + .@maxi = .@recipe_qty / 2; // Maximum: 50% + 1 - .@ammo = rand2(.@mini, .@maxi); + // Some sanitizing (should never happen but you can never be sure) + // (Could only happen if qty == 1, which is skipped) + if (.@mini > .@maxi) + .@maxi = .@mini; - getitem .@recipe_item, .@ammo; - mesc l("* Acquired @@ @@!", .@ammo, getitemlink(.@recipe_item)); + .@ammo = rand2(.@mini, .@maxi); + + getitem .@recipe_item, .@ammo; + mesc l("* Acquired @@ @@!", .@ammo, getitemlink(.@recipe_item)); } } return .@item; -- cgit v1.2.3-60-g2f50