Posted 05 May 2013 - 06:04 PM
Hi This is one of the first programs I have posted on here it is a Remote control turtle program. it has the features such as choosing what id the turtle is. Also what side the modem is on and of course controlling it. It tells you the controls and you can see them again by pressing the decimal key. also a nifty feature for mini games a redstone activation key. If you find any bugs on it please tell me
first here is the computer it is named turtlespy and please name it that
also put coal in the turtle and press refuel to get started
I have tested Everything and it works
first here is the computer it is named turtlespy and please name it that
term.setBackgroundColor(colors.cyan)
print(" ")
term.clear()
term.setCursorPos(1,1)
print("Please Enter Side Modem Is On")
input = read()
rednet.open(input)
term.setBackgroundColor(colors.lime)
print(" ")
term.clear()
term.setCursorPos(18, 10)
print("Rednet Is Open")
sleep(2)
term.setBackgroundColor(colors.cyan)
print(" ")
term.clear()
term.setCursorPos(1, 1)
print("Please Enter Turtle ID")
input = tonumber(read())
term.setBackgroundColor(colors.lime)
print(" ")
term.clear()
term.setCursorPos(20, 10)
print("ID Accepted")
sleep(2)
term.setBackgroundColor(colors.cyan)
print(" ")
term.clear()
term.setCursorPos(1, 1)
term.setTextColor(colors.white)
print("Controls:")
print("Arrowkey Up = Forward")
print("Arrowkey Down = Back")
print("Arrowkey Left = Left")
print("Arrowkey Right = Right")
print("Numpad 0 = Place")
print("Numpad 2 = Up")
print("Numpad 4 = Redstone Activation")
print("Enter = Refuel")
print("Numpad 1 = Dig")
print("Numpad 5 = Dig Up")
print("Numpad 6 = Dig Down")
print("Numpad 7 = Place Up")
print("Numpad 8 = Place Down")
print("R Shift = Restart")
print("+ = Quit")
print(". Decimal = Show Controls")
print("Reminder If You Haven't Put Coal In The Turtle It Won't Move So Please Do.")
while true do
event, e = os.pullEvent("key")
if e == 200 then
rednet.send(input,"forward")
print("Moving Forward")
elseif e == 208 then
rednet.send(input,"back")
print("Moving Backwards")
elseif e == 203 then
rednet.send(input,"left")
print("Turning Left")
elseif e == 205 then
rednet.send(input,"right")
print("Turning Right")
elseif e == 82 then
rednet.send(input,"place")
print("Placing")
elseif e == 79 then
rednet.send(input,"dig")
print("Digging")
elseif e == 80 then
rednet.send(input,"up")
print("Going Up")
elseif e == 81 then
rednet.send(input,"down")
print("Going Down")
elseif e == 75 then
rednet.send(input,"redstone")
print("Redstone Switching On")
sleep(1.5)
print("Redstone Switching Off")
elseif e == 28 then
rednet.send(input,"refuel")
print("Refueling")
elseif e == 54 then
shell.run("turtlespy")
elseif e == 83 then
term.clear()
term.setCursorPos(1, 1)
print("Controls:")
print("Arrowkey Up = Forward")
print("Arrowkey Down = Back")
print("Arrowkey Left = Left")
print("Arrowkey Right = Right")
print("Numpad 0 = Place")
print("Numpad 2 = Up")
print("Numpad 4 = Redstone Activation")
print("Enter = Refuel")
print("Numpad 1 = Dig")
print("Numpad 5 = Dig Up")
print("Numpad 6 = Dig Down")
print("Numpad 7 = Place Up")
print("Numpad 8 = Place Down")
print("R Shift = Restart")
print("+ = Quit")
print(". Decimal = Show Controls")
elseif e == 78 then
break
elseif e == 76 then
rednet.send(input,"digup")
print("Digging Up")
elseif e == 77 then
rednet.send(input,"digdown")
print("Digging Down")
elseif e == 71 then
rednet.send(input,"placeup")
print("Placing Up")
elseif e == 72 then
rednet.send(input,"placedown")
print("Placing Down")
end
end
and then the turtle it is named startup this one you can rename anything you want unless you are taking credit :P/>
rednet.open("right")
while true do
id, msg = rednet.receive()
if msg == "forward" then
turtle.forward()
elseif msg == "back" then
turtle.back()
elseif msg == "left" then
turtle.turnLeft()
elseif msg == "right" then
turtle.turnRight()
elseif msg == "place" then
turtle.place()
elseif msg == "dig" then
turtle.dig()
elseif msg == "up" then
turtle.up()
elseif msg == "down" then
turtle.down()
elseif msg == "refuel" then
turtle.refuel()
elseif msg == "redstone" then
redstone.setOutput("front",true)
sleep(1.5)
redstone.setOutput("front",false)
elseif msg == "digup" then
turtle.digUp()
elseif msg == "digdown" then
turtle.digDown()
elseif msg == "placeup" then
turtle.placeUp()
elseif msg == "placedown" then
turtle.placeDown()
end
end
I you would help me find out how to put download links please help me with that I don't know how to set one up so you will just have to copy and paste it onto a empty program sorry also my pastebin doesn't load it is most likely my internet so I might not make it that link if I do thankyou And Please enjoy Oh and quick suggestion for best sight change the gui in options/video settings while in minecraft to smallalso put coal in the turtle and press refuel to get started
I have tested Everything and it works