1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to check items in player inventory? Please Help

Discussion in 'Skript' started by BrownMee, May 7, 2021.

Thread Status:
Not open for further replies.
  1. BrownMee

    BrownMee Active Member

    Joined:
    Apr 16, 2018
    Messages:
    126
    Likes Received:
    6
    Code (Text):
    1. if name of clicked item is "&cAky's Book":
    2.         cancel event
    3.         loop all items in player's inventory:
    4.             if name of loop-item-1 is "&a☘ &eLullaby Box":
    5.                 loop all items in player's inventory:
    6.                     if name of loop-item-2 is "&a☘ &eSoul Flame":
    7.                         loop all items in player's inventory:
    8.                             if name of loop-item-3 is "&a☘ &eWeave":
    9.                                 if amount of loop-item-3 is more than 63:
    10.                                     loop all items in player's inventory:
    11.                                         if name of loop-item-4 is "&a☘ &eFerry Dust":
    12.                                             if amount of loop-item-4 is more than 63:
    13.                                                 remove 1 of loop-item-1 from player
    14.                                                 remove 1 of loop-item-2 from player
    15.                                                 remove 64 of loop-item-3 from player
    16.                                                 remove 64 of loop-item-4 from player
    I want to check if player have these items and remove it.

    This is the error
    'loop-item-3' can only ever have one value at most,
    --- Double Post Merged, May 8, 2021, Original Post Date: May 7, 2021 ---
    bump
     
Thread Status:
Not open for further replies.

Share This Page

Loading...