Last active
September 5, 2021 10:33
-
-
Save ashap5/99596464b3c9adcc7e8d8aabfd5cd56c to your computer and use it in GitHub Desktop.
turtle sERVEr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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