otavio101
Active Member
- Joined
- Dec 14, 2010
- Messages
- 68
- Reaction score
- 39
I use this passive sistem Monster - Passive Monsters, but i found some bugs.
When you hit the monster and logout without kill him he will attack the first player on screen.
When you hit the monster and logout without kill him he will attack the first player on screen.
Code:
function onSelectTarget(self, target)
if target:getMaster() then
local master = target:getMaster()
end
local damageMap = self:getDamageMap()
for creatureId, damage in pairs(damageMap) do
local thing = Creature(creatureId)
if target == thing or master == thing then
return true
end
end
if target:getTarget() == self then
return true
end
return false
end