Guest User

CC Error

a guest
Mar 22nd, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function next()
  2.  turtle.turnRight()
  3.  turtle.forward()
  4.  turtle.turnLeft()
  5. end
  6. function mine()
  7.  turtle.dig()
  8.  next()
  9.  turtle.dig()
  10.  next()
  11.  turtle.dig()
  12.  turtle.turnLeft()
  13.  turtle.forward()
  14.  turtle.forward()
  15.  turtle.turnRight()
  16. end
  17. function place()
  18.  turtle.select(2)
  19.  turtle.place()
  20.  next()
  21.  turtle.place()
  22.  next()
  23.  turtle.place()
  24.  turtle.turnLeft()
  25.  turtle.forward()
  26.  turtle.forward()
  27.  turtle.turnRight()
  28.  turtle.select(1)
  29. end
  30. function button()
  31.  rs.setOutput("top", true)
  32.  sleep(0.5)
  33.  rs.setOutput("top", false)
  34.  sleep(1.75)
  35.  rs.setOutput("top", true)
  36.  sleep(0.5)
  37.  rs.setOutput("top", false)
  38. end
  39. print("How much obsidian would you like?")
  40. input = read()
  41. amount = input/3
  42. if turtle.getItemCount(2) >= input then
  43.  for i=1,amount do
  44.   place()
  45.   button()
  46.   mine()
  47.  end
  48. else
  49.  print("Not enough redstone!")
  50. end
  51. print("Mining is complete!")
Advertisement
Add Comment
Please, Sign In to add comment