#Help with gradient chat color

1 messages · Page 1 of 1 (latest)

vivid stump
#

im using colorutils and want to setup this function to activate the gradient when clicked upon

#
    return gradient({_text}, ("FB0808", "FF9B00"))
#

newer to sk

#

ive read all the colorutils docs nothin

#
command exclusivecolors [<text>]:
    aliases: ecc
    permission: ecc.use
    trigger:
        if arg 1 is "blaze":
            if player has permission "iceycc":
                set %{color.%player%}% to "<gradient:489BE4:94D6EB>%message%</gradient>"
            else:
                send "&c(!) &7You Do not have permission to execute this command!" to player
        if arg 1 is not set:
            open chest with 5 rows named "<##FF00AA>     Exclusive Chat-Colors" to player
            wait 1 tick
            format slot 10 of player with 1 pink wool named "&drainbow test" with lore "RAINBOW BABY" to close then run [execute player command "ecc blaze"]
#

theres my code aside from colorutils

#

its the <gradent> stuff

#

idk what to put there

#

messageformat: %player's displayname%&7 ⮕ %{color.%player%}%%message%

real pewter
#

use :: instead of . in variables, makes them lists

#

whats going on with this code?

vivid stump
#

i want to make a gradient chatcolor

#

i cant find any docs oin it

#

im using the colorutils skript thing

real pewter
#

you cant use the message expression outside of a chat event

#

and that last line looks suspiciously like tuske syntax

nimble hatch
#

Bros about to tweak on him for Tuske usage lol

#

Suspiciously like TUSKE syntax 😜

vivid stump
vivid stump
nimble hatch
vivid stump
#

I’m not using it

real pewter
#

then is the last line skquery?

nimble hatch
#

that cant be skript or skbee syntax

vivid stump
#

Idk but it’s what I used for my other Charcot script

#

Chatcolor

#

And it works

#

I just don’t know how to sup the function to run when clicked on in a gui to make the chatcolor a gradient

real pewter
#

"sup"

#

set-up??

#

just set a variable/nbt/whatever to the players chatcolour

#

then use that in the chat event

vivid stump
#

Imma be honest I have no idea how to do that

#

Like ‘’’’on chat:
Set %{color.%player%}% to Gradientblaze(text:text) text :: text

#

Or wtvr

#

Yeah set up

real pewter
#

just set a variable to their gradient

#

then set the chat format to %{}%...</gradient>

vivid stump
#

Can I set it to the variable

#

The custom gradient variable

real pewter
#

yeah, if everyone has the same gradient

vivid stump
#

Well I want to set it up to where you need a certain permission to do it

#

How would I set up the variable for the message format thing

real pewter
#

you can check if they have the permission then use the function if you want

vivid stump
#
on chat:
    if player has permission "blazecc":
        if {color::blaze} is true:
            set chat format to %player's displayname%&7 ⮕ function GradientBlaze(text:text) :: text:
    return gradient({_text}, ("FB0808", "FF9B00"))%message%
#

something like this?

#

i just started using functions

real pewter
#

why the heck do you have a return there?

#

heck, I would just set message to func(message)

vivid stump
#
on chat:
    if player has permission "blazecc":
        if {color::blaze} is true:
            set chat format to %player's displayname%&7 ⮕ function GradientBlaze(message)
#

legit just that?

real pewter
#

no

#
  1. no function keyword when calling
  2. the chat format has to be set to a string
  3. set the message, that way it doesnt affect the whole format and you can use whatever your default one is
vivid stump
vivid stump
#

im using colorutils btw

real pewter
real pewter
vivid stump
#

yeah?

#

so you can see their prefix and the arrow instead of the :

real pewter
#

okay, but that should happen regardless of whether the message is a gradient or not

vivid stump
#

so just get rid of it in the entirety

real pewter
#

you set the chat format for all messages, then only add the gradient (to only the message) if they have the permission

vivid stump
#

OOOOOHHH

#

okay hold on

#

set message to GradientBlaze(message)

#

function GradientBlaze(text:text) :: text:
    return gradient({_text}, ("FB0808", "FF9B00"))
#

so my function works alongside it?

devout jackal
#

you could use Skbee for this

vivid stump
#

wym

real pewter
#

skbee text components

devout jackal
#

yea

vivid stump
#

still dont know

devout jackal
#

kind of like this

real pewter
vivid stump
#

so do you want me to clear all my functions and colorutils?

#

and try this

devout jackal
#

you can if you want

vivid stump
#

it seems way more simple so ill tyry

vivid stump
#

it wont do anything to the message format

devout jackal
#

but it should work

vivid stump
#

would i set the message or the message format then?

devout jackal
#

not really sure

vivid stump
#
set {color.%player%} to <rainbow>

I want this to work with my option of my message format

messageformat: %player's displayname%&7 ⮕ %{color.%player%}%%message%
#

i used your example as a base

#

set {color.%player%} to mini message from "<rainbow>"

also doesnt work

devout jackal
#

yea im not sure how to help you

real pewter
#

I would just if has permission: set message to "<gradient>%message%<reset>"

vivid stump
real pewter
#

search for 'gradien' in this server

#

you'll see people using it

vivid stump
#

um alr

#

im so lost

#

thers lilke 1

#

and its so subtle

#
on chat:
    if player has permission "gradient.use":
        set {_chatcolor} to "<gradient:#F30A0A:#0A2AF3>"
        set {_m} to mini message from "<%player%>{_ChatColor}%%{_msg}%"
        broadcast "----------"
        send component {_m} to all players
        broadcast "----------"
~```
ts all i got out of i
#

wel i gotta go to bed

#

lmk if you findd a solution

real pewter
#

where did you set {_msg}?

vivid stump
# real pewter where did you set `{_msg}`?
on async chat:
    if player has permission "op":
        set {_ChatColor} to "<gradient:#F30A0A:#0A2AF3>"
        set {_m::1} to text component from formatted "&f<%player%> %{_ChatColor}%"
        set {_m::2} to async chat message
        set {_m} to merge components {_m::*}
        set {_msg} to text component from formatted "%player's displayname%&7 ⮕ %message%"
        set {_m} to mini message from "<%player%>{_ChatColor}%%{_msg}%"
        broadcast "----------"
        send component {_m} to all players
        broadcast "----------"

im so lost bro

#

i looked at other players things and there was basically nothing

real pewter
#

figure out the default chat first, ie

  set the chat format to "%player% > %message%"```

Then, you can just modify the `message` expression beforehand (apply the gradient):
```on chat:
  if player has perm....:
    set message to "<gradient:x:y>%message%<reset>"
  set the chat format to "%player% > %message%"```
vivid stump
#

what does that last line do?

nimble hatch
#

What does player > message

#

What is that? Xight

real pewter
#

thats setting the chat format

#

so it would look like Steve > Hello

nimble hatch
#

Oh ok

#

Ty

vivid stump
#
on chat:
    if {color.%player%} is set:
        set message format to "{@messageformat}"
#

i already have that in my code earlier up

#

is chat format just message format?

#
<gradient:x:y>

is this just

#

from birdflop

#

just that now

#
on chat:
    if player has permission "op":
        set message to "<gradient:#9DFF00:#FF3B00%message%<reset>"
        set the chat format to "{@messageformat}"
#

the @messageformat is not affecting it btw

#

Xight do i need to set that as {_msg}?

real pewter
#

set message to formatted ...

vivid stump
#

stil

#
on chat:
    if player has permission "op":
        set message to formatted "<gradient:#9DFF00:#FF3B00>%message%<reset>"
        set the chat format to "{@messageformat}"
#
on chat:
    if player has permission "op":
        set message to formatted "<gradient:#9DFF00:#FF3B00>%message%<reset>"
        set the chat format to "%player's displayname%&7 ⮕ %message%"

even if i override the color.player it wont work

real pewter
#

try minimessage then

vivid stump
#

so like

set message to formatted mini message "<gradient:#9DFF00:#FF3B00>%message%<reset>"

?

#

js doesnt work

#

I FINALLY GOT IT

#

ty for not spoonfeeding

#

how tf do i mark is as solved?

#
on chat:
    if player has permission "op":
        set message to mini message from "<gradient:#9DFF00:#FF3B00>%message%<reset>"
        set the chat format to "%player's displayname%&7 ⮕ %message%"

works

real pewter