Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. function RCmaster()
  2. while true do
  3. local sEvent, param = os.pullEvent("key")
  4. if(sEvent == "key") then
  5. if(param == 200) then
  6. rednet.broadcast("TS Forward")
  7. elseif (param == 208) then
  8. rednet.broadcast("TS Backward")
  9. elseif (param == 203) then
  10. rednet.broadcast("TS TurnLeft")
  11. elseif (param == 205) then
  12. rednet.broadcast("TS TurnRight")
  13. elseif (param == 28) then
  14. rednet.broadcast("TS PlaceBlock")
  15. elseif (param == 72) then
  16. rednet.broadcast("TS Up")
  17. elseif (param == 80) then
  18. rednet.broadcast("TS Down")
  19. elseif (param == 57) then
  20. rednet.broadcast("TS Bomb")
  21. end
  22. end
  23. end
  24. end
  25. print("What side is your modem on?")
  26. local modem = read()
  27. rednet.open(modem)
  28. term.clear()
  29. textutils.slowPrint("TurtleControl Initiated.")
  30. print ("Use arrow keys to move and Enter to place blocks.")
  31. RCmaster()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement