Advertisement
Guest User

startup

a guest
Dec 19th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. inp="0"
  2. count=0
  3. maxcount=16
  4. gows="0"
  5. shell.run("refuel all")
  6. while true do
  7. inp=read()
  8. coal = turtle.refuel()
  9. shell.run("label set Miner, "..coal)
  10.  
  11. if not(inp=="0") then
  12. if not(inp=="ref") then
  13. if not(inp=="go") then
  14. if not(inp=="drop") then
  15. shell.run("tunnel "..inp)
  16. turtle.turnLeft()
  17. turtle.turnLeft()
  18. shell.run("tunnel "..inp)
  19. count=0
  20. inp="0"
  21. end
  22. end
  23. end
  24. if(inp=="drop") then
  25. while not(count==maxcount) do
  26. if count==0 then
  27.  
  28. else
  29. turtle.select(count)
  30. turtle.dropDown()
  31. end
  32. count=count+1
  33. end
  34. turtle.select(1)
  35. end
  36. end
  37. if inp=="go" then
  38. turtle.forward()
  39. end
  40. if(inp=="ref") then
  41. shell.run("refuel all")
  42. end
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement