Advertisement
Guest User

startup

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