Lion4ever

CC Edu Shell with turtle moves

Aug 25th, 2015
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.30 KB | None | 0 0
  1. parallel.waitForAny(
  2.     function()
  3.         shell.run"shell"
  4.     end,
  5.     function()
  6.         while true do
  7.             local event = {os.pullEventRaw()}
  8.             if type(event[1]) == "string" then
  9.                 local match = string.match(event[1],"^edu_(.*)")
  10.                 if match and turtle[match] then
  11.                     turtle[match]()
  12.                 end
  13.             end
  14.         end
  15.     end)
Advertisement
Add Comment
Please, Sign In to add comment