Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getWaterInArea(pos, rangex, rangey)
- local ItemIds = {4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}
- for itemId in pairs(ItemIds) do
- for x = -rangex, rangex do
- for y = -rangey, rangey do
- local posi = {x = pos.x + x, y = pos.y + y, z = pos.z}
- local item = getTileItemById(posi, itemId)
- if item.uid > 0 and not (x == 0 and y == 0) then
- return true
- end
- end
- end
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement