Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- function newPosition()
- local res = http.get("http://mc.delta-revolution.de/?action=getDirection&id="..os.getComputerID())
- if res then
- if res.readLine()=="n" then
- turtle.turnRight()
- turtle.up()
- turtle.up()
- turtle.up()
- for i=0,15 do
- turtle.forward()
- end
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.turnLeft()
- end
- end
- end
- function mine()
- http.get("http://mc.delta-revolution.de/?action=setTurtleStatus&id="..os.getComputerID().."&status=mine")
- --[excavate]--
- print("Mine...")
- newPosition()
- end
- term.clear()
- http.get("http://mc.delta-revolution.de/?action=setTurtleStatus&id="..os.getComputerID().."&status=wait")
- print("=============================")
- print("=== Miner Tool v1.0 ===")
- print("=== Westen ===")
- print("=============================")
- print("")
- while true do
- print("Waiting for Controller...")
- local res = http.get("http://mc.delta-revolution.de/?action=getControllerStatus&id="..os.getComputerID())
- if res then
- if res.readLine()=="ready" then
- mine()
- end
- end
- os.sleep(1)
- end
RAW Paste Data


