Code:
obj/Non_items/Blacksmithing
icon='Blacksmithing.dmi'
Forge
icon_state="Forge"
verb/Forge()
set src in oview(1)
var/list/Orelist=list()
var/Qty
var/ForgeAmt
usr.Working=1
for(var/obj/items/Mining/Ores/Q in usr.contents)
if(!locate(Q.type)in Orelist)
Orelist += Q
if(!Orelist.len)
usr<<"[A][RED]You have nothing to smelt!"
usr.Working=0
return
var/obj/items/Mining/Ores/O = input("Which ore would you like to smelt?")as null|anything in Orelist
if(!O)
usr.Working=0
return
else
if(usr.Blacksmithing>=O.Forgelvl)
for(O in usr.contents)
if(locate(O)in usr.contents)
Qty++
var/obj/items/Mining/Ores/Amt = input("How many would you like to smelt?","Forge",Qty)as num
if(Amt<1)
usr.Working=0
return
if(Amt>Qty)
ForgeAmt=Qty
else
ForgeAmt=Amt
var/Ingot2=O.Ingot
while(ForgeAmt>0)
var/obj/I = new Ingot2(usr)
usr<<"[A][BLUE]You forge a new [I]!"
if(usr.Blacksmithing<O.Maxlvl)
usr.BlacksmithingXP+= O.Expgain
usr.Blacksmithingup()
del(O)
ForgeAmt--
usr<<"[A][GREEN]Smelting completed."
usr.Working=0
return
else
usr<<"[A][RED]You need at least [O.Forgelvl] to forge this!"
usr.Working=0
return
Problem description:
The system doesn't seem to be working at the while() proc and its not doing anything ahead of it