Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on right click:
- if player's tool is {gatya-item}:
- set {_gatya.%player%} to random integer between 1 and {gatya-num}
- send "%{_gatya.%player%}%"
- give {gatya::%{_gatya.%player%}%} to player
- if player's tool is stone named "2":
- send "%{gatya::*}%"
- on left click:
- if player's tool is {gatya-item}:
- set {_gatya} to chest with 6 row named "&6&lガチャ景品一覧"
- loop {gatya::*}:
- set slot loop-index parsed as number - 1 of {_gatya} to loop-value
- open {_gatya} to player
- command /gatya <text>:
- permission: op
- trigger:
- if arg 1 = "set":
- set {_gatya} to chest with 6 row named "&6&lガチャ景品設定"
- loop {gatya::*}:
- set slot loop-index parsed as number - 1 of {_gatya} to loop-value
- open {_gatya} to player
- if arg 1 is "list":
- set {_gatya} to chest with 6 row named "&6&lガチャ景品一覧"
- loop {gatya::*}:
- set slot loop-index parsed as number - 1 of {_gatya} to loop-value
- open {_gatya} to player
- on inventory close:
- if name of event-inventory is "&6&lガチャ景品設定":
- set {_gatyanum} to 1
- set {gatya-num} to 0
- delete {gatya::*}
- loop 54 times:
- set {gatya::%{_gatyanum}%} to slot loop-number - 1 of event-inventory
- if {gatya::%{_gatyanum}%} is not air:
- add 1 to {_gatyanum}
- add 1 to {gatya-num}
- if {gatya::%{_gatyanum}%} is air:
- delete {gatya::%{_gatyanum}%}
- if name of event-inventory is "&e&lガチャアイテムを変更":
- set {gatya-item} to slot 4 of event-inventory
- if {gatya-item} is air:
- set {gatya-item} to chest named "%{gatya-name}%"
- command /gatya1:
- permission: op
- trigger:
- open chest with 1 row named "&6&lガチャ設定" to player
- set slot 0 of player's current inventory to diamond named "&e&l景品設定"
- set slot 1 of player's current inventory to writable book named "&e&lガチャの名前変更" with lore "&f現在:%{gatya-name}%"
- set slot 2 of player's current inventory to chest named "&e&lガチャアイテム変更"
- on inventory click:
- if name of player's current inventory contain "&6&lガチャ景品一覧":
- cancel event
- if name of player's current inventory contain "&6&lガチャ設定":
- cancel event
- if event-item is writable book named "&e&lガチャの名前変更" with lore "&f現在:%{gatya-name}%":
- set {.gatyanamesetting.%player%} to on
- send "&aガチャの名前をチャットに入力してください"
- close event-players's inventory
- if event-item is diamond named "&e&l景品設定":
- set {_gatya} to chest with 6 row named "&6&lガチャ景品設定"
- loop {gatya::*}:
- set slot loop-index parsed as number - 1 of {_gatya} to loop-value
- open {_gatya} to player
- if event-item is chest named "&e&lガチャアイテム変更":
- open chest with 1 row named "&6&lガチャアイテム変更" to player
- set slot 3 of player's current inventory to {gatya-item} named "&e&lガチャアイテムを変更"
- set slot 5 of player's current inventory to green stained glass pane named "&e&lガチャアイテムを入手"
- if name of player's current inventory contain "&6&lガチャアイテム変更":
- cancel event
- if event-item is {gatya-item} named "&e&lガチャアイテムを変更":
- open chest with 1 row named "&e&lガチャアイテムを変更" to player
- set slot 0 and 1,2,3,5,6,7,8 of player's current inventory to yellow stained glass pane named "&f真ん中においてね"
- set slot 4 of player's current inventory to {gatya-item}
- if event-item is green stained glass pane named "&e&lガチャアイテムを入手":
- give {gatya-item} to player
- on chat:
- if {.gatyanamesetting.%player%} is on:
- cancel event
- set {gatya-name} to the chat message
- set {.gatyanamesetting.%player%} to off
- send "&eガチャの名前を&f[%{gatya-name}%&f]&eに変更しました"
- on load:
- if {gatya-item} is not set:
- set {gatya-item} to chest named "&fガチャ"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement