siso_

login bounus

Apr 4th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. options:
  2. itemname: ログインボーナス #変えても構いません
  3.  
  4. command /loginbounus:
  5. aliases: login, bounus
  6. trigger:
  7. if {bounus.%player%} is not set:
  8. set {bounus.%player%} to floor(unix timestamp of now) + 86400
  9. give paper named "{@itemname}" to player
  10. broadcast "&e%player%&6がログインボーナスを受け取りました!!"
  11. stop
  12. if {bounus.%player%} <= floor(unix timestamp of now):
  13. give paper named "{@itemname}" to player
  14. clear {bounus.%player%}
  15. set {bounus.%player%} to floor(unix timestamp of now) + 86400
  16. broadcast "&e%player%&6がログインボーナスを受け取りました!!"
  17. stop
  18. else:
  19. set {_bounustime} to {bounus.%player%} - floor(unix timestamp of now)
  20. set {_bounustime} to {_bounustime} / 3600
  21. send "&c次の報酬まで残り%round({_bounustime})%時間"
  22.  
  23. #サンプル (プレイヤーが参加したときに↑のログインボーナスが実行される) ※消しても構いません
  24. on join:
  25. execute player command "/loginbounus"
Add Comment
Please, Sign In to add comment