#help with a cooldown for an inventory click

1 messages · Page 1 of 1 (latest)

robust swift
#
on inventory click:
    if name of event-inventory is "&bRick en Fin shop!":
        cancel event
    if index of event-slot is 12:
        open {_g2} to player
    if name of event-inventory is "&6Ores":
        cancel event
    if index of event-slot is 12:
        cooldown: 10 minutes
            set {_r} to a random integer between 1 and 5
            if {_r} = 1:
                give player 1 iron ingot
            if {_r} = 2:
                give player 2 iron ingot
            if {_r} = 3:
                give player 3 iron ingot
            if {_r} = 4:
                give player 4 iron ingot
            if {_r} = 5:
                give player 5 iron ingot``` so i want to make it when you click on the slot it has a cooldown but idk how to
thin girder
#

is this vanilla gui or a addon?

robust swift
#

vanilla

thin girder
#

i only know vanilla

#

ok

robust swift
#

i think so

thin girder
#

so u need help with cooldown:

robust swift
#

yea

#

that when you click to get items you needa wait some time before doing it again

thin girder
#

use a variable, check if it's set to true, if it is send a wait to do this message

robust swift
#

okay imma try

thin girder
#

delete the var every 10 mins

robust swift
#

idk how to start with the cooldown tho

thin girder
#
{cooldown::%player's uuud%} is set:
 send "Wait 10 minutes to do this again" to player
else:
 set {cooldown::%player's uuid%} to true
 more code here

every 10 minutes:
 delete {cooldown::*}
#

i just spoonfed u but i lack braincells to explain

robust swift
#

xD

#

idk why ppl hate spoonfeeders ngl

thin girder
#

u cant learn

#

if people spoonfeed you

#

if u wanna be spoonfed pay someone

robust swift
#

yeah

thin girder
#

then pay me lol

robust swift
#

lmao

#

too poor ¯_(ツ)_/¯

#

also it doesnt understand da 10 minutes part

thin girder
robust swift
#

yeah

#

@thin girder

thin girder
#

bruh

#

every 10 minute

#

remove the S

robust swift
#

lmao

#

same error tho

full maple
#

version of skript?

robust swift
#

nah i fixed it

hollow galleon
#

Um, ok

#

Why not just give r of iron ingot

#

Why delete using a periodical??

#

Theres a chance it wont wait the whole 10 min