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.

Solved Most kills hologram

Discussion in 'Requests' started by BrettPlayMC, Jan 31, 2017.

  1. BrettPlayMC

    Supporter

    Joined:
    Jan 26, 2017
    Messages:
    715
    Likes Received:
    53
    Category: Fun

    Suggested name:
    MostKillsHolo

    What I want:
    A not so simple script that I am about to explain. :emoji_slight_smile:

    Basically I would like a script that at X Y and Z coordinates displays a hologram that looks exactly like the "Top Balances" picture on the LeaderHeads plugin page (scroll down to bottom). I would like this to display the top 10 players with the most kills in the "Survival" world. If someone could make this it would be amazing. If you have the desire to show off your work you can post it on SkUnity as an official resource! :emoji_grinning:
    Ideas for commands:
    What are needed? :emoji_stuck_out_tongue:
    Ideas for permissions:
    What are needed? :emoji_stuck_out_tongue:
    When I'd like it by: Saturday? :emoji_stuck_out_tongue:

     
  2. Best Answer:
    Post #16 by ShaneBee, Feb 4, 2017
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I suggest using a plugin. I dont really know an addon wich is able to show this! Sorry
    - NoobMazter
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    It is possible.
     
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Tbh, i am not the best at skript. Most of the addons i readed didnt really show something up. Ask another person, but if you want it really quick i suggest just using a plugin.
     
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I only know one plugin that does this but it is $12.50 and does way more than I want to. I am also a big user and fan of script. :emoji_slight_smile:
     
  7. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    You want a script that shows the top kills and corresponding players?

    Here's a free plugin, does exactly what you want, except it isn't a hologram.

    However, I can do this in Skript with list variables. It may be hard, but I could do it if I worked for a while. I know for sure that I can make a list of the most kills, but without the corresponding player.
    I can do it, most likely.
     
  8. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I help Brett's server out with his Skript needs and he specifically need a hologram. I can supply the ranking from one to ten if someone would be nice enough to supply an addon or example that would allow me to create a hologram.
     
    • Friendly Friendly x 1
  9. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Ah.
    I thought there was an addon to do this.
    I guess not!
    @Gatt could you maybe make an addon for this? :emoji_slight_smile:
     
    • Funny Funny x 1
  10. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Ahahaha. No.

    You can just use invisible armor stands. Done
     
  11. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Doesn't Umbaska have hologram support via Holographic Displays? ...Or maybe I'm wrong?
     
  12. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I made my own hologram system for Umbsaka. But you can still use invisible armor stands. Holograms = Armor Stands. Done.
     
  13. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
  14. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    You can use SkRayFall to create holograms through Holographic Displays.

    Also, I have created the hologram script but I'm sure @mathhulk can probably create a better one.
     
    • Agree Agree x 1
  15. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    If you share it, I will gladly use it and improve it.
     
  16. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    This is what I have so far. It can likely be improved.

    Code (Skript):
    1. # Required addons:
    2. # RandomSK, MundoSK, SkRayFall
    3. # Plugins required: HolographicDisplays and ProtocolLib
    4. on statistics increase:
    5.     if event-statistic is player kills:
    6.         remove {kills.%player%} from {TopKills::*}
    7.         increase {kills.%player%} by 1
    8.         loop {TopKills::*}:
    9.             if {kills.%player%} is less than loop-index:
    10.                 insert {kills.%player%} after {TopKills::%loop-index%}
    11.                 stop
    12.         loop all players:
    13.             if {kills.%player%} = first element of {TopKills::*}
    14.                 set {pos.%loop-player%} to 1
    15.             else:
    16.                 loop {TopKills::*}:
    17.                     if {kills.%loop-player%} = loop-index:
    18.                         set {pos.%loop-player%} to loop-value
    19.                         set {PlayerIndic.%loop-value%} to name of loop-player
    20.                         set {killsIndic.%loop-value%} to {kills.%loop-player%}
    21.  
    22.  
    23. Command /topkillshere:
    24.     Permission: KillsHolo.sethere
    25.     Permission message: No permission
    26.     Description: Set the location of Top Kills Hologram.
    27.     Trigger:
    28.         set {holoLoc} to location of player
    29.         send "&7Hologram location updated."
    30.        
    31. every 5 seconds:
    32.     create hologram "&9Top Player Kills;&aPlayer&5::&6Kills;&11. &a%{PlayerIndic.1}%::%{killsIndic.1}%;&12. &a%{PlayerIndic.2}%::%{killsIndic.2}%;&13. &a%{PlayerIndic.3}%::%{killsIndic.3}%;&14. &a%{PlayerIndic.4}%::%{killsIndic.4}%;&15. &a%{PlayerIndic.5}%::%{killsIndic.5}%;&16. &a%{PlayerIndic.6}%::%{killsIndic.6}%;&17. &a%{PlayerIndic.7}%::%{killsIndic.7}%;&18. &a%{PlayerIndic.8}%::%{killsIndic.8}%;&19. &a%{PlayerIndic.9}%::%{killsIndic.9}%;&110. &a%{PlayerIndic.10}%::%{killsIndic.10}%" at {holoLoc} for 5 seconds
    33.  
    34. Command /clearkills <player>:
    35.     Permission: KillsHolo.clear
    36.     Permission message: No permission
    37.     Usage: /clearkills <player>
    38.     Description: Clear kills of player
    39.     Trigger:
    40.         set {kills.%arg 1%} to 0
    41.         send "&5%arg 1%&7's kills have been cleared."
    [/SPOILER]
     
  17. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    • Like Like x 1
  18. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Do you have RandomSK? That's the on stats increase.

    Also, does anybody know how to better use the "(add|insert) %objects% (before|after) (%listutil% %-number%|last %listutil%)[ (of|in) %-object/objects%]" from MundoSK's ListUtils.
    Code (Skript):
    1. # Required addons:
    2. # RandomSK, MundoSK, SkRayFall
    3. # Plugins required: HolographicDisplays and ProtocolLib
    4. on statistics increase:
    5.     if event-statistic is player kills:
    6.         remove {kills.%player%} from {TopKills::*}
    7.         increase {kills.%player%} by 1
    8.         if {kills.%player%} > first element of  {TopKills::*}:
    9.             insert {kills.%player%} before {TopKills::%loop-index%}
    10.             wait 1 tick
    11.             run codeblock UpdateList
    12.             stop
    13.         loop {TopKills::*}:
    14.             if {kills.%player%} is less than loop-index:
    15.                 insert {kills.%player%} after {TopKills::%loop-index%}
    16.                 wait 1 tick
    17.                 run codeblock UpdateList
    18.                 stop
    19.  
    20. Codeblock UpdateList:
    21.         loop all players:
    22.             if {kills.%player%} > first element of {TopKills::*}
    23.                 set {pos.%loop-player%} to loop-value
    24.                 set {PlayerIndic.%1%} to name of loop-player
    25.                 set {killsIndic.%1%} to {kills.%loop-player%}
    26.             else:
    27.                 loop {TopKills::*}:
    28.                     if {kills.%loop-player%} = loop-index:
    29.                         set {pos.%loop-player%} to loop-value
    30.                         set {PlayerIndic.%loop-value%} to name of loop-player
    31.                         set {killsIndic.%loop-value%} to {kills.%loop-player%}
    32.  
    33.  
    34. Command /topkillshere:
    35.     Permission: KillsHolo.sethere
    36.     Permission message: No permission
    37.     Description: Set the location of Top Kills Hologram.
    38.     Trigger:
    39.         set {holoLoc} to location of player
    40.         send "&7Hologram location updated."
    41.      
    42. every 5 seconds:
    43.     create hologram "&9Top Player Kills;&aPlayer&5::&6Kills;&11. &a%{PlayerIndic.1}%::%{killsIndic.1}%;&12. &a%{PlayerIndic.2}%::%{killsIndic.2}%;&13. &a%{PlayerIndic.3}%::%{killsIndic.3}%;&14. &a%{PlayerIndic.4}%::%{killsIndic.4}%;&15. &a%{PlayerIndic.5}%::%{killsIndic.5}%;&16. &a%{PlayerIndic.6}%::%{killsIndic.6}%;&17. &a%{PlayerIndic.7}%::%{killsIndic.7}%;&18. &a%{PlayerIndic.8}%::%{killsIndic.8}%;&19. &a%{PlayerIndic.9}%::%{killsIndic.9}%;&110. &a%{PlayerIndic.10}%::%{killsIndic.10}%" at {holoLoc} for 5 seconds
    44.  
    45. Command /clearkills <player>:
    46.     Permission: KillsHolo.clear
    47.     Permission message: No permission
    48.     Usage: /clearkills <player>
    49.     Description: Clear kills of player
    50.     Trigger:
    51.         set {kills.%arg 1%} to 0
    52.         send "&5%arg 1%&7's kills have been cleared."
     
  19. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I didn't end up using the versions provided. Mathhulk wrote a custom version for my server with only 2 bugs in it.
    One of them being SkQuery spamming an annoying message in console and the second being the hologram not staying on server restart.
     
  20. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I'll fix that when I get the time.
     
    • Agree Agree x 1
  21. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I may be able to help.

    You can use on skript load to create the hologram on server start.
     
    • Informative Informative x 1

Share This Page

Loading...