Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function nameTurtle()
- term.clear()
- term.setCursorPos(2,2)
- print("What shall we name the turtle?")
- local input = read()
- os.setComputerLabel(input)
- term.clear()
- term.setCursorPos(1,1)
- print("We named the turtle:")
- term.write(os.getComputerLabel())
- sleep(5)
- end
- function install()
- shell.run("pastebin get 6dNgXmT5 OreQuarry")
- shell.run("pastebin get 7arKuHCS gps-deploy")
- fs.move("/disk/OreQuarry", "/OreQuarry")
- fs.move("/disk/gps-deploy", "/gps-deploy")
- term.clear()
- term.setCursorPos(1,1)
- print("Turtle:")
- print(os.getComputerLabel())
- print("Is now installed with OreQuarry and gps-deploy")
- end
- if os.getComputerLabel() ~= nil then
- install()
- end
- if os.getComputerLabel() == nil then
- term.clear()
- term.setCursorPos(2,2)
- print("You have not chosen a name for this")
- term.setCursorPos(3,3)
- term.write("turtle.")
- term.setCursorPos(3,5)
- print("Would you like to do so now?")
- term.setCursorPos(13,7)
- term.write("Y/N?")
- term.setCursorPos(11,8)
- local rep = 1
- repeat
- local event,key = os.pullEvent("key")
- if key == keys.y then
- rep = 0
- nameTurtle()
- end
- if key == keys.n then
- os.setComputerLabel(tostring(os.getComputerID()))
- rep = 0
- term.clear()
- term.setCursorPos(1,1)
- print("Turtle Label:")
- term.write(os.getComputerLabel())
- sleep(5)
- end
- until rep == 0
- install()
- end
- shell.run("cd /")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement