Cooldowns

  • 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 community!

    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.

Buddha

Member
Apr 22, 2017
20
0
0
How would I check to see if a cooldown has expired within a GUI, and if it has expired, it should be deleted?

Right now, the script I am using displays the correct cooldown, however, once the cooldown is up - it will just continue going up. I honestly don't know how to explain it, but maybe if you read my script you may see what I'm getting at.

Code:
                open virtual chest with 6 rows named "Kits" to player
                if {kits.%player%.daily} is not set:
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
                else:
                    set {_waiteddaily} to difference between {kits.%player%.daily} and now
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button

{kits.%player%.daily} gets set whenever someone uses /kit daily. It is supposed to last 24 hours, which it does - however within the GUI on the cooldown part of the lore for the healing potion, the cooldown should say 'Claim now!' once the 24 hours is up. It doesn't do this, and instead begins to start a new timer, which will then just continue forever.

TLDR: looking to remove {kits.%player%.daily} after 24 hours have passed.
 
Oh it's normal!
after passed the 24h you have to put the {kits.%player%.daily} to now
So you have to change somethings:

so first of all if {kits.%player%.daily} is not set you have to set it.

Code:
if {kits.%player%.daily} is not set:
    set {kits.%player%.daily} to now

So now the cooldown.
What if {kits.%player%.daily} is set??

it's math. if the counter < 24 hours so the cooldown is not expired.
if the counter > 24 hours then the cooldown is expired.
let's code it!

Cooldown < 24hours :

Code:
    if {kits.%player%.daily} is less than 24 hours:
        set {_waiteddaily} to difference between {kits.%player%.daily} and now
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button

Cooldown > 24hours : so if count is > than 24 hours you don't have do delete the counter, but to set it to 'now'

Code:
else:
        set {kits.%player%.daily} to now
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button


so all together :

Code:
    if {kits.%player%.daily} is not set:
        set {kits.%player%.daily} to now
       
    if {kits.%player%.daily} is less than 24 hours:
        set {_waiteddaily} to difference between {kits.%player%.daily} and now
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
        stop
    else:
        set {kits.%player%.daily} to now
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
 
Oh it's normal!
after passed the 24h you have to put the {kits.%player%.daily} to now
So you have to change somethings:

so first of all if {kits.%player%.daily} is not set you have to set it.

Code:
if {kits.%player%.daily} is not set:
    set {kits.%player%.daily} to now

So now the cooldown.
What if {kits.%player%.daily} is set??

it's math. if the counter < 24 hours so the cooldown is not expired.
if the counter > 24 hours then the cooldown is expired.
let's code it!

Cooldown < 24hours :

Code:
    if {kits.%player%.daily} is less than 24 hours:
        set {_waiteddaily} to difference between {kits.%player%.daily} and now
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button

Cooldown > 24hours : so if count is > than 24 hours you don't have do delete the counter, but to set it to 'now'

Code:
else:
        set {kits.%player%.daily} to now
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button


so all together :

Code:
    if {kits.%player%.daily} is not set:
        set {kits.%player%.daily} to now
     
    if {kits.%player%.daily} is less than 24 hours:
        set {_waiteddaily} to difference between {kits.%player%.daily} and now
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
        stop
    else:
        set {kits.%player%.daily} to now
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button

I'm not sure this works.. or I'm just stupid and made a mistake doing this.. here's my code. In the GUI, once I claim the daily kit, and it runs /kits daily it gives me the kit. That works fine, however when I then re-open the /kits before the cooldown is over, it still says: cooldown: claim now

edit: forgot to add code

Code:
                if {kits.%player%.daily} is not set:
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kits daily" using left mouse button
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
                else if {kits.%player%.daily} is less than 24 hours:
                    set {_waiteddaily} to difference between {kits.%player%.daily} and now
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
                else:
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
 
pls read my answer!!!
if cooldown is not set, you need to set it to NOW
[doublepost=1560247679,1560247603][/doublepost]again, test this :
Code:
    if {kits.%player%.daily} is not set:
        set {kits.%player%.daily} to now
      
    if {kits.%player%.daily} is less than 24 hours:
        set {_waiteddaily} to difference between {kits.%player%.daily} and now
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
        stop
    else:
        set {kits.%player%.daily} to now
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
 
Code:
on join:
    if {kits.%player%.daily} is not set:
        set {kits.%player%.daily} to now

this is what I had set up for that, would that not be okay?
 
yes, it's ok, but see my 11*line of code
"set {kits.%player%.daily} to now"

when you execute the command and the cooldown is expired you need to set again the cooldown to now
 
pls read my answer!!!
if cooldown is not set, you need to set it to NOW
[doublepost=1560247679,1560247603][/doublepost]again, test this :
Code:
    if {kits.%player%.daily} is not set:
        set {kits.%player%.daily} to now
    
    if {kits.%player%.daily} is less than 24 hours:
        set {_waiteddaily} to difference between {kits.%player%.daily} and now
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
        stop
    else:
        set {kits.%player%.daily} to now
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
        make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button

just tested exactly this, now there is a cooldown at all times.

also; here is /kits daily if this helps;
Code:
        else if arg-1 is "Daily":
            set {_waited} to difference between {kits.%player%.daily} and now
            if {_waited} is less than 24 hours:
                send "you must wait %difference between 24 hours and {_waited}%"
                stop
            else if {kits.%player%.daily} is not set:
                send "redeemed"
                set {kits.%player%.daily} to now
            else:
                send "redeemed"
                set {kits.%player%.daily} to now
 
Code:
command /kits [<text>]:
    trigger:
        if arg 1 is "daily":
            
            if {kits.%player%.daily} is not set:
                set {kits.%player%.daily} to 24 hours
                
            set {_wait} to difference between {kits.%player%.daily} and now
            
            if {_wait} is less than 24 hours:
                message "Cooldown : %difference between 24 hours and {_wait}%" to player
                stop
            else:
                message "redeem" to player
                set {kits.%player%.daily} to now
                stop


here the solution!
 
I still get the same issue.. I've replaced the /kits daily with what you sent; which code should I use for the GUI? this is my current; I returned to what I had previously because I thought it was only the /kits daily that I would've needed to change.. think that was my bad.
Code:
                if {kits.%player%.daily} is not set:
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kits daily" using left mouse button
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
                else if {kits.%player%.daily} is less than 24 hours:
                    set {_waiteddaily} to difference between {kits.%player%.daily} and now
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_waiteddaily}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
                else:
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
 
sorry but....
i've send the exact code here and you continue to replace the code with other code...

Code:
command /kits [<text>]:
    trigger:
        if arg 1 is "daily":
            
            if {kits.%player%.daily} is not set:
                set {kits.%player%.daily} to 24 hours
                
            set {_wait} to difference between {kits.%player%.daily} and now
            
            if {_wait} is less than 24 hours:   
                make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_wait}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_wait}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
                stop
            else:
                make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
                set {kits.%player%.daily} to now
                stop

THIS IS THE CODE.
 
sorry but....
i've send the exact code here and you continue to replace the code with other code...

Code:
command /kits [<text>]:
    trigger:
        if arg 1 is "daily":
          
            if {kits.%player%.daily} is not set:
                set {kits.%player%.daily} to 24 hours
              
            set {_wait} to difference between {kits.%player%.daily} and now
          
            if {_wait} is less than 24 hours: 
                make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_wait}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_wait}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
                stop
            else:
                make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
                set {kits.%player%.daily} to now
                stop

THIS IS THE CODE.
Code:
                if {kits.%player%.daily} is not set:
                    set {kits.%player%.daily} to 24 hours
                set {_wait} to difference between {kits.%player%.daily} and now
                if {_wait} is less than 24 hours:
                    set {_waiteddaily} to difference between {kits.%player%.daily} and now
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_wait}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
                else:
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button

I'm literally using exactly what you sent and it still doesn't work.. here is the full thing:

Code:
command /kits [<text>]:
    aliases: kit
    trigger:
        if arg-1 is not set:
            if player has permission "kits.gui":
                open virtual chest with 6 rows named "Kits" to player
                wait 1 ticks
                make gui slot 0 of player with red stained glass pane named " " to do nothing
                make gui slot 1 of player with red stained glass pane named " " to do nothing
                make gui slot 2 of player with red stained glass pane named " " to do nothing
                make gui slot 3 of player with red stained glass pane named " " to do nothing
                make gui slot 4 of player with red stained glass pane named " " to do nothing
                make gui slot 5 of player with red stained glass pane named " " to do nothing
                make gui slot 6 of player with red stained glass pane named " " to do nothing
                make gui slot 7 of player with red stained glass pane named " " to do nothing
                make gui slot 8 of player with red stained glass pane named " " to do nothing
                make gui slot 9 of player with red stained glass pane named " " to do nothing
                make gui slot 18 of player with red stained glass pane named " " to do nothing
                make gui slot 27 of player with red stained glass pane named " " to do nothing
                make gui slot 36 of player with red stained glass pane named " " to do nothing
                make gui slot 44 of player with red stained glass pane named " " to do nothing
                make gui slot 45 of player with red stained glass pane named " " to do nothing
                make gui slot 46 of player with red stained glass pane named " " to do nothing
                make gui slot 47 of player with red stained glass pane named " " to do nothing
                make gui slot 48 of player with red stained glass pane named " " to do nothing
                make gui slot 49 of player with barrier named "&cExit" to close
                make gui slot 50 of player with red stained glass pane named " " to do nothing
                make gui slot 51 of player with red stained glass pane named " " to do nothing
                make gui slot 52 of player with red stained glass pane named " " to do nothing
                make gui slot 53 of player with red stained glass pane named " " to do nothing
                make gui slot 17 of player with red stained glass pane named " " to do nothing
                make gui slot 26 of player with red stained glass pane named " " to do nothing
                make gui slot 35 of player with red stained glass pane named " " to do nothing
                if {kits.%player%.daily} is not set:
                    set {kits.%player%.daily} to 24 hours
                set {_wait} to difference between {kits.%player%.daily} and now
                if {_wait} is less than 24 hours:
                    set {_waiteddaily} to difference between {kits.%player%.daily} and now
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: %difference between 24 hours and {_wait}%" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
                else:
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kit daily" using left mouse button
                    make gui slot 20 of player with a Healing Potion without any NBT named "&e&lDaily" with lore "&fCooldown: Claim now!" and "&fStatus: &a&lUnlocked!" and " " and "&7Left-click to claim!" and "&7Right-click to preview!" to run player command "/kitpreview daily" using right mouse button
        else if arg-1 is "Daily":
            if {kits.%player%.daily} is not set:
                set {kits.%player%.daily} to 24 hours
                
            set {_waited} to difference between {kits.%player%.daily} and now
            if {_waited} is less than 24 hours:
                send "you must wait %difference between 24 hours and {_waited}%"
                stop
            else:
                send "redeemed"
                set {kits.%player%.daily} to now   
                stop
 
Can we have an anydesk session? If you wanna help contact me on telegram @Lyone_official
[doublepost=1560251181,1560250170][/doublepost]SOLVED.
 
Status
Not open for further replies.