Advertisement
Guest User

scanner.lua

a guest
Jan 18th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. command = '/testforblock '
  2. ore =  'railcraft:ore_metal 5'
  3. lx = -175
  4. ly = 29
  5. lz = -393
  6. wide = 45
  7. hmax = 30
  8. hmin = 30
  9. for x=lx-wide,lx+wide do
  10.     for z=lz-wide,lz+wide do
  11.         for y=hmin,hmax do
  12.             loc = tostring(x)..' '..tostring(y)..' '..tostring(z)
  13.             bol = commands.testforblock(loc..' '..ore)
  14.             if bol then
  15.                 print("Find one at "..loc)
  16.                 return 0
  17.             end
  18.             print(loc)
  19.         end
  20.     end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement