Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Settings --
- bgcolor = 16384 -- Backgroundcolor Default = 16384 (red)
- textcolor = 32768 -- Textcolor Default = 32768 (Black)
- mside = "top" -- Side of modem.
- turtleid = 89 -- Id of your controlled turtle
- -- End of settings --
- rednet.open(mside)
- function o()
- os.reboot()
- end
- function start2()
- term.clear()
- sleep(1)
- term.setCursorPos(1,1)
- print("[1] Make turtle go forward")
- term.setCursorPos(1,2)
- print("[2] Make turtle go backwards")
- term.setCursorPos(1,3)
- print("[3] Make turtle turn left")
- term.setCursorPos(1,4)
- print("[4] Make turtle turn right")
- term.setCursorPos(1,5)
- print("[5] Make turtle go up")
- term.setCursorPos(1,6)
- print("[6] Make turtle go down")
- term.setCursorPos(1,7)
- print("[7] Make turtle dig (Only mining turtles)")
- term.setCursorPos(1,8)
- print("[8] Exit to start")
- term.setCursorPos(1,9)
- write("Input number please: ")
- local input = read()
- if input == "1" then
- rednet.send(turtleid, "forward")
- start2()
- elseif input == "2" then
- rednet.send(turtleid, "backwards")
- start2()
- elseif input == "3" then
- rednet.send(turtleid, "left")
- start2()
- elseif input == "4" then
- rednet.send(turtleid, "right")
- start2()
- elseif input == "5" then
- rednet.send(turtleid, "up")
- start2()
- elseif input == "6" then
- rednet.send(turtleid, "down")
- start2()
- elseif input == "7" then
- rednet.send(turtleid, "dig")
- start2()
- end
- end
- function start()
- term.clear()
- term.setTextColor(textcolor)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,1)
- term.setBackgroundColor(bgcolor)
- print("Running Mackan90096's Turtle Controlling program version 1.0")
- term.setCursorPos(1,2)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,3)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,4)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,6)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,7)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,8)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,9)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,10)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,11)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,12)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,13)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,14)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(1,15)
- term.setBackgroundColor(bgcolor)
- term.setCursorPos(5,5)
- term.setBackgroundColor(bgcolor)
- print("Start? Y/N")
- local input = read()
- if input == "y" then
- start2()
- elseif input == "n" then
- term.clear()
- end
- end
- start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement