ID:146674
 
Code:
bj
var/lumber_use = 300

Lumber_Axe
icon = 'obj.dmi'
icon_state = "Lumber Axe"
name = "Lumber Axe"
verb
Drop()
set category = "Utilities"
src.loc=locate(usr.x,usr.y,usr.z)
Get()
set category = "Utilities"
set src in oview(0)
Move(usr)
Use()
set category = "Utilities"
if(usr.woodcutting == 0)
usr << "You must lurn Woodcutting to use the Lumber Axe"
else
switch(input("What do you wish to cut?","Woodcutting")in list("Bamboo","Nothing"))
if("Bamboo")
if(usr.cutbamboo)
usr << ""
usr << "You stop cutting Bamboo."
usr.move = 1
usr.icon_state = ""
usr.cutbamboo = 0
else
usr << "You begin cutting Bamboo."
usr << ""
sleep(20)
usr.icon_state = ""
usr.move = 0
usr.cutbamboo = 1
usr.bamboocut()





// del(src)
mob
proc
bamboocut()
src.random = rand(1,23)
if(src.random == 1)
src.lumber_use -= 1
src << "You Ruined this peace of Bamboo"
if(src.random == 2)
src.lumber_use -= 1
src << "You Ruined this peace of Bamboo"
src.random = rand(1,2)
if(src.random == 2)
src << "You have cut a nice peace of Bamboo"
src.contents += new /obj/Rattan
src.random = rand(1,25)
sleep(40)
if(src.lumber_use <= 1)
src.move = 1
src.icon_state = ""
src.cutbamboo = 0
src << "You stopped Woodcutting beaceuse your Lumber Axe has worn out."
return


Problem description:

It only loops one`s and then dont but it does not stop he only doesn`t loop :S
Sheesh man, if you want help ask the question in a comprehensible manner.

i.e.: "I am unable to proceed in this loop, [insert comprehensible problem details here]

--Super Squirrel
((Gat dangit' you're supposed to put away the knife first.))
Ok, after looking through your code, I think I've figured out where you're trying to loop. The problem is, you don't have a loop in that area. What you'll want to do is something like this:

            Use()   // This part goes under obj/Lumber_Axe/verb, of course...
set category = "Utilities"
if(usr.woodcutting == 0)
usr << "You must lurn Woodcutting to use the Lumber Axe"
else
switch(input("What do you wish to cut?","Woodcutting")in list("Bamboo","Nothing"))
if("Bamboo")
if(usr.cutbamboo)
usr << ""
usr << "You stop cutting Bamboo."
usr.move = 1
usr.icon_state = ""
usr.cutbamboo = 0
else
usr << "You begin cutting Bamboo."
usr << ""
sleep(20)
usr.icon_state = ""
usr.move = 0
usr.cutbamboo = 1
spawn() //I usually prefer to use a spawn when calling another proc
usr.bamboocut()



mob
proc
bamboocut()
while(src.lumber_use > 1 && usr.cutbamboo == 1) // Check cutbamboo, so if it's 0, the loop stops.
src.random = rand(1,23)
if(src.random <= 2) // I'm not sure what you had the extra check in here for...
src.lumber_use -= 1
src << "You Ruined this peace of Bamboo"
if(src.random > 2)
src << "You have cut a nice peace of Bamboo"
src.contents += new /obj/Rattan
sleep(40)
src.move = 1
src.icon_state = ""
src.cutbamboo = 0
src << "You stopped Woodcutting beaceuse your Lumber Axe has worn out."
return


Hopefully this helps!

Also, I know english isn't your primary language, so you may also consider asking someone to spell/grammar check your game after you have completed it.