Advertisement
Doob

boom

May 24th, 2015
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.70 KB | None | 0 0
  1. local x, z, size = 0, 0, 0
  2.  
  3. local function eraser(cx, cy, cz)
  4.   cx, cy, cz = cx-(size/2), cy-(size/2), cz-(size/2)
  5.   for ix = 1, size do
  6.     for iy = 1, size do
  7.       for iz = 1, size do
  8.         exec('setblock '..cx+ix..' '..cy+iy..' '..cz+iz..' 0')
  9.       end
  10.     end
  11.   end
  12. end
  13.  
  14. local function test()
  15.   y = 255
  16.   while y >= (size/2)+5 do
  17.     b, s = exec('testforblock '..x..' '..y..' '..z..' 0')
  18.     if b == false then
  19.       eraser(x, y, z)
  20.       break
  21.     end
  22.     y = y-1
  23.   end
  24. end
  25.  
  26. function printUsage()
  27.   print('Usage: boom <xCoord> <zCoords> <size>')
  28.   return
  29. end
  30.  
  31. local tArgs = {...}
  32. if #tArgs == 3 then
  33.   x = tArgs[1]
  34.   z = tArgs[2]
  35.   size = tArgs[3]
  36.   test()
  37. else printUsage()
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement