ronkrt

Untitled

Jun 17th, 2012
42
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. rs.open(v)
  13. end
  14. end
  15. function Input()
  16. while true do
  17. print("Mine > ")
  18. x = read()
  19. print(x)
  20. if(string.lower(x)=="exit") then
  21. break
  22. else
  23. rednet.broadcast(x)
  24. end
  25. end
  26. end
  27. main()
Advertisement
Add Comment
Please, Sign In to add comment