ecco7777

CC fernsteuerbare Wireless Turtle

Jun 12th, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. rednet.open("right")
  2. while true do
  3. event, side, frequency, replyFrequency, message, distance =os.pullEvent("modem_message")
  4. if string.sub(message.message,1,#"turtle run ")=="turtle run " then
  5. command=string.sub(message.message,#"turtle run ")
  6. shell.run(command)
  7. end
  8. if string.sub(message.message,1,#"turtle do ")=="turtle do " then
  9. command=string.sub(message.message,#"turtle do "+1)
  10. fp=fs.open("command","w")
  11. fp.writeLine(command)
  12. fp.close()
  13. shell.run("command")
  14. end
  15. end
Add Comment
Please, Sign In to add comment