lokolokio
Well-Known Member
Hello OTLanders, the info I need to know is if there are function like this one?
or wath I need to do to make a monster run anytime I want, not like this function:
that function make monster run when his hp goes below certain health points, but I want to make monster run if he is surounded by many players, not just with hp below, ex:
Lua:
monsterType:setRunHealth()
Lua:
monsterType:getRunHealth()
Lua:
--Obviously is not a working function but is the example idea.
function onThink(cid)
local m = Monster(cid)
local attackers = Game.getSpectators(pos, -5, 5, -6, 6, true)
local monster = MonsterType(m)
local hp = m:getHealth()
if attacker >= 6 then
monster:setRunHealth(hp) -- Not importing the hp, I want to make a monster run if a 6 or more players surround him.
end
end