 |
Talas Newbie
Joined: 07 Aug 2005 Posts: 6
|
Posted: Thu Aug 18, 2005 2:34 pm
Random color script request |
Basically i'm looking for something that will randomize colors on a single channel. I've looked around for something that would work. Looked at a some and tried to get them to work and haven't had any luck so far, so i thought the best thing to do is request one and hope somebody has something that will work or would be willing to write one.
The channel i'm wanting it for is used as such: ot text
The color codes of the mud are: &r &R &g &G &b &B &c &C &p &P &y &Y &w &W
Hope this is enough info, if not let me know and i'll give what i can. |
|
|
 |
DeReP Adept
Joined: 14 Jun 2003 Posts: 222 Location: Chile
|
Posted: Thu Aug 18, 2005 5:24 pm |
I'm not sure how you put colors in the alias but you can figure that out.
#VAR colors {r|R|g|G|b|B|c|C|p|P|y|Y|w|W}
#ALIAS ot {~ot ~&%item(@colors,%random(1,8)) %-1}
Again Im not sure where in "ot" you put the color code :S |
|
|
 |
Talas Newbie
Joined: 07 Aug 2005 Posts: 6
|
Posted: Thu Aug 18, 2005 5:37 pm |
Since i can't write scripts, not due to lack of trying to learn either. Thanks for the help so far, maybe this time around i may fluke it and get a script to work. If anyone knows of a site that has some decent tutorials on learning scripting it would be much appreciated if they could post it. I'm sure many people apart from myself would be interested in a site like that.
|
|
|
 |
DeReP Adept
Joined: 14 Jun 2003 Posts: 222 Location: Chile
|
Posted: Thu Aug 18, 2005 6:10 pm |
How exactly do you use color codes in your mud?
|
|
|
 |
Talas Newbie
Joined: 07 Aug 2005 Posts: 6
|
Posted: Thu Aug 18, 2005 6:14 pm |
A direct paste from the mud.
&x - Black &r - Red (blood)
&g - Green &O - Orange (brown)
&b - Dark Blue &p - Purple
&c - Cyan &w - Gray (default color)
&z - Dark Grey &R - Light Red
&G - Light Green &Y - Yellow
&B - Blue &P - Pink
&C - Light Blue &W - White |
|
|
 |
Vitae Enchanter

Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Aug 18, 2005 6:20 pm |
#CLASS {ColorTalk}
#ALIAS colortell {colored_message = %subregex( "%-1", "(.)", "@addcolor(~"%%1~")");tell %1 %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( @colored_message, ~|~|, " "), |, ""), "@r@", "@r @"), "@R@", "@R @"), "@b@", "@b @"), "@B@", "@B @"), "@c@", "@c @"), "@C@", "@C @"), "@m@", "@m @"), "@M@", "@M @"), "@y@", "@y @"), "@Y@", "@Y @"), "@g@", "@g @"), "@G@", "@G @"), "@w@", "@w @"), "@W@", "@W @")}
#ALIAS colorreply {colored_message = %subregex( "%-1", "(.)", "@addcolor(~"%%1~")");#send {reply %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( @colored_message, ~|~|, " "), |, ""), "@r@", "@r @"), "@R@", "@R @"), "@b@", "@b @"), "@B@", "@B @"), "@c@", "@c @"), "@C@", "@C @"), "@m@", "@m @"), "@M@", "@M @"), "@y@", "@y @"), "@Y@", "@Y @"), "@g@", "@g @"), "@G@", "@G @"), "@w@", "@w @"), "@W@", "@W @")}}
#ALIAS colorhelp {#SHOW {____________________________________________________________________};#SHOW {};#SHOW {};#SHOW {One Annoying as Hell %ansi( red)C%ansi( green)ol%ansi( blue)or %ansi( cyan)C%ansi( red)ha%ansi( green)n%ansi( grey)g%ansi( cyan)i%ansi( green)ng Chatter};#SHOW {%ansi( cyan)(co-created with Vitae)};#SHOW {};#SHOW {Syntax:};#SHOW {colortalk ~<channel~> ~<message~>};#SHOW { Send a multi-colored message on the channel you type in.};#SHOW {colortell ~<player~> ~<message~>};#SHOW { Send a multi-colored message on the player you type in.};#SHOW {colorreply ~<message~>};#SHOW { Send a multi-colored reply on the last person to send you a tell.};#SHOW {colorpick};#SHOW { Choose colors from a list (Hold CTRL to choose multiple).};#SHOW {};#SHOW {This help can be viewed at anytime by simply typing 'colorhelp'};#SHOW {If you are forwarding this to anyone, please remember to tell them};#SHOW {to read 'colorhelp'};#SHOW {};#SHOW {};#SHOW {____________________________________________________________________}}
#ALIAS add_color {#ADDITEM color_options (~@|%1)}
#ALIAS pickcolors {color_options = %null;#PICK {p:Select your colors ~(Hold CONTROL to choose more~)~:} {Red:add_color r} {Bright Red:add_color R} {Blue:add_color b} {Bright Blue:add_color B} {Cyan:add_color c} {Bright Cyan:add_color C} {Magenta:add_color m} {Bright Magenta:add_color M} {Yellow:add_color y} {Bright Yellow:add_color Y} {Green:add_color g} {Bright Green:add_color G} {Grey:add_color w} {White:add_color W};num_colors = %numitems( @color_options);color_list = @color_options}
#ALIAS colortalk {colored_message = %subregex( "%-2", "(.)", "@addcolor(~"%%1~")");#send {%1 %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( %replace( @colored_message, ~|~|, " "), |, ""), "@r@", "@r @"), "@R@", "@R @"), "@b@", "@b @"), "@B@", "@B @"), "@c@", "@c @"), "@C@", "@C @"), "@m@", "@m @"), "@M@", "@M @"), "@y@", "@y @"), "@Y@", "@Y @"), "@g@", "@g @"), "@G@", "@G @"), "@w@", "@w @"), "@W@", "@W @")}}
#VAR addcolor {%concat( %item( @color_list, %random( 1, @num_colors)), "%1")}
#VAR colored_message {@|RI@|r@|YL@|YO@|rV@|rE@|R@|rY@|yO@|yU@|r@|YA@|RL@|YL@|Y!@|r!}
#VAR num_colors {4}
#VAR color_list {(@|r)|(@|R)|(@|y)|(@|Y)}
#VAR color_options {(@|r)|(@|R)|(@|y)|(@|Y)}
#CLASS 0
This was written up by someone on Aardwolf.
On Aardwolf, @'s are used for color codes. I'll take a guess that if you change the @'s to &'s you should be fine. Which ones exactly i am not sure. |
|
|
 |
Talas Newbie
Joined: 07 Aug 2005 Posts: 6
|
Posted: Thu Aug 18, 2005 6:26 pm |
Vitae, that looks like too much fun not to spend the time to make it work. Thanks for passing it on.
|
|
|
 |
Vitae Enchanter

Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Aug 18, 2005 6:39 pm |
also, looks like you have about 4 more colors than aard does.
you will have to add %replaces, and make additions to the pickcolors alias.
of course, you COULD just decide what 12 colors you want and just change it to reflect that if you'd rather the short cut.
I don't see magenta (M/m) on your list, so you can change the M/m's to a P/p's since magenta is a shade of purple. |
|
|
 |
Dharkael Enchanter

Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
|
_________________ -Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." |
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|