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!

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

Clickable commands.

Discussion in 'Requests' started by Computerize, Dec 24, 2019.

  1. Computerize

    Computerize Member

    Joined:
    Oct 10, 2019
    Messages:
    38
    Likes Received:
    0
    I want to use this text:

    "&3Type '&e/f join %{factionOfPlayer.%player%}%&3' or &bclick here <reset> &3to join."

    I'd like the "&bclick here" to execute the command "/f join %{factionOfPlayer.%player%}%" and when "&bclick here" is hovered over the message "&b/f join %{factionOfPlayer.%player%}%" is shown.

    Thanks
    --- Double Post Merged, Dec 24, 2019, Original Post Date: Dec 24, 2019 ---
    Also, tell me which addons are required.
     
  2. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    The way that i make this things is:

    Code (Skript):
    1.  
    2. command /anycmd:
    3.     trigger:
    4.         console command "/tellraw %player% {'text':'§3Type §e/f join %{factionOfPlayer.%player%}% or §bclick here §3to join.','clickEvent':{'action':'run_command','value':'/f join %{factionOfPlayer.%player%}%}}"
    5.  
    If that gives you bugs, let me know, and I'll try to correct it.
     
  3. Computerize

    Computerize Member

    Joined:
    Oct 10, 2019
    Messages:
    38
    Likes Received:
    0
    no errors but it didnt do anything
     
  4. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Did you clicked the message?
     
  5. Computerize

    Computerize Member

    Joined:
    Oct 10, 2019
    Messages:
    38
    Likes Received:
    0
    No message appears
     
  6. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    that weird... what is your spigot and skript version?
     
  7. Computerize

    Computerize Member

    Joined:
    Oct 10, 2019
    Messages:
    38
    Likes Received:
    0
    I'm on a free server hosting called MineHut they use a custom version. Same with spigot.
     
  8. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    and the server version? 1.14, 1.13, 1.12 or wich?
     
  9. Computerize

    Computerize Member

    Joined:
    Oct 10, 2019
    Messages:
    38
    Likes Received:
    0
    1.15
     
  10. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Ugh ... I don't have much knowledge about version 1.15. But, look for messages in json(hover and clickables). The results will guide you to what you need.
     
  11. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    430
    Likes Received:
    30
    you need json.sk
    Code (Text):
    1. #event & stuff
    2.     json("%player%", ""&3Type '&e/f join %{factionOfPlayer.%player%}%&3' or &bclick here <reset> &3to join.||cmd:/f join %{factionOfPlayer.%player%}%||ttp:&b/f join %{factionOfPlayer.%player%}%")
    3.  
     
  12. Computerize

    Computerize Member

    Joined:
    Oct 10, 2019
    Messages:
    38
    Likes Received:
    0
    invalid use of quotains
    when i make all of the " into "" it does nothing :/
    I might be making some of the quotations "" when they are not in the text so idk
     
  13. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    430
    Likes Received:
    30
    Code (Text):
    1. command /json:
    2.     trigger:
    3.         json("%player%", "&3Type """"&e/f join %{factionOfPlayer.%player%}%&3"""" or &bclick here <reset> &3to join.||cmd:/f join %{factionOfPlayer.%player%}%||ttp:&b/f join %{factionOfPlayer.%player%}%")
     
  14. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    108
    Medals:
    You don't need to use json.sk or console commands, Skript has functionality for this:
    Code (Text):
    1. message formatted "&3Type '&e/f join %{factionOfPlayer.%player%}%&3' or &b<tooltip:&b/f join %{factionOfPlayer.%player%}%><cmd:/f join %{factionOfPlayer.%player%}%>click here <reset> &3to join."
     
    #14 TPGamesNL, Dec 26, 2019
    Last edited: Dec 28, 2019
  15. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Oh, i really didnt know this existed.
     

Share This Page

Loading...