Pārlūkot izejas kodu

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!

aleos 7 gadi atpakaļ
vecāks
revīzija
76923ac506
2 mainītis faili ar 12 papildinājumiem un 0 dzēšanām
  1. 4 0
      npc/merchants/advanced_refiner.txt
  2. 8 0
      npc/merchants/refine.txt

+ 4 - 0
npc/merchants/advanced_refiner.txt

@@ -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)) {

+ 8 - 0
npc/merchants/refine.txt

@@ -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)) {