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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

wand cooldown with changing cmd

Discussion in 'Requests' started by Rejze, Jul 25, 2022.

  1. Rejze

    Rejze Member

    Joined:
    Nov 22, 2021
    Messages:
    1
    Likes Received:
    0
    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 (Text):
    1.  
    2. every 0.1 second:
    3.     loop players:
    4.         if {cooldown_necromancers_wand::%loop-player's uuid%} is "active":
    5.             set {cooldown_necromancers_wand::%loop-player's uuid%} to "inactive"
    6.             set custom model data of loop-player's tool to 10001
    7.             send action bar "&c▇&7▇▇▇▇" to loop-player
    8.             play sound "minecraft:block.dispenser.fail" with volume 10 and pitch 0 for loop-player
    9.             wait 1 second
    10.             send action bar "&c▇▇&7▇▇▇" to loop-player
    11.             play sound "minecraft:block.dispenser.fail" with volume 10 and pitch 0.5 for loop-player
    12.             wait 1 second
    13.             send action bar "&c▇▇▇&7▇▇" to loop-player
    14.             play sound "minecraft:block.dispenser.fail" with volume 10 and pitch 1 for loop-player
    15.             wait 1 second
    16.             send action bar "&c▇▇▇▇&7▇" to loop-player
    17.             play sound "minecraft:block.dispenser.fail" with volume 10 and pitch 1.5 for loop-player
    18.             wait 1 second
    19.             send action bar "&c▇▇▇▇▇" to loop-player
    20.             play sound "minecraft:block.dispenser.fail" with volume 10 and pitch 2 for loop-player
    21.             wait 1 second
    22.             loop all items in the loop-player's inventory:
    23.                 set custom model data of loop-item to 10000
     
  2. Neppkun

    Neppkun Member

    Joined:
    Jul 18, 2020
    Messages:
    4
    Likes Received:
    0
    Assuming the "Necromancer's Wand" is a blaze rod with the name "Necromancer's Wand", you'd need to do:
    Code (Text):
    1.  
    2. loop all items in the loop-player's inventory:
    3.     loop-item is blaze rod named "Necromancer's Wand":
    4.         #do stuff
    5.  
     
    • Informative Informative x 1

Share This Page

Loading...