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.

Solved i have problem on this prestige script

Discussion in 'Skript' started by Fain, May 19, 2020.

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

    Fain Member

    Joined:
    May 19, 2020
    Messages:
    19
    Likes Received:
    1
    Code (Text):
    1. command /prestigebook [<player>]:
    2.   permission: prestige.book
    3.   trigger:
    4.     give 1 of written book named "&7&ki &5&lPrestigious &d&lSkyFlood &7&ki" to arg-1
    5.    
    6. on join:
    7.   if {prestige.%player's uuid%} is not set:
    8.     set {prestige.%player's uuid%} to 0
    9.  
    10. on chat:
    11.   send "%player's display name% &7[&f%{prestige.%player's uuid%}%&7] &f: %message%" to player
    12.  
    13. on right click with written book:
    14.   if name of tool of player is "&7&ki &5&lPrestigious &d&lSkyFlood &7&ki":
    15.     send "&a>> You have &e&lPrestiged&a! <<"
    16.     set {_t} to {prestige.%player's uuid%} +1
    17.     send "      &7[&8%{prestige.%player's uuid%}%&7] --> &7[&a%{_t}%&7]"
    18.     add 1 to {prestige.%player's uuid%}
    19.     broadcast "&6&l%player% &4&lhas prestiged!"
    20.     remove held item from player
    the players cant see other player prestige on chat and only see self and if I type on chat its duplicate my name one prestige and second one none prestige I want to help me

     
    #1 Fain, May 19, 2020
    Last edited: May 19, 2020
  2. Best Answer:
    Post #16 by novastosha, May 19, 2020
  3. in the on chat event, change "send" to "broadcast", and remove "to player"
    so
    Code (Text):
    1. on chat:
    2.     broadcast "%player's display name% &7[&f%{prestige.%player's uuid%}%&7] &f: %message%"
     
  4. Fain

    Fain Member

    Joined:
    May 19, 2020
    Messages:
    19
    Likes Received:
    1
    the other player can see my prestige but its still duplicate my name
    it I need more plugin for it ?
     

    Attached Files:

    • same.png
      same.png
      File size:
      847.2 KB
      Views:
      153
  5. send over the updated FULL code
     
  6. Fain

    Fain Member

    Joined:
    May 19, 2020
    Messages:
    19
    Likes Received:
    1
    Code (Text):
    1. command /prestigebook [<player>]:
    2.   permission: prestige.book
    3.   trigger:
    4.     give 1 of written book named "&7&ki &5&lPrestigious &d&lSkyFlood &7&ki" to arg-1
    5.    
    6. on join:
    7.   if {prestige.%player's uuid%} is not set:
    8.     set {prestige.%player's uuid%} to 0
    9.  
    10. on chat:
    11.   broadcast "%player's display name% &7[&f%{prestige.%player's uuid%}%&7] &f: %message%"
    12.  
    13. on right click with written book:
    14.   if name of tool of player is "&7&ki &5&lPrestigious &d&lSkyFlood &7&ki":
    15.     send "&a>> You have &e&lPrestiged&a! <<"
    16.     set {_t} to {prestige.%player's uuid%} +1
    17.     send "      &7[&8%{prestige.%player's uuid%}%&7] --> &7[&a%{_t}%&7]"
    18.     add 1 to {prestige.%player's uuid%}
    19.     broadcast "&6&l%player% &4&lhas prestiged!"
    20.     remove held item from player
     
  7. do you have any other skripts than use the "on chat" event?
     
  8. Fain

    Fain Member

    Joined:
    May 19, 2020
    Messages:
    19
    Likes Received:
    1
    im very noob on scripting and there it my plugins

    Essentials, Essentialschat, Holographic, luckperms, placeholder api, Skript, Skript addon: Ersatz, Skript addon:skQuery,Vault, Worldedit, Worldguard

    only this plugins


    And no I don't have any script only this
     
  9. There has to be something interfering, because you are only broadcasting the message once.

    To be clear, your issue is that the message is end twice, correct?
     
  10. Fain

    Fain Member

    Joined:
    May 19, 2020
    Messages:
    19
    Likes Received:
    1
    can you create scrip
    yeah If i type something then type twice than one
    --- Double Post Merged, May 19, 2020, Original Post Date: May 19, 2020 ---
    its problem from essentialschat?
     
  11. No, I don't think it is.

    So, if you remove the broadcast entirely, what happens then?
     
  12. Fain

    Fain Member

    Joined:
    May 19, 2020
    Messages:
    19
    Likes Received:
    1
    I see this
     

    Attached Files:

    • hgf.png
      hgf.png
      File size:
      83.2 KB
      Views:
      147
  13. okay, so just try and disable the skript, so we can see if there's some other skript also doing a broadcast
     
  14. Fain

    Fain Member

    Joined:
    May 19, 2020
    Messages:
    19
    Likes Received:
    1
    ok
    --- Double Post Merged, May 19, 2020, Original Post Date: May 19, 2020 ---
    I disable it
    --- Double Post Merged, May 19, 2020 ---
    this command /skript disable prestige right?
     
  15. okay, then what happens when you type in the chat?
    --- Double Post Merged, May 19, 2020 ---
    Yes, "/sk disable (skript name)"
     
  16. Fain

    Fain Member

    Joined:
    May 19, 2020
    Messages:
    19
    Likes Received:
    1
    its back to normal and no prestige
    --- Double Post Merged, May 19, 2020, Original Post Date: May 19, 2020 ---
    and not twice
     

    Attached Files:

    • 432.png
      432.png
      File size:
      17.2 KB
      Views:
      148
  17. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    dude cancel the event
    --- Double Post Merged, May 19, 2020, Original Post Date: May 19, 2020 ---
    or set the chat format to what u want
     
  18. Oh yeah, i completely missed the obvious fact that he is not cancelling the event, and why the message is therefor being sent twice..
    How stupid of me xD
     
    • Funny Funny x 1
  19. Fain

    Fain Member

    Joined:
    May 19, 2020
    Messages:
    19
    Likes Received:
    1
    Okay How to cancel the event?
    --- Double Post Merged, May 20, 2020 ---
    finally I fix it thank you man :emoji_slight_smile:
    --- Double Post Merged, May 20, 2020 ---
    and thank you for helping me :emoji_slight_smile:
     
    • Friendly Friendly x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...