Advertisement
1vannn

Turtle Mining Script for my server

Jul 27th, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.28 KB | None | 0 0
  1. local side = "right" -- right for everything except wheat/carrot
  2. function str1()
  3.     for i=0,11 do
  4.         turtle.place()
  5.         turtle.forward()
  6.     end
  7. end
  8. function str2()
  9.     for i=0,11 do
  10.         turtle.dig()
  11.         turtle.forward()
  12.     end
  13. end
  14. while true do
  15.     if (side == "right") then
  16.         sleep(5) -- allows for easy debugging
  17.         turtle.forward()
  18.         turtle.turnRight()
  19.         turtle.forward()
  20.         turtle.digDown()
  21.         turtle.turnLeft()
  22.         str2()
  23.         turtle.turnRight()
  24.         turtle.forward()
  25.         turtle.digDown()
  26.         turtle.turnRight()
  27.         str2()
  28.         turtle.turnLeft()
  29.         turtle.forward()
  30.         turtle.digDown()
  31.         turtle.turnLeft()
  32.         str2()
  33.         turtle.turnLeft()
  34.         for i=0,2 do
  35.             turtle.forward()
  36.         end
  37.         turtle.turnLeft()
  38.         for i=0,11 do
  39.             turtle.forward()
  40.         end
  41.         turtle.turnLeft()
  42.         turtle.turnLeft()
  43.         sleep(5)
  44.         print("Preparing Materials..")
  45.         turtle.select(1)
  46.         turtle.forward()
  47.         turtle.turnRight()
  48.         turtle.forward()
  49.         turtle.placeDown()
  50.         turtle.turnLeft()
  51.         str1()
  52.         turtle.turnRight()
  53.         turtle.forward()
  54.         turtle.turnRight()
  55.         str1()
  56.         turtle.turnLeft()
  57.         turtle.forward()
  58.         turtle.turnLeft()
  59.         str1()
  60.         turtle.turnLeft()
  61.         for i=0,2 do
  62.             turtle.forward()
  63.         end
  64.         turtle.turnLeft()
  65.         for i=0,11 do
  66.             turtle.forward()
  67.         end
  68.         sleep(1200)
  69.     elseif (side == "left") then
  70.         sleep(5) -- allows for easy debugging
  71.         turtle.forward()
  72.         turtle.turnLeft()
  73.         turtle.forward()
  74.         turtle.digDown()
  75.         turtle.turnRight()
  76.         str2()
  77.         turtle.turnLeft()
  78.         turtle.forward()
  79.         turtle.digDown()
  80.         turtle.turnLeft()
  81.         str2()
  82.         turtle.turnRight()
  83.         turtle.forward()
  84.         turtle.digDown()
  85.         turtle.turnRight()
  86.         str2()
  87.         turtle.turnRight()
  88.         for i=0,2 do
  89.             turtle.forward()
  90.         end
  91.         turtle.turnRight()
  92.         for i=0,11 do
  93.             turtle.forward()
  94.         end
  95.         turtle.turnRight()
  96.         turtle.turnRight()
  97.         sleep(5)
  98.         print("Preparing Materials..")
  99.         turtle.select(1)
  100.         turtle.forward()
  101.         turtle.turnLeft()
  102.         turtle.forward()
  103.         turtle.placeDown()
  104.         turtle.turnRight()
  105.         str1()
  106.         turtle.turnLeft()
  107.         turtle.forward()
  108.         turtle.turnLeft()
  109.         str1()
  110.         turtle.turnRight()
  111.         turtle.forward()
  112.         turtle.turnRight()
  113.         str1()
  114.         turtle.turnRight()
  115.         for i=0,2 do
  116.             turtle.forward()
  117.         end
  118.         turtle.turnLeft()
  119.         for i=0,11 do
  120.             turtle.forward()
  121.         end
  122.         sleep(1200)
  123.     else
  124.         print("Invalid side")
  125.         return
  126.     end
  127. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement