1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to put a tooltip in a variable?

Discussion in 'Skript' started by pepper82, Dec 7, 2017.

Thread Status:
Not open for further replies.
  1. pepper82

    pepper82 Member

    Joined:
    Jan 26, 2017
    Messages:
    272
    Likes Received:
    1
    Hi all,

    I know that this works:
    send "Click <tooltip:test>&b&nhere<reset> to popup"

    But I need it this way:
    set {_temp} to "Click <tooltip:test>&b&nhere<reset> to open"
    make console execute command "/ch qm CHANNEL %{_temp}%"

    Any way of doing this?
     
  2. Pikachu

    Moderator Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    871
    Likes Received:
    139
    Medals:
  3. MartinOdum

    MartinOdum Member

    Joined:
    Jan 26, 2017
    Messages:
    112
    Likes Received:
    13
    hope he adds support for this eventually, this is why I'm still using json.sk rather than the built in json chat support
     
  4. pepper82

    pepper82 Member

    Joined:
    Jan 26, 2017
    Messages:
    272
    Likes Received:
    1
    would it work with json.sk ? if so, how?
     
  5. MartinOdum

    MartinOdum Member

    Joined:
    Jan 26, 2017
    Messages:
    112
    Likes Received:
    13
    I'm unsure of what exactly you wish to do to be honest but the reason I'd like to store json chat message stuff like tooltips and whatnot in variables is because I have json in my chat, and everyone's prefixes are not the same so my actual code is alot more complicated but the one below is a very simple version that shows you can store json message information in a variable if you use json sk since the second argument of the funtion is text after all

    Code (Skript):
    1. on chat:
    2.     cancel event
    3.     set {_rank} to "&f&l[&e&lGuest&f&l]"
    4.     set {_tag} to " &e%player%"
    5.     set {_prefix} to "%{_rank}%||%{_tag}%||ttp: &9&lPM %player's display name%||sgt:/pm %player% || %message%"
    6.     json("@a", "%{x_prefix}%")
     
  6. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    9
    Totally off topic from this post but are you able to get json.sk to work for 1.8.9? Because tooltips are broken when I attempted to use them.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...