ID:268573
 
how do I make a meditate verb for and RPG where it will gain HP?
Dragon warrior2662 wrote:
how do I make a meditate verb for and RPG where it will gain HP?

Think about it for a minute. You need a verb, and inside the verb you want the player's HP var to increase.
In response to Jon88
mob
verb
Meditate()
if(!Meditating)
movement = 1 //Change this to the var that freezes the character. If you don't have one, look up Insayne's Admin Demo.
src.icon_state = "Meditate" //Switch this to your Meditate icon state.
HPrecover = HP //Making it so your HP recovers faster if you have higher HP.
HPrecover *= 1.5 //Multiplying it by 1.5...
round(HPrecover,1) //Rounding it to the nearest one.
MeditateDelay = Agility //Making it so the faster Agility you have, the faster you can meditate.
//Insert a loop here, seeing as I don't know them yet.
spawn(50) //The delay for each recovery.(5 seconds)
src.HP += HPrecover //Add the HP recovery
src.HPCheck() //Check to make sure if there HP is over their max.
else //If they click Meditate again...
movement = 0 //Make it so they can move.
src.icon_state = "" //And, make it so they're back to normal.

var
HPrecover
MeditateDelay
Meditating

proc
HPCheck()
if(HP >= MaxHP)
HP == MaxHP
else
return

I didn't test this out, so, meh.