Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- state = {
- lastMessage = nil
- }
- b = peripheral.wrap("left")
- rednet.open("right")
- function sendAspects(table)
- if table ~= nil then
- aspectTable = textutils.serialize(table)
- if state.lastMessage ~= aspectTable then
- rednet.broadcast(aspectTable)
- lastMessage = aspectTable
- end
- end
- end
- while true do
- aspects = b.getAspectsDown()
- if next(aspects) == nil then
- rednet.broadcast("none")
- state.lastMessage = nil
- else
- sendAspects(aspects)
- end
- for i = 1, 16 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- turtle.dropDown()
- sleep(0.2)
- end
- end
- sleep(0.4)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement