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.

Solved If player is holding ...

Discussion in 'Skript' started by Sander Vereecke, Apr 9, 2020.

Thread Status:
Not open for further replies.
  1. Sander Vereecke

    Joined:
    Dec 19, 2019
    Messages:
    31
    Likes Received:
    2
    I have a question about these codes if I'm using them correctly. Because when I'm using them they don't broadcast anything. Thank you.
    Code (Text):
    1.         if tool of arg-1 is any sword: #sword
    2.             broadcast "ddd"
    3.         if tool of arg-1 is any pickaxe, any axe and any shovel: #pickaxe, axe and shovel
    4.             broadcast "ddd"
    5.         if arg-1's held item is any helmet, any chestplate, any leggings and any boots: #helmet, chestplate, leggings and boots
    6.             broadcast "ddd"


     
  2. Best Answer:
    Post #3 by TenToTu Sho, Apr 9, 2020
  3. zTak

    zTak Active Member

    Joined:
    Mar 3, 2018
    Messages:
    84
    Likes Received:
    6
    "If hold item of player is x"

    leave like pls :emoji_slight_smile:
     
    • Like Like x 1
  4. TenToTu Sho

    TenToTu Sho Member

    Joined:
    Dec 30, 2019
    Messages:
    20
    Likes Received:
    2
    first, the correct usage is "player's tool" not "tool of player"
    second, separate all of the possible items with "or", because in the third one, you are just telling skript to broadcast ddd only if player is holding all of the items at once.

    so the code would then be:
    Code (Text):
    1. if arg-1's tool is any sword:
    2.             broadcast "ddd"
    3.         if arg-1's tool is any pickaxe or any axe or any shovel:
    4.             broadcast "ddd"
    5.         if arg-1's held item is any helmet or any chestplate or any leggings or any boots:
    6.             broadcast "ddd"
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...