Realuid Posted November 20, 2020 Share Posted November 20, 2020 (edited) Hello, i would like to make a baltop for my server using my own balance variable, does anyone know how i might do this? the variable: {balance::%player's uuid%} Im also having a problem where when a player does /stats instead of displaying {balance::%arg-1's uuid%} it displays something like {balance::6112341aa-asfsfm112-a12241sa-mjknkjfh} This is the skript: command /stats <player>: usage: /stats <player> trigger: send "&0&l---------------------" send "&6%arg-1% &chas &a$ {balance::%arg-1's uuid%} " send "&6%arg-1% &chas &a{prestige::%arg-1's uuid%} &dPrestiges" send "&0&l---------------------" Edited November 20, 2020 by Realuid Link to comment Share on other sites More sharing options...
AgentGamerPro Posted November 20, 2020 Share Posted November 20, 2020 3 hours ago, Realuid said: Hello, i would like to make a baltop for my server using my own balance variable, does anyone know how i might do this? the variable: {balance::%player's uuid%} Im also having a problem where when a player does /stats instead of displaying {balance::%arg-1's uuid%} it displays something like {balance::6112341aa-asfsfm112-a12241sa-mjknkjfh} This is the skript: command /stats <player>: usage: /stats <player> trigger: send "&0&l---------------------" send "&6%arg-1% &chas &a$ {balance::%arg-1's uuid%} " send "&6%arg-1% &chas &a{prestige::%arg-1's uuid%} &dPrestiges" send "&0&l---------------------" For the problem do %player% and %arg-1%, the random numbers and letters is the player's UUID, not IGN. For the balance variable, if you want a /pay skript, do a command that finds if the player executing /pay has enough amount in the variable, removing the amount from him (ex. {balance.%player%}), and adding argument to the targeted player (ex. {balance.%arg-1%}). Sorry if what i wrote was confusing, it confused me too 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...
Realuid Posted November 20, 2020 Author Share Posted November 20, 2020 thanks. also, i have another problem. im trying do make a /eco <player> [give][remove] <number> command but i dont know how to specify the [give] and [remove] arguments. Link to comment Share on other sites More sharing options...
AgentGamerPro Posted November 21, 2020 Share Posted November 21, 2020 heres an example skript: on command /example <text>: trigger: if arg-1 is set to give: send "give" to player else if arg-1 is set to remove: send "remove" to player else: send "Use ""Give"" or ""Remove"" for the arguments!" to player 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...
CoolProgrammer Posted November 21, 2020 Share Posted November 21, 2020 Skript does provide sorting example skript when you first install it. Here is a piece of code that I used to use on my server. loop {balance::*}: add 1 to {_size} if {_low.to.high.list::%loop-value%} is not set: set {_low.to.high.list::%loop-value%} to loop-index else: set {_n} to 0 loop {_size} times: set {_n} to {_n} + 1 {_low.to.high.list::%loop-value-1%.%{_n}%} is not set set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index stop loop set {_n} to size of {_low.to.high.list::*} loop {_low.to.high.list::*}: set {_high.to.low.list::%{_n}%} to loop-value set {_n} to {_n} - 1 set {_i} to 0 send "&8&l» &3&lTop Balances" loop {_high.to.low.list::*}: set {_player} to "%loop-value%" parsed as offline player set {_uuid} to uuid of {_player} if {_player} is not "<none>": add 1 to {_topnumber} send "&3%{_topnumber}%&8| &b%{_player}% &8| &3$&b%{balance::%{_uuid}%}%" add 1 to {_i} if {_topnumber} > 9: stop Feel free to use it, and make sure to customize it according to your needs. Hello there! If you're reading this, hope you're having a wonderful day! Feel free to contact me via Discord (CoolProgrammer#1920) for any help. My DMs are always open for help. You can also message via. forum messages for help. Also, don't hesitate to leave a like on my post if I helped you in any way. Link to comment Share on other sites More sharing options...
Realuid Posted November 21, 2020 Author Share Posted November 21, 2020 (edited) Thanks! also AgentGamerPro, what i ended up using was [<player>] or something like that. works well! Coolprogrammer ♥ appreciate it man. One more problem: the skript that Coolprogrammer sent does not work. it says that loop-value is used in too many different places or something. Edited November 22, 2020 by Realuid Link to comment Share on other sites More sharing options...
CoolProgrammer Posted November 22, 2020 Share Posted November 22, 2020 6 hours ago, Realuid said: Thanks! also AgentGamerPro, what i ended up using was [<player>] or something like that. works well! Coolprogrammer ♥ appreciate it man. One more problem: the skript that Coolprogrammer sent does not work. it says that loop-value is used in too many different places or something. No worries Can you copy paste the errors here? I'll fix them for you. Hello there! If you're reading this, hope you're having a wonderful day! Feel free to contact me via Discord (CoolProgrammer#1920) for any help. My DMs are always open for help. You can also message via. forum messages for help. Also, don't hesitate to leave a like on my post if I helped you in any way. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now