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.

item holding detection

Discussion in 'Skript' started by Grandfish, Mar 19, 2021.

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

    Grandfish Member

    Joined:
    Feb 8, 2021
    Messages:
    13
    Likes Received:
    0
    im trying to make a system where when you hold a specific item, you gain a specific amount of mana, then when you go to a different hotbar slot, the extra mana goes away.
    Code (Text):
    1. on hotbar switch:
    2.     loop all entities:  
    3.         loop-entity is holding blaze rod named "&6magic stick" with lore "&6wow so op":
    4.             add 400 to {maxmana.%loop-entity%}
    , but it just doesnt work. there are no errors though.
    --- Double Post Merged, Apr 1, 2021, Original Post Date: Mar 19, 2021 ---
    bump
     
  2. Tarna

    Tarna Member

    Joined:
    Mar 10, 2020
    Messages:
    14
    Likes Received:
    0
    Why are you looping all entities? Do you want to make it that for each person holding it, it increases everyone's mana by 400?
     
  3. Grandfish

    Grandfish Member

    Joined:
    Feb 8, 2021
    Messages:
    13
    Likes Received:
    0
    Yes, when u hold the item, u gain 400 mana , and when u switch items, u lose that extra mana.
    --- Double Post Merged, Apr 1, 2021, Original Post Date: Apr 1, 2021 ---
    anyone holding it gets +400 mana.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...