ID:141441
 
Code:
mob
verb
Train()
set category ="Jutsus"
if(usr.firing)
return
if(usr.resting)
return
if(usr.canmed)
return
if(usr.train)
usr.train=1
usr.move=1
usr.icon_state=null
usr.canmed=1
usr << "You Stop Traiing."
spawn(100)
usr.canmed=0
else
usr.train=0
usr.move=0
usr << "You Start training."
usr<<"You Swing Wildly."
usr.icon_state="rest"
while(usr.train)
sleep(pick(100,110))
if(usr.random==4)
usr<<"Your Genjutsu increases."
usr<<"You Swing Wildly."
usr.chakra-=rand(5,10)
usr.genexp+=rand(1,10)
if(usr.random==2)
usr<<"Your Ninjutsu increases."
usr<<"You Swing Wildly."
usr.chakra-=rand(5,10)
usr.ninexp+=rand(1,10)
if(usr.random==8)
usr<<"Chakra increases."
usr.Mchakra+=rand(10,30)
if(usr.random==4)
usr<<"HP increases."
usr.chakra-=rand(5,10)
usr.maxhealth+=rand(10,30)
if(usr.chakra <= 5)
usr<<"You Stop Training"
usr.train=0
usr.icon_state=null
usr.canmed=1
usr.move=1
spawn(100)
usr.canmed=0


Problem description:
When the Button DMF or The Stat Pannel Icon are clicked.
it does nothing but print Start training and stop..
what have I done wrong here,
I Know The Errors with the number or placements its just not coming to me
Don't use usr in that, use src.
Src, fixed the problems --thanks
although now even though I have the if chakra <=0 etc, there its still allowing The use of Train, skills iin the - numbers, how can I make it so they can not use that skill untill they rest