Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cardIn()
- card = io.open("disk/id.txt")
- if card == nil then return false
- else return true
- end
- card.close()
- end
- function getCardId()
- card = io.open("disk/id.txt")
- for line in card:lines() do
- if cardIn() ~= false then return line end
- end
- end
- function printCent(y, s)
- w,h = term.getSize()
- x = math.floor((w - string.len(s)) / 2)
- term.setCursorPos(x, y)
- term.clearLine()
- term.write(s)
- end
- function getCardData()
- rednet.send(0, "client " .. getCardId())
- id, message = rednet.receive()
- return message
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement