Skill GUI

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

    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.

WiebeHero

Active Member
Aug 23, 2017
135
5
0
So i have been working on a skill gui with variables and stuff but there is a big problem i am facing right now. As i see i open the gui but it doesnt register the P in the format but if you click it once it registers. how can i make it so it always registers?
Code:
on level change:
    add 2 to {p}

command /skills:
    trigger:
        create a gui with virtual chest with 3 rows named "&6Skills":
            make gui 0 with book named "&6Skill Points" with lore "&7These are you're &6SKILL &7points that you||&7Can invest in custom abilities!||&6Skill Points: 0 / 100":
                lore of gui-item contains "&6Skill Points: "
                set {K::*} to lore of gui-item split at "||"
                loop {K::*}:
                    if "%loop-value%" contains "&6Skill Points: ":
                        set {v} to loop-index parsed as integer
                        stop loop
                set {K} to "%uncolored {K::%{v}%}%"
                replace every "Attack Damage Level: " with "" in {K}
                replace every " " with "" in {K}
                set {C::*} to {K} split at "/"
                set {P} to {C::1} parsed as number
                make gui 0 with book named "&6Skill Points" with lore "&7These are you're &6SKILL &7points that you||&7Can invest in custom abilities!||&6Skill Points: %{p}% / 100"
 
you could use the edit effect for the gui on the level change. you can edit a gui without opening it to the player.
 
Do you have an example i got this right now but it doesnt work:
Code:
on level change:
    add 2 to {p}
    edit gui "&6Skills": 
        make gui 0 with book named "&6Skill Points" with lore "&7These are you're &6SKILL &7points that you||&7Can invest in custom abilities!||&6Skill Points: %{p}% / 100"
command /skills:
    trigger:
        create a gui with virtual chest with 3 rows named "&6Skills":
            make gui 0 with book named "&6Skill Points" with lore "&7These are you're &6SKILL &7points that you||&7Can invest in custom abilities!||&6Skill Points: 0 / 100":
                lore of gui-item contains "&6Skill Points: "
                set {K::*} to lore of gui-item split at "||"
                loop {K::*}:
                    if "%loop-value%" contains "&6Skill Points: ":
                        set {v} to loop-index parsed as integer
                        stop loop
                set {K} to "%uncolored {K::%{v}%}%"
                replace every "Attack Damage Level: " with "" in {K}
                replace every " " with "" in {K}
                set {C::*} to {K} split at "/"
                set {P} to {C::1} parsed as number
 
Status
Not open for further replies.