How to make per world scoreboards? [SOLVED]

Discussion in 'Skript' started by Trench, Jul 3, 2018.

Thread Status:
Not open for further replies.
  1. I cannot figure out how to create per world scoreboards could you please help. This is the code I currently have:
    Code (Text):
     
    if world of player is "spawn":
    every 2 second:
        loop all players:
            wipe loop-player's sidebar
            set name of sidebar of loop-player to "&8&L[&c&LTestNetwork&8&L]"
            set score " &8&m------------------------------" in sidebar of loop-player to 16
            set score " &7Welcome to the &c&LTestNetwork!" in sidebar of loop-player to 15
            set score "         &8&L[&c%loop-player%&8&L]" in sidebar of loop-player to 14
            set score "   &8| &7Buy ranks on our store at: &8|" in sidebar of loop-player to 13
            set score "           &7| &8www.testmc.net &7|" in sidebar of loop-player to 12
            set score "    &c&LPlay Games On Our Network!" in sidebar of loop-player to 11
            set score "      &c&LOr Relax In The Afk Lobby!" in sidebar of loop-player to 10
            set score "               &8| &7SkyWars &8|" in sidebar of loop-player to 9
            set score "               &8| &7SkyBlock &8|" in sidebar of loop-player to 8
            set score "               &8| &7Duels &8|" in sidebar of loop-player to 7
            set score "               &8| &7TheBridge &8|" in sidebar of loop-player to 6
            set score "               &8| &7BedWars &8|" in sidebar of loop-player to 5
            set score "               &8www.spigotmc.net " in sidebar of loop-player to 3
            set score " &c&m------------------------------" in sidebar of loop-player to 2
     
  2. Two

    Two

    Code (Text):
    on join:
        while player is online:
            wait 2 seconds
            if world of player is "spawn":
                wipe player's sidebar
                set name of sidebar of player to "&8&L[&c&LTestNetwork&8&L]"
                set score " &8&m------------------------------" in sidebar of player to 16
                set score " &7Welcome to the &c&LTestNetwork!" in sidebar of player to 15
                set score "         &8&L[&c%player%&8&L]" in sidebar of player to 14
                set score "   &8| &7Buy ranks on our store at: &8|" in sidebar of player to 13
                set score "           &7| &8www.testmc.net &7|" in sidebar of player to 12
                set score "    &c&LPlay Games On Our Network!" in sidebar of player to 11
                set score "      &c&LOr Relax In The Afk Lobby!" in sidebar of player to 10
                set score "               &8| &7SkyWars &8|" in sidebar of player to 9
                set score "               &8| &7SkyBlock &8|" in sidebar of player to 8
                set score "               &8| &7Duels &8|" in sidebar of player to 7
                set score "               &8| &7TheBridge &8|" in sidebar of player to 6
                set score "               &8| &7BedWars &8|" in sidebar of player to 5
                set score "               &8www.spigotmc.net " in sidebar of player to 3
                set score " &c&m------------------------------" in sidebar of player to 2
            else:
                wipe player's sidebar

    I couldn't test this code, but should work.
     
    #2 Two, Jul 3, 2018
    Last edited: Jul 3, 2018
  3. Thanks I will test it on my server and I will let you know if it worked :)
     
  4. There is one error that says "can't compare 'if world of player' with a text"
     
  5. Two

    Two

    Alright, then try
    Code (Text):
    if "%world of player%" is "spawn"
     
  6. Okay I will try that thanks.
     
  7. It says the same error just with that text.
     
  8. Two

    Two

    Tested on my own server, no errors.
    Addons:
    Skript 2.2-dev25
    skRayFall v1.9.12
    SkQuery 3.6.0
     
  9. Also is there a way so its not just on join because I want players to see the scoreboard in each world (lobby) ?
     
  10. Two

    Two

    If you read the code, you would see that after joining, the skript loops that player every 2 seconds, checking which world they are in.
     
  11. I have those exact addons and I still get the error.
     
  12. Two

    Two

    Then I cannot help you, those are the only 3 plugins currently on my test server.
     
  13. Alright thank you for the help I figured out what was wrong, have a nice day. :)
     
Thread Status:
Not open for further replies.