Action doesn't happen when there are multiple items in one slot (idk how to write the name correctly)

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

SandBoxer011

Member
Feb 9, 2024
10
1
3
21
Hi everyone, I have a problem. I'm working on an amulet system now. To activate an amulet you need to click it in your inventory, but problem is that if I have multiple of one Amulet in one slot it doesn't work :emoji_frowning:

(If there is only one item in a slot it works perfectly)

My Code:
on inventory click:
# Testing Amulet
event-item is stone named "&fTesting Amulet &a[Tier I]"
slot 0 of player's current inventory is black stained glass pane named " "
slot 29 of {%player%_amulet_gui} isn't stone named "&fTesting Amulet &a[Tier I]"

make player execute command "/tier1check1"

remove stone named "&fTesting Amulet &a[Tier I]" from player's inventory
set slot 29 of {%player%_amulet_gui} to stone of efficiency 1 named "&fTesting Amulet &a[Tier I]" with lore "&7Coins per Click: &a+10" with all flags hidden
set {%player%_testing_amulet_active} to true
if {%player%_amulet_change} is true:
play sound "minecraft:block.beacon.power_select" with volume 0.5 with pitch 1.2 to the player
send "&eTier I Amulet was changed!"
set {%player%_amulet_change} to false
else:
play sound "minecraft:block.beacon.power_select" with volume 0.5 with pitch 1.5 to the player
send "&aTier I Amulet was activated!"
 
Hello!

Since you are calling for the exact tool, it has to be one.

One way to fix this is to change:


code_language.skript:
event-item is stone named "&fTesting Amulet &a[Tier I]":

To:

code_language.skript:
name of event-item contains "&fTesting Amulet &a[Tier I]"