Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- cowsay.lua (from https://gist.github.com/Gaichu/1c5b63c0093512b72779, made by Gaichu)
- -- (Converted to computercraft by justync7)
- arg = { ... }
- if #arg < 1 then
- print("Incorrect usage. "..shell.getRunningProgram().." <message> ")
- end
- local cow = {
- [[
- \ ^__^
- \ (oo)\_______
- (__)\ )\/\\
- ||----w |
- || ||
- ]]
- }
- local maxLen = 2^10
- for i=1,#arg do
- if i == 1 then
- if string.len(arg[1]) <= maxLen then
- print(" "..string.rep("_",#arg[1]+2).." ")
- print("< "..arg[1].." >")
- print(" "..string.rep("-",#arg[1]+2).." "..cow[1])
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement