Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function peripheral.find(pType)
- pList = {}
- for _,pName in pairs(peripheral.getNames()) do
- if peripheral.getType(pName) == pType then
- table.insert(pList, peripheral.wrap(pName))
- end
- end
- return unpack(pList)
- end
- local colorSymbol = ""
- file = fs.open("colorSymbol","wb")
- file.write(194)
- file.write(167)
- file.close()
- file = fs.open("colorSymbol", "r")
- colorSymbol = file.readAll()
- file.close()
- local sign = peripheral.find("sign")
- args = {...}
- if args[1] and args[2] and tonumber(args[1]) then
- local line = tonumber(args[1])
- local text = ""
- for i=2, #args, 1 do
- text = text .. args[i]
- if args[i+1] then
- text = text .. " "
- end
- end
- text = text:gsub("&", colorSymbol)
- sign.setLine(line,text)
- return
- end
- print("Usage: sign <line> <text>")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement