Gui Updating error?

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

WiebeHero

Active Member
Aug 23, 2017
135
5
0
23
Hello i am WiebeHero and i am encountering an issue with my GUI Advanced off Tsuke. The ting is the first one called "Attack speed" updates both lines of lore just fin WITHIN the gui while it is open however at "Bow Damage" It doesnt update the first line of lore witch it should. Can you find the error?
Code:
make gui 12 with feather named "&6Attack Speed" with lore "&7This will increase you're &6ATTACK SPEED &7so||&7This will make you attack faster!||&6Attack Speed Level: %{ASpeedL.%player%}% / 50||||&6Attack Speed: %{ASpeedD.%player%}%%% / 400%%":
                if gui-click-action is left mouse or right mouse button:
                    lore of gui-clicked-item contains "&6Attack Speed Level: "
                    lore of gui-clicked-item contains "&6Attack Speed: "
                    set {ASpeed.%player%::*} to lore of gui-clicked-item split at "||"
                    loop {ASpeed.%player%::*}:
                        if "%loop-value%" contains "&Attack Speed Level: ":
                            set {LoreE.%player%} to loop-index parsed as integer
                            stop loop
                    loop {ASpeed.%player%::*}:
                        if "%loop-value%" contains "&6Attack Speed: ":
                            set {LoreF.%player%} to loop-index parsed as integer
                            stop loop
                    set {ASpeed.%player%} to "%uncolored {ASpeed.%player%::%{LoreE.%player%}%}%"
                    set {ASpeed.%player%} to "%uncolored {ASpeed.%player%::%{LoreF.%player%}%}%"
                    replace every "Attack Speed Level: " with "" in {ASpeed.%player%}
                    replace every "Attack Speed: " with "" in {ASpeed.%player%}
                    replace every " " with "" in {ASpeed.%player%} 
                    set {Max7.%player%::*} to {ASpeed.%player%} split at "&6Attack Speed Level: %{ASpeedL.%player%}% / 50"
                    set {Max8.%player%::*} to {ASpeed.%player%} split at "&6Attack Speed: %{ASpeedD.%player%}%%% / 150%%"
                    set {ASpeedL.%player%} to {Max7.%player%::1} parsed as number
                    set {ASpeedD.%player%} to {Max8.%player%::1} parsed as number
                    if {SkillPoints.%player%} is equal to 0:
                        message "&aYou do not have enough &6SKILL POINTS &aFor this!"
                    if {SkillPoints.%player%} is more than 0:
                        add 1 to {ASpeedL.%player%}
                        add 3 to {ASpeedD.%player%}
                        remove 1 from {SkillPoints.%player%}
                        set the {LoreE.%player%}rd line of lore of gui-clicked-item to "&6Attack Speed Level: %{ASpeedL.%player%}% / 50"
                        set the {LoreF.%player%}th line of lore of gui-clicked-item to "&6Attack Speed: %{ASpeedD.%player%}%%% / 150%%"
                        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: %{SkillPoints.%player%}%"
            make gui 14 with bow named "&6Bow Damage" with lore "&7This will increase you're &6BOW DAMAGE &7so||&7You will do more damage with bows!||&6Bow Damage Level: %{BDamageL.%player%}% / 50||||&6Bow Damage: %{BDamageD.%player%}%%% / 400%%":
                if gui-click-action is left mouse or right mouse button:
                    lore of gui-clicked-item contains "&6Bow Damage Level: "
                    lore of gui-clicked-item contains "&6Bow Damage: "
                    set {BDamage.%player%::*} to lore of gui-clicked-item split at "||"
                    loop {BDamage.%player%::*}:
                        if "%loop-value%" contains "&Bow Damage Level: ":
                            set {LoreG.%player%} to loop-index parsed as integer
                            stop loop
                    loop {BDamage.%player%::*}:
                        if "%loop-value%" contains "&6Bow Damage: ":
                            set {LoreH.%player%} to loop-index parsed as integer
                            stop loop
                    set {BDamage.%player%} to "%uncolored {BDamage.%player%::%{LoreG.%player%}%}%"
                    set {BDamage.%player%} to "%uncolored {BDamage.%player%::%{LoreH.%player%}%}%"
                    replace every "Bow Damage Level: " with "" in {BDamage.%player%}
                    replace every "Bow Damage: " with "" in {BDamage.%player%}
                    replace every " " with "" in {MSpeed.%player%}
                    set {Max9.%player%::*} to {BDamage.%player%} split at "&6Bow Damage Level: %{BDamageL.%player%}% / 50"
                    set {Max10.%player%::*} to {BDamage.%player%} split at "&6Bow Damage: %{BDamageD.%player%}%%% / 400%%"
                    set {BDamageL.%player%} to {Max9.%player%::1} parsed as number
                    set {BDamageD.%player%} to {Max10.%player%::1} parsed as number
                    if {SkillPoints.%player%} is equal to 0:
                        message "&aYou do not have enough &6SKILL POINTS &aFor this!"
                    if {SkillPoints.%player%} is more than 0:
                        add 1 to {BDamageL.%player%}
                        add 3 to {BDamageD.%player%}
                        remove 1 from {SkillPoints.%player%}
                        set the {LoreG.%player%}rd line of lore of gui-clicked-item to "&6Bow Damage Level: %{BDamageL.%player%}% / 50"
                        set the {LoreH.%player%}th line of lore of gui-clicked-item to "&6Bow Damage: %{BDamageD.%player%}%%% / 400%%"
                        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: %{SkillPoints.%player%}%"
 
You also need one of these on your first line
code_language.skript:
to close:
to run:
To do nothing
There are more but I mainly use these ones
 
Status
Not open for further replies.