Skip to content

Instantly share code, notes, and snippets.

@ashap5
Last active September 5, 2021 10:33
Show Gist options
  • Save ashap5/99596464b3c9adcc7e8d8aabfd5cd56c to your computer and use it in GitHub Desktop.
Save ashap5/99596464b3c9adcc7e8d8aabfd5cd56c to your computer and use it in GitHub Desktop.
turtle sERVEr
rednet.open("right")
print(os.getComputerID())
while true do
local id, message = rednet.receive()
print(message)
if message == "excavate" then
shell.run("bg","excavate","5")
end
if message == "stopExcavate" then
os.reboot()
end
if message == "wood" then
shell.run("bg","test")
end
if message == "woodStop" then
os.reboot()
end
print(("Computer %d sent message %s"):format(id, message))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment