Solved Amount in specific 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.

NightyNight

Member
Feb 21, 2017
20
0
0
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:
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
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?
 
Status
Not open for further replies.