SHARE
TWEET

Mine

a guest Aug 20th, 2017 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function main()
  2.   use()
  3.   setup()
  4.   goOneDown()
  5.   setup()
  6.   goOneDown()
  7.   turtle.turnLeft()
  8.   turtle.turnLeft()
  9.   turtle.up()
  10.   turtle.select(14)
  11.   turtle.place()
  12.   turtle.down()
  13.   turtle.turnLeft()
  14.   turtle.turnLeft()
  15.   turtle.select(1)
  16.   local torches = turtle.getItemCount(16)
  17.   for i=1, torches do
  18.     for j=1, 5 do
  19.       setup()
  20.       if goOneDown() then
  21.         return true
  22.       end
  23.     end
  24.     placeTorch()
  25.   end
  26. end
  27.  
  28. function use()
  29.   print("64 Torches on Itemslot 16")
  30.   print("64 Cobblestone on Itemslot 15")
  31.   print("2 Craftingtable on Itemslot 14")
  32. end
  33.  
  34. function placeTorch()
  35.     turtle.up()
  36.     turtle.turnLeft()
  37.     turtle.turnLeft()
  38.     turtle.forward()
  39.     turtle.up()
  40.     turtle.select(16)
  41.     if turtle.compareUp() then
  42.         return 'true'
  43.     end
  44.     turtle.placeUp()
  45.     turtle.turnRight()
  46.     turtle.turnRight()
  47.     turtle.down()
  48.     turtle.forward()
  49.     turtle.down()
  50. end
  51.  
  52.  
  53. function setup()
  54.   while turtle.detect() do
  55.     turtle.dig()
  56.     sleep(0.5)
  57.   end
  58.   turtle.forward()
  59. end
  60.  
  61. function goOneDown()
  62.   while turtle.detectUp() do
  63.     turtle.digUp()
  64.     sleep(0.5)
  65.   end
  66.   if turtle.detectDown() then
  67.     turtle.digDown()
  68.     if turtle.detectDown() then
  69.       print("Block unbreakable")
  70.       return true
  71.     end
  72.   end
  73.   turtle.down()
  74.   if turtle.detectDown() then
  75.     turtle.digDown()
  76.     if turtle.detectDown() then
  77.       print("Block unbreakable")
  78.       return true
  79.     end
  80.   end
  81.   turtle.down()
  82.   if turtle.detectDown() then else
  83.     turtle.select(15)
  84.     turtle.placeDown()
  85.     turtle.select(1)
  86.   end
  87.   turtle.up()
  88.   return false
  89. end
  90.  
  91. function goBack()
  92.   turtle.turnLeft()
  93.   turtle.turnLeft()
  94.   turtle.forward()
  95.   turtle.select(14)
  96.   while true do
  97.     turtle.up()
  98.     if turtle.compareUp() then
  99.       return true
  100.     else
  101.       turtle.forward()
  102.     end
  103.   end
  104. end
  105.  
  106. main()
  107. print("End Going Up")
  108. goBack()
  109. print("Finished")
RAW Paste Data
Top