Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- w, h = term.getSize()
- function writeFile()
- handle = fs.open("serums", "w")
- handle.write(textutils.serialize(serum))
- handle.close()
- end
- --mon = peripheral.wrap("right")
- sleep(1)
- rednet.open("left")
- rednet.broadcast("id2")
- event, sid, mes, dis = os.pullEvent("rednet_message")
- if mes == "id2" then
- smelter = sid
- print(smelter)
- end
- xpos = 1
- ypos = 1
- term.clear()
- while true do
- event, sid, mes, dis = os.pullEvent("rednet_message")
- if sid == smelter then
- serum = textutils.unserialize(mes)
- writeFile()
- term.clear()
- term.setCursorPos(1,1)
- xpos = 1
- ypos = 1
- for k, v in ipairs(serum) do
- if string.find(v, "species") then
- term.setCursorPos(xpos, ypos)
- bee = string.sub(v, 14)
- print(bee)
- ypos = ypos +1
- if ypos == h then
- ypos = 1
- xpos = xpos + 26
- end
- elseif string.find(v, "Species") then
- term.setCursorPos(xpos, ypos)
- print(v)
- ypos = ypos +1
- if ypos == h then
- ypos = 1
- xpos = xpos + 26
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement