Advertisement
nnimos

Untitled

May 5th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. -- Code for Sending PC
  2. function rawread()
  3. while true do
  4. local sEvent, param = os.pullEvent("key")
  5. if sEvent == "key" then
  6. if param == 28 then
  7. print("Enter detected")
  8. break
  9. end
  10. end
  11. end
  12. end
  13.  
  14. term.clear()
  15. term.setCursorPos(1,1)
  16. term.setTextColor(colors.blue)
  17. textutils.slowPrint("Pig Mashing machine")
  18. term.setTextColor(colors.white)
  19. os.sleep(1)
  20. print("Press enter when you are ready to continue")
  21. rawread()
  22.  
  23. write("Please type command number: ")
  24. local input = tonumber(read())
  25. local modem = peripheral.wrap("left")
  26. print(input)
  27. os.sleep(2)
  28. modem.transmit(4, 2, input)
  29. term.setTextColor(colors.green)
  30. textutils.slowPrint("Command has been successfuly sent")
  31. os.sleep(5)
  32. reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement