Solved Colored text between *Text*

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

MrNygus

Active Member
Jan 28, 2017
116
2
18
I want to color text between * *
How to do this?

This is *example* of **this** :emoji_grinning:
 
I dont really understand your question.. xD
You can do something like this:
Your wanted &7&lText&r goes here (...)
&r has the same effect as &f
 
I want get text from chat message and looking for text between ** and change color of this.

Hello, everyone *said*, What's up? :emoji_grinning:
 
So, you want to check if some one wrote an specific word & if he did, you want to change the color of the specific word, am i right?
 
Maybe with an loop & with chars it could work, im going to try it, after Minecraft started.
But im not sure if it's going to work.
[doublepost=1509146814,1509143773][/doublepost]Its really Sh*tty but:

code_language.skript:
on chat:
    replace every "* " in message with "+placeholder+"
    replace every "*" in message with "*&a&l"
    replace every "+placeholder+" in message with "&r* "

Thats the easiest way.

The only Problem is, if someone writes "+placeholder+" in the chat, it will be replaced with "&r* "

Better solution:
code_language.skript:
on chat:
    replace every "* " in message with "§ "
    replace every "*" in message with "*&a&l"
    replace every "§ " in message with "&r* "

Works completly fine. No player can write "§" in the chat. So.. there will be no problem with that
 
Last edited:
  • Like
Reactions: MrNygus
Status
Not open for further replies.