Florian86

foreign_obsiplus

Apr 1st, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. local args = {...}
  2. help = args[1]
  3.  
  4. if help == "help" then
  5.   print("==== Obsidian Miner v1.3 ====")
  6.   print("By Zach Dyer")
  7.   print("Just relax let Obsidian Miner mine that pesky obsidian for you.")
  8.   print(" ")
  9.   print("USAGE: ")
  10.   print("1. Place obsidian in the first slot.")
  11.   print(" ")
  12.   print("2. Set turtle by any corner of an obsidian vein and type 'obsidian'")
  13.  
  14. else
  15.  
  16.   local done = false
  17.   local tries = 0
  18.  
  19.   if(turtle.compare() == false) then
  20.     print("Please add obsidian to the first slot.")
  21.     done = true
  22.   end
  23.  
  24.   while done == false do
  25.      
  26.     if(turtle.compare()) then
  27.       turtle.dig()
  28.       turtle.forward()
  29.       turtle.turnRight()
  30.       tries = 0
  31.     else
  32.       turtle.turnLeft()
  33.       tries = tries + 1
  34.       if tries == 5 then
  35.         turtle.back()
  36.       end
  37.       if tries > 8 then
  38.         done = true
  39.       end
  40.      
  41.     end
  42.  
  43.   end
  44.  
  45. end
Add Comment
Please, Sign In to add comment