Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ID = 14
- id1 = 0
- rednet.open("right")
- shell.run("clear")
- print("M to mine")
- function compare()
- for n=1,3 do
- turtle.select(n)
- if turtle.compare() then
- rednet.broadcast("Prepare your anus")
- return true
- end
- end
- end
- function mine()
- for n=1,2 do
- if not compare() then
- turtle.dig()
- turtle.up()
- else
- prepare()
- end
- end
- if not compare() then
- turtle.dig()
- else
- prepare()
- end
- turtle.down()
- turtle.down()
- end
- function prepare()
- turtle.down()
- turtle.down()
- turtle.up()
- turtle.up()
- turtle.back()
- turtle.back()
- print("Press o when you are done")
- end
- Times = 0
- while true do
- event, id, msg = os.pullEvent()
- if id == ID or id1 == ID then
- if msg == "Prepare your anus" then
- print("Something in front of me")
- prepare()
- elseif msg == "done" then
- Times = Times+1
- if Times == 2 then
- rednet.broadcast("forwards!")
- print("Forwards!")
- Times = 0
- turtle.select(4)
- turtle.placeDown()
- if not turtle.forward() then
- rednet.broadcast("I cannot")
- print("Cant go forwards!")
- turtle.back()
- mine()
- end
- end
- end
- elseif event == "char" and id == "o" then
- print("Its over! Back to mining!")
- rednet.broadcast("itsover")
- turtle.forward()
- turtle.forward()
- turtle.down()
- turtle.down()
- mine()
- elseif event == "char" and id == "m" then
- rednet.broadcast("mine")
- print("Mine!")
- mine()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment