BalanceTop displayed with signs

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

KroterPvP

Active Member
Apr 10, 2017
178
7
18
22
Hello, I need help while doing a balancetop in signs. I want to display the signs like:
code_language.skript:
                    set {_num} to line 3 of event-block
                    wait 1 tick
                    set line 1 of event-block to "&0##%{_num}%"
                    set line 2 of event-block to "&a%{_player}%"
                    set line 3 of event-block to "&0%{_balance}%&0&l€"
                    set line 4 of event-block to ""
                    send "&7You have created a &abalance top &7sign."
                    stop
And I need to spawn a player head too, and update the signs and the skulls every x seconds.
Full Skript:
https://pastebin.com/teD9xq5G
 
What the problem? Just take the "/bal top" snippet code and put it into ever seconds, before you need first set location of sign. example:


code_language.skript:
/setsign <numer>:
trigger:
    if arg-1 is between 0 to 10:
        set {Sign::1} to location of target block
        send "Top balance for sign %arg-1% setup"


#then at ever seconds

every 1 seconds:
    #snippet code from /bal top
    set {_r} to 1
    loop {_high.to.low.list::*}:
        set line 1 of {Sign::%{_r}%} to "&0##%{_R}%"
        set line .... contiue it.
        add 1 to {_r}
        if {_r} is more than 10:
            stop
 
What the problem? Just take the "/bal top" snippet code and put it into ever seconds, before you need first set location of sign. example:


code_language.skript:
/setsign <numer>:
trigger:
    if arg-1 is between 0 to 10:
        set {Sign::1} to location of target block
        send "Top balance for sign %arg-1% setup"


#then at ever seconds

every 1 seconds:
    #snippet code from /bal top
    set {_r} to 1
    loop {_high.to.low.list::*}:
        set line 1 of {Sign::%{_r}%} to "&0##%{_R}%"
        set line .... contiue it.
        add 1 to {_r}
        if {_r} is more than 10:
            stop
But why do I still need to keep the "if {_r} is more than 10" if it's a sign?
 
But why do I still need to keep the "if {_r} is more than 10" if it's a sign?
do you want loop Amount of Players that joined server times? This is because you need "if {_r} is more than 10" to stop it, and only show 10 top in Sign? or do you want only Top 1?
 
do you want loop Amount of Players that joined server times? This is because you need "if {_r} is more than 10" to stop it, and only show 10 top in Sign? or do you want only Top 1?
Okey, I need it. And to spawn the player skull in the block of the sign?
 
Ufff.... here you go...
code_language.skript:
every 10 seconds:
    loop {seco.bal::*}:
        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
            if {_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
    wait 1 tick
    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
    wait 1 tick
    set {_total.balances} to 0
    loop {_high.to.low.list::*}:
        add 1 to {_topnumber}
        set {_b} to block at {Sign::%{_topnumber}%}
        set {_player} to "%loop-value%" parsed as offlineplayer
        set line 1 of {_b} to "&0##%{_topnumber}%"
        set line 2 of {_b} to "&a%{_player}%"
        set line 3 of {_b} to "&0%{seco.bal::%{_player}%}%&0&l€"
        set line 4 of {_b} to ""
        set block above {_b} to {_player}'s skull
        if {_topnumber} = 5:#!<=== Change... i have only 5 top.
            stop


i fell this is more request than help -.-
 
code_language.skript:
...
            if line 2 of event-block is "baltop":
                if line 3 of event-block is "1", "2", "3", "4", "5", "6", "7", "8", "9" or "10":
                    set {_topnumber} to line 3 of event-block
                    set {sign::*} to event-block
                    send "&7You have created a &abalance top &7sign."
                    stop
                else if line 3 of event-block is not "1", "2", "3", "4", "5", "6", "7", "8", "9" or "10":
                    cancel event
                    send "&7You need to specify a top number between &a1 &7and &a10&7."
                    stop
        else if player doesn't have permission "seco.signs" or "seco.admin":
            send "&cYou don't have permission to do this!"
every 4 seconds:
    loop {seco.bal::*}:
        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
            if {_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
    wait 1 tick
    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
    wait 1 tick
    set {_total.balances} to 0
    loop {_high.to.low.list::*}:
        add 1 to {_topnumber}
        set {_b} to block at {sign::%{_topnumber}%}
        set {_player} to "%loop-value%" parsed as offlineplayer
        set line 1 of {_b} to "&0##%{_topnumber}%"
        set line 2 of {_b} to "&a%{_player}%"
        set line 3 of {_b} to "&0%{seco.bal::%{_player}%}%&0&l€"
        set line 4 of {_b} to ""
        set block above {_b} to {_player}'s skull
        if {_topnumber} = 10:
            stop

The player skull doesn't apear. The top signs only gets displayed on blank signs. And I want to display the top that I write on the third line of the sign, (It always/only displays the top 2)
Thanks
 
Last edited by a moderator:
Status
Not open for further replies.