Corrected some refiner checks

* Follow up to e24d30a.
* Fixes #2505 and fixes #2507.
* Added a missing material check for Suhnbi.
* Added a missing safe limit check for normal refiners. Safe limit was always 0.
Thanks to @mazvi, @Mickosis, and @cydh!
This commit is contained in:
aleos 2017-10-14 09:11:30 -04:00
parent 3ab39c4cb3
commit 76923ac506
2 changed files with 12 additions and 0 deletions

View File

@ -58,6 +58,10 @@ payon,157,146,6 script Suhnbi#cash 85,{
.@price = getequiprefinecost(.@part, REFINE_COST_ENRICHED, REFINE_ZENY_COST);
.@material = getequiprefinecost(.@part, REFINE_COST_ENRICHED, REFINE_MATERIAL_ID);
// Make sure you have the neccessary items and Zeny to refine your items
// Determines chance of failure and verifies that you want to continue.
callsub S_RefineValidate,getequipweaponlv(.@part),.@material,.@price,.@part;
mes "[Suhnbi]";
mes "Clang! Clang! Clang!";
if (getequippercentrefinery(.@part, true) > rand(100)) {

View File

@ -612,6 +612,14 @@ function script refinemain {
.@price = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_ZENY_COST);
.@material = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_MATERIAL_ID);
switch (getequipweaponlv(.@part)) {
case 1: .@safe = 7; break;
case 2: .@safe = 6; break;
case 3: .@safe = 5; break;
case 4:
default: .@safe = 4; break;
}
// If the VIP system is enabled, the prices for non-VIP players are considerably higher.
if (VIP_SCRIPT && !vip_status(VIP_STATUS_ACTIVE)) {
switch(getequipweaponlv(.@part)) {