ronkrt

Untitled

Jun 23rd, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. -- Computer portion!
  2. function main()
  3. term.clear()
  4. x,y = term.getSize()
  5. term.setCursorPos(1,1)
  6. term.setCursorBlink(true)
  7. print("Welcome to turtlemine!")
  8. OpenAllPorts()
  9. Input()
  10. end
  11. function OpenAllPorts()
  12. for _,v in ipairs(rs.getSides()) do
  13. rednet.open(v)
  14. end
  15. end
  16. function Input()
  17. while true do
  18. term.write("mine > ")
  19. local x = read()
  20. if(string.lower(x)=="exit") then
  21. break
  22. end
  23. rednet.broadcast(x)
  24. end
  25. end
  26. main()
Advertisement
Add Comment
Please, Sign In to add comment