ALPHADOIDE

Untitled

Jul 12th, 2021 (edited)
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.74 KB | None | 0 0
  1. on rightclick on entity:
  2. if display name of event-entity is "スキルショップ":
  3. cancel event
  4. open chest inventory with 6 row named "&a&lスキルショップ" to player
  5. loop 10 times:
  6. set slot loop-number - 1 of player's current inventory to iron bars named ""
  7. 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「経験は、何よりの宝になる」 ロック・ロバート"
  8. set slot 9 of player's current inventory to {hel1}
  9. set slot 10 of player's current inventory to {hel2}
  10. set slot 11 of player's current inventory to {hel3}
  11. set slot 12 of player's current inventory to {hel4}
  12. set slot 13 of player's current inventory to {hel5}
  13. loop {SkillNumber} times:
  14. if {skillunlock::%player%::%loop-number%} is true:
  15. set slot loop-number - 1 + 9 of player's current inventory to red wool named "&d&l開放済み"
  16.  
  17. on inventory click:
  18. name of clicked inventory is "&a&lスキルショップ"
  19. cancel event
  20. if event-item is {hel1}:
  21. SkillShop(player, 1)
  22. else if event-item is {hel2}:
  23. SkillShop(player, 2)
  24. else if event-item is {hel3}:
  25. SkillShop(player, 3)
  26. else if event-item is {hel4}:
  27. SkillShop(player, 4)
  28. else if event-item is {hel5}:
  29. SkillShop(player, 5)
  30.  
  31. function SkillShop(p :player, n :number):
  32. if {exppoint::%{_p}%} >= 5:
  33. send "&5[システム]&c&l%{SkillName%{_n}%}%を開放しました!" to {_p}
  34. remove 5 from {exppoint::%{_p}%}
  35. set {skillunlock::%{_p}%::%{_n}%} to true
  36. close {_p}'s inventory
  37. wait 10 ticks
  38. play sound "ENTITY_FIREWORK_LAUNCH" with volume 1 and pitch 1.0 to {_p}
  39. wait 20 ticks
  40. play sound "ENTITY_FIREWORK_TWINKLE" with volume 1 and pitch 1.0 to {_p}
  41. else:
  42. send "経験値が足りないようだ・・・" to {_p}
  43. play sound "BLOCK_LAVA_POP" with volume 1 and pitch 1.0 to {_p}
  44. close {_p}'s inventory
  45.  
  46.  
  47. command /setexp <int>:
  48. trigger:
  49. set {exppoint::%player%} to arg
  50.  
  51.  
  52. every 3 second:
  53. loop all players:
  54. wipe loop-player's sidebar
  55. set name of sidebar of loop-player to "&e-%loop-player% Status-"
  56. set score "&aLevel:%{level::%loop-player%}%" in sidebar of loop-player to 3
  57. set score "&bEXP:%{exp::%loop-player%}%/%{nextexp::%loop-player%}%" in sidebar of loop-player to 2
  58. set score "所持経験値:%{exppoint::%loop-player%}%point" in sidebar of loop-player to 1
  59.  
  60. command /buildshop <number>:
  61. permission: admin
  62. trigger:
  63. set {testchest%player%} to true
  64. set {BuildShopNumber} to arg
  65. open chest inventory with 6 row named "&a&l建材ショップ Page:%arg%" to player
  66. set {_num} to 0
  67. loop {BuildShop.%arg%::*}:
  68. set slot {_num} of player's current inventory to loop-value
  69. add 1 to {_num}
  70.  
  71. on rightclick on entity:
  72. if display name of event-entity is "&d建材ショップ":
  73. open chest inventory with 6 row named "&a&l建材ショップ Page:1" to player
  74. set {_num} to 0
  75. set {BuildShopPage.%player%} to 1
  76. loop {BuildShop.1::*}:
  77. set slot {_num} of player's current inventory to loop-value
  78. add 1 to {_num}
  79. set slot 53 of player's current inventory to arrow named "次のページへ"
  80.  
  81. command /openbuildshop <number>:
  82. trigger:
  83. open chest inventory with 6 row named "&a&l建材ショップ Page:%arg%" to player
  84. set {_num} to 0
  85. loop {BuildShop.%arg%::*}:
  86. set slot {_num} of player's current inventory to loop-value
  87. add 1 to {_num}
  88.  
  89. on inventory close:
  90. {testchest%player%} is true
  91. loop 54 times:
  92. set {BuildShop.%{BuildShopNumber}%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
  93. set {testchest%player%} to false
  94.  
  95. on inventory click:
  96. name of clicked inventory contains "&a&l建材ショップ"
  97. {testchest%player%} is false
  98. cancel event
  99. if {money::%player%} >= 100:
  100. remove 100 from {money::%player%}
  101. give event-item to player
  102. play sound "BLOCK_NOTE_HARP" with volume 1 and pitch 1.0 to player
  103. else:
  104. send "ペルが足りないようだ・・・" to player
  105. play sound "BLOCK_LAVA_POP" with volume 1 and pitch 1.0 to player
  106. close player's inventory
  107. if event-item is arrow named "次のページへ":
  108. close player's inventory
  109. add 1 to {BuildShopPage.%player%}
  110. open chest inventory with 6 row named "&a&l建材ショップ Page:%{BuildShopPage.%player%}%" to player
  111. set {_num} to 0
  112. loop {BuildShop.%{BuildShopPage.%player%}%::*}:
  113. set slot {_num} of player's current inventory to loop-value
  114. add 1 to {_num}
  115. set slot 53 of player's current inventory to arrow named "次のページへ"
  116. set slot 45 of player's current inventory to arrow named "前のページへ"
  117. else if event-item is arrow named "前のページへ":
  118. close player's inventory
  119. remove 1 from {BuildShopPage.%player%}
  120. open chest inventory with 6 row named "&a&l建材ショップ Page:%{BuildShopPage.%player%}%" to player
  121. set {_num} to 0
  122. loop {BuildShop.%{BuildShopPage.%player%}%::*}:
  123. set slot {_num} of player's current inventory to loop-value
  124. add 1 to {_num}
  125. set slot 53 of player's current inventory to arrow named "次のページへ"
  126. {BuildShopPage.%player%} >= 2
  127. set slot 45 of player's current inventory to arrow named "前のページへ"
  128.  
  129. command /setgatya <String> <number>:
  130. permission: admin
  131. trigger:
  132. set {Gatya::%arg-1%} to player's tool
  133. set {GatyaChance::%arg-1%} to arg-2
  134. give name tag named "&e%arg-1%のガチャチケット" with lore "&d当選確率: 1/%arg-2%" and "&a右クリックでガチャを引くことができる" to player
  135. loop {Gatya::*}:
  136. send loop-index to player
  137.  
  138. on rightclick with name tag:
  139. loop {Gatya::*}:
  140. if player have name tag named "&e%loop-index%のガチャチケット" with lore "&d当選確率: 1/%{GatyaChance::%loop-index%}%" and "&a右クリックでガチャを引くことができる":
  141. wait 2 ticks
  142. remove name tag named "&e%loop-index%のガチャチケット" with lore "&d当選確率: 1/%{GatyaChance::%loop-index%}%" and "&a右クリックでガチャを引くことができる" from the player
  143. set {_gatya} to a random integer between 1 and {GatyaChance::%loop-index%}
  144. if {_gatya} = 1:
  145. broadcast "&e&l%player%さんが、%loop-index%を当てました!"
  146. give {Gatya::%loop-index%} to player
  147. loop all players:
  148. loop 5 times:
  149. play sound "ENTITY_FIREWORK_LAUNCH" with volume 0.3 and pitch 1 to the loop-players
  150. wait 10 ticks
  151. else:
  152. play sound "BLOCK_LAVA_POP" with volume 1 and pitch 1.0 to player
  153.  
  154. command /patinko:
  155. trigger:
  156. give iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" to player
  157.  
  158. on rightclick:
  159. if block is sign:
  160. if line 1 is "&d&l10ペルパチンコ":
  161. if line 2 is "当たり:30玉":
  162. player have iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える"
  163. wait 1 tick
  164. remove iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" from player
  165. set {_10pati} to a random integer between 1 and 30
  166. if {_10pati} = 1:
  167. play sound "ENTITY_PLAYER_LEVELUP" with volume 0.5 and pitch 2 to the players
  168. give 30 iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" to player
  169. else:
  170. play sound "BLOCK_NOTE_BELL" with volume 0.5 and pitch 1 to the players
  171.  
  172. if line 2 is "当たり:10玉":
  173. player have iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える"
  174. wait 1 tick
  175. remove iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" from player
  176. set {_10pati} to a random integer between 1 and 10
  177. if {_10pati} = 1:
  178. play sound "ENTITY_PLAYER_LEVELUP" with volume 0.5 and pitch 2 to the players
  179. give 10 iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" to player
  180. else:
  181. play sound "BLOCK_NOTE_BELL" with volume 0.5 and pitch 1 to the players
  182.  
  183. else if line 2 is "当たり:5玉":
  184. player have iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える"
  185. wait 1 tick
  186. remove iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" from player
  187. set {_10pati} to a random integer between 1 and 5
  188. if {_10pati} = 1:
  189. play sound "ENTITY_PLAYER_LEVELUP" with volume 0.5 and pitch 2 to the players
  190. give 5 iron nugget named "&b&l10ペルパチンコ玉" with lore "&a10ペルと同じ価値を持つ玉" and "&a10ペルパチンコ台で使える" to player
  191. else:
  192. play sound "BLOCK_NOTE_BELL" with volume 0.5 and pitch 1 to the players
  193.  
  194.  
  195.  
  196. on sign change:
  197. if line 1 is "10ペルパチンコ5":
  198. set line 1 to "&d&l10ペルパチンコ"
  199. set line 2 to "当たり:5玉"
  200. set line 3 to "&a確率:高"
  201. if line 1 is "10ペルパチンコ10":
  202. set line 1 to "&d&l10ペルパチンコ"
  203. set line 2 to "当たり:10玉"
  204. set line 3 to "&a確率:中"
  205. if line 1 is "10ペルパチンコ30":
  206. set line 1 to "&d&l10ペルパチンコ"
  207. set line 2 to "当たり:30玉"
  208. set line 3 to "&a確率:低"
Add Comment
Please, Sign In to add comment