7thFullMoon

remote console

Jan 20th, 2013
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 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. end
  16. end
  17. end
  18. end
  19. print("What side is your modem on?")
  20. local modem = read()
  21. rednet.open(modem)
  22. term.clear()
  23. textutils.slowPrint("TurtleControl Initiated.")
  24. print ("Use arrow keys to move and Enter to place blocks.")
  25. RCmaster()
Add Comment
Please, Sign In to add comment