item holding detection

  • 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!

  • 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.

Grandfish

Member
Feb 8, 2021
13
0
1
22
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:
on hotbar switch:
    loop all entities:   
        loop-entity is holding blaze rod named "&6magic stick" with lore "&6wow so op":
            add 400 to {maxmana.%loop-entity%}
, but it just doesnt work. there are no errors though.
[doublepost=1617304728,1616192958][/doublepost]bump
 
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?
 
Yes, when u hold the item, u gain 400 mana , and when u switch items, u lose that extra mana.
[doublepost=1617315795,1617315256][/doublepost]anyone holding it gets +400 mana.
 
Status
Not open for further replies.