Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isMonsterInArea(fromPos, toPos)
- local apos = {}
- local monsters = {}
- for xx = fromPos.x, toPos.x do
- for yy = fromPos.y, toPos.x do
- for zz = fromPos.z, toPos.z do
- apos = {x = xx, y = yy, z = zz}
- local creature = getTopCreature(apos)
- if creature.uid > 0 then
- if isMonster(creature.uid) then
- table.insert(monsters, creature)
- end
- end
- end
- end
- end
- return #monsters <= 0 and false or true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement