ronkrt

Untitled

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