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

Adrihun

Member
Feb 1, 2017
368
6
0
So I'm trying to make A scoreboard animation with skelett scoreboard.
code_language.skript:
on join:
    player has permission "scoreboarddzz.use"
    wait 1 second
    while player is online:
        set title of stylish scoreboard "test-%player%" to "&dLol"
        if player is not online:
            stop
        wait 7 ticks
        if player is not online:
            stop
        set title of stylish scoreboard "test-%player%" to "&aLol"
        if player is not online:
            stop
        wait 7 ticks
        if player is not online:
            stop
        set title of stylish scoreboard "test-%player%" to "&bLol"
        if player is not online:
            stop


And i have a stylish scoreboard for each groups (and i have like 15 groups), I don't really want to copy & paste this whole code 15 times and change "test-" to "owner-" "admin-" etc... -- wouldn't that lag the server? Is there another way to do it? Like... set it for all people?

@LimeGlass ? :emoji_slight_smile:
 
I have made a function API to make this even more simple, which I have shared with you before.

Add these function anywhere:

code_language.skript:
function createBoard(p: player, t: text, size: integer = 15):
    add "&a", "&b", "&c", "&d", "&e", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9" and "&f" to {_d::*}
    if stylish scoreboard "%{_t}%-%{_p}%" does not exist:
        create new stylish scoreboard named "%{_t}%-%{_p}%"
        loop {_size} times:
            create a new id based score "%{_p}%Slot%loop-number%" with text "%{_d::%loop-number%}%" slot loop-number for stylish scoreboard "%{_t}%-%{_p}%"
function deleteBoard(p: player, t: text):
    loop 15 times:
        delete the id based score "%{_p}%Slot%loop-number%" in stylish scoreboard "%{_t}%-%{_p}%"
    delete stylish scoreboard "%{_t}%-%{_p}%"
function setSlot(p: player, board: text, slot: integer, t: text):
    add "&a", "&b", "&c", "&d", "&e", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9" and "&f" to {_d::*}
    if {_slot} is between 1 and 15:
        set text of id "%{_p}%Slot%{_slot}%" to "%{_d::%{_slot}%}%%{_t}%"

Then here is your spoon fed coding:
code_language.skript:
function updateBoard(p: player):
    setSlot({_p}, "Test", 1, "&c&lThis is slot 1")
    setSlot({_p}, "Test", 15, "&c&lThis is slot 15")
    setSlot({_p}, "Test", 5, "&c&lThis is slot 5")
on join:
    player has permission "scoreboarddzz.use"
    createBoard(player, "Test", 15) #Creates a board with 15 slots named "Test"
    set title of stylish scoreboard "Test-%player%" to "&dLol"
    set stylish scoreboard of player to "Test-%player%"
    while player is online:
        updateBoard(player)
        wait a second
on quit:
    deleteBoard(player)
Hope this helps
 
Last edited:
  • Like
Reactions: L0v0lup
@LimeGlass I still need help. Is there a way to do it like i did but to all groups?
like, can you add something like "set title of stylish scoreboard of all groups to "&aTest" to your plugin?
It would be really useful.
 
@LimeGlass I still need help. Is there a way to do it like i did but to all groups?
like, can you add something like "set title of stylish scoreboard of all groups to "&aTest" to your plugin?
It would be really useful.
Just don't make it specified towards a player then.

Example:

code_language.skript:
function createBoard(t: text, size: integer = 15):
    add "&a", "&b", "&c", "&d", "&e", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9" and "&f" to {_d::*}
    if stylish scoreboard "%{_t}%" does not exist:
        create new stylish scoreboard named "%{_t}%"
        loop {_size} times:
            create a new id based score "Slot%loop-number%" with text "%{_d::%loop-number%}%" slot loop-number for stylish scoreboard "%{_t}%"
function deleteBoard(t: text):   
    loop 15 times:
        delete the id based score "Slot%loop-number%" in stylish scoreboard "%{_t}%"
    delete stylish scoreboard "%{_t}%"
function setSlot(board: text, slot: integer, t: text):
    add "&a", "&b", "&c", "&d", "&e", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9" and "&f" to {_d::*}
    if {_slot} is between 1 and 15:
        set text of id "Slot%{_slot}%" to "%{_d::%{_slot}%}%%{_t}%"
function updateBoard(empty: boolean = true):
    setSlot("Test", 1, "&c&lThis is slot 1")
    setSlot("Test", 15, "&c&lThis is slot 15")
    setSlot("Test", 5, "&c&lThis is slot 5")
    set title of stylish scoreboard "Test" to "&dLol"
on script load:
    createBoard(player, "Test", 15) #Creates a board with 15 slots named "Test"
on script unload:
    deleteBoard("Test")
on join:
    player has permission "scoreboarddzz.use"
    set stylish scoreboard of player to "Test-%player%"
every second:
    updateBoard(player)
 
@LimeGlass But i stil have to give it to the groups on the server so say i got 3 players who have Rank Premium and 2 players who are owners i still have to copy & paste the script twice, and it will slow down the server pefromance...
 
Just don't make it specified towards a player then.

Example:

code_language.skript:
function createBoard(t: text, size: integer = 15):
    add "&a", "&b", "&c", "&d", "&e", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9" and "&f" to {_d::*}
    if stylish scoreboard "%{_t}%" does not exist:
        create new stylish scoreboard named "%{_t}%"
        loop {_size} times:
            create a new id based score "Slot%loop-number%" with text "%{_d::%loop-number%}%" slot loop-number for stylish scoreboard "%{_t}%"
function deleteBoard(t: text): 
    loop 15 times:
        delete the id based score "Slot%loop-number%" in stylish scoreboard "%{_t}%"
    delete stylish scoreboard "%{_t}%"
function setSlot(board: text, slot: integer, t: text):
    add "&a", "&b", "&c", "&d", "&e", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9" and "&f" to {_d::*}
    if {_slot} is between 1 and 15:
        set text of id "Slot%{_slot}%" to "%{_d::%{_slot}%}%%{_t}%"
function updateBoard(empty: boolean = true):
    setSlot("Test", 1, "&c&lThis is slot 1")
    setSlot("Test", 15, "&c&lThis is slot 15")
    setSlot("Test", 5, "&c&lThis is slot 5")
    set title of stylish scoreboard "Test" to "&dLol"
on script load:
    createBoard(player, "Test", 15) #Creates a board with 15 slots named "Test"
on script unload:
    deleteBoard("Test")
on join:
    player has permission "scoreboarddzz.use"
    set stylish scoreboard of player to "Test-%player%"
every second:
    updateBoard(player)
Just a question, what is the difference between a stylish and normal scoreboard?
@LimeGlass But i stil have to give it to the groups on the server so say i got 3 players who have Rank Premium and 2 players who are owners i still have to copy & paste the script twice, and it will slow down the server pefromance...
READ THE WIKI!
 
The way you did it is really bad and really non-performant. If you don't want a 50mb script, you need to use functions and loops to reduce repetitive code. You either need to take the time to learn how the code that's being given to you works or stop asking for help, because nobody is going to intentionally write code that looks like that for you because it's really poorly done and is the exact opposite of what you should want if you want your code optimized.
 
50Mb Script - i can't even imagine how that code has been written.
 
The way you did it is really bad and really non-performant. If you don't want a 50mb script, you need to use functions and loops to reduce repetitive code. You either need to take the time to learn how the code that's being given to you works or stop asking for help, because nobody is going to intentionally write code that looks like that for you because it's really poorly done and is the exact opposite of what you should want if you want your code optimized.
The old saying also goes, "You live and you learn". The OP is living but not learning.
 
skrayfall scoreboards don't work, they are buggy and they give errors, the dev needs to fix it ffs!
MrQe8bg.png

@LimeGlass Your code is complicated and i don't understand it, can you try doing it like i did ?
Then maybe you should read through it until you understand it
 
@Pikachu They don't work, I tried to contact the Dev but no response.
[doublepost=1494622450,1494622357][/doublepost]
50Mb Script - i can't even imagine how that code has been written.
@ImOfflinezzz Well if i would copy & paste the animation code 20 times it would probably be 50MB
thats why i want this new thing in @LimeGlass 's Plugin but he won't add it. Like it would be good if you could just set everyones stylish scoreboard title with 1 line of code.
example: "set title of all stylish scoreboards to "&btest" "
[USER=7]@Mr_Simba[/USER] The way i did it? What the animation code? There is no other way to do it. I would rather use this then "every 2 seconds"
@BrettPlayMC lol
 
@Pikachu They don't work, I tried to contact the Dev but no response.
[doublepost=1494622450,1494622357][/doublepost]
@ImOfflinezzz Well if i would copy & paste the animation code 20 times it would probably be 50MB
thats why i want this new thing in @LimeGlass 's Plugin but he won't add it. Like it would be good if you could just set everyones stylish scoreboard title with 1 line of code.
example: "set title of all stylish scoreboards to "&btest" "
[USER=7]@Mr_Simba[/USER] The way i did it? What the animation code? There is no other way to do it. I would rather use this then "every 2 seconds"
@BrettPlayMC lol
If you want something simpler than this 15 line function code. You can look at my simple scoreboard script https://forums.skunity.com/resources/simpleboard.159/

It allows you to configure and adjust everything in a yaml that is easy to understand. Even a 8 year old could understand.
 
If you want something simpler than this 15 line function code. You can look at my simple scoreboard script https://forums.skunity.com/resources/simpleboard.159/

It allows you to configure and adjust everything in a yaml that is easy to understand. Even a 8 year old could understand.
Yes I get that but this Post is about fixing animated scoreboards not how to make easy skelett scoreboards.

You should add this to skelett:
"set title of all stylish scoreboards to "&btest" "

Or is it hard to do in java?
[doublepost=1494635311,1494625771][/doublepost]@LimeGlass Come on man.. just add it it will be useful
 
Do you even know what a 50 MB skript file is?
My whole mimigame only has 0.07 MB and has over 2500 lines.
And there is no need to fix animated scoreboards.
There are good how they are at the moment.
LimeGlass send you to skripts where you can do animated scoreboards in a short version.
 
  • Like
Reactions: Adrihun
Yes I get that but this Post is about fixing animated scoreboards not how to make easy skelett scoreboards.

You should add this to skelett:
"set title of all stylish scoreboards to "&btest" "

Or is it hard to do in java?
[doublepost=1494635311,1494625771][/doublepost]@LimeGlass Come on man.. just add it it will be useful
Stop asking him to add this... If you really want it, it's not hard to make yourself.
 
If you can't use this scoreboard, find any scoreboard in java with Skript support or PlaceHolders support and use it.

- Sorry for my english.
 
Status
Not open for further replies.