Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {give.amount} = 0
- on right click:
- if x-coordinate of location of block is 11.5:
- if z-coordinate of location of block is 0.5:
- if y-coordinate of location of block is 4.5:
- cancel event
- if player is sneaking:
- set {_int} to 1
- while {_int} is less than or equal to {give.amount}:
- if {give.%{_int}%.%player%} is not set:
- if {_item} is not set:
- set {_item} to {give.item.%{_int}%}
- set {give.%{_int}%.%player%} to 1
- exit 3 sections
- add 1 to {_int}
- if {_item} is not empty:
- add {_item} to player
- send "&a配布を受け取りました!" to player
- set {_text} to {give.text.%{_int}%}
- send "&a%{_text}%" to player
- else:
- send "&c受け取れるアイテムがありません" to player
- else:
- set {_int} to 1
- if {give.amount} is less than or equal to 0:
- send "&c受け取れるアイテムがありません" to player
- while {_int} is less than or equal to {give.amount}:
- if {give.%{_int}%.%player%} is not set:
- send "&a未受取があります!" to player
- send "&a受け取る場合は左クリックしてください!" to player
- exit 4 sections
- else:
- send "&c受け取れるアイテムがありません" to player
- add 1 to {_int}
- command /addgive [<text>]:
- description: 報酬の追加
- permission: skript.give
- executable by: players
- trigger:
- add 1 to {give.amount}
- set {give.item.%{give.amount}%} to tool of player
- set {give.text.%{give.amount}%} to arg 1
- set {_text} to {give.text.%{give.amount}%}
- send "&aadded: %{give.amount}%.%{_text}%" to player
- command /removegive [<number>]:
- description: 報酬の削除
- permission: skript.give
- executable by: players
- trigger:
- remove 1 from {give.amount}
- delete {give.item.%arg 1%}
- delete {give.text.%arg 1%}
- send "&cremoved: %arg 1%.%{give.text.%arg 1%}%" to player
- if {give.amount} is less than 0:
- set {give.amount} to 0
- command /listgive:
- description: 報酬の一覧
- permission: skript.give
- executable by: players
- trigger:
- send "&2give-item list:" to player
- set {_int} to 1
- while {_int} is less than or equal to {give.amount}:
- set {_text} to {give.text.%{_int}%}
- set {_item} to {give.item.%{_int}%}
- send "&a%{_int}%.%{_text}%.%type of {_item}%" to player
- add 1 to {_int}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement