Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --For Use With RCTurtle
- rednet.open("back")
- message={"","","","",""}
- char=""
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("Use W A S D to move")
- print("Use Q to move up")
- print("Use E to move down")
- print("")
- print(message[4].." is at:")
- print("x: "..tostring(message[1]).." y: "..tostring(message[2]).." z: "..tostring(message[3]))
- print("")
- print(message[4].."'s fuel level is: ")
- print(message[5].." energy units")
- event, char = os.pullEvent("char")
- if char=="q" then
- rednet.send(3, "up","remote")
- elseif char=="w" then
- rednet.send(3, "forward","remote")
- elseif char=="s" then
- rednet.send(3, "back","remote")
- elseif char=="a" then
- rednet.send(3, "sLeft","remote")
- elseif char=="e" then
- rednet.send(3, "down","remote")
- elseif char=="d" then
- rednet.send(3, "sRight","remote")
- end
- id, message = rednet.receive("gps")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement