TuSKe GUI and glowing item

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

KabanFriends

New Member
Nov 10, 2018
6
0
0
code_language.skript:
function USLAch_defineAchievement(player: player, group: string, id: string, name: string, desc: string, item: item):
    set {_playeruuid} to uuid of {_player}
    {USLAch.temp.%{_playeruuid}%.currentID} is {_group}
    add 1 to {USLAch.temp.%{_playeruuid}%.achievementCount.%{USLAch.temp.%{_playeruuid}%.currentID}%}
    set {USLAch.achievementList::%{_id}%} to {_id}
    set {USLAch.achievementData.%{_id}%.name} to {_name}
    set {USLAch.achievementData.%{_id}%.desc} to {_desc}
    set {USLAch.achievementData.%{_id}%.genre} to {USLAch.temp.%{_playeruuid}%.currentGenre}
    set {_slot} to {USLAch.temp.%{_playeruuid}%.achievementSlot} + 9

    if {USLAch.playerData.%{_playeruuid}%.achievement::%{_id}%.status} is not set:
        set {_temp} to "%{_desc}%||||&bNOT UNLOCKED"
        create a gui slot {_slot} of {_player} with 1 of concrete powder:7 named "&f&l---" with lore {_temp}

    else if {USLAch.playerData.%{_playeruuid}%.achievement::%{_id}%.status} is "claimed":
        create a gui slot {_slot} of {_player} with 1 of {_item} named {_name} with lore {_desc}

    else:
        if {USLAch.achievementData.%{_id}%.rewards} is not set:
            create a gui slot {_slot} of {_player} with 1 of {_item} named {_name} with lore {_desc}

        else:
            set {_temp} to "%{_desc}%||||&a&lREWARD AVAILABLE||&eClick to claim!"
            create a gui slot {_slot} of {_player} with 1 of glowing {_item} named {_name} with lore {_temp} to run function USLAch_claimRewards({_player}, {_id})
    add 1 to {USLAch.temp.%{_playeruuid}%.achievementSlot}
I'm making custom achievements with custom GUI for list of achievement.
I made players can claim rewards of unlocking achievement by clicking the icon of the achievement in the list GUI.

The reward-claiming system itself works well but there's one visual problem
In the achievement list GUI,
Achievement icons with rewards available have "glowing" effect for the item (glowing %itemstack%)
Achievement icons with no rewards or with rewards that is already claimed don't have glowing effect

Also the lore changes between rewards-available icons and no-rewards icon.

The lore changing works successfully but even after claiming reward, the icons keep glowing.
When I reload the .sk file, the icon's glowing states will be fixed.

How can I solve this problem?


Other Information:
Server Version: Spigot 1.12.2 (Final build)
Skript Version: 2.2-dev37c
Addon for GUI: TuSKe 1.8.3-v2 (aka PikachuPatch)
 
Is it still glowing when you re-open the menu?
 
Can you add some debug messages just to be sure that the line with the glowing stuff isn't being called?
 
Already tested few days ago and I didn't change the code very much
it loaded the right line

the strange thing is the glitch gets fixed by reloading script
is it the glitch of TuSKe
 
I think its sort of glitch as well so you might want to report it to them
 
Status
Not open for further replies.