Solved bugged lore of items (TuSKe - 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 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.

HardMCore

Member
Jul 13, 2019
2
0
0
24
Server is 1.13.2 (Paper version git-Paper-637 (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT), I use 2.3.7 version of skript and TuSKe 1.8.3 pikachu-patch v3.
The problem is that "format gui slot" is changing/saving or idk what the lore. And the second problem: ||, %nl%, %newline% and \n doesn't work. I also tried with lore "1", "2" and "3" and it also didnt work.

Code:
                loop {itemytargu.%arg-1%::*}:
                    format gui slot loop-index parsed as integer -1 of player with loop-value with lore "%lore of loop-value% \n test" to close
And what happens is that lore of the item changes every time the loop triggers. The loop is looking like that: "*actual lore of item* \n test \n test \n test \n test " and every time it loops again (every time I use command with this loop) it adds another "\n test " to the lore. Is there possibility of repairing it? Since to the lore of the item I just want to add other variable and make it be in the next line of lore, so it would look like
*lore of the item*
My lore: %variable%

Also, when I changed this line to:
Code:
format gui slot loop-index parsed as integer -1 of player with loop-value to close
(simply removed lore)
it still appears the whole lore to be "*actual lore of item*\ n test \n test..."
BUT it actually doesnt change the lore of the item (when I check the variable out of the loop in any other way, the lore of the item works correctly).

So ye, this is a very complicated error (I mean, it doesnt show any errors, but it just doesnt work). Is there possiblity of repairing it, or is there a working GUI addon?
 
Last edited:
Server is 1.13.2 (Paper version git-Paper-637 (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT), I use 2.3.7 version of skript and TuSKe 1.8.3 pikachu-patch v3.
The problem is that "format gui slot" is changing/saving or idk what the lore. And the second problem: ||, %nl%, %newline% and \n doesn't work. I also tried with lore "1", "2" and "3" and it also didnt work.

Code:
                loop {itemytargu.%arg-1%::*}:
                    format gui slot loop-index parsed as integer -1 of player with loop-value with lore "%lore of loop-value% \n test" to close
And what happens is that lore of the item changes every time the loop triggers. The loop is looking like that: "*actual lore of item* \n test \n test \n test \n test " and every time it loops again (every time I use command with this loop) it adds another "\n test " to the lore. Is there possibility of repairing it? Since to the lore of the item I just want to add other variable and make it be in the next line of lore, so it would look like
*lore of the item*
My lore: %variable%

Also, when I changed this line to:
Code:
format gui slot loop-index parsed as integer -1 of player with loop-value to close
(simply removed lore)
it still appears the whole lore to be "*actual lore of item*\ n test \n test..."
BUT it actually doesnt change the lore of the item (when I check the variable out of the loop in any other way, the lore of the item works correctly).

So ye, this is a very complicated error (I mean, it doesnt show any errors, but it just doesnt work). Is there possiblity of repairing it, or is there a working GUI addon?
For multiple lore lines: `%item% with lore "line 1", "line 2" and "line 3"`
Maybe it'll work when you set a local variable to the loop-value, then check for the lore in that local variable. Still not what you want? Try setting the lore of that local variable to `""`, or deleting it.
 
@TPGamesNL Thanks for all the help here and on discord, I changed my code to:
Code:
                loop {itemytargu.%arg-1%::*}:
                    format gui slot loop-index parsed as integer -1 of player with loop-value to close
                    wait 2 ticks
                    set {loreitemu.%player%} to "%lore of loop-value%"
                    set lore of slot loop-index parsed as integer -1 of player's current inventory to "%{loreitemu.%player%}%", " ", "&6Price: &c%{itemprice.%player%::%loop-index%}%"
now the lore lines and variables work just like I wanted. Unluckily, there is one bug left in TuSKe, which is that e.g. 'close then run "command"' doesn't work at all after using /sk reload, to make it work, skript requires server restart, but I dont need any help with that.
 
Status
Not open for further replies.