Page 1 of 1

Mob question..

Posted: Fri May 30, 2014 12:52 pm
by Signature
how would we make a mob heal itself on deaggro.?


Example: a small group is fighting a Notorious monster... Everyone in group dies. At this point the mob will deaggro And should Heal up to full health or start a heavy regen untill health is back at 100%...

Is this done inside the source files on a per family basis? would it be in mobutils.cpp or somewhere else?

can this be triggered by a lua script on a per nm basis?

Re: Mob question..

Posted: Sat May 31, 2014 3:45 am
by gedads
Hi, you probably can do that by adding mod regen in the script of the mob once the mob goes or is roaming in OnMobRoam.
but the regen once a mob is left unclaimed is really fast like 10 percent hp every tick and sometimes much quicker and i don't know if a doted unclaimed mob is considered as roaming (it prevents hp regen).

Re: Mob question..

Posted: Sat May 31, 2014 4:33 am
by kjLotus
to do it properly, would probably have to be something in the mobs checkregen (ie. if it's roaming and it's not taking damage over time, heal it a bunch)

Re: Mob question..

Posted: Sat May 31, 2014 4:03 pm
by Signature
Perfect! Thank you!


this is what worked...

Code: Select all

-----------------------------------
-- OnMobRoam
-----------------------------------

function OnMobRoam(mob)

	mob:addHP( 250000 );
end;