adamg765

nextTunnel

Jun 20th, 2017
82
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local args = { ... }
  2.  
  3. local direction = tonumber(args[1])
  4.  
  5. local function refuel()
  6.     if turtle.getFuelLevel() == 0 then
  7.         local prev = turtle.getSelectedSlot()
  8.         turtle.select(1)
  9.         if not turtle.refuel(1) then
  10.             print('Need more fuel')
  11.             while not turtle.refuel(1) do
  12.                 sleep(1)
  13.             end
  14.         end
  15.         turtle.select(prev)
  16.     end
  17. end
  18.  
  19. refuel()
  20. if(direction == 0) then
  21.     turtle.turnLeft()
  22. else
  23.     turtle.turnRight()
  24. end
  25.  
  26. for i = 1, 12, 1 do
  27.     turtle.forward()
  28. end
  29.  
  30. if(direction == 0) then
  31.     turtle.turnLeft()
  32. else
  33.     turtle.turnRight()
  34. end
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×