I have got this far ^_^
mob/verb/Punch(obj/M as obj in oview(1))
if(istype(M,/obj/Training/punchingbag))
if(upcount == 5)
flick("Stick_Attack",M)
usr << "You punched the bag!"
usr << "You gained strength!"
src.strength += 1
src.upcount = 0
else
flick("Stick_Attack",M)
usr << "You punched the bag!"
upcount += 1
if(istype(M,/obj/Training/punchingbag2))
if(upcount2 == 5)
flick("Stick_Attack",M)
usr << "You punched the bag!"
usr << "You gained dexterity!"
src.dexterity += 1
src.upcount2 = 0
else
flick("Stick_Attack",M)
usr << "You punched the bag!"
upcount2 += 1
else
return
I have made a new var called stamina, which is set to 100. How can i make this so that it drops by a random amount (1-10) and when it reaches 0 it wont let you train and it will tell you that via a msg. I can make a separate rest verb to do that.
ID:148892
Aug 25 2002, 6:41 am
|
|
In response to Soori-99
|
|
it kinda works =)
what happens is the stamina reaches 0 and the msg saying you need to rest comes up, but it doesnt return, so you can continues to punch the bag, anyone want to give me more help ^_^ ? |
In response to Feiti
|
|
mob/proc/staminacheck()
if(usr.stamina <= 0) usr << "You are too tired" return 0 else usr.stamina -= rand(1,10) return 1 (Notice the return 0) Then, put in... if(!staminacheck()) return Hope that helps. BTW, punching bags are NOT a good idea for ANY game. |
mob/proc/staminacheck()
if(usr.stamina <= 0)
usr << "You are too tired"
return
else
usr.stamina -= rand(1,10)
add this right before the flick proc for each one
i think that should work