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 our 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 do I make clickable text?

Discussion in 'Skript' started by SandyVerse, May 21, 2017.

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

    SandyVerse Well-Known Member

    Joined:
    Mar 19, 2017
    Messages:
    51
    Likes Received:
    0
    As in, say I run /team invite <player> and they receive the message "<player> invited you to their team! Type /team accept <player> or click here to accept" How would I make the "click here" text run a command?
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    • Like Like x 1
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Or use JSON chat features in Skript dev27
    Code (Skript):
    1. send "(player) invited you to their team! Type /team accept (player) or <command:/team accept (player)>click here<reset> to accept" to player
    Actually don't, since Skript can't parse expressions inside JSON tags as of now, it will broadcast the tag raw.
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    You could potentially use evaluate
     
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    My json stop working. This is the error:

    Code (Skript):
    1. 21.05 22:56:26 [Server] INFO Invalid json: Unterminated object at line 1 column 14
    Someone else got this error?
     
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Oh yeah forgot about that
     
  9. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    No. Are you using json.sk?
     
  10. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Yep. And the last version of skript.
     
  11. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    How are you using the json function? Could you send us your code?
     
  12. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Code (Skript):
    1. #    json("%player%", "[§bAes§6Gold§8]&r- &cTEXT HERE!||url:http://URLHERE/")
     
  13. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    [​IMG]
    [​IMG]

    This does work for me:
    Code (Skript):
    1. json("%player%", "[§bAes§6Gold§8]&r- &cTEXT HERE!||url:http://URLHERE/")
     
  14. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Using last skript version?
     
  15. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
  16. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Yep, looks like this error is for dev27. I'll wait for the fix then (and report it on github if no one else already did it)
     
  17. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    This is not really an error because Json is now implementing in Bensku Fork since dev26c
    • <link:url>visible link text<reset>
    • <command:command>clickable text<reset>
    • <suggest command:command>clickable text<reset>
    • <tooltip:tooltip text>visible text with tooltip<reset>
     
    • Informative Informative x 2
  18. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    I'll try it later
     
Thread Status:
Not open for further replies.
Loading...