Solved Cooldown 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.
code_language.skript:
on right click on villager holding a cauldron:
    if difference between {rewardcd.%uuid of player%} and now is less than 30 seconds:
        send "&cYou must wait %difference between 30 seconds and difference between {rewardcd.%uuid of player%} and now% before doing that again." to player
        stop
    set {rewardcd.%uuid of player%} to now
    set {_chance} to a random integer between 1 and 200
    if {_chance} is between 1 and 24:
        make console execute command "/msg %player% &2Treat! &7>> &2Take some Golden Candy"
        give golden apple to player
    if {_chance} is between 25 and 48:
        make console execute command "/msg %player% &2Treat! &7>> &2Take some Sour Candy"
        give apple to player
    if {_chance} is between 49 and 72:
        make console execute command "/msg %player% &2Treat! &7>> &2Take some Crunchy Candy"
        give gold nugget to player
    if {_chance} is between 73 and 96:
        make console execute command "/msg %player% &2Treat! &7>> &2Take some Fluffy Candy"
        give cake to player
    if {_chance} is between 97 and 119:
        make console execute command "/msg %player% &2Treat! &7>> &2Take some Sweet Candy"
        give pumpkin pie to player
    if {_chance} is between 119 and 120:
        make console execute command "/cc give physical basic 1 %player%"
        make console execute command "/bc &2&l%player%&r &2Has won the &lGRAND PRIZE!"
    if {_chance} is between 121 and 200:
        make console execute command "/eco take %player% 30"
        make console execute command "/msg %player% &cTrick! &7>> &cYour money is mine now!"
 
Status
Not open for further replies.