Advertisement
nabe0929

Untitled

Jun 28th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. variables:
  2. {give.amount} = 0
  3.  
  4. on right click:
  5. if x-coordinate of location of block is 11.5:
  6. if z-coordinate of location of block is 0.5:
  7. if y-coordinate of location of block is 4.5:
  8. cancel event
  9. if player is sneaking:
  10. set {_int} to 1
  11. while {_int} is less than or equal to {give.amount}:
  12. if {give.%{_int}%.%player%} is not set:
  13. if {_item} is not set:
  14. set {_item} to {give.item.%{_int}%}
  15. set {give.%{_int}%.%player%} to 1
  16. exit 3 sections
  17. add 1 to {_int}
  18. if {_item} is not empty:
  19. add {_item} to player
  20. send "&a配布を受け取りました!" to player
  21. set {_text} to {give.text.%{_int}%}
  22. send "&a%{_text}%" to player
  23. else:
  24. send "&c受け取れるアイテムがありません" to player
  25. else:
  26. set {_int} to 1
  27. if {give.amount} is less than or equal to 0:
  28. send "&c受け取れるアイテムがありません" to player
  29. while {_int} is less than or equal to {give.amount}:
  30. if {give.%{_int}%.%player%} is not set:
  31. send "&a未受取があります!" to player
  32. send "&a受け取る場合は左クリックしてください!" to player
  33. exit 4 sections
  34. else:
  35. send "&c受け取れるアイテムがありません" to player
  36. add 1 to {_int}
  37.  
  38. command /addgive [<text>]:
  39. description: 報酬の追加
  40. permission: skript.give
  41. executable by: players
  42. trigger:
  43. add 1 to {give.amount}
  44. set {give.item.%{give.amount}%} to tool of player
  45. set {give.text.%{give.amount}%} to arg 1
  46. set {_text} to {give.text.%{give.amount}%}
  47. send "&aadded: %{give.amount}%.%{_text}%" to player
  48.  
  49. command /removegive [<number>]:
  50. description: 報酬の削除
  51. permission: skript.give
  52. executable by: players
  53. trigger:
  54. remove 1 from {give.amount}
  55. delete {give.item.%arg 1%}
  56. delete {give.text.%arg 1%}
  57. send "&cremoved: %arg 1%.%{give.text.%arg 1%}%" to player
  58. if {give.amount} is less than 0:
  59. set {give.amount} to 0
  60.  
  61. command /listgive:
  62. description: 報酬の一覧
  63. permission: skript.give
  64. executable by: players
  65. trigger:
  66. send "&2give-item list:" to player
  67. set {_int} to 1
  68. while {_int} is less than or equal to {give.amount}:
  69. set {_text} to {give.text.%{_int}%}
  70. set {_item} to {give.item.%{_int}%}
  71. send "&a%{_int}%.%{_text}%.%type of {_item}%" to player
  72. add 1 to {_int}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement