ID:146562
 
Code:
mob
proc
Mining()
set category = "Actions"
if(usr.Doing == 0)
if(usr.PickAxe==1)
if(usr.Mining <= 19)
if(prob(30))
usr.Doing = 1
sleep(30)
if(src.currentitems > src.max_items-1)
usr<<"<font face=Arial><font size = 1 font color = red>You are holding to many items"
usr.Doing = 0
else
usr << "<font face=Arial><font size = 1 font color = blue>You mine iron ore!"
usr.MiningExp += 25
usr.MiningCheck()
usr.contents += new/obj/Item/Iron_Ore
usr.Doing = 0
if(prob(40))
usr.Doing = 1
sleep(30)
if(src.currentitems > src.max_items-1)
usr<<"<font face=Arial><font size = 1 font color = red>You are holding to many items"
usr.Doing = 0
else
usr.MiningExp += 15
usr.MiningCheck() //....
usr << "<font face=Arial><font size = 1 font color = red>You mine nothing!"
usr.Doing = 0
if(usr.Mining >= 20)
if(prob(30))
usr.Doing = 1
sleep(30)
usr.MiningExp += 25
usr << "<font face=Arial><font size = 1 font color = blue>You mine iron ore!"
if(src.currentitems > src.max_items -1)
usr<<"<font face=Arial><font size = 1 font color = red>You are holding to many items"
usr.Doing = 0
else
usr.contents += new/obj/Item/Iron_Ore
usr.MiningCheck()
usr.Doing = 0
if(prob(40))
usr.Doing = 1
sleep(30)
if(src.currentitems > src.max_items-1)
usr<<"<font face=Arial><font size = 1 font color = red>You are holding to many items"
usr.Doing = 0
else
usr << "<font face=Arial><font size = 1 font color = red>You mine nothing!"
usr.MiningExp += 15
usr.MiningCheck()
usr.Doing = 0
if(prob(20))
usr.Doing = 1
sleep(30)
if(src.currentitems > src.max_items-1)
usr<<"<font face=Arial><font size = 1 font color = red>You are holding to many items"
usr.Doing = 0
else
usr.MiningExp += 30
usr.MiningCheck()
usr << "<font face=Arial><font size = 1 font color = blue>You mine steel ore!"
if(src.currentitems > src.max_items-1)
usr<<"<font face=Arial><font size = 1 font color = red>You are holding to many items"
usr.Doing = 0
else
usr.contents += new/obj/Item/Steel_Ore
usr.Doing = 0
else
usr << "<font face=Arial><font size = 1>You need a pick axe to mine!"
else
..()

obj
Icon
PickAxe
name = "Pick Axe"
icon = 'items2.dmi'
icon_state = "pickaxe"
verb
Get()
set category = "Actions"
set src in oview(1)
usr.contents += src
usr.PickAxe=1

Drop()
set category = "Actions"
set src in usr
new/obj/Icon/PickAxe(usr.loc)
usr.PickAxe=0
del(src)


Problem description:
Bacisly when i buy a pick axe and then go to mine it says you need a pick axe to mine but if i drop the pick axe and then pick it up again i can mine, or when i re-log and then go to mine it does the same. could some one please tell me how to do this noobie Problem^_^ I would be very greatfull for any help.
The problem is usr.Pickaxe=1, you shouldn't have a variable saying if you have a pickaxe or not, you should just search for one. if(locate(/obj/pickaxe) in usr) <-- There, that's checking if there's a pickaxe in usr's contents.
In response to Crashed
Thanks lol so simple but i guess i learn from my mistakes. all fixed now. ^_^
You desperately need to fix the HTML in your code.

<font face=Arial><font size = 1 font color = red>


First of all, you should never ever put spaces between an attribute (size) and the value (1). Likewise for the color attribute. Whoever started teaching people to do this needs to be slapped upside the head.

Second, you don't need to repeat "font" in the tag.

Third, you can combine these tags.

Fourth, you must always close your HTML tags.

Lummox JR