diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-06-04 01:47:36 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-06-04 01:47:36 -0300 |
commit | d91f46cebf86ae77bfb6e4fff9f93af04480f1e7 (patch) | |
tree | cc217f774dcb35c0edf3e53bbdac0767082bd36d | |
parent | 6209e38538f2fc1418dd644862ff3c85af21c62a (diff) | |
download | serverdata-d91f46cebf86ae77bfb6e4fff9f93af04480f1e7.tar.gz serverdata-d91f46cebf86ae77bfb6e4fff9f93af04480f1e7.tar.bz2 serverdata-d91f46cebf86ae77bfb6e4fff9f93af04480f1e7.tar.xz serverdata-d91f46cebf86ae77bfb6e4fff9f93af04480f1e7.zip |
Fix bugs and add a discount of 10GP/Level so higher equips are cheaper to refine.
This is to encourage players to always upgrade their equipment.
-rw-r--r-- | npc/functions/refine.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/npc/functions/refine.txt b/npc/functions/refine.txt index dee5c36e0..220ee6de3 100644 --- a/npc/functions/refine.txt +++ b/npc/functions/refine.txt @@ -62,11 +62,11 @@ function script refineMaster { // Savior items have different rules .@savior = false; - if (compare("savior", strtolower(getitemname(getarg(0))))) + if (compare("savior", strtolower(getitemname(.@item)))) .@savior = true; // Legendary Weapons, this formula is hardcoded in C - if (is_between(3600, 3610, getarg(0))) + if (is_between(3600, 3610, .@item)) .@savior = true; // Max refining level: 10 @@ -78,6 +78,7 @@ function script refineMaster { .@rlv=getequiprefinerycnt(.@it); .@price=(.@rlv+1)*1000; + .@price-=min(.@price, getiteminfo(.@item, ITEMINFO_ELV) * 10); .@price=POL_AdjustPrice(.@price); .@amount=(.@rlv/2)+1; // required item |