Click Question

  • 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 community!

    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.

MateoxPL

Active Member
Jan 27, 2018
116
0
16
Hello
how to do in this skript to give 64 stone instead of wool? (I want to do it without variables)



Code:
command /shop:
    trigger:
        wait 1 tick
        open chest with 1 rows named "&5&lSHOP" to player
        set player's current inventory's slot 0 to 64 stone named "&7Stone"
on inventory click:
    cancel event
    if name of player's current inventory is "&5&lSHOP":
        if clicked item is not air:
            if inventory type of clicked inventory is "CHEST":   
                if clicked item is stone:
                    wait 1 tick
                    open chest with 1 rows named "&5&lCONFRIM BUY" to player
                    set player's current inventory's slot 4 to green wool named "&2Confirm"
    if name of player's current inventory is "&5&lCONFRIM BUY":
        if clicked item is not air:
            if inventory type of clicked inventory is "CHEST":           
                if clicked item is green wool:
                    give player clicked item # Give green wool instead stone
                    close player's inventory
 
give player stone?
You should add the item you want to sell/buy in the GUI, and give that item to the player
 
Status
Not open for further replies.