Advertisement
Guest User

startup.lua

a guest
Jul 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. local listenProtocol = "miner"
  2. local modem = "right"
  3. local chest = "up"
  4.  
  5. rednet.open(modem)
  6.  
  7. while true do
  8.  
  9. local n, message, protocol = rednet.receive()
  10.  
  11.  
  12. if protocol == listenProtocol then
  13.  
  14. if message == "place" then
  15. turtle.place()
  16. elseif message == "dig" then
  17. turtle.dig()
  18. elseif message == "go" then
  19. turtle.forward()
  20. elseif message == "clear" then
  21. for i=1,16,1 do
  22. turtle.select(i)
  23. turtle.dropUp()
  24. end
  25. turtle.select(1)
  26. end
  27. end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement