Solved detect an 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 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.

Flajakay

Active Member
Jul 29, 2018
55
1
8
Dnepr, Ukraine
When the player opens virtual chest inventory and put an iron block in the six slot, he will get 9 iron ingots.
How to detect an item that a player put in the six slot?
 
code_language.skript:
command /test:
    trigger:
        open virtual chest inventory named "TEST" to player

on inventory click:
    if name of current inventory of player is "TEST":
        if clicked slot is 6:
            if player's cursor is iron block:
                give player 9 iron ingot
                wait 1 tick
                set slot 6 of current inventory of player to air
 
  • Like
Reactions: Flajakay
Status
Not open for further replies.