summaryrefslogtreecommitdiff
path: root/npc/craft
diff options
context:
space:
mode:
Diffstat (limited to 'npc/craft')
-rw-r--r--npc/craft/smith.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/npc/craft/smith.txt b/npc/craft/smith.txt
index 9f5a4d903..6d5ea54c9 100644
--- a/npc/craft/smith.txt
+++ b/npc/craft/smith.txt
@@ -66,6 +66,12 @@ function script SmithSystem {
delinventorylist(); // Needed, because we'll rely on rfind()
getinventorylist();
.@index=array_rfind(@inventorylist_id, .@it);
+
+ // Just to be sure, if this have an option, get something else
+ if (getitemoptionparambyindex(.@index, 0)) {
+ .@index=array_find(@inventorylist_id, .@it);
+ }
+
if (csys_Check(.@index, 75000)) {
csys_Apply(.@index);
}