Solved (HELP) Select tags from GUI with Skript

  • 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.
Feb 7, 2019
2
0
1
25
Hey guys, I made a Skript which does have achievements in itself and gives you tags by you make these achievements.

Like; mining your first diamond gives you permission to use "Rich" tag.

If you want to use a tag, you are typing "/tag" and select the tag that you want to use from tags GUI.

Here is a screenshot to make it more clear:
Ünvanlar.png


So, it works quite good. It can check the achievements, tags, and list them in a GUI by a simple code. But when it comes to selecting one of the tags, it sets your tag to the last tag in the gui, doesn't matter which one you choose. If you selected the "Rich" tag, and the last tag in the GUI is "Hunter", it selects the "Hunter".

Here is my code:
Code:
loop size of {tags::%player%::*} times:
    format slot loop-value + 8 of player with name tag named "%{color::%player%}%&l%{tags::%player%::%loop-value%}%" with lore "" and "&7Örnek görünüm:" and "&8» %{color::%player%}%[%{tags::%player%::%loop-value%}%] &7%player%" and "" and "&5<Seçmek için tıkla>" to close then run [set {prefix::%player%} to "%{color::%player%}%[%{tags::%player%::%loop-value%}%]&7"]

What I want is simple; I just want it to work properly. If I choose tag "Rich", I want it to set my tag to "Rich", not something else. I hope I made it clear.

Note that, I know that there is nothing wrong with the {tags::%player%::*} list. Problem is somewhere in the loop, that's why I only put the loop code.
 
This is a known problem with SkQuery, an outdated addon. It's better to use TuSKe (https://github.com/Tuke-Nuke/TuSKe/wiki/GUI-Manager) or just Skript (set slot and on inventory click) for GUI's.
Can I make GUI's with vanilla Skript? How?

Edit:
Anyways, I made it work with Pikachu's TuSKe patch, thank you so much. I've ben trying to do it this last 2 days, and I can't tell you how much I'm happy right now. I mean, I'm running in the house right now, lol. Again, thank you!

In case anyone wants to know the solution, just use the TuSKe instead of SkQuery and adapt your code to TuSKe.
 
Last edited:
Can I make GUI's with vanilla Skript? How?

Edit:
Anyways, I made it work with Pikachu's TuSKe patch, thank you so much. I've ben trying to do it this last 2 days, and I can't tell you how much I'm happy right now. I mean, I'm running in the house right now, lol. Again, thank you!

In case anyone wants to know the solution, just use the TuSKe instead of SkQuery and adapt your code to TuSKe.
You can use the set slot effect and inventory click, but it's easier to use TuSKe instead. Nice to see that you're happy :emoji_slight_smile:
 
Status
Not open for further replies.