Skript help

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

Xceislor

Member
Aug 4, 2021
18
0
1
24
How do i make it so when a player has a item named "&cStaff of Strength" in their hand they get a 5+ bonus in the {strength.%player%} variable, but when it isnt in their hand they dont get the bonus. Reminder, i dont want it set to 5 :emoji_slight_smile:
 
How do i make it so when a player has a item named "&cStaff of Strength" in their hand they get a 5+ bonus in the {strength.%player%} variable, but when it isnt in their hand they dont get the bonus. Reminder, i dont want it set to 5 :emoji_slight_smile:
I don't think such event exist so just loop all players and check loop-player's held item like this;
Code:
every second:
    loop all players:
        if name of loop-player's held item is "&cSword Name":
            #code here
 
I don't think such event exist so just loop all players and check loop-player's held item like this;
Code:
every second:
    loop all players:
        if name of loop-player's held item is "&cSword Name":
            #code here
There is indeed an event for that, it's called on tool change
 
Use list variables :emoji_slight_smile:
Especially in your case, I think everyone on the server has its own {strength.%player%} variable. You wouldn't have a chance to reset them all or loop them. So:
Code:
{strength.%player%} --> {strength::%player%}
 
Status
Not open for further replies.