I'm looking to create something where the script checks for a specific amount of items in a player's slot using a function, like this:
But the "16 of sugar" and "2 of blaze_powder" don't check anything. I'm not sure how to return an amount, as checking for the item in that slot only returns an item name. Any help?
code_language.skript:
function elixirCheckRecipies(p: Player):
if slot 1 of {_p}'s current inventory is 2 of blaze_powder:
if slot 3 of {_p}'s current inventory is 16 of sugar:
play sound "VILLAGER_IDLE" to {_p} with volume 100 and pitch 3
make a gui slot 5 of {_p} with glass bottle named "&e&l&oExamining Elixir..." with lore "&7&oPlease wait..." to do nothing
wait 1 second
make a gui slot 5 of {_p} with potion named "&b&lTest Elixir" with lore "&7&oClick to craft.||&d&l * &dCrafting Time: &7&o30 seconds" to do nothing
play sound "LEVEL_UP" to {_p} with volume 100 and pitch 1