SHARE
TWEET

SDOS RC

osmarks Dec 14th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local skynet = require "skynet"
  2.  
  3. clear()
  4.   echo("ShutdownOS Remote Control")
  5.   echo("This program securely remote controls turtles running the ShutdownOS Slave program.")
  6.   echo("Use WASD to move.")
  7.   echo("Q and E to go up and down.")
  8.   echo("F to dig.")
  9.   echo("L to refuel.")
  10.   echo("M to quit out of this program.")
  11.   echo("Looking to disable slave mode on the turtle? You can't!")
  12.  
  13.   while true do
  14.     local event, character = os.pullEvent("char")
  15.     if character == "w" then
  16.       skynet.send("shutdownos.turtle", "forward")
  17.     elseif character == "a" then
  18.       skynet.send("shutdownos.turtle", "left")
  19.     elseif character == "s" then
  20.       skynet.send("shutdownos.turtle", "back")
  21.     elseif character == "d" then
  22.       skynet.send("shutdownos.turtle", "right")
  23.     elseif character == "q" then
  24.       skynet.send("shutdownos.turtle", "up")
  25.     elseif character == "e" then
  26.       skynet.send("shutdownos.turtle", "down")
  27.     elseif character == "f" then
  28.       skynet.send("shutdownos.turtle", "dig")
  29.     elseif character == "l" then
  30.       skynet.send("shutdownos.turtle", "refuel")
  31.   end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top