wand cooldown with changing cmd

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

Rejze

Member
Nov 22, 2021
1
0
1
24
Hello! I'm trying to make wand that changes custom model data on cooldown, but I don't know how to select that specific item even if player is not holding it! Here's my code

Code:
every 0.1 second:
    loop players:
        if {cooldown_necromancers_wand::%loop-player's uuid%} is "active":
            set {cooldown_necromancers_wand::%loop-player's uuid%} to "inactive"
            set custom model data of loop-player's tool to 10001
            send action bar "&c▇&7▇▇▇▇" to loop-player
            play sound "minecraft:block.dispenser.fail" with volume 10 and pitch 0 for loop-player
            wait 1 second
            send action bar "&c▇▇&7▇▇▇" to loop-player
            play sound "minecraft:block.dispenser.fail" with volume 10 and pitch 0.5 for loop-player
            wait 1 second
            send action bar "&c▇▇▇&7▇▇" to loop-player
            play sound "minecraft:block.dispenser.fail" with volume 10 and pitch 1 for loop-player
            wait 1 second
            send action bar "&c▇▇▇▇&7▇" to loop-player
            play sound "minecraft:block.dispenser.fail" with volume 10 and pitch 1.5 for loop-player
            wait 1 second
            send action bar "&c▇▇▇▇▇" to loop-player
            play sound "minecraft:block.dispenser.fail" with volume 10 and pitch 2 for loop-player
            wait 1 second
            loop all items in the loop-player's inventory:
                set custom model data of loop-item to 10000
 
Assuming the "Necromancer's Wand" is a blaze rod with the name "Necromancer's Wand", you'd need to do:
Code:
loop all items in the loop-player's inventory:
    loop-item is blaze rod named "Necromancer's Wand":
        #do stuff