One line, line graph

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

Pexien

New Member
Aug 10, 2017
2
3
3
Allows you to graph a one line graph thing, this is very similar to the one used on hypixel to show your progress for minigames.

Usage: lineGraph(length, percent)


Code:
options:
    line plotter: ■
    color scheme: &e

function lineGraph(length: integer = 10, percent: number) :: text:
    set {_graph} to "&8["
    set {_values} to rounded ({_length}/100)*(rounded {_percent})
    loop {_length} times:
        loop-number <= {_values}:
            set {_graph} to "%{_graph}%&e{@line plotter}"
        else:
            set {_graph} to "%{_graph}%&7{@line plotter}"
    set {_graph} to "%{_graph}%&8]"
    return {_graph}

upload_2019-6-6_16-24-39.png
 

Attachments

  • upload_2019-6-6_16-21-36.png
    upload_2019-6-6_16-21-36.png
    24.8 KB · Views: 351