JustDogYT Posted April 29, 2021 Share Posted April 29, 2021 So i am trying to make it when u click a item it changes variables and updates the gui My Code so far command /skills: trigger: skills() function skills(): open virtual chest named "&4&lSkills" with size 3 to player format gui slot 0 and 1 and 2 and 3 and 4 and 5 and 6 and 7 and 8 and 9 and 15 and 17 and 18 and 19 and 20 and 21 and 22 and 23 and 24 and 25 and 26 of player with White Stained Glass Pane named " " to do nothing format gui slot 16 of player with Beacon named "&6&lSkill Points" with lore "&a%{skill}%" to do nothing format gui slot 10 of player with golden apple named "&c&lHealth &6+%{Health}%" to run: if {skill} > 0: set {skill} to {skill} - 1 set {health} to {health} + 1 skills() I don't really know how to use functions the best but this was my idea to try and get it to reload. Link to comment Share on other sites More sharing options...
BanditEagle Posted April 29, 2021 Share Posted April 29, 2021 are you using TuSKe addon for the gui? 1 If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot! Some Minehut Links: Server Rules • Staff Applications • News & Updates • Reports • Appeals Minehut: VIP (07/04/2021 --> Current)Elestra/Versa Realms: Manager (12/04/2021 --> Current) If you have any questions contact me!My Discord: BanditEagle#2481My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/My IGN: BanditEagle Link to comment Share on other sites More sharing options...
JustDogYT Posted April 29, 2021 Author Share Posted April 29, 2021 yeah Link to comment Share on other sites More sharing options...
rosabel Posted April 30, 2021 Share Posted April 30, 2021 command /skills: trigger: skills(player) function skills(p: player): open virtual chest named "&4&lSkills" with size 3 to {_p} format gui slot 0 and 1 and 2 and 3 and 4 and 5 and 6 and 7 and 8 and 9 and 15 and 17 and 18 and 19 and 20 and 21 and 22 and 23 and 24 and 25 and 26 of {_p} with White Stained Glass Pane named " " to do nothing format gui slot 16 of {_p} with Beacon named "&6&lSkill Points" with lore "&a%{skill}%" to do nothing format gui slot 10 of {_p} with golden apple named "&c&lHealth &6+%{Health}%" to run: if {skill} > 0: set {skill} to {skill} - 1 set {health} to {health} + 1 close {_p}'s current inventory skills({_p}) Try this. Not tested, but I'm hoping it'll do what you want it to do! RosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRosaRi code, animate, develop, UI design, learn, and adapt, as well as make servers, of courseJoined Minehut sometime in 2014VIP sometime in 2018Legend in January 2021Helper on 4/11/2021♥ (Retired) on 5/17/2021 Moderator on 8/18/2023 Link to comment Share on other sites More sharing options...
JustDogYT Posted April 30, 2021 Author Share Posted April 30, 2021 It worked but I had to change: close {_p}'s current inventory to close {_p}'s inventory Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now