From f723a9024ddecea6554d246a41be8b339f94c18b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 5 Mar 2020 13:34:34 -0300 Subject: Reorder stuff on refine which could cause crashes --- npc/functions/refine.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'npc/functions') diff --git a/npc/functions/refine.txt b/npc/functions/refine.txt index 82ea3ca50..570570fb8 100644 --- a/npc/functions/refine.txt +++ b/npc/functions/refine.txt @@ -137,14 +137,13 @@ function script refineMaster { mesq l("HA, HA, HA! The blacksmiths from the Land of Fire are the best from the world! There's no challenge too big for us!"); mesq l("It's time to show this shiny @@ who is the boss! HAHAHAHAHAHAHAH!", getitemlink(.@item)); next; - // If you cheat somewhere along the way, the script will explode - POL_PlayerMoney(.@price); - delitem .@rg, .@amount; // Cheater should be locked for eternity. if (getequiprefinerycnt(.@it) != .@rlv || getequipid(.@it) != .@item || getequipisequiped(.@it) == 0) { atcommand "@jail "+strcharinfo(0); close; } + // If you cheat somewhere along the way, the script will explode + POL_PlayerMoney(.@price); // Were we successful? if (getequippercentrefinery(.@it) > rand2(100)) { @@ -186,6 +185,7 @@ function script refineMaster { mesq l("I'm sure I could refine this again, if you bring me the payment and the reagents again."); next; } + delitem .@rg, .@amount; // We delete last, to prevent IDX changes return; } -- cgit v1.2.3-70-g09d2