Guest User

floor by Big SHiny Toys

a guest
Sep 21st, 2012
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. local a = {...}
  2. turtle.turnLeft()
  3. turtle.turnLeft()
  4. local function find()
  5.     for x = 1,16 do
  6.     if turtle.getItemCount(x) > 0 then
  7.         turtle.select(x)
  8.     return true
  9.     end
  10.     end
  11.     print("wating for blocks")
  12.     while true do
  13.     local e,e1 = os.pullEvent("key")
  14.     if e1 == 28 then break end
  15.     end
  16. end
  17. for i = 1,a[1] do
  18.     for a = 1,a[2] do
  19.         turtle.back()
  20.         if not turtle.place() and find() then
  21.             turtle.place()
  22.         end
  23.     end
  24.     if math.fmod(i,2) == 0 then
  25.         turtle.turnRight()
  26.         turtle.back()
  27.         turtle.place()
  28.         turtle.turnRight()
  29.     else
  30.         turtle.turnLeft()
  31.         turtle.back()
  32.         turtle.place()
  33.         turtle.turnLeft()
  34.     end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment