Mob question..

Post Reply
User avatar
Signature
Posts: 126
Joined: Fri May 02, 2014 3:44 am

Mob question..

Post by Signature » Fri May 30, 2014 12:52 pm

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?

gedads
Developer
Posts: 171
Joined: Fri Jan 04, 2013 7:48 pm

Re: Mob question..

Post by gedads » Sat May 31, 2014 3:45 am

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).

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Mob question..

Post by kjLotus » Sat May 31, 2014 4:33 am

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)

User avatar
Signature
Posts: 126
Joined: Fri May 02, 2014 3:44 am

Re: Mob question..

Post by Signature » Sat May 31, 2014 4:03 pm

Perfect! Thank you!


this is what worked...

Code: Select all

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

function OnMobRoam(mob)

	mob:addHP( 250000 );
end;

Post Reply