Advertisement
Guest User

excavatorTurtle.lua

a guest
Mar 23rd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. --Variables
  2.   local BlocksDug = 1
  3.   rednet.open("left")
  4.   local senderId, TunnelLenght, protocol = rednet.receive("excavatorCom")
  5.  
  6. --Functions
  7.   term.clear()
  8.   term.setCursorPos(1,1)
  9.   print("Creating a tunnel of"..TunnelLenght.."blocks")
  10.   for BlocksDug=1,TunnelLenght do
  11.     BlocksDug = BlocksDug + 1
  12.     for FuelSlot=1,16 do
  13.       select(FuelSlot)
  14.       if turtle.refuel(0) then
  15.         turtle.refuel()
  16.       end
  17.     end
  18.     turtle.dig()
  19.     turtle.forward()
  20.     turtle.digUp()
  21.     turtle.digDown()
  22.   end
  23. --Main Stuff
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement