Ok, I have been trying for weeks now to have a working smithing system. It was alot harder to delete more than one item for osme reason, idk maybe im stupid. But lets get over that now and go to the helping..
icon = 'OBJ.dmi'
icon_state = "anvil"
set src in oview(1)
if(!(locate(/obj/Items/Smith/Hammer) in usr.contents))
usr << "<font size=1><font color=yellow>You need a hammer to start smithing!"
var/smithing = input("What would you like to create?","SMITH MENU")in list("Iron Sword","Cancel")
if(smithing == "Iron Sword")
var/Iron_Bar = 0
for(var/obj/Items/Smith/I in usr.contents)
for( var/i = 0; i < 6; i++ )
var/obj/Items/Smith/B = locate() in usr.contents
if( istype( B, ironitemType ) )
usr << "<font size=1><font color=green>You smith an Iron Sword!"
usr << "<font size=1><font color=yellow>You need 5 iron bars to make an Iron Sword!"
This is my smithing code, it compiles cleanly.
Here is what I want it to do...
*locate 5 iron ore and delete to make an iron sword from inventory.
Here is what it is doing...
*deletes 4 ores and gives the iron sword. But next time you try smithing it doesnt delete any and gives you the sword.
So, what I'm really asking is if you can help fix this code up or, show me a cleaner system that isn't crazy.
higher than high. drakiel.