Jump to content

Recommended Posts

  • Gold

Hey guys,

is here someone who know how can I do something like this in questlib?

I need to say color but with ending of the color.

Practically it looks like:

say("|cffff0000Test color|r")

And I want to make a function for it (this is not working syntax, idk how should I make it woking).

function say_red(name) say(|cffff0000..name..|r) end

Thanks for answers!

Sincerely,

ReFresh

I'll be always helpful! 👊 

Link to comment
Share on other sites

  • Premium
ColorList = {["red"] = {255, 0, 0}}; -- add as many colors as you want. Structure: ["color_name"] = {r, g, b};

say_color = function(color, text)
	local r, g, b = color[1], color[2], color[3];
    say(color256(r, g, b)..text..color256(200, 200, 200)) -- resets color to default after coloring the string 'text'.
end -- function

say_color(ColorList["red"], "Vos et ipsam civitatem benedicimus"); -- prints a red string.

 

  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.