No_Skittles Posted March 28, 2020 Share Posted March 28, 2020 Hello, ive seen many custom scripted servers have a hologram of the top 10 players on the server and i was just wondering how the skript for that works. Link to comment Share on other sites More sharing options...
Vinixs Posted March 29, 2020 Share Posted March 29, 2020 (edited) On 3/27/2020 at 9:36 PM, No_Skittles said: Hello, ive seen many custom scripted servers have a hologram of the top 10 players on the server and i was just wondering how the skript for that works. This is a level top hologram that we use for my server Multiples. First you'd want a way to create the hologram, so do something like this, command /holoset [<text>]: permission: rank.admin trigger: if arg-1 is not set: send "&c/holoset <level>" else if arg-1 is "level": create new holo with line "&7» &c&lLevel Leaderboard &7«" and store in {lvl_lbs::*} send "&aCreated a new hologram with id &c%size of {lvl_lbs::*}%" Basically all it does is sort everyone and their levels from a certain variable and displaying it, function refreshLevelLB(): set {_slevels::*} to sorted {Level::*} from highest to lowest with format "@index" set {_ind} to 0 loop {lvl_lbs::*}: loop {_slevels::*}: if {_ind} < 10: add 1 to {_ind} set {_pl} to "%loop-value-2 parsed as offline player%" set {_ul} to {Level::%loop-value-2%} set line (1 + {_ind}) of loop-value-1 to "&4&l%{_ind}%&7. &f%{_pl}%&7: [&c%{_ul}%&7]" You could have a timed event for refreshing the leaderboard if you wanted, or you could do it manually, just run the function refreshLevelLB(player) Edited March 29, 2020 by Vinixs 3 1 Link to comment Share on other sites More sharing options...
No_Skittles Posted April 2, 2020 Author Share Posted April 2, 2020 thank you very much Link to comment Share on other sites More sharing options...
Vinixs Posted April 2, 2020 Share Posted April 2, 2020 2 minutes ago, No_Skittles said: thank you very much No problem 1 1 Link to comment Share on other sites More sharing options...
Mathew_2122 Posted April 7, 2020 Share Posted April 7, 2020 Hmm i have error with ur skript Vinixshttps://prnt.sc/rus2t7 Link to comment Share on other sites More sharing options...
No_Skittles Posted April 8, 2020 Author Share Posted April 8, 2020 (edited) make sure you have sk-holo, also you need MorkazSk Edited April 8, 2020 by No_Skittles forgot 1 Link to comment Share on other sites More sharing options...
FnnF Posted May 22, 2020 Share Posted May 22, 2020 How do I get it to not just say the title Psalm 27:12 Link to comment Share on other sites More sharing options...
FnnF Posted May 22, 2020 Share Posted May 22, 2020 command /holoset [<text>]: permission: rank.admin trigger: if arg-1 is not set: send "&c/holoset <level>" else if arg-1 is "level": create new hologram with line "&7» &b&lBodies Leaderboard &7«" and store in {body_lbs::*} send "&aCreated a new hologram with id &c%size of {body_lbs::*}%" refreshLevelLB(player) Psalm 27:12 Link to comment Share on other sites More sharing options...
FnnF Posted May 22, 2020 Share Posted May 22, 2020 And how do I delete the holo Psalm 27:12 Link to comment Share on other sites More sharing options...
Vinixs Posted May 22, 2020 Share Posted May 22, 2020 On 3/29/2020 at 11:41 AM, Vinixs said: function refreshLevelLB(): set {_slevels::*} to sorted {Level::*} from highest to lowest with format "@index" set {_ind} to 0 loop {lvl_lbs::*}: loop {_slevels::*}: if {_ind} < 10: add 1 to {_ind} set {_pl} to "%loop-value-2 parsed as offline player%" set {_ul} to {Level::%loop-value-2%} set line (1 + {_ind}) of loop-value-1 to "&4&l%{_ind}%&7. &f%{_pl}%&7: [&c%{_ul}%&7]" @Waifer make sure you add this function, and make sure you run it in either a command or timed event 3 1 1 Link to comment Share on other sites More sharing options...
FnnF Posted May 22, 2020 Share Posted May 22, 2020 (edited) 8 minutes ago, Vinixs said: @Waifer make sure you add this function, and make sure you run it in either a command or timed event What do you mean? This is what I have @Vinixs function refreshLevelLB(): set {bodies::*} to sorted {Level::*} from highest to lowest with format "@index" set {_ind} to 0 loop {body_lbs::*}: loop {_bodies::*}: if {_ind} < 10: add 1 to {_ind} set {_pl} to "%loop-value-2 parsed as offline player%" set {_ul} to {Bodies::%loop-value-2%} set line (1 + {_ind}) of loop-value-1 to "&4&l%{_ind}%&7. &f%{_pl}%&7: [&c%{_ul}%&7]" command /holoset [<text>]: permission: rank.admin trigger: if arg-1 is not set: send "&c/holoset <level>" else if arg-1 is "level": create new hologram with line "&7» &b&lBodies Leaderboard &7«" and store in {body_lbs::*} send "&aCreated a new hologram with id &c%size of {body_lbs::*}%" refreshLevelLB(player) Edited May 22, 2020 by Waifer Psalm 27:12 Link to comment Share on other sites More sharing options...
Spiderlogical Posted May 22, 2020 Share Posted May 22, 2020 6 hours ago, FandF said: What do you mean? This is what I have @Vinixs function refreshLevelLB(): set {bodies::*} to sorted {Level::*} from highest to lowest with format "@index" set {_ind} to 0 loop {body_lbs::*}: loop {_bodies::*}: if {_ind} < 10: add 1 to {_ind} set {_pl} to "%loop-value-2 parsed as offline player%" set {_ul} to {Bodies::%loop-value-2%} set line (1 + {_ind}) of loop-value-1 to "&4&l%{_ind}%&7. &f%{_pl}%&7: [&c%{_ul}%&7]" command /holoset [<text>]: permission: rank.admin trigger: if arg-1 is not set: send "&c/holoset <level>" else if arg-1 is "level": create new hologram with line "&7» &b&lBodies Leaderboard &7«" and store in {body_lbs::*} send "&aCreated a new hologram with id &c%size of {body_lbs::*}%" refreshLevelLB(player) You could create a command like /refreshlb that runs refreshLevelLB() and then also setup an event like every 5 minutes: refreshLevelLB() to remove a hologram: command /holoremove [<text>]: permission: somepermhere trigger: if arg-1 is not set: send "&c/holoremove <id>" else: delete hologram {body_lbs::%arg-2%} delete {body_lbs::%arg-2%} send "&aDeleted hologram with ID &c%arg-2%" Link to comment Share on other sites More sharing options...
FnnF Posted May 22, 2020 Share Posted May 22, 2020 21 minutes ago, Spiderlogical said: You could create a command like /refreshlb that runs refreshLevelLB() and then also setup an event like every 5 minutes: refreshLevelLB() to remove a hologram: command /holoremove [<text>]: permission: somepermhere trigger: if arg-1 is not set: send "&c/holoremove <id>" else: delete hologram {body_lbs::%arg-2%} delete {body_lbs::%arg-2%} send "&aDeleted hologram with ID &c%arg-2%" But this only says one line, the title. Psalm 27:12 Link to comment Share on other sites More sharing options...
Spiderlogical Posted May 23, 2020 Share Posted May 23, 2020 4 hours ago, FandF said: But this only says one line, the title. Even after running the function to refresh it? Link to comment Share on other sites More sharing options...
FnnF Posted May 23, 2020 Share Posted May 23, 2020 Yea Psalm 27:12 Link to comment Share on other sites More sharing options...
FnnF Posted May 23, 2020 Share Posted May 23, 2020 function refreshLevelLB(): set {bodies::*} to sorted {Level::*} from highest to lowest with format "@index" set {_ind} to 0 loop {body_lbs::*}: loop {_bodies::*}: if {_ind} < 10: add 1 to {_ind} set {_pl} to "%loop-value-2 parsed as offline player%" set {_ul} to {Bodies::%loop-value-2%} set line (1 + {_ind}) of loop-value-1 to "&4&l%{_ind}%&7. &f%{_pl}%&7: [&c%{_ul}%&7]" command /holoset [<text>]: permission: rank.admin trigger: if arg-1 is not set: send "&c/holoset <level>" else if arg-1 is "level": create new hologram with line "&7» &b&lBodies Leaderboard &7«" and store in {body_lbs::*} send "&aCreated a new hologram with id &c%size of {body_lbs::*}%" command /refreshlb: trigger: refreshLevelLB() send "Done" This is all I have Psalm 27:12 Link to comment Share on other sites More sharing options...
Hulio Posted October 27, 2020 Share Posted October 27, 2020 So what should i do for this? Link to comment Share on other sites More sharing options...
AgentGamerPro Posted October 28, 2020 Share Posted October 28, 2020 @DeltaRays nEcRoPoStInG 1 Lifestealed | Minecraft Servers OG [VIP] 12/26/20 - 10/27/2021 OG [PRO] 12/27/21 - 11/18/2022 OG [LEGEND] 11/18/2022 - 3/14/2023 [DEFAULT] 3/14/2023 - Present Link to comment Share on other sites More sharing options...
DeltaRays Posted October 28, 2020 Share Posted October 28, 2020 Thanks. Locked Please don't reply to posts which have been inactive for more than one month. Link to comment Share on other sites More sharing options...
Recommended Posts