Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local skynet = require "skynet"
- clear()
- echo("ShutdownOS Remote Control")
- echo("This program securely remote controls turtles running the ShutdownOS Slave program.")
- echo("Use WASD to move.")
- echo("Q and E to go up and down.")
- echo("F to dig.")
- echo("L to refuel.")
- echo("M to quit out of this program.")
- echo("Looking to disable slave mode on the turtle? You can't!")
- while true do
- local event, character = os.pullEvent("char")
- if character == "w" then
- skynet.send("shutdownos.turtle", "forward")
- elseif character == "a" then
- skynet.send("shutdownos.turtle", "left")
- elseif character == "s" then
- skynet.send("shutdownos.turtle", "back")
- elseif character == "d" then
- skynet.send("shutdownos.turtle", "right")
- elseif character == "q" then
- skynet.send("shutdownos.turtle", "up")
- elseif character == "e" then
- skynet.send("shutdownos.turtle", "down")
- elseif character == "f" then
- skynet.send("shutdownos.turtle", "dig")
- elseif character == "l" then
- skynet.send("shutdownos.turtle", "refuel")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement