Jump to content

Baltop command


Realuid

Recommended Posts

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 by Realuid
Link to comment
Share on other sites

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 😕

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

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

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

 

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

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

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.

1604908226_ScreenShot2021-01-28at10_32_28AM.png.2646ad6be239a9d0756a99e8e15602ab.png

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

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 by Realuid
Link to comment
Share on other sites

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.

1604908226_ScreenShot2021-01-28at10_32_28AM.png.2646ad6be239a9d0756a99e8e15602ab.png

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...