Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on rightclick on entity:
- if display name of event-entity is "スキルショップ":
- cancel event
- open chest inventory with 6 row named "&a&lスキルショップ" to player
- loop 10 times:
- set slot loop-number - 1 of player's current inventory to iron bars named ""
- set slot 4 of player's current inventory to magma cream named "&e&lスキルショップ" with lore "&a&lレベルアップなどで入手できる経験値を消費して" and "&a&lスキルを購入することができる。" and "&a&l使用するスキルの選択は、メニューから行ってね" and "&c&lなおスキルの購入には5経験値pointが必要です" and "&5「経験は、何よりの宝になる」 ロック・ロバート"
- set slot 9 of player's current inventory to {hel1}
- set slot 10 of player's current inventory to {hel2}
- set slot 11 of player's current inventory to {hel3}
- set slot 12 of player's current inventory to {hel4}
- set slot 13 of player's current inventory to {hel5}
- loop {SkillNumber} times:
- if {skillunlock::%player%::%loop-number%} is true:
- set slot loop-number - 1 + 9 of player's current inventory to red wool named "&d&l開放済み"
- on inventory click:
- name of clicked inventory is "&a&lスキルショップ"
- cancel event
- if event-item is {hel1}:
- SkillShop(player, 1)
- else if event-item is {hel2}:
- SkillShop(player, 2)
- else if event-item is {hel3}:
- SkillShop(player, 3)
- else if event-item is {hel4}:
- SkillShop(player, 4)
- else if event-item is {hel5}:
- SkillShop(player, 5)
- function SkillShop(p :player, n :number):
- if {exppoint::%{_p}%} >= 5:
- send "&5[システム]&c&l%{SkillName%{_n}%}%を開放しました!" to {_p}
- remove 5 from {exppoint::%{_p}%}
- set {skillunlock::%{_p}%::%{_n}%} to true
- close {_p}'s inventory
- wait 10 ticks
- play sound "ENTITY_FIREWORK_LAUNCH" with volume 1 and pitch 1.0 to {_p}
- wait 20 ticks
- play sound "ENTITY_FIREWORK_TWINKLE" with volume 1 and pitch 1.0 to {_p}
- else:
- send "経験値が足りないようだ・・・" to {_p}
- play sound "BLOCK_LAVA_POP" with volume 1 and pitch 1.0 to {_p}
- close {_p}'s inventory
- command /setexp <int>:
- trigger:
- set {exppoint::%player%} to arg
- every 3 second:
- loop all players:
- wipe loop-player's sidebar
- set name of sidebar of loop-player to "&e-%loop-player% Status-"
- set score "&aLevel:%{level::%loop-player%}%" in sidebar of loop-player to 3
- set score "&bEXP:%{exp::%loop-player%}%/%{nextexp::%loop-player%}%" in sidebar of loop-player to 2
- set score "所持経験値:%{exppoint::%loop-player%}%point" in sidebar of loop-player to 1
- command /buildshop <number>:
- permission: admin
- trigger:
- set {testchest%player%} to true
- set {BuildShopNumber} to arg
- open chest inventory with 6 row named "&a&l建材ショップ Page:%arg%" to player
- set {_num} to 0
- loop {BuildShop.%arg%::*}:
- set slot {_num} of player's current inventory to loop-value
- add 1 to {_num}
- on rightclick on entity:
- if display name of event-entity is "&d建材ショップ":
- open chest inventory with 6 row named "&a&l建材ショップ Page:1" to player
- set {_num} to 0
- set {BuildShopPage.%player%} to 1
- loop {BuildShop.1::*}:
- set slot {_num} of player's current inventory to loop-value
- add 1 to {_num}
- set slot 53 of player's current inventory to arrow named "次のページへ"
- command /openbuildshop <number>:
- trigger:
- open chest inventory with 6 row named "&a&l建材ショップ Page:%arg%" to player
- set {_num} to 0
- loop {BuildShop.%arg%::*}:
- set slot {_num} of player's current inventory to loop-value
- add 1 to {_num}
- on inventory close:
- {testchest%player%} is true
- loop 54 times:
- set {BuildShop.%{BuildShopNumber}%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
- set {testchest%player%} to false
- on inventory click:
- name of clicked inventory contains "&a&l建材ショップ"
- {testchest%player%} is false
- cancel event
- if {money::%player%} >= 100:
- remove 100 from {money::%player%}
- give event-item to player
- play sound "BLOCK_NOTE_HARP" with volume 1 and pitch 1.0 to player
- else:
- send "ペルが足りないようだ・・・" to player
- play sound "BLOCK_LAVA_POP" with volume 1 and pitch 1.0 to player
- close player's inventory
- if event-item is arrow named "次のページへ":
- close player's inventory
- add 1 to {BuildShopPage.%player%}
- open chest inventory with 6 row named "&a&l建材ショップ Page:%{BuildShopPage.%player%}%" to player
- set {_num} to 0
- loop {BuildShop.%{BuildShopPage.%player%}%::*}:
- set slot {_num} of player's current inventory to loop-value
- add 1 to {_num}
- set slot 53 of player's current inventory to arrow named "次のページへ"
- set slot 45 of player's current inventory to arrow named "前のページへ"
- else if event-item is arrow named "前のページへ":
- close player's inventory
- remove 1 from {BuildShopPage.%player%}
- open chest inventory with 6 row named "&a&l建材ショップ Page:%{BuildShopPage.%player%}%" to player
- set {_num} to 0
- loop {BuildShop.%{BuildShopPage.%player%}%::*}:
- set slot {_num} of player's current inventory to loop-value
- add 1 to {_num}
- set slot 53 of player's current inventory to arrow named "次のページへ"
- {BuildShopPage.%player%} >= 2
- set slot 45 of player's current inventory to arrow named "前のページへ"
- command /setgatya <String> <number>:
- permission: admin
- trigger:
- set {Gatya::%arg-1%} to player's tool
- set {GatyaChance::%arg-1%} to arg-2
- give name tag named "&e%arg-1%のガチャチケット" with lore "&d当選確率: 1/%arg-2%" and "&a右クリックでガチャを引くことができる" to player
- loop {Gatya::*}:
- send loop-index to player
- on rightclick with name tag:
- loop {Gatya::*}:
- if player have name tag named "&e%loop-index%のガチャチケット" with lore "&d当選確率: 1/%{GatyaChance::%loop-index%}%" and "&a右クリックでガチャを引くことができる":
- wait 2 ticks
- remove name tag named "&e%loop-index%のガチャチケット" with lore "&d当選確率: 1/%{GatyaChance::%loop-index%}%" and "&a右クリックでガチャを引くことができる" from the player
- set {_gatya} to a random integer between 1 and {GatyaChance::%loop-index%}
- if {_gatya} = 1:
- broadcast "&e&l%player%さんが、%loop-index%を当てました!"
- give {Gatya::%loop-index%} to player
- loop all players:
- loop 5 times:
- play sound "ENTITY_FIREWORK_LAUNCH" with volume 0.3 and pitch 1 to the loop-players
- wait 10 ticks
- else:
- play sound "BLOCK_LAVA_POP" with volume 1 and pitch 1.0 to player
- command /patinko:
- trigger:
- give iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" to player
- on rightclick:
- if block is sign:
- if line 1 is "&d&l10ペルパチンコ":
- if line 2 is "当たり:30玉":
- player have iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える"
- wait 1 tick
- remove iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" from player
- set {_10pati} to a random integer between 1 and 30
- if {_10pati} = 1:
- play sound "ENTITY_PLAYER_LEVELUP" with volume 0.5 and pitch 2 to the players
- give 30 iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" to player
- else:
- play sound "BLOCK_NOTE_BELL" with volume 0.5 and pitch 1 to the players
- if line 2 is "当たり:10玉":
- player have iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える"
- wait 1 tick
- remove iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" from player
- set {_10pati} to a random integer between 1 and 10
- if {_10pati} = 1:
- play sound "ENTITY_PLAYER_LEVELUP" with volume 0.5 and pitch 2 to the players
- give 10 iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" to player
- else:
- play sound "BLOCK_NOTE_BELL" with volume 0.5 and pitch 1 to the players
- else if line 2 is "当たり:5玉":
- player have iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える"
- wait 1 tick
- remove iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" from player
- set {_10pati} to a random integer between 1 and 5
- if {_10pati} = 1:
- play sound "ENTITY_PLAYER_LEVELUP" with volume 0.5 and pitch 2 to the players
- give 5 iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" to player
- else:
- play sound "BLOCK_NOTE_BELL" with volume 0.5 and pitch 1 to the players
- on sign change:
- if line 1 is "10ペルパチンコ5":
- set line 1 to "&d&l10ペルパチンコ"
- set line 2 to "当たり:5玉"
- set line 3 to "&a確率:高"
- if line 1 is "10ペルパチンコ10":
- set line 1 to "&d&l10ペルパチンコ"
- set line 2 to "当たり:10玉"
- set line 3 to "&a確率:中"
- if line 1 is "10ペルパチンコ30":
- set line 1 to "&d&l10ペルパチンコ"
- set line 2 to "当たり:30玉"
- set line 3 to "&a確率:低"
Add Comment
Please, Sign In to add comment