Rest()
set category = "Skills"
if(!Resting)
icon_state = "Resting"
Resting = 1
else
Resting = 0
icon_state = ""
Problem description:
I'd like to make this wait a bit before you can use it again, but, a verb doesn't have to finish running in order for a new instance of it to be created. If I hold down a Rest macro, and bunch of rests can run consecutively. So far, using sleep() while manipulating the variables has proved to be a solution, but what's the best way to prevent the verb from being spammed?
Anyways, you can just use spawn() to tell it when you can rest.
Of course you could do it other ways, all depending on how you plan on managing "resting". If you want them to stop resting when stat A is fully recharged, then you are going to either want to loop to check when it is recharged, or call a proc to recharge it that will return a value to tell when it is recharged.
I know all of the above was complicated, but my point was that you could handle resting times many ways depending on what you want to do while resting and what conditions will cause resting to stop.