Woah, they put OOC regen on live? LOL, they might actually be getting smarter :P
Either way, with the rule, you will be able to easily turn it on or off, or adjust the rate you want them to regen at. By setting the rule to 1, you would regen 1% per tick. So, if you wanted to regen from 0 to full in 3 minutes, you would just take 180/6 = 30, so 30 ticks, and if you set your rules to 3 (3 X 30 = 90), it would be pretty close to 3 minutes to regen full HPs or Mana. I think it is nice to have the option to enable/disable and increase/decrease the OOC Regen rates.
As for the code to check if they are engaged, I see in command.cpp from the latest SVN that it uses:
To check something with Feign Death (I don't have the code handy right now to post the exact line).
I tried using something like that, but I don't know how to define "c" properly. I think if I could figure out how to do that, that it should probably work. Maybe something like this:
Code:
if(c->IsEngaged())
oochpregen = 0;
else
oochpregen += GetMaxHP() * RuleI(Character, OOCHPRegen) / 100;
I think that looks about right, but I would need someone to help me to define "c" so that it worked like it does in command.cpp. I am still a noob lol.