kit cooldown

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

skybarn

Member
Sep 17, 2021
3
0
1
31
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?
 
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?
Do you mind formatting your code first and explaining what you want exactly?
 
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)
 
vOgWJgi.png
 
Code:
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)
I want it to give you the kit then you cant use it for ten seconds
 
Code:
if arg-1 is "vip":
    if player has permission "vip":
        if difference between now and {kit::%player's uuid%::cooldown::vip} is more than 10 seconds:
            set {kit::%player's uuid%::cooldown::vip} to now
            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"
 
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)


put [code ] (actual code) [/code ] (without spaces after the word code)
[doublepost=1632002300,1632001955][/doublepost]
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?

add this stuff

Code:
command /whatever
  trigger
    if {cd%player%} is false:
      give stuff to player
      send "&au got the stuff"
      set {cd%player%} to true
      wait 30 seconds
      set {cd%player%} to false
    else:
      send "&cit on cool down"

make sure u make it give the stuff in the if cd is false
 
put [code ] (actual code) [/code ] (without spaces after the word code)
[doublepost=1632002300,1632001955][/doublepost]

add this stuff

Code:
command /whatever
  trigger
    if {cd%player%} is false:
      give stuff to player
      send "&au got the stuff"
      set {cd%player%} to true
      wait 30 seconds
      set {cd%player%} to false
    else:
      send "&cit on cool down"

make sure u make it give the stuff in the if cd is false
HELL NO! DO NOT DO THIS!
 
put [code ] (actual code) [/code ] (without spaces after the word code)
[doublepost=1632002300,1632001955][/doublepost]

add this stuff

Code:
command /whatever
  trigger
    if {cd%player%} is false:
      give stuff to player
      send "&au got the stuff"
      set {cd%player%} to true
      wait 30 seconds
      set {cd%player%} to false
    else:
      send "&cit on cool down"

make sure u make it give the stuff in the if cd is false
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
Reactions: Minecoll_YT
Status
Not open for further replies.