BBcode-Like Tags v1.5.0

By Roy911 on Jan 15, 2007

CodeTags v1.5.0 by Roy911 (Remotes Script)

Usage:
//echo $tags([green]asdf)
Would return asdf green and underlined.

Supported Tags:
[white], [black], , [dblue], [green], [red], [brown], [purple], [orange], [yellow], [lgreen], [turq], , [lblue], [blue], [pink], [gray], [lgray], , , , [r], [/r], , and .

Version History:
v1.0.0:
-Created

v1.5.0:
-Fixed underline/bold bug
-Edited colorcodes

/*
CodeTags v1.5.0 by Roy911 (Remotes Script)
irc.abxy.org:#Roy911

Usage:
//echo $tags([green]<u>asdf</u>)
Would return asdf green and underlined.

Supported Tags:
[white], [black], , [dblue], [green], [red], [brown], [purple], [orange], [yellow], [lgreen], [turq], , [lblue], [blue], [pink], [gray], [lgray], , <u>, </u>, [r], [/r], **, and **.

Version History:
v1.0.0:
-Created

v1.5.0:
-Fixed underline/bold bug
-Edited colorcodes
*/

alias tags {
  var %text = $1-
  var %text = $replace(%text,[white],00,[black],01,[dblue],02,[green],03,[red],04,[brown],05,[purple],06,[orange],07,[yellow],08,[lgreen],09,[turq],10,[lblue],11,[blue],12,[pink],13,[gray],14,[lgray],15,,)
  var %text = $replace(%text,**,$chr(2),**,$chr(2),[r],$chr(22),[/r],$chr(22),<u>,$chr(31),</u>,$chr(31))
  return %text
}

Comments

Sign in to comment.
Roy911   -  Jan 17, 2007

Hey guys, thanks for the comments,
I\'ve fixed the bold and underline bug and added the 0\'s as xDaeMoN said.

 Respond  
Yoinx   -  Jan 16, 2007

yeah, he just didnt explain why. Sometimes, I find people like to know exactly why you tell them not to do something, rather than just saying not to do it.

 Respond  
F*U*R*B*Y*   -  Jan 16, 2007

Yeah i had same problem so i had to change it, i didn\'t say anything because xdaemon said about it :P

 Respond  
Yoinx   -  Jan 16, 2007

as xdaemon had said... you should always use 2 characters for the color codes.

This will prevent errors when coloring something that uses a number as the first digit

ie, [white]5 times[/white] which should become brown 05

 Respond  
F*U*R*B*Y*   -  Jan 15, 2007

looks nice, good job

 Respond  
ZabuzaMomochi   -  Jan 15, 2007

Very cool. I SHALL USE THIS

 Respond  
xDaeMoN   -  Jan 15, 2007

You interchanged the character for underline to bold and vice versa. Also use 2 numbers for colors (i.e. 3 should be 03).

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.