Hello people, Im having some trouble with a part of the quest demon oak.
The problem is, players outside de demon oak area cant attack monster inside the demon oak, BUT, monsters can attack players outside the quest
here is the creaturescript im using
EDIT: spells can attack monsters inside too, can someone fix it???
The problem is, players outside de demon oak area cant attack monster inside the demon oak, BUT, monsters can attack players outside the quest
here is the creaturescript im using
Code:
local areaPosition =
{
{x=32708, y=32343, z=7, stackpos = 255},
{x=32725, y=32357, z=7, stackpos = 255}
}
function onAttack(cid, target)
if not isPlayer(cid) or not isMonster(target) then return true end
if not isInRange(getCreaturePosition(cid), areaPosition[1], areaPosition[2]) and isInRange(getCreaturePosition(target), areaPosition[1], areaPosition[2]) then
return false
end
return true
end
EDIT: spells can attack monsters inside too, can someone fix it???
Last edited: