Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {RewardPoint-Cooldown%player%} = 0
- {check-jukebox-name%player%} = "none"
- on quit:
- clear {check-jukebox-name%player%}
- on join:
- clear {check-jukebox-name%player%}
- on place:
- event-block is jukebox
- set {check-jukebox-name%player%} to "%name of held item%"
- on jukebox change:
- {check-jukebox-name%player%} is "RewardPoint"
- on right click:
- event-block is jukebox
- if {RewardPoint-Cooldown%player%} is 0:
- if player can hold 1 of diamond:
- execute console command "execute @e[name=%player%] ~ ~ ~ playsound entity.player.levelup master %player% ~ ~ ~ 1 1.5"
- give 1 of diamond to player
- send "&2今日の分の報酬を獲得しました。" to player
- set {RewardPoint-Cooldown%player%} to 90
- execute console command "reward-point-cooldow %player%"
- else:
- send "&cインベントリに空きがありません・・・" to player
- else:
- execute console command "execute @e[name=%player%] ~ ~ ~ playsound entity.pig.ambient master %player% ~ ~ ~ 2 1"
- if {RewardPoint-Cooldown%player%} is more than or equal to 60:
- send "報酬獲得までのこり1m%{RewardPoint-Cooldown%player%} - 60%sです。" to player
- else:
- send "報酬獲得までのこり0m%{RewardPoint-Cooldown%player%}%sです。" to player
- command /reward-point-cooldow <text>:
- executable by: console
- trigger:
- if {RewardPoint-Cooldown%arg-1%} is 0:
- stop
- else:
- wait 1 second
- add -1 to {RewardPoint-Cooldown%arg-1%}
- execute console command "reward-point-cooldow %arg-1%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement