For smithing in my game, it's only deleteing 1 ore no matter what i try, so thats what i got in this code, deletes 1 ore.
mob
Miner1
icon = 'man2.dmi'
density = 1
verb
Talk()
set src in view(2)
var/tmp/blacksmith = input("Welcome to the Smithing shop, what may i help you with on this fine day?") in list ("Smith","Cancel")
if (blacksmith == ("Smith"))
var/pick = input("What do you want to make?") in list ("Bone Armor","No")
if(pick == "Bone Armor")
if(usr.ore >= 2)
var/list/L = new
for(var/obj/ore/O in usr)
if(istype(O,/obj/ore))
L += O
L += "Bye"
var/obj/item = input("Which ore you want to use?","???")in L
if(item == "Bye")
usr << "No ores sorry."
return
usr.contents+=new/obj/armor/Bone_Armor
usr << "Smithed 1 bone armor."
usr << "Enjoy your Armor!"
del(item)
ore=0
usr.smithing+=1
else
usr << "Aw, dude, not enough ores!"
return
Now, if usr.ores <= 2
Then it will create bone armor and delete 2 ores, i cant get it to delete 2, only 1 so im depressed.
Anyone?
RaeKwon
Try running another loop on the character's contents for the particular ore, and delete it that way.
- Malver