Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rb = require("robot")
- local comp = require("component")
- local event = require("event")
- local m = comp.modem
- local term = require("term")
- m.open(123)
- print(m.isOpen(123))
- local i = 1;
- repeat
- local _, _, _, _, _, input = event.pull("modem_message")
- print("Got: " .. tostring(input))
- if (i > 1) then
- repeat
- rb.use()
- until(rb.count(1) > 0)
- end
- rb.select(1)
- rb.transferTo(i)
- rb.select(input)
- comp.inventory_controller.equip()
- rb.use()
- comp.inventory_controller.equip()
- rb.select(1)
- i = input
- until(input == 5)
- term.clear()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement