Well i got a mend skill and i was wondoing if theres a way to make it stop from going over the max HP with this
usr.HP += 10
But make it stop with out going over max hp ?
ID:176269
Jan 31 2003, 3:46 pm
|
|
Jan 31 2003, 3:50 pm
|
|
Look up max() in the reference.
|
In response to Nadrew
|
|
Don't you mean min()?
|
put
mob var maxhp = 100 //the verb coding if(src.hp + 10 > maxhp) src.hp = maxhp else src.hp += 10 |
In response to Garthor
|
|
Both could be used in this case.
|
In response to Nadrew
|
|
would mine work?
|
In response to Koolguy900095
|
|
Yes, but it's not the most efficent way of doing it. min() (and secondly max()) would be the best way of doing at it.
|