Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #------------------#
- # ガチャポンスクリプト #
- #------------------#
- options:
- gatya.prefix: &6&l[&2&lガチャポン&6&l]&f
- gatya.name.1: ガチャ1の名前
- gatya.lore.1: ガチャ1の説明文
- gatya.cost.1: stone #アイテムのIDを入れる ※有料ガチャのコスト
- #-------------------------------------------------------------------------------------#
- command /gatya give <player> <text> <text> <number>:
- permission: gatya.admin
- trigger:
- if arg 2 is "weapon":
- if arg 3 is "free":
- give arg 4 of name tag named "&e{@gatya.name.1}&a[無料]" with lore "{@gatya.lore.1}" to arg 1
- send "{@gatya.prefix} : &b%player%&fが&b%arg 1%&fに『&e{@gatya.name.1}&a[無料]&f』をあげました!" to player and arg 1
- else if arg 3 is "charge":
- give arg 4 of name tag named "&e{@gatya.name.1}&c[有料]" with lore "{@gatya.lore.1}" to arg 1
- send "{@gatya.prefix} : &b%player%&fが&b%arg 1%&fに『&e{@gatya.name.1}&c[有料]&f』をあげました!" to player and arg 1
- on rightclick:
- held item is name tag
- if name of item is "&e{@gatya.name.1}&a[無料]":
- if lore of item is "{@gatya.lore.1}":
- remove 1 of held item from player
- set {_gatya} to random integer between 1 and 14
- if {_gatya} is between 1 and 5:
- give 1 of wooden sword to player
- play "ENTITY_PLAYER_LEVELUP" to player at volume 1
- send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
- else if {_gatya} is between 5 and 8:
- give 1 of stone sword to player
- play "ENTITY_PLAYER_LEVELUP" to player at volume 1
- send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
- else if {_gatya} is between 9 and 11:
- give 1 of iron sword to player
- play "ENTITY_PLAYER_LEVELUP" to player at volume 1
- send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
- else if {_gatya} is between 12 and 13:
- give 1 of golden sword to player
- play "ENTITY_PLAYER_LEVELUP" to player at volume 1
- send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
- else if {_gatya} is 14:
- give 1 of diamond sword to player
- play "ENTITY_PLAYER_LEVELUP" to player at volume 1
- send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
- else if name of item is "&e{@gatya.name.1}&c[有料]":
- if lore of item is "{@gatya.lore.1}":
- if player has 1 of {@gatya.cost.1}:
- remove 1 of held item from player
- remove 1 of {@gatya.cost.1} from player's inventory
- set {_gatya} to random integer between 1 and 14
- if {_gatya} is between 1 and 5:
- give 1 of wooden sword to player
- play "ENTITY_PAYER_LEVELUP" to player at volume 1
- send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
- else if {_gatya} is between 5 and 8:
- give 1 of stone sword to player
- play "ENTITY_PLAYER_LEVELUP" to player at volume 1
- send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
- else if {_gatya} is between 9 and 11:
- give 1 of iron sword to player
- play "ENTITY_PLAYER_LEVELUP" to player at volume 1
- send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
- else if {_gatya} is between 12 and 13:
- give 1 of golden sword to player
- play "ENTITY_PLAYER_LEVELUP" to player at volume 1
- send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
- else if {_gatya} is 14:
- give 1 of diamond sword to player
- play "ENTITY_PLAYER_LEVELUP" to player at volume 1
- send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
- else:
- send "{@gatya.prefix} : &c必要コストを持っていません・・・" to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement