View difference between Paste ID: CA0APfaM and DrViKdd2
SHOW: | | - or go back to the newest paste.
1
--  This function returns a string, and is meant to be used with the native hecho(str) function.
2
--  Example use:  Listing your afflictions, abbreviated & colored.
3
--
4
--    cecho("\n<white>Your afflictions: ")
5
--    for x, aff in ipairs(afflictions) do
6
--          hecho(vc(aff).. " ")
7-
--    end
7+
--   ,
8
--
9
--  Use http://widget.colorcodehex.com/color-picker.html to pick some new colors, and just use
10
--  the standard hecho() format:  |cRRGGBB at the beginning of the string in quotations.
11
12
affs = {
13-
	if aff == "paralysis" then return "|cff0033par" end
13+
   
14-
	if aff == "asthma" then return "|cFF8000ast" end
14+
	paralysis = "|cff0033par",
15-
	if aff == "slickness" then return "|c33cc00slic" end
15+
	asthma = "|cFF8000ast",
16-
	if aff == "anorexia" then return "|cff99ccano" end
16+
	slickness = "|c33cc00slic",
17-
	if aff == "impatience" then return "|cffff00imp" end
17+
	anorexia = "|cff99ccano",
18-
	if aff == "stupidity" then return "|ccccc33stu" end
18+
	impatience = "|cffff00imp",
19-
	if aff == "relapsing" then return "|cffffffrelapsing" end
19+
	stupidity = "|ccccc33stu",
20-
	if aff == "darkshade" then return "|c0066ffdark" end
20+
	relapsing = "|cffffffrelapsing",
21-
	if aff == "confusion" then return "|c99ffffconf" end
21+
	darkshade = "|c0066ffdark",
22-
	if aff == "weariness" then return "|cFF8000weary" end
22+
	confusion = "|c99ffffconf",
23-
	if aff == "ablaze" then return "|cBDBDBDablz" end
23+
	weariness = "|cFF8000weary",
24-
	if aff == "addiction" then return "|cBDBDBDadd" end
24+
	ablaze = "|cBDBDBDablz",
25-
	if aff == "agoraphobia" then return "|cBDBDBDago" end
25+
	addiction = "|cBDBDBDadd",
26-
	if aff == "claustrophobia" then return "|cBDBDBDclau" end
26+
	agoraphobia = "|cBDBDBDago",
27-
	if aff == "clumsiness" then return "|cFF8000clum" end
27+
	claustrophobia = "|cBDBDBDclau",
28-
	if aff == "disloyalty" then return "|cBDBDBDdisl" end
28+
	clumsiness = "|cFF8000clum",
29-
	if aff == "dizziness" then return "|cBDBDBDdiz" end
29+
	disloyalty = "|cBDBDBDdisl",
30-
	if aff == "epilepsy" then return "|cBDBDBDepi" end
30+
	dizziness = "|cBDBDBDdiz",
31-
	if aff == "generosity" then return "|cBDBDBDgen" end
31+
	epilepsy = "|cBDBDBDepi",
32-
	if aff == "hallucinations" then return "|cBDBDBDhal" end
32+
	generosity = "|cBDBDBDgen",
33-
	if aff == "haemophilia" then return "|cBDBDBDhaem" end
33+
	hallucinations = "|cBDBDBDhal",
34-
	if aff == "hypochondria" then return "|cBDBDBDhypo" end
34+
	haemophilia = "|cBDBDBDhaem",
35-
	if aff == "hypersomnia" then return "|cBDBDBDhyp" end
35+
	hypochondria = "|cBDBDBDhypo",
36-
	if aff == "lethargy" then return "|cBDBDBDleth" end
36+
	hypersomnia = "|cBDBDBDhyp",
37-
	if aff == "loneliness" then return "|cBDBDBDlone" end
37+
	lethargy = "|cBDBDBDleth",
38-
	if aff == "masochism" then return "|cBDBDBDmaso" end
38+
	loneliness = "|cBDBDBDlone",
39-
	if aff == "illness" then return "|cBDBDBDill" end
39+
	masochism = "|cBDBDBDmaso",
40-
	if aff == "paranoia" then return "|cBDBDBDprna" end
40+
	illness = "|cBDBDBDill",
41-
	if aff == "recklessness" then return "|cBDBDBDreck" end
41+
	paranoia = "|cBDBDBDprna",
42-
	if aff == "sensitivity" then return "|cBDBDBDsens" end
42+
	recklessness = "|cBDBDBDreck",
43-
	if aff == "shyness" then return "|cBDBDBDshy" end
43+
	sensitivity = "|cBDBDBDsens",
44-
	if aff == "vertigo" then return "|cBDBDBDvert" end
44+
	shyness = "|cBDBDBDshy",
45-
	if aff == "voyria" then return "|cffffffvoy" end
45+
	vertigo = "|cBDBDBDvert",
46-
	if aff == "webbed" then return "|cffffffWEBBED" end
46+
	voyria = "|cffffffvoy",
47-
	if aff == "transfixed" then return "|cffffffTRANSFIXED" end
47+
	webbed = "|cffffffWEBBED",
48-
	if aff == "singlecrippledarm" then return "|cffffffarm" end
48+
	transfixed = "|cffffffTRANSFIXED",
49-
	if aff == "twocrippledarms" then return "|cffffffarm" end
49+
	singlecrippledarm = "|cffffffarm",
50-
	if aff == "singlecrippledleg" then return "|cffffffleg" end
50+
	twocrippledarms = "|cffffffarm",
51-
	if aff == "twocrippledlegs" then return "|cffffffleg" end
51+
	singlecrippledleg = "|cffffffleg",
52
	twocrippledlegs = "|cffffffleg"
53
}
54-
	return aff
54+
55
function vc(aff)
56
	return affs[aff]
57
end