Q:
How do I make this remove 1 second while {Time::%player%} is set?
Code:
How do I make this remove 1 second while {Time::%player%} is set?
Code:
code_language.skript:
command /dailyrewards:
description: Rewards command
trigger:
wait 1 tick
open chest with 1 row named "Daily Rewards" to player
wait 1 tick
if {Time::%player%} is not set:
format gui slot 0 of player with 1 light green stained glass pane named "&aDaily Reward" with lore "||&eCondition: &aReady||||&eClick to collect reward" to run player command "/w385vc5" with left click
else:
format gui slot 0 of player with 1 red stained glass pane named "&c&lReward" with lore "||&eCondition: &cLocked||&eTime Left: &c%{Time::%player%}%||&cYour reward is on a timer" to run player command "/w385vc5" with left click
command /w385vc5:
description: Daily Reward 1
trigger:
if {Time::%player%} is less than 86400 seconds:
stop
close player's inventory
send "&cReward &8&l» &7You must wait &a%{Time::%player%}% &7to claim this reward"
else:
send "&cReward &8&l» &7You have claimed your daily reward" to player
play "ORB_PICKUP" to player at volume 1
send "&cReward &8&l» &7You have received &a5 XP"
close player's inventory
make console execute command "xp add %player% 5"
set {Time::%player%} to 86400