Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("destination")
- redstone.setOutput("top", true)
- sides = peripheral.getNames()
- for k,v in pairs(sides) do
- name = peripheral.getType(v)
- if name == "Dialling Device" then
- dial = peripheral.wrap(v)
- end
- end
- while true do
- local words = {}
- e, msg, b, c = os.pullEvent("chat_command")
- if msg == "updatedest" then
- shell.run("delete destination")
- shell.run("pastebin get J6TkdfJX destination")
- shell.run("destination")
- elseif string.find(msg, "open") then
- for word in msg:gmatch('[^%-]+') do
- table.insert(words, word)
- end
- for k, v in pairs(destination) do
- if k == words[2] then
- dial.dial(tostring(v))
- end
- end
- redstone.setOutput("top", false)
- elseif msg == "terminate" then
- dial.terminate()
- redstone.setOutput("top", true)
- elseif msg == "update" then
- shell.run("delete startup")
- shell.run("pastebin get K0BJbYA8 startup")
- os.reboot()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement