Lua CallForHelpHp

From ArcEmu-Wiki
Jump to: navigation, search
+/-
Main Page        LuaArcEmu Website     ArcEmu Forum     Bug Tracker



Ico maintenance.png Some of the content of this wikipage is not up to date and need some maintenance. Please help to improve this page and do some update.


Syntax

int CallForHelpHp = pUnit:CallForHelpHp(value)

Description

Will make the unit call for help when it reaches the amount of hp given.
The unit will flee in fear for help.

Return value

TODO: ?

Examples

When the unit enters combat the CallForHelpHp value is set to 10% or lower. So if the unit reaches 10% or less of it's hp it will attempt to flee.

function OnEnterCombat(pUnit, event, pAttacker)
pUnit:CallForHelpHp(pUnit:GetHealthPct <= 10)
end
Personal tools