SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local i = 0
  2. local turn = true
  3. local h = 0
  4.  
  5. function demitour()
  6.     local k = 0
  7.     for k=0,1,1 do
  8.         turtle.turnLeft()
  9.     end
  10. end
  11. function poseTorche()
  12.     if i == 10 then
  13.         turtle.select(1)
  14.         demitour()
  15.         turtle.place()
  16.         demitour()
  17.         i = 0
  18.     end
  19. end
  20. function couloir()
  21.     if turtle.detect() == true then
  22.         turtle.dig()
  23.     elseif turtle.detectUp() ==  true then
  24.         turtle.digUp()
  25.     elseif turtle.detectDown() == false then
  26.         turtle.select(3)
  27.         turtle.placeDown()  
  28.     else
  29.         turtle.forward()
  30.         i = i + 1
  31.         h = h + 1    
  32.     end
  33. end
  34. function changeCouloir()
  35.     if turn == true then
  36.         turtle.turnLeft()
  37.         while h <= 67 do
  38.             couloir()
  39.         end
  40.         turtle.turnLeft()
  41.         turn = false
  42.     elseif turn == false then
  43.         turtle.turnRight()
  44.         while h<=67 do
  45.             couloir()
  46.         end
  47.         turtle.turnRight()
  48.         turn = true
  49.     end
  50.  
  51. end
  52.  
  53. while true do
  54.    
  55.     while h <= 64 do
  56.         couloir()
  57.         poseTorche()
  58.     end
  59.     changeCouloir()
  60.     h = 0
  61. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top