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.

compare 2 items while ignoring durability?

Discussion in 'Skript' started by Nubb, Jan 25, 2023.

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

    Nubb New Member

    Joined:
    Apr 30, 2021
    Messages:
    6
    Likes Received:
    0
    im trying to compare 2 items and not compare their durabilty while doing so e.g:


    Code (Text):
    1. if {item::1} is {item::2}:
    2.     send "same item!" to player
    however for example, if 1 of them is full durability and 1 is even slightly damaged they dont count as the same, if there is any way of avoiding this please tell me so,
     
  2. xdh

    xdh Active Member

    Joined:
    Apr 15, 2020
    Messages:
    88
    Likes Received:
    4
    i honestly don't if this works or not, just try it and lmk
    Code (Text):
    1. if {item::1} is {item::2} where [{item::1}'s durability != {item::2}'s durability or {item::1}'s durability == {item::2}'s durability]:
     
  3. Merrical

    Supporter

    Joined:
    Jul 27, 2020
    Messages:
    29
    Likes Received:
    3
    if the only thing you care about is durability, you could use the expression https://skripthub.net/docs/?id=3735 to set their durability to the same thing. I've used this before and I can vouch that it works.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...