summaryrefslogtreecommitdiff
path: root/scripts/cowsay.lua
blob: 5d9a80d916ecb0895fd25ad38a8e5d71d3ad7f3e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

-- my drawing
function ascii_nerd( name )
	local s = ""
	s = s .. [[

\ | | /
| o o |
 \ O /
  | |
]]
	local l = string.len(name)
	for i=1,l+4 do s = s .. "+" end
	s = s .. "\n| " .. name .. " |\n"
	for i=1,l+4 do s = s .. "+" end
	return s
end

--from beej.us
function ascii_goat( text )
	local s = ""
	s = s .. [[    )_)
 ___|oo) ]]
	s = s .. text .. "\n"
	s = s .. [['|  |\_|                            
 |||| #
 ````]]
	return s
end

--http://ascii.co.uk/art/shoot
function ascii_shoot( name )
	local s = ""
	if name == nil then name = "" else
	name = "("..name..")" end
	s = s .. [[
   O
  <\==-   -   - -   -  -  - ---
 ./ \                            _/\_\O ]] .. name .. [[
]]
	return s
end

function ascii_lurker( name )
end

function ascii_hunt( name )
end

function ascii_pc( pccmd )
end

function ascii_dickbutt( name )
	local s = ""
	if name == nul then name = "" else
	name = "("..name..")\n" end
	s = s .. [[
 ___
/   \ <--- ]] .. name .. [[
|o o|
| > |
|__/|  /\
|   |_ ||
|  |  \||
|  J   )_)
 \____/
   |
  ='
]]
	return s
end

v="help"
for k,v in ipairs(arg) do
	if v == "nerd" then
		print( ascii_nerd( arg[k+1] ) )
	elseif v == "goat" then
		print( ascii_goat( arg[k+1] ) )
	elseif v == "shoot" then
		print( ascii_shoot( arg[k+1] ) )
	elseif v == "dickbutt" then
		print( ascii_dickbutt( arg[k+1] ) )
	end
end
--if v == "help" then
--	print("usage: sayp [nerd|goat|shoot|dickbutt] [name]")
--end