diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-03-05 13:34:34 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-03-05 13:34:34 -0300 |
commit | f723a9024ddecea6554d246a41be8b339f94c18b (patch) | |
tree | 9246afa3eb77c8386e589f557e9aa86d044ed9a3 | |
parent | a4d0f908f52d97144622d077d9080c34ff6e4a65 (diff) | |
download | serverdata-f723a9024ddecea6554d246a41be8b339f94c18b.tar.gz serverdata-f723a9024ddecea6554d246a41be8b339f94c18b.tar.bz2 serverdata-f723a9024ddecea6554d246a41be8b339f94c18b.tar.xz serverdata-f723a9024ddecea6554d246a41be8b339f94c18b.zip |
Reorder stuff on refine which could cause crashes
-rw-r--r-- | npc/functions/refine.txt | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |