Advertisement
Guest User

roxmaster

a guest
Nov 23rd, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. local function RoxMaster()
  2. local run = 1
  3. while run == 1 do
  4. local sEvent, param = os.pullEvent("key")
  5. if sEvent == "key" then
  6. if param == 17 then
  7. rednet.broadcast("MoveForward")
  8. elseif param == 30 then
  9. rednet.broadcast("MoveLeft")
  10. elseif param == 31 then
  11. rednet.broadcast("MoveBack")
  12. elseif param == 32 then
  13. rednet.broadcast("MoveRight")
  14. elseif param == 18 then
  15. rednet.broadcast("MoveUp")
  16. elseif param == 16 then
  17. rednet.broadcast("MoveDown")
  18. elseif param == 33 then
  19. rednet.broadcast("DigForward")
  20. elseif param == 19 then
  21. rednet.broadcast("DigUp")
  22. elseif param == 46 then
  23. rednet.broadcast("DigDown")
  24. elseif param == 45 then
  25. rednet.broadcast("EndTurtle")
  26. textutils.slowPrint("Ended program on the")
  27. textutils.slowPrint("current Turtle and closed")
  28. textutils.slowPrint("it\'s Rednet connection.")
  29. print("--------------------------")
  30. elseif param == 44 then
  31. rednet.broadcast("EndBoth")
  32. run = 0
  33. rednet.close("back")
  34. textutils.slowPrint("Ended program on both")
  35. textutils.slowPrint("machines.")
  36. sleep(0.75)
  37. textutils.slowPrint("Closed rednet connection.")
  38. end
  39. end
  40. end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement