5bitesofcookies

platform

Mar 6th, 2015
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. local args = {...}
  2. if args[1] and args[2] then else
  3.   print"Usage:"
  4.   print"roofer numLines numTurn"
  5.   return
  6. end
  7. args[1]=tonumber(args[1])-1
  8. args[2]=tonumber(args[2])-1
  9. turtle.select(1)
  10. local right
  11. for i=1,args[1] do
  12.   for i=1,args[2] do
  13.     if turtle.getItemCount(turtle.getSelectedSlot())==0 then
  14.       turtle.select(turtle.getSelectedSlot()+1)
  15.       print"ohhhh NOOOOO!!!!"
  16.     end
  17.     turtle.placeDown()
  18.     turtle.forward()
  19.   end
  20.   if not right then
  21.     turtle.turnLeft()
  22.     turtle.forward()
  23.     turtle.turnLeft()
  24.   else
  25.     turtle.turnRight()
  26.     turtle.forward()
  27.     turtle.turnRight()
  28.   end
  29.   right=not right
  30. end
Advertisement
Add Comment
Please, Sign In to add comment