Hello.
I would like to have a rainbow-ish coloured name tag in my Minecraft server.
For example, my name tag would be:
WilliamPlays0402
0.5s later:
WilliamPlays0402
0.5s later:
WilliamPlays0402
etc..
This is what I've achieved so far:
The only problem is that I do not know how to split the player's name's letters into a list variable. From there I can just loop through the list variable, add 1 to a modifier on the function for each letter, and add that to a variable that can replace "%loop-player%".
Any help is appreciated.
Additional info:
- Skript Version: 2.6-beta2
- Minecraft Version: 1.16.5
I would like to have a rainbow-ish coloured name tag in my Minecraft server.
For example, my name tag would be:
WilliamPlays0402
0.5s later:
WilliamPlays0402
0.5s later:
WilliamPlays0402
etc..
This is what I've achieved so far:
Code:
every 5 tick:
add 1 to {60ticktime}
if {60ticktime} is greater than 9:
set {60ticktime} to 1
function rainbowName(t: text, n: integer) :: text:
set {_stages::*} to "<##fa3ca8>", "<##ff42ec>", "<##f242ff>", "<##c942ff>", "<##aa42ff>", "<##c942ff>", "<##f242ff>", "<##ff42ec>" and "<##fa3ca8>"
if {_n} is greater than 10:
set {_modifier} to mod({_n},10)
else:
set {_modifier} to {_n}
set {_output} to "%{_stages::%{_modifier}%}%%{_t}%"
return {_output}
every 2 ticks:
loop all players:
if loop-player has permission "op":
set {_rb} to rainbowName("", {60ticktime})
set {_header} to "%{_rb}% "
set loop-player's tab list name to "%{_header}%%loop-player%
The only problem is that I do not know how to split the player's name's letters into a list variable. From there I can just loop through the list variable, add 1 to a modifier on the function for each letter, and add that to a variable that can replace "%loop-player%".
Any help is appreciated.
Additional info:
- Skript Version: 2.6-beta2
- Minecraft Version: 1.16.5