1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Color bugg with Skelett Scoreboard

Discussion in 'Skript' started by Brok3nmind, Nov 21, 2020.

Thread Status:
Not open for further replies.
  1. Brok3nmind

    Brok3nmind Active Member

    Joined:
    Feb 3, 2017
    Messages:
    66
    Likes Received:
    1
    I have a problem with the colors in Skelett Scoreboards.
    Sometimes colors will not show correctly.
    Sometimes the half variable will be shown correct and the other half not.

    Bugg Image Photo:
    https://darkvoid.eu/Bugg.PNG

    Code (Text):
    1. on disconnect:
    2.     deleteBoard(player, "Survival")
    3.  
    4. function createBoard(p: player, t: text, size: integer = 12):
    5.     add "&a", "&b", "&c", "&d", "&e", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9" and "&f" to {_d::*}
    6.     if stylish scoreboard "%{_t}%-%{_p}%" does not exist:
    7.         create new stylish scoreboard named "%{_t}%-%{_p}%"
    8.         loop {_size} times:
    9.             create a new id based score "%{_p}%Slot%loop-number%" with text "%{_d::%loop-number%}%" slot loop-number for stylish scoreboard "%{_t}%-%{_p}%"
    10.  
    11. function deleteBoard(p: player, t: text):
    12.     loop 12 times:
    13.         delete the id based score "%{_p}%Slot%loop-number%" in stylish scoreboard "%{_t}%-%{_p}%"
    14.     delete stylish scoreboard "%{_t}%-%{_p}%"
    15.  
    16. function setSlot(p: player, board: text, slot: integer, t: text):
    17.     add "&a", "&b", "&c", "&d", "&e", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9" and "&f" to {_d::*}
    18.     if {_slot} is between 1 and 12:
    19.         set text of id "%{_p}%Slot%{_slot}%" to "%{_d::%{_slot}%}%%{_t}%"
    20.        
    21. on join:
    22.     createBoard(player, "Survival", 12)
    23.     set title of stylish scoreboard "Survival-%player%" to " &7-&8/&7- &3Darkvoid-Network &7-&8/&7- "
    24.     set stylish scoreboard of player to "Survival-%player%"
    25.     if {player.kills::%event-player%} is not set:
    26.         set {player.kills::%event-player%} to 0
    27.     if {mob.kills::%event-player%} is not set:
    28.         set {mob.kills::%event-player%} to 0
    29.     if {player.deaths::%event-player%} is not set:
    30.         set {player.deaths::%event-player%} to 0
    31.     updateBoard(player)
    32.        
    33. function updateBoard(p: player):
    34.     set {_t} to total xp of {_p}
    35.     set {_uuid} to uuid of {_p}
    36.     set title of stylish scoreboard "Survival-%{_p}%" to " &7-&8/&7-  &eSurvival  &7-&8/&7- "
    37.     set stylish scoreboard of {_p} to "Survival-%{_p}%"
    38.     setSlot({_p}, "Survival", 12, "&fCurrent World:")
    39.     if {_p} is in world "world":
    40.         setSlot({_p}, "Survival", 11, "&aMainWorld")
    41.     if {_p} is in world "farmingworld":
    42.         setSlot({_p}, "Survival", 11, "&aFarmworld &aOverworld")
    43.     if {_p} is in world "farmingnether":
    44.         setSlot({_p}, "Survival", 11, "&aMainWorld")
    45.     if {_p} is in world "farmingnend":
    46.         setSlot({_p}, "Survival", 11, "&aMainWorld")
    47.     if {_p} is in world "farmingnend":
    48.         setSlot({_p}, "Survival", 11, "&aMainWorld")
    49.    
    50.     setSlot({_p}, "Survival", 10, "")
    51.     set the text of id "%{_p}%Slot9" to "&fLevel: &c%{_t}%&7❖"
    52.     setSlot({_p}, "Survival", 8, "")
    53.     set the text of id "%{_p}%Slot7" to "Coins: &2%{money.%{_uuid}%}%"
    54.     setSlot({_p}, "Survival", 6, "")
    55.     set the text of id "%{_p}%Slot5" to "Player Kills: &a%{player.kills::%{_p}%}%"
    56.     set the text of id "%{_p}%Slot4" to "Mob Kills: &a%{mob.kills::%{_p}%}%"
    57.     set the text of id "%{_p}%Slot3" to "Deaths: &a%{player.deaths::%{_p}%}%"
    58.     setSlot({_p}, "Survival", 2, "")
    59.     setSlot({_p}, "Survival", 1, "&ewww.darkvoid&e.eu")
    60.    
    61. every 3 ticks:
    62.     loop all players:
    63.         updateBoard(loop-player)
    64.        
    65. on death:
    66.     if attacker is a player:
    67.         if event-entity is a monster:
    68.             add 1 to {mob.kills::%attacker%}
    69.             updateBoard(event-player)
    70.             stop
    71.         if event-entity is a player:
    72.             add 1 to {player.kills::%attacker%}
    73.             add 1 to {player.deaths::%victim%}
    74.             updateBoard(event-player)
    75.             stop
    76.  
     
Thread Status:
Not open for further replies.

Share This Page

Loading...