Converting Luckperms hex codes to Skript hex codes

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

DeoviserYT

Member
Aug 4, 2024
15
1
3
37
Hi, I'm making a per world chat system for my server but when I tried to do send formatted it only did color codes, not hex. I realised that Skript uses a different way of recognising hex codes so I need a way to convert &# to <## and add > 6 letters after, so I could convert things such as &#0000FF to <##0000ff>

My code:
Code:
on join:
    while player is online:
        set {rank::%player's uuid%} to placeholder "luckperms_prefix" # Addon called Ersatz to get placeholders out of skript

on chat:
    cancel event
    loop all players:
        if loop-player's world is player's world:
            send formatted "%{rank::%player's uuid%}%%player%&6: %message%" to loop-player
 
Hi, I'm making a per world chat system for my server but when I tried to do send formatted it only did color codes, not hex. I realised that Skript uses a different way of recognising hex codes so I need a way to convert &# to <## and add > 6 letters after, so I could convert things such as &#0000FF to <##0000ff>

My code:
Code:
on join:
    while player is online:
        set {rank::%player's uuid%} to placeholder "luckperms_prefix" # Addon called Ersatz to get placeholders out of skript

on chat:
    cancel event
    loop all players:
        if loop-player's world is player's world:
            send formatted "%{rank::%player's uuid%}%%player%&6: %message%" to loop-player
Why can't you just do this manually?