Advertisement
Skymagnum

Untitled

May 12th, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. function getWaterInArea(pos, rangex, rangey)
  2.  
  3.         local ItemIds = {4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}
  4.  
  5.         for itemId in pairs(ItemIds) do
  6.                 for x = -rangex, rangex do
  7.                         for y = -rangey, rangey do
  8.                                 local posi = {x = pos.x + x, y = pos.y + y, z = pos.z}
  9.                                 local item = getTileItemById(posi, itemId)
  10.                                 if item.uid > 0 and not (x == 0 and y == 0) then
  11.                                         return true
  12.                                 end
  13.                         end
  14.                 end
  15.         end
  16.         return false
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement