chat tooltip help

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

titustitus98

Member
Feb 19, 2018
47
0
6
25
hi so i know to add a tolltip you have to add json.sk and such but i do not know how to make it so that when i hover my name in chat it says in line 1: text1 in line 2: text2 and in a third line text3
if anyone could help it would be appreciated.
 
code_language.skript:
on chat:
    set {_sender-info} to "%colored player's prefix% %sender%"
    set {_tooltip} to "&a&l             %sender% %nl% &8» &fRank: &a%uncolored colored player's prefix% %nl% &8» &fMoney: &a%player's money%
    set {_cmd-in-tooltip} to "/plot home %sender%"
    loop all players:       
        json("%loop-player%", "%{_sender-info}%||ttp:%{_tooltip}%||sgt:%{_cmd-in-tooltip}%||%colored message%")
 
You actually don't need json.sk for this. You can do this with vanilla Skript. But you will need SkQuery to handle the extra lines (%nl%).
code_language.skript:
on chat:
    cancel event
    send "<tooltip:&aLINE 1%nl%&bLINE 2%nl%&cLINE 3>%player%<reset>: %message%" to all players
 
Status
Not open for further replies.