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.

kit cooldown

Discussion in 'Skript' started by skybarn, Sep 17, 2021.

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

    skybarn Member

    Joined:
    Sep 17, 2021
    Messages:
    3
    Likes Received:
    0
    I can't get this skript to work
    command /kit [<text>]:
    trigger:
    if arg-1 is not set:
    open chest with 3 rows named "&b&lKITS" to player
    wait 1 tick
    format slot 3 of player with gray dye named "&7Default" with lore "&fThis is the default kit" to run [make player execute command "kit pvp"]
    format slot 5 of player with lime dye named "&aVIP" with lore "&aThis is the kit for the rank &7[&aVIP&7]&f" to run [make player execute command "kit vip"]
    if arg-1 is "pvp":
    give iron sword of sharpness 1 and unbreaking 2 named "&8PvP Sword" to player
    give iron helmet of protection 1 and unbreaking 2 to player
    give iron chestplate of protection 1 and unbreaking 2 to player
    give iron leggings of protection 1 and unbreaking 2 to player
    give iron boots of protection 1 and unbreaking 2 to player
    give bow named "&8PvP Bow" to player
    give 32 arrows to player
    give 5 golden apple to player
    give 32 cooked beef to player
    send "&bYou have received kit &8PVP"
    if arg-1 is "vip":
    if player has permission "vip":
    give diamond sword of sharpness 2 and unbreaking 3 to player
    give iron helmet of protection 2 and unbreaking 3 to player
    give diamond chestplate of protection 2 and unbreaking 3 to player
    give iron leggings of protection 2 and unbreaking 3 to player
    give iron boots of protection 2 and unbreaking 3 to player
    give bow of power 1 to player
    give 64 arrows to player
    give 14 golden apple to player
    give 64 cooked beef to player
    send "&bYou have received kit &aVIP"


    if {cooldowns::emoji_stuck_out_tongue:layer} does not contain "pvp":
    add "pvp" to {cooldowns::emoji_stuck_out_tongue:layer}
    wait 10 second
    remove "pvp" from {cooldowns::emoji_stuck_out_tongue:layer}
    else:
    send "&cayo it on cooldown"
    stop



    can anyone help me?
     
  2. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    142
    Likes Received:
    5
    Do you mind formatting your code first and explaining what you want exactly?
     
  3. skybarn

    skybarn Member

    Joined:
    Sep 17, 2021
    Messages:
    3
    Likes Received:
    0
    command /kit [<text>]:
    trigger:
    if arg-1 is not set:
    open chest with 3 rows named "&b&lKITS" to player
    wait 1 tick
    format slot 3 of player with gray dye named "&7Default" with lore "&fThis is the default kit" to run [make player execute command "kit pvp"]
    format slot 5 of player with lime dye named "&aVIP" with lore "&aThis is the kit for the rank &7[&aVIP&7]&f" to run [make player execute command "kit vip"]
    if arg-1 is "pvp":
    give iron sword of sharpness 1 and unbreaking 2 named "&8PvP Sword" to player
    give iron helmet of protection 1 and unbreaking 2 to player
    give iron chestplate of protection 1 and unbreaking 2 to player
    give iron leggings of protection 1 and unbreaking 2 to player
    give iron boots of protection 1 and unbreaking 2 to player
    give bow named "&8PvP Bow" to player
    give 32 arrows to player
    give 5 golden apple to player
    give 32 cooked beef to player
    send "&bYou have received kit &8PVP"
    if arg-1 is "vip":
    if player has permission "vip":
    give diamond sword of sharpness 2 and unbreaking 3 to player
    give iron helmet of protection 2 and unbreaking 3 to player
    give diamond chestplate of protection 2 and unbreaking 3 to player
    give iron leggings of protection 2 and unbreaking 3 to player
    give iron boots of protection 2 and unbreaking 3 to player
    give bow of power 1 to player
    give 64 arrows to player
    give 14 golden apple to player
    give 64 cooked beef to player
    send "&bYou have received kit &aVIP"


    if {cooldowns::emoji_stuck_out_tongue:layer} does not contain "pvp":
    add "pvp" to {cooldowns::emoji_stuck_out_tongue:layer}
    wait 10 second
    remove "pvp" from {cooldowns::emoji_stuck_out_tongue:layer}
    else:
    send "&cayo it on cooldown"
    stop


    I want it to give a cooldown when you get the kit (i cant format it)
     
  4. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    597
    Likes Received:
    37
  5. skybarn

    skybarn Member

    Joined:
    Sep 17, 2021
    Messages:
    3
    Likes Received:
    0
    Code (Text):
    1. command /kit [<text>]:
    2.   trigger:
    3.     if arg-1 is not set:
    4.       open chest with 3 rows named "&b&lKITS" to player
    5.       wait 1 tick
    6.       format slot 3 of player with gray dye named "&7Default" with lore "&fThis is the default kit" to run [make player execute command "kit pvp"]
    7.       format slot 5 of player with lime dye named "&aVIP" with lore "&aThis is the kit for the rank &7[&aVIP&7]&f" to run [make player execute command "kit vip"]
    8.     if arg-1 is "pvp":
    9.       give iron sword of sharpness 1 and unbreaking 2 named "&8PvP Sword" to player
    10.       give iron helmet of protection 1 and unbreaking 2 to player
    11.       give iron chestplate of protection 1 and unbreaking 2 to player
    12.       give iron leggings of protection 1 and unbreaking 2 to player
    13.       give iron boots of protection 1 and unbreaking 2 to player
    14.       give bow named "&8PvP Bow" to player
    15.       give 32 arrows to player
    16.       give 5 golden apple to player
    17.       give 32 cooked beef to player
    18.       send "&bYou have received kit &8PVP"
    19.     if arg-1 is "vip":
    20.       if player has permission "vip":
    21.         give diamond sword of sharpness 2 and unbreaking 3 to player
    22.         give iron helmet of protection 2 and unbreaking 3 to player
    23.         give diamond chestplate of protection 2 and unbreaking 3 to player
    24.         give iron leggings of protection 2 and unbreaking 3 to player
    25.         give iron boots of protection 2 and unbreaking 3 to player
    26.         give bow of power 1 to player
    27.         give 64 arrows to player
    28.         give 14 golden apple to player
    29.         give 64 cooked beef to player
    30.         send "&bYou have received kit &aVIP"
    31.  
    32.  
    33. if {cooldowns::emoji_stuck_out_tongue:layer} does not contain "pvp":
    34.   add "pvp" to {cooldowns::emoji_stuck_out_tongue:layer}
    35.   wait 10 second
    36.   remove "pvp" from {cooldowns::emoji_stuck_out_tongue:layer}
    37. else:
    38.   send "&cayo it on cooldown"
    39.   stop
    40.  
    41.  
    42. I want it to give a cooldown when you get the kit (i cant format it)
    43.  
    I want it to give you the kit then you cant use it for ten seconds
     
  6. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    597
    Likes Received:
    37
    Code (Text):
    1. if arg-1 is "vip":
    2.     if player has permission "vip":
    3.         if difference between now and {kit::%player's uuid%::cooldown::vip} is more than 10 seconds:
    4.             set {kit::%player's uuid%::cooldown::vip} to now
    5.             give diamond sword of sharpness 2 and unbreaking 3 to player
    6.             give iron helmet of protection 2 and unbreaking 3 to player
    7.             give diamond chestplate of protection 2 and unbreaking 3 to player
    8.             give iron leggings of protection 2 and unbreaking 3 to player
    9.             give iron boots of protection 2 and unbreaking 3 to player
    10.             give bow of power 1 to player
    11.             give 64 arrows to player
    12.             give 14 golden apple to player
    13.             give 64 cooked beef to player
    14.             send "&bYou have received kit &aVIP"
     
  7. yea rite

    yea rite Member

    Joined:
    Jul 11, 2021
    Messages:
    26
    Likes Received:
    2

    put [code ] (actual code) [/code ] (without spaces after the word code)
    --- Double Post Merged, Sep 18, 2021, Original Post Date: Sep 18, 2021 ---
    add this stuff

    Code (Text):
    1. command /whatever
    2.   trigger
    3.     if {cd%player%} is false:
    4.       give stuff to player
    5.       send "&au got the stuff"
    6.       set {cd%player%} to true
    7.       wait 30 seconds
    8.       set {cd%player%} to false
    9.     else:
    10.       send "&cit on cool down"
    make sure u make it give the stuff in the if cd is false
     
  8. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    597
    Likes Received:
    37
    HELL NO! DO NOT DO THIS!
     
  9. TheCubPlays

    TheCubPlays Member

    Joined:
    Jun 22, 2021
    Messages:
    35
    Likes Received:
    3
    In case you are wondering why you should not make it work like this, it's because I think that in case the server closes this will be ruined also it's not good for performance, not sure about the performance one but either way doing what minecoll said is the best way you can do this in general
    .
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...