command /dailyrewards:
permission: {@daily_use}
trigger:
set {_} to chest inventory with 3 rows named "{@gui_name}"
set slot (integers between 0 and 27) of {_} to black stained glass pane
if difference between {daily::%player's uuid%} and now is smaller than {@cooldown}:
set slot 13 of {_} to {@claimed_item} named "{@unclaimed_item_name}" with lore "{@reward_name}" and "" and "{@claimed}"
else:
set slot 13 of {_} to {@unclaimed_item} named "{@claimed_item_name}" with lore "{@reward_name}" and "" and "{@unclaimed}"
open {_} to player
on inventory click:
event-inventory is not player's inventory
if name of event-inventory is "{@gui_name}":
cancel event
if clicked slot is 13:
close player's inventory
if clicked slot is {@claimed_item}:
play sound "entity.villager.no" with volume 2 to player
send "{@prefix}{@cooldown_message}" to player
else if clicked slot is {@unclaimed_item}:
{@reward_cmd}
play sound "block.note_block.bell" with volume 2 to player
set {daily::%player's uuid%} to now
send "{@prefix}{@claimed_message}" to player
command /tezedd:
trigger:
clear {daily::%player's uuid%}
options:
claimed: &cClaimed!
unclaimed: &aClick To Claim!
prefix: &d&lDaily &7&l»&r
daily_use: daily.use
cooldown: 24 hours
gui_name: &d&lDaily Rewards
unclaimed_item: minecart with chest
unclaimed_item_name: &6Daily Reward
claimed_item_name: &6Daily Reward
claimed_item: minecart
reward_name: &7+1 &bDiamond
reward_cmd: give 1 of diamond to player
claimed_message: &a Successfully claimed!
cooldown_message: &c This reward is on cooldown!
Prosze, licze na like