|-------------------------------------------------------------------------------------
| SUB: CheckStats
|-------------------------------------------------------------------------------------
Sub CheckStats(int statcheck, charname, ckclass, stat, int pause,int resume)
/if (${Debug}) /echo statcheck ${statcheck} charname ${charname} ckclass ${ckclass} stat ${stat} pause ${pause} resume ${resume}
/if (!${statcheck} || !${Spawn[${ckclass} ${charname}].ID} || ${Group.Member[${Group.Member[${Spawn[Group ${ckclass} ${charname}]}]}].Current${stat}}>${pause}) /return
/echo Waiting for ${charname} to med up to ${resume}% ${stat}.
:wait_for_resume
/if (${Group.Member[${Group.Member[${Spawn[Group ${ckclass} ${charname}]}]}].Current${stat}}<${resume}) /goto :wait_for_resume
/echo ${charname} is now above ${resume}% ${stat} resuming activity.
/if (${Debug}) /echo leaving CheckStats
/return