Advertisement
shadowkat1010

controller1

Jan 3rd, 2013
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. rednet.open("back")
  2. mon = peripheral.wrap("top")
  3. mon.setTextScale(0.5)
  4. term.redirect(mon)
  5. print(" ** SKS-ES v1.0 ** ")
  6. local function rmButtons()
  7. while true do
  8. local event,from,message,distance = os.pullEvent("rednet_message")
  9. if tonumber(message) then
  10. os.queueEvent("key",tonumber(message) or 0)
  11. elseif message ~= "nil" then
  12. os.queueEvent("char",message)
  13. end
  14. end
  15. end
  16. local function OverShell()
  17. shell.run("shell")
  18. end
  19. local function doCommandKeys()
  20. while true do
  21. if rs.getInput("left") then
  22. os.queueEvent("key",208)
  23. elseif rs.getInput("right") then
  24. os.queueEvent("key",29)
  25. end
  26. end
  27. end
  28. parallel.waitForAny(rmButtons,OverShell)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement