Advertisement
CREAMPAN0408

Untitled

Dec 24th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. variables:
  2. {RewardPoint-Cooldown%player%} = 0
  3. {check-jukebox-name%player%} = "none"
  4.  
  5. on quit:
  6. clear {check-jukebox-name%player%}
  7.  
  8. on join:
  9. clear {check-jukebox-name%player%}
  10.  
  11. on place:
  12. event-block is jukebox
  13. set {check-jukebox-name%player%} to "%name of held item%"
  14.  
  15. on jukebox change:
  16. {check-jukebox-name%player%} is "RewardPoint"
  17.  
  18. on right click:
  19. event-block is jukebox
  20. if {RewardPoint-Cooldown%player%} is 0:
  21. if player can hold 1 of diamond:
  22. execute console command "execute @e[name=%player%] ~ ~ ~ playsound entity.player.levelup master %player% ~ ~ ~ 1 1.5"
  23. give 1 of diamond to player
  24. send "&2今日の分の報酬を獲得しました。" to player
  25. set {RewardPoint-Cooldown%player%} to 90
  26. execute console command "reward-point-cooldow %player%"
  27. else:
  28. send "&cインベントリに空きがありません・・・" to player
  29. else:
  30. execute console command "execute @e[name=%player%] ~ ~ ~ playsound entity.pig.ambient master %player% ~ ~ ~ 2 1"
  31. if {RewardPoint-Cooldown%player%} is more than or equal to 60:
  32. send "報酬獲得までのこり1m%{RewardPoint-Cooldown%player%} - 60%sです。" to player
  33. else:
  34. send "報酬獲得までのこり0m%{RewardPoint-Cooldown%player%}%sです。" to player
  35.  
  36. command /reward-point-cooldow <text>:
  37. executable by: console
  38. trigger:
  39. if {RewardPoint-Cooldown%arg-1%} is 0:
  40. stop
  41. else:
  42. wait 1 second
  43. add -1 to {RewardPoint-Cooldown%arg-1%}
  44. execute console command "reward-point-cooldow %arg-1%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement