Advertisement
Andersfc

RednetRedstone-Transmit-name it startup

Jan 16th, 2013
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.05 KB | None | 0 0
  1. shell.run("label set Sorting_PC")
  2. shell.run("clear")
  3.  
  4. if peripheral.isPresent("right") then
  5. print("Opening Modem on the right...")
  6. rednet.open("right")
  7. end
  8. if peripheral.isPresent("left") then
  9. print("Opening Modem on the left...")
  10. rednet.open("left")
  11. end
  12. if peripheral.isPresent("top") then
  13. print("Opening Modem on the top...")
  14. rednet.open("top")
  15. end
  16. if peripheral.isPresent("bottom") then
  17. print("Opening Modem on the bottom...")
  18. rednet.open("bottom")
  19. end
  20. if peripheral.isPresent("front") then
  21. print("Opening Modem on the front...")
  22. rednet.open("front")
  23. end
  24. if peripheral.isPresent("back") then
  25. print("Opening Modem on the back...")
  26. rednet.open("back")
  27. end
  28.  
  29. term.write("Which Command?>")
  30. Andersfc = read()
  31.  
  32. rednet.broadcast(Andersfc)
  33. x,y,z = rednet.receive()
  34. print(y)
  35. if y == Andersfc then
  36.    term.write("How many "..Andersfc.."?, MAX 64>")
  37.    Andersfc2 = read()
  38.    rednet.broadcast(Andersfc2)
  39.    shell.run("clear")
  40.    term.setCursorPos(1,8)
  41.    print(Andersfc2.." "..Andersfc.." have been requested")
  42. end
  43. sleep(3)
  44. shell.run("startup")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement