Solved Amount of certain item in slot

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

GamingGeek

Supporter
Aug 1, 2017
46
0
0
21
Skript Version: Skript 2.2
Skript Author: Mirreski
Minecraft Version: 1.8.8

I'm trying to make a sell gui using "Inventory clicking" by setting a slot in a gui to the clicked item, but I want to try and make my code loop for every item in the slot. Is this possible?
 
Tuske is best for gui inventories.
code_language.skript:
make gui slot 0 with potato named "buy or sell potato":
    if gui-click-type is left mouse button: 
                        give player 5 potato
                        remove 10 from player's balance
                    else if gui-click-type is right mouse button:
                        remove 1 potato from player
                        add 10 to player's balance
I'm not quite sure what you mean/want to do with looping, but loops can be done within tuske gui or are negligible when accomplished in a better way with tuske's gui features. The advanced gui allows you to code normally within the gui events.
 
Tuske is best for gui inventories.
code_language.skript:
make gui slot 0 with potato named "buy or sell potato":
    if gui-click-type is left mouse button:
                        give player 5 potato
                        remove 10 from player's balance
                    else if gui-click-type is right mouse button:
                        remove 1 potato from player
                        add 10 to player's balance
I'm not quite sure what you mean/want to do with looping, but loops can be done within tuske gui or are negligible when accomplished in a better way with tuske's gui features. The advanced gui allows you to code normally within the gui events.
I found a plugin that can do what I need. Thanks for your help anyways
 
Status
Not open for further replies.