Solved Read what color an item's name is?

  • 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 comminuty!

    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.

SmallDev

Member
Apr 6, 2020
39
0
6
I'm making a Skript, and for the Skript I am working on rarities that define values, and the way I wish to get the rarities is by the color of their name. I don't know how to get an item name color tho. Please help, thanks. Heres an example of what I want, but doesn't work.
Code:
                                    if held item's name is colored white:
 
I'm making a Skript, and for the Skript I am working on rarities that define values, and the way I wish to get the rarities is by the color of their name. I don't know how to get an item name color tho. Please help, thanks. Heres an example of what I want, but doesn't work.
Code:
                                    if held item's name is colored white:
You can make
Code:
if player's tool is cookie named "&fcookie":
        send "&fhi" to player
else:
        stop
 
I know this would work, but the list of names I'm working with is many, is there a way to do this without
having to know what it was actually named?
 
I'm making a Skript, and for the Skript I am working on rarities that define values, and the way I wish to get the rarities is by the color of their name. I don't know how to get an item name color tho. Please help, thanks. Heres an example of what I want, but doesn't work.
Code:
                                    if held item's name is colored white:
Try:
code_language.skript:
if first 2 characters of coloured player's held item are "&f":
 
I'm making a Skript, and for the Skript I am working on rarities that define values, and the way I wish to get the rarities is by the color of their name. I don't know how to get an item name color tho. Please help, thanks. Heres an example of what I want, but doesn't work.
Code:
                                    if held item's name is colored white:


code_language.skript:
function getColors(text: text) :: string:
    loop {_text} split at " ":
        set {_uncolored} to uncolored loop-value
        set {_original} to loop-value
        if loop-value contains "&4" or "&c" or "&6" or "&e" or "&2" or "&a" or "&b" or "&3" or "&1" or "&9" or "&d" or "&5" or "&f" or "&7" "&8" or "&0":
            replace all "%{_uncolored}%" in {_original} with ""
        else:
            return "No Colors at %loop-value%!"
 
Status
Not open for further replies.