Solved Progress bar rankup

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

Mattllama987

Active Member
Aug 5, 2018
225
7
18
24
Hello, I have a rankup script, and a progress bar. I want to know if I can make the code way smaller for the progress bar? I have a prison server, and the ranks go A-Z. But like I said, I have a skript to show a rankup bar, but I want to know if the code can be smaller?


code_language.skript:
every 1 second:
    loop all players:
        if loop-player's money is more than or equal to 0:
            set action bar of loop-player to coloured "        &bRank&7: &eA &c||||||||||||||||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 39189:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|&c|||||||||||||||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 78378:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||&c||||||||||||||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 117567:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||&c|||||||||||||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 156756:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||&c||||||||||||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 195945:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||&c|||||||||||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 235134:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||&c||||||||||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 274323:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||&c|||||||||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 313512:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||&c||||||||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 352701:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||&c|||||||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 391890:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||&c||||||||||||||||||||||||||| &bNext&7: &eB" #10
        if loop-player's money is more than or equal to 431079:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||&c|||||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 470268:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||&c||||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 509457:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||&c|||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 548646:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||&c||||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 587835:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||&c|||||||||||||||||||||| &bNext&7: &eB"  #15
        if loop-player's money is more than or equal to 627024:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||&c||||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 666213:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||&c|||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 705402:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||&c||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 744591:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||&c||||||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 783780:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||&c||||||||||||||||| &bNext&7: &eB"#20
        if loop-player's money is more than or equal to 822969:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||&c|||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 862158:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||&c||||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 901347:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||&c|||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 940536:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||&c||||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 979725:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||||&c|||||||||||| &bNext&7: &eB"    #25
        if loop-player's money is more than or equal to 1018914:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||&c||||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 1058103:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||||||&c|||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 1097292:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||||&c||||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 1136481:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||||||||&c|||||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 1175670:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||||||&c||||||| &bNext&7: &eB"     #30
        if loop-player's money is more than or equal to 1214859:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||||||||||&c|||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 1254048:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||||||||&c||||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 1293237:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||||||||||||&c|||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 1332426:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||||||||||&c||| &bNext&7: &eB"
        if loop-player's money is more than or equal to 1371615:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||||||||||||||&c|| &bNext&7: &eB"
        if loop-player's money is more than or equal to 1410804:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||||||||||||&c| &bNext&7: &eB"
        if loop-player's money is more than or equal to 1450000:
            set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||||||||||||| &bNext&7: &eB"
        if {custom::prefix::%loop-player%} is "&f[&bB&f]":
            if loop-player's money is more than or equal to 0:
                set action bar of loop-player to coloured "        &bRank&7: &eB &c||||||||||||||||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 43243:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|&c|||||||||||||||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 86486:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||&c||||||||||||||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 129729:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||&c|||||||||||||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 172972:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||&c||||||||||||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 216215:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||&c|||||||||||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 256458:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||&c||||||||||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 301701:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||&c|||||||||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 345944:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||&c||||||||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 389187:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||&c|||||||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 432430:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||&c||||||||||||||||||||||||||| &bNext&7: &eC" #10
            if loop-player's money is more than or equal to 475673:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||||&c|||||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 518916:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||&c||||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 562159:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||||||&c|||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 605402:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||&c||||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 648645:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||||||||&c|||||||||||||||||||||| &bNext&7: &eC"  #15
            if loop-player's money is more than or equal to 691888:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||&c||||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 735131:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||||||||||&c|||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 778374:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||||&c||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 821617:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||||&c||||||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 864860:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||||||&c||||||||||||||||| &bNext&7: &eC"#20
            if loop-player's money is more than or equal to 908103:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||||||||||||||&c|||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 951346:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||||||||&c||||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 994589:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||||||||||||||||&c|||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 1037832:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||||||||||&c||||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 1081075:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||||||||||||||||||&c|||||||||||| &bNext&7: &eC"    #25
            if loop-player's money is more than or equal to 1124318:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||||||||||||&c||||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 1167561:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||||||||||||||||||||&c|||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 1210804:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||||||||||||||&c||||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 1254047:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||||||||||||||||||||||&c|||||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 1297290:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||||||||||||||||&c||||||| &bNext&7: &eC"     #30
            if loop-player's money is more than or equal to 1340533:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||||||||||||||||||||||||&c|||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 1383776:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||||||||||||||||||&c||||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 1427019:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||||||||||||||||||||||||||&c|||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 1470262:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||||||||||||||||||||&c||| &bNext&7: &eC"
            if loop-player's money is more than or equal to 1513505:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a|||||||||||||||||||||||||||||||||||&c|| &bNext&7: &eC"
            if loop-player's money is more than or equal to 1556748:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||||||||||||||||||||||&c| &bNext&7: &eC"
            if loop-player's money is more than or equal to 1600000:
                set action bar of loop-player to coloured "        &bRank&7: &eB &a||||||||||||||||||||||||||||||||||||| &bNext&7: &eC"
        if {custom::prefix::%loop-player%} is "&f[&bC&f]":
            if loop-player's money is more than or equal to 0:
                set action bar of loop-player to coloured "        &bRank&7: &eA &c||||||||||||||||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 43243:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|&c|||||||||||||||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 86486:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||&c||||||||||||||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 129729:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||&c|||||||||||||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 172972:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||&c||||||||||||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 216215:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||&c|||||||||||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 256458:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||&c||||||||||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 301701:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||&c|||||||||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 345944:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||&c||||||||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 389187:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||&c|||||||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 432430:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||&c||||||||||||||||||||||||||| &bNext&7: &eB" #10
            if loop-player's money is more than or equal to 475673:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||&c|||||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 518916:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||&c||||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 562159:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||&c|||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 605402:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||&c||||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 648645:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||&c|||||||||||||||||||||| &bNext&7: &eB"  #15
            if loop-player's money is more than or equal to 691888:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||&c||||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 735131:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||&c|||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 778374:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||&c||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 821617:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||&c||||||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 864860:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||&c||||||||||||||||| &bNext&7: &eB"#20
            if loop-player's money is more than or equal to 908103:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||&c|||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 951346:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||&c||||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 994589:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||&c|||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 1037832:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||&c||||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 1081075:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||||&c|||||||||||| &bNext&7: &eB"    #25
            if loop-player's money is more than or equal to 1124318:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||&c||||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 1167561:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||||||&c|||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 1210804:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||||&c||||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 1254047:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||||||||&c|||||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 1297290:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||||||&c||||||| &bNext&7: &eB"     #30
            if loop-player's money is more than or equal to 1340533:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||||||||||&c|||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 1383776:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||||||||&c||||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 1427019:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||||||||||||&c|||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 1470262:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||||||||||&c||| &bNext&7: &eB"
            if loop-player's money is more than or equal to 1513505:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a|||||||||||||||||||||||||||||||||||&c|| &bNext&7: &eB"
            if loop-player's money is more than or equal to 1556748:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||||||||||||&c| &bNext&7: &eB"
            if loop-player's money is more than or equal to 1600000:
                set action bar of loop-player to coloured "        &bRank&7: &eA &a||||||||||||||||||||||||||||||||||||| &bNext&7: &eB"
 
Maybe something like this:
code_language.skript:
set {_i} to min(round(loop-player's money / 39189) and 37)
set {_txt} to "        &bRank&7: &eA &a"
loop {_i} times:
    set {_txt} to "%{_txt}%|"
set {_txt} to "%{_txt}%&c"
loop 37-{_i} times:
    set {_txt} to "%{_txt}%|"
set {_txt} to "%{_txt}% &bNext&7: &eB"
set action bar of loop-player to {_txt}
 
For what I saw, of that example. It would loop the action bar, 37 times. I don't want that xD I just need a small easy way to make the progress bar. I like what you showed, small and easy. But the only thing it would do is loop the action bar.
 
It doesn't loop the actionbar?
 
Can you send your code? (You edited it so yea) also delete the txt variable before every player
 
This is the edited code.

code_language.skript:
every 1 second:
    loop all players:
        set {_i} to min(round(loop-player's money / 39189) and 37)
        set {_txt} to "        &bRank&7: &eA &a"
        loop {_i} times:
            set {_txt} to "%{_txt}%|"
            set {_txt} to "%{_txt}%&c"
        loop 37-{_i} times:
            set {_txt} to "%{_txt}%|"
            set {_txt} to "%{_txt}% &bNext&7: &eB"
            set action bar of loop-player to {_txt}

This is the prices I need it to match to, but im not sure how to do it?


code_language.skript:
    {rankup::A::%player%} = 0
    {rankup::B::%player%} = 1450000
    {rankup::C::%player%} = 1600000
    {rankup::D::%player%} = 1900000
    {rankup::E::%player%} = 2200000
    {rankup::F::%player%} = 2500000
    {rankup::G::%player%} = 2900000
    {rankup::H::%player%} = 3200000
    {rankup::I::%player%} = 3700000
    {rankup::J::%player%} = 4200000
    {rankup::K::%player%} = 4500000
    {rankup::L::%player%} = 5100000
    {rankup::M::%player%} = 5500000
    {rankup::N::%player%} = 5900000
    {rankup::O::%player%} = 6500000
    {rankup::P::%player%} = 7100000
    {rankup::Q::%player%} = 7600000
    {rankup::R::%player%} = 8200000
    {rankup::S::%player%} = 8800000
    {rankup::T::%player%} = 9500000
    {rankup::U::%player%} = 10100000
    {rankup::V::%player%} = 10900000
    {rankup::W::%player%} = 11500000
    {rankup::X::%player%} = 12200000
    {rankup::Y::%player%} = 13000000
    {rankup::Z::%player%} = 13800000
 
This is the edited code.

code_language.skript:
every 1 second:
    loop all players:
        set {_i} to min(round(loop-player's money / 39189) and 37)
        set {_txt} to "        &bRank&7: &eA &a"
        loop {_i} times:
            set {_txt} to "%{_txt}%|"
            set {_txt} to "%{_txt}%&c"
        loop 37-{_i} times:
            set {_txt} to "%{_txt}%|"
            set {_txt} to "%{_txt}% &bNext&7: &eB"
            set action bar of loop-player to {_txt}

This is the prices I need it to match to, but im not sure how to do it?


code_language.skript:
    {rankup::A::%player%} = 0
    {rankup::B::%player%} = 1450000
    {rankup::C::%player%} = 1600000
    {rankup::D::%player%} = 1900000
    {rankup::E::%player%} = 2200000
    {rankup::F::%player%} = 2500000
    {rankup::G::%player%} = 2900000
    {rankup::H::%player%} = 3200000
    {rankup::I::%player%} = 3700000
    {rankup::J::%player%} = 4200000
    {rankup::K::%player%} = 4500000
    {rankup::L::%player%} = 5100000
    {rankup::M::%player%} = 5500000
    {rankup::N::%player%} = 5900000
    {rankup::O::%player%} = 6500000
    {rankup::P::%player%} = 7100000
    {rankup::Q::%player%} = 7600000
    {rankup::R::%player%} = 8200000
    {rankup::S::%player%} = 8800000
    {rankup::T::%player%} = 9500000
    {rankup::U::%player%} = 10100000
    {rankup::V::%player%} = 10900000
    {rankup::W::%player%} = 11500000
    {rankup::X::%player%} = 12200000
    {rankup::Y::%player%} = 13000000
    {rankup::Z::%player%} = 13800000
Use
code_language.skript:
variables:
    {rankup::A} = 0
    {rankup::B} = 1450000
    {rankup::C} = 1600000
    {rankup::D} = 1900000
    {rankup::E} = 2200000
    {rankup::F} = 2500000
    {rankup::G} = 2900000
    {rankup::H} = 3200000
    {rankup::I} = 3700000
    {rankup::J} = 4200000
    {rankup::K} = 4500000
    {rankup::L} = 5100000
    {rankup::M} = 5500000
    {rankup::N} = 5900000
    {rankup::O} = 6500000
    {rankup::P} = 7100000
    {rankup::Q} = 7600000
    {rankup::R} = 8200000
    {rankup::S} = 8800000
    {rankup::T} = 9500000
    {rankup::U} = 10100000
    {rankup::V} = 10900000
    {rankup::W} = 11500000
    {rankup::X} = 12200000
    {rankup::Y} = 13000000
    {rankup::Z} = 13800000

every 1 second:
    loop all players:
        set {_rank::*} to uncolored {custom::prefix::%loop-player%} parsed as "[%text%]"
        set {_rank} to {_rank::1} ? "A"
        set {_abc::*} to split "ABCDEFGHIJKLMNOPQRSTUVWXYZ" at ""
        loop {_abc::*}:
            {_rank} is loop-value-2
            set {_i2} to loop-index parsed as a integer + 1
            set {_nextrank} to {_abc::%{_i2}%}
        set {_rankcost} to {rankup::%{_nextrank}%}
        set {_i} to min(round((loop-player's money) / ({_rankcost} / 37)) and 37)
        # set {_i} to min(round(({money::%loop-player%} ? 0) / ({_rankcost} / 37)) and 37)
        set {_txt} to "      &bRank&7: &e%{_rank}% &a"
        # broadcast "i: %{_i}%"
        loop {_i}+1 times:
            {_i} is not 0
            set {_txt} to "%{_txt}%|"
        set {_txt} to "%{_txt}%&c"
        loop 37-{_i} times:
            {_i} is not 37
            set {_txt} to "%{_txt}%|"
        set {_txt} to "%{_txt}% &bNext&7: &e%{_nextrank}%"
        set action bar of loop-player to {_txt}
 
Last edited:
  • Like
Reactions: BrettPlayMC
Use
code_language.skript:
variables:
    {rankup::A} = 0
    {rankup::B} = 1450000
    {rankup::C} = 1600000
    {rankup::D} = 1900000
    {rankup::E} = 2200000
    {rankup::F} = 2500000
    {rankup::G} = 2900000
    {rankup::H} = 3200000
    {rankup::I} = 3700000
    {rankup::J} = 4200000
    {rankup::K} = 4500000
    {rankup::L} = 5100000
    {rankup::M} = 5500000
    {rankup::N} = 5900000
    {rankup::O} = 6500000
    {rankup::P} = 7100000
    {rankup::Q} = 7600000
    {rankup::R} = 8200000
    {rankup::S} = 8800000
    {rankup::T} = 9500000
    {rankup::U} = 10100000
    {rankup::V} = 10900000
    {rankup::W} = 11500000
    {rankup::X} = 12200000
    {rankup::Y} = 13000000
    {rankup::Z} = 13800000

every 1 second:
    loop all players:
        set {_rank::*} to uncolored {custom::prefix::%loop-player%} parsed as "[%text%]"
        set {_rank} to {_rank::1} ? "A"
        set {_abc::*} to split "ABCDEFGHIJKLMNOPQRSTUVWXYZ" at ""
        loop {_abc::*}:
            {_rank} is loop-value-2
            set {_i2} to loop-index parsed as a integer + 1
            set {_nextrank} to {_abc::%{_i2}%}
        set {_rankcost} to {rankup::%{_nextrank}%}
        set {_i} to min(round((loop-player's money) / ({_rankcost} / 37)) and 37)
        # set {_i} to min(round(({money::%loop-player%} ? 0) / ({_rankcost} / 37)) and 37)
        set {_txt} to "      &bRank&7: &e%{_rank}% &a"
        # broadcast "i: %{_i}%"
        loop {_i}+1 times:
            {_i} is not 0
            set {_txt} to "%{_txt}%|"
        set {_txt} to "%{_txt}%&c"
        loop 37-{_i} times:
            {_i} is not 37
            set {_txt} to "%{_txt}%|"
        set {_txt} to "%{_txt}% &bNext&7: &e%{_nextrank}%"
        set action bar of loop-player to {_txt}
Thanks for helping me out, I really appreciate it! But I have a small issue. When I copy and paste what you have, this is what it shows
https://gyazo.com/63e8a4f1f53dd7c05afefadae4d5044a

And the last and final thing. When I get the right amount of money, the progress bar doesn't move to the rigt amount of money?
 
Try this one:
code_language.skript:
variables:
    {rankup::A} = 0
    {rankup::B} = 1450000
    {rankup::C} = 1600000
    {rankup::D} = 1900000
    {rankup::E} = 2200000
    {rankup::F} = 2500000
    {rankup::G} = 2900000
    {rankup::H} = 3200000
    {rankup::I} = 3700000
    {rankup::J} = 4200000
    {rankup::K} = 4500000
    {rankup::L} = 5100000
    {rankup::M} = 5500000
    {rankup::N} = 5900000
    {rankup::O} = 6500000
    {rankup::P} = 7100000
    {rankup::Q} = 7600000
    {rankup::R} = 8200000
    {rankup::S} = 8800000
    {rankup::T} = 9500000
    {rankup::U} = 10100000
    {rankup::V} = 10900000
    {rankup::W} = 11500000
    {rankup::X} = 12200000
    {rankup::Y} = 13000000
    {rankup::Z} = 13800000
 
every 1 second:
    loop all players:
        set {_rank} to uncolored {custom::prefix::%loop-player%} ? "A"
        replace every "[" and "]" with "" in {_rank}
        set {_abc::*} to split "ABCDEFGHIJKLMNOPQRSTUVWXYZ" at ""
        loop {_abc::*}:
            {_rank} is loop-value-2
            set {_i2} to loop-index parsed as a integer + 1
            set {_nextrank} to {_abc::%{_i2}%}
        set {_rankcost} to {rankup::%{_nextrank}%}
        set {_i} to min(round((loop-player's money) / ({_rankcost} / 37)) and 37)
        # set {_i} to min(round(({money::%loop-player%} ? 0) / ({_rankcost} / 37)) and 37)
        set {_txt} to "       &bRank&7: &e%{_rank}% &a"
        # broadcast "i: %{_i}%"
        loop {_i}+1 times:
            {_i} is not 0
            set {_txt} to "%{_txt}%|"
        set {_txt} to "%{_txt}%&c"
        loop 37-{_i} times:
            {_i} is not 37
            set {_txt} to "%{_txt}%|"
        set {_txt} to "%{_txt}% &bNext&7: &e%{_nextrank}%"
        set action bar of loop-player to {_txt}
 
Ohhh yes!!! But it doesn't cost the right amount of money. But besides that, its working fine.

Thanks!
 
Ohhh yes!!! But it doesn't cost the right amount of money. But besides that, its working fine.

Thanks!
What's the problem with the cost? (Is it one level too high or something?)
 
Can you add
code_language.skript:
broadcast "rank: %{_rank}%, nextrank: %{_nextrank}%, rankcost: %{_rankcost}%, i: %{_i}%, bal: %player's money%"
somewhere after line 39 and send me the result?
 
Status
Not open for further replies.