daily pastebin goal
41%
SHARE
TWEET

Miner (West)

c4sti3l Jan 29th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function newPosition()
  2.     local res = http.get("http://mc.delta-revolution.de/?action=getDirection&id="..os.getComputerID())
  3.     if res then
  4.         if res.readLine()=="n" then
  5.             turtle.turnRight()
  6.             turtle.up()
  7.             turtle.up()
  8.             turtle.up()
  9.             for i=0,15 do
  10.                 turtle.forward()
  11.             end
  12.             turtle.down()
  13.             turtle.down()
  14.             turtle.down()
  15.             turtle.turnLeft()
  16.         end
  17.     end
  18. end
  19.  
  20. function mine()
  21.     http.get("http://mc.delta-revolution.de/?action=setTurtleStatus&id="..os.getComputerID().."&status=mine")
  22.     --[excavate]--
  23.     print("Mine...")
  24.     newPosition()
  25. end
  26.  
  27. term.clear()
  28. http.get("http://mc.delta-revolution.de/?action=setTurtleStatus&id="..os.getComputerID().."&status=wait")
  29. print("=============================")
  30. print("===    Miner Tool v1.0    ===")
  31. print("===        Westen         ===")
  32. print("=============================")
  33. print("")
  34. while true do
  35.     print("Waiting for Controller...")
  36.     local res = http.get("http://mc.delta-revolution.de/?action=getControllerStatus&id="..os.getComputerID())
  37.     if res then
  38.         if res.readLine()=="ready" then
  39.             mine()
  40.         end
  41.     end
  42.     os.sleep(1)
  43. end
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top