Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function rev()
- local o = {os.pullEvent("modem_message")}
- if type(o[4]) == "string" then
- local p = loadstring("return "..o[4])
- if p then
- return p()
- end
- end
- return nil
- end
- local m = peripheral.find("modem")
- m.open(1)
- local function snd(...)
- local s = textutils.serialize({...})
- m.transmit(1,1,s)
- end
- if commands then
- commands.setblock("~","~4","~","minecraft:grass")
- while true do
- snd(commands.exec(unpack(rev())))
- end
- else
- local l= peripheral.find"computer"
- l.turnOn()
- local function ex(...)
- snd(...)
- return rev()
- end
- commands = setmetatable({exec=ex},{__index=function(t,k) return function(...) ex(k,...) end end})
- end
Advertisement
Add Comment
Please, Sign In to add comment