Check content of specific hotbar slot (2.2)

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

wraithcode

Member
Feb 10, 2025
2
0
1
Hi, I'm trying to make an accessory system and I need to check the contents of the 7th and 8th hotbar slots but everything I've tried doesn't work, is there any way to check this in Skript 2.2? Addons are fine.

this doesn't work:
Code:
on right click:
    if slot 0 of player is an iron hoe:
        send "You have an iron hoe in hotbar slot 1!" to player
 
I have not used this before but after some googeling, I think i found something that could work

on right click:
loop all items in player's inventory
if index of event-item is 7 or 8:
send "You have an iron hoe in hotbar slot 1!" to player
 
i tried your answer and it didnt work exactly right away but it led me to the right wording, thank you!