Progress bar using vertical pipes

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

msconfig32

Member
Nov 10, 2018
33
0
6
20
I was wondering how I could go from a percentage to fill in a series of vertical pipes to &a for that percentage.
Ex. 50% would turn the vertical pipes to &c in the middle of the lines.
&a|||||||||||||||||||||||||&c|||||||||||||||||||||||||

Hopefully I explained this well enough, thanks :emoji_slight_smile:
 
You could probably split the percentage in tenths, so there are 10 pipes and you make 1 pipe green every 10% added (ill provide an example sometime later mayhaps)

EDIT:
Here is a (probably) inefficient example of what I mean that you can look at
Code:
command percent:
    trigger:
        set {_p} to random number between 1 and 100
        set {_p2} to {_p} / 10
        if {_p2} is 1:
            send "&a█&c█████████"
        if {_p2} is 2:
            send "&a██&c████████"
        if {_p2} is 3:
            send "&a███&c███████"
        if {_p2} is 4:
            send "&a████&c██████"
        if {_p2} is 5:
            send "&a█████&c█████"
        if {_p2} is 6:
            send "&a██████&c████"
        if {_p2} is 7:
            send "&a███████&c███"
        if {_p2} is 8:
            send "&a████████&c██"
        if {_p2} is 9:
            send "&a█████████&c█"
        if {_p2} is 10:
            send "&a██████████"
 
Last edited:
Status
Not open for further replies.