Advertisement
ALPHADOIDE

skript2

Jul 21st, 2021 (edited)
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.64 KB | None | 0 0
  1. on load:
  2. #草 1.草 2.土
  3. set {slotmachine.grass.1} to green wool
  4. set {slotmachine.grass.2} to dirt
  5. set {slotmachine.grass.name.1} to "草"
  6. set {slotmachine.grass.name.2} to "土"
  7. set {slotmachine.grass.reward.1} to 30
  8. set {slotmachine.grass.reward.2} to 50
  9. set {slotmachine.grass.price} to 10
  10.  
  11. #鉱石 1.石炭 2.鉄 3.金
  12. set {slotmachine.ore.1} to coal ore
  13. set {slotmachine.ore.2} to iron ore
  14. set {slotmachine.ore.3} to gold ore
  15. set {slotmachine.ore.name.1} to "石炭"
  16. set {slotmachine.ore.name.2} to "鉄"
  17. set {slotmachine.ore.name.3} to "金"
  18. set {slotmachine.ore.reward.1} to 600
  19. set {slotmachine.ore.reward.2} to 800
  20. set {slotmachine.ore.reward.3} to 1000
  21. set {slotmachine.ore.price} to 100
  22.  
  23. #鉱石 1エメラルド 2.金 3.レッド 4.ラピス 5.ダイヤ
  24. set {slotmachine.gatya.1} to diamond block
  25. set {slotmachine.gatya.2} to gold block
  26. set {slotmachine.gatya.3} to redstone block
  27. set {slotmachine.gatya.4} to emerald block
  28. set {slotmachine.gatya.5} to lapis block
  29. set {slotmachine.gatya.6} to iron block
  30. set {slotmachine.gatya.7} to coal block
  31. set {slotmachine.ore.price} to 100
  32. if {legend.slot.jackpot} is not set:
  33. set {legend.slot.jackpot} to 1000
  34.  
  35. on join:
  36. if {cooltime.%player%} is set:
  37. clear {cooltime.%player%}
  38. on rightclick:
  39. if event-block is diamond block:
  40. if {money::%player%} >= 100:
  41. {cooltime.%player%} is not set
  42. set {cooltime.%player%} to true
  43. remove 100 from {money::%player%}
  44. add 10 to {legend.slot.jackpot}
  45. set {_slotblocknum} to 7
  46. block under the event-block is bedrock
  47. set {_x.cord} to the event-block's x-coordinate
  48. set {_y.cord} to the event-block's y-coordinate
  49. set {_z.cord} to the event-block's z-coordinate
  50. set {_block1} to location at {_x.cord}+10, {_y.cord}+2, {_z.cord}-7
  51. set {_block1.1} to location at {_x.cord}+10, {_y.cord}, {_z.cord}-5
  52. set {_block2} to location at {_x.cord}+10, {_y.cord}+2, {_z.cord}-3
  53. set {_block2.1} to location at {_x.cord}+10, {_y.cord}, {_z.cord}-1
  54. set {_block3} to location at {_x.cord}+10, {_y.cord}+2, {_z.cord}+1
  55. set {_block3.1} to location at {_x.cord}+10, {_y.cord}, {_z.cord}+3
  56. set {_block4} to location at {_x.cord}+10, {_y.cord}+2, {_z.cord}+5
  57. set {_block4.1} to location at {_x.cord}+10, {_y.cord}, {_z.cord}+7
  58. set {_slot.num1} to a random integer between 1 and {_slotblocknum}
  59. set {_slot.num2} to a random integer between 1 and {_slotblocknum}
  60. set {_slot.num3} to a random integer between 1 and {_slotblocknum}
  61. set {_slot.num4} to a random integer between 1 and {_slotblocknum}
  62. set {_num} to 0
  63. set {_num1} to 0
  64. set {_num2} to 0
  65. set {_num3} to 0
  66. loop 4 times:
  67. add 1 to {_num3}
  68. loop blocks within {_block%{_num3}%} and {_block%{_num3}%.1}:
  69. set block at loop-block to black wool
  70. loop 4 times:
  71. add 1 to {_num}
  72. loop blocks within {_block%{_num}%} and {_block%{_num}%.1}:
  73. set block at loop-block to {slotmachine.gatya.%{_slot.num%{_num}%}%}
  74. add 1 to {_num2}
  75. if {_num2} is 9 or 18 or 27 or 36:
  76. play sound "block.wood.break" with volume 2 and pitch 1 at player
  77. wait 3 ticks
  78.  
  79. loop 4 times:
  80. add 1 to {_num1}
  81. if {_slot.num1} != {_slot.num%{_num1}%}:
  82. clear {cooltime.%player%}
  83. play sound "block.glass.break" with volume 1.5 and pitch 2 at player
  84. wait 5 tick
  85. stop
  86. loop all players:
  87. play sound "ui.toast.challenge_complete" with volume 0.8 and pitch 1 to the loop-player
  88. broadcast "&c[Slot]&d%player%さん&eが&bレジェンドスロット&eを当てました!&aレジェンドチケット&eと&dジャックポット%{legend.slot.jackpot}%ペル&eをゲットです!"
  89. add {legend.slot.jackpot} to {money::%player%}
  90. set {legend.slot.jackpot} to 1000
  91. give paper named "&d&lレジェンドチケット" with lore "&eスロット限定武器等に交換できる" and "&eとても貴重なチケット" to player
  92. wait 8 seconds
  93. clear {cooltime.%player%}
  94. else:
  95. play sound "block.lava.pop" with volume 0.8 and pitch 1 at player
  96.  
  97. command /getslotticket:
  98. permission: admin
  99. trigger:
  100. give paper named "&d&lレジェンドチケット" with lore "&eスロット限定武器等に交換できる" and "&eとても貴重なチケット" to player
  101.  
  102. on rightclick:
  103. if event-block is grass:
  104. set {_slottype} to "grass"
  105. set {_slotblocknum} to 2
  106. else if event-block is gold block:
  107. set {_slottype} to "ore"
  108. set {_slotblocknum} to 3
  109. else:
  110. stop
  111. block under the event-block is bedrock
  112. if {money::%player%} >= {slotmachine.%{_slottype}%.price}:
  113. {cooltime.%player%} is not set
  114. set {cooltime.%player%} to true
  115. remove {slotmachine.%{_slottype}%.price} from {money::%player%}
  116. set {_x.cord} to the event-block's x-coordinate
  117. set {_y.cord} to the event-block's y-coordinate
  118. set {_z.cord} to the event-block's z-coordinate
  119. set {_block1} to location at {_x.cord}+1, {_y.cord}+1, {_z.cord}-2
  120. set {_block2} to location at {_x.cord}+1, {_y.cord}+1, {_z.cord}
  121. set {_block3} to location at {_x.cord}+1, {_y.cord}+1, {_z.cord}+2
  122. set {_slot.num1} to a random integer between 1 and {_slotblocknum}
  123. set {_slot.num2} to a random integer between 1 and {_slotblocknum}
  124. set {_slot.num3} to a random integer between 1 and {_slotblocknum}
  125. set {_slotloop} to 0
  126. loop 3 time:
  127. add 1 to {_slotloop}
  128. set block at {_block%{_slotloop}%} to black wool
  129. set {_slotloop} to 0
  130. loop 3 time:
  131. add 1 to {_slotloop}
  132. wait 7 ticks
  133. play 10 CLOUD with offset of 0.15, 0.15, 0.15 and speed 0 at {_block%{_slotloop}%}'s location
  134. play sound "entity.blaze.hurt" with volume 0.8 and pitch 1 at player
  135. set block at {_block%{_slotloop}%} to {slotmachine.%{_slottype}%.%{_slot.num%{_slotloop}%}%}
  136. clear {cooltime.%player%}
  137. set {_num} to 0
  138. loop 3 times:
  139. add 1 to {_num}
  140. if {_slot.num1} != {_slot.num%{_num}%}:
  141. stop
  142. send "&b[Slot]&e当たり!&d(%{slotmachine.%{_slottype}%.name.%{_slot.num1}%}%:&c%{slotmachine.%{_slottype}%.reward.%{_slot.num1}%}%ペル&d)"
  143. add {slotmachine.%{_slottype}%.reward.%{_slot.num1}%} to {money::%player%}
  144. play sound "entity.experience_orb.pickup" with volume 0.8 and pitch 1 at player
  145. else:
  146. play sound "block.lava.pop" with volume 0.8 and pitch 1 at player
  147.  
  148. every 120 seconds:
  149. set {_kabu} to a random integer between 1 and 13
  150. if {_kabu} >= 6:
  151. loop all players:
  152. play sound "entity.player.levelup" with volume 0.8 and pitch 0.1 to the loop-players
  153. else:
  154. loop all players:
  155. play sound "entity.player.levelup" with volume 0.8 and pitch 0.5 to the loop-players
  156. if {_kabu} = 1:
  157. kabuka(100,false)
  158. if {_kabu} = 2:
  159. kabuka(80,false)
  160. if {_kabu} = 3:
  161. kabuka(50,false)
  162. if {_kabu} = 4:
  163. kabuka(5,false)
  164. if {_kabu} = 5:
  165. kabuka(2,false)
  166. if {_kabu} = 6:
  167. kabuka(-100,false)
  168. if {_kabu} = 7:
  169. kabuka(-100,false)
  170. if {_kabu} = 8:
  171. kabuka(-80,false)
  172. if {_kabu} = 9:
  173. kabuka(-50,false)
  174. if {_kabu} = 10:
  175. kabuka(-50,false)
  176. if {_kabu} = 11:
  177. kabuka(-5,false)
  178. if {_kabu} = 12:
  179. kabuka(-2,false)
  180. if {_kabu} = 13:
  181. kabuka(0,true)
  182.  
  183. function kabuka(n:number, b:boolean):
  184. if {_b} is true:
  185. broadcast "&d[株]&e倒産しました...全員の株が没収されます"
  186. loop {kabu::*}:
  187. set {kabu::%loop-index%} to 0
  188. set {kabuka} to 100
  189. stop
  190. if {_n} >= 0:
  191. broadcast "&d[株]&e株価が%{_n}%ペル上昇しました!&c(%{kabuka}%→%{kabuka} + {_n}%)"
  192. else:
  193. broadcast "&b[株]&e株価が%{_n}%ペル下落しました・・・&c(%{kabuka}%→%{kabuka} + {_n}%)"
  194. set {kabuka} to {kabuka} + {_n}
  195. set {kabu} to {_n}
  196. if {kabuka} <= 10:
  197. broadcast "&d[株]&e倒産しました...全員の株が没収されます"
  198. loop {kabu::*}:
  199. set {kabu::%loop-index%} to 0
  200. set {kabuka} to 100
  201.  
  202. on sign change:
  203. if line 1 is "kabu kau1":
  204. set line 1 to "&d==============="
  205. set line 2 to "&c&l株を一株買う"
  206. set line 3 to "&d==============="
  207. if line 1 is "kabu kau10":
  208. set line 1 to "&d==============="
  209. set line 2 to "&c&l株を十株買う"
  210. set line 3 to "&d==============="
  211. if line 1 is "kabu uru1":
  212. set line 1 to "&d==============="
  213. set line 2 to "&b&l株を一株売る"
  214. set line 3 to "&d==============="
  215. if line 1 is "kabu uru10":
  216. set line 1 to "&d==============="
  217. set line 2 to "&b&l株を十株売る"
  218. set line 3 to "&d==============="
  219.  
  220. on rightclick:
  221. if block is sign:
  222. if line 2 is "&c&l株を一株買う":
  223. {money::%player%} >= {kabuka}
  224. add 1 to {kabu::%player%}
  225. remove {kabuka} from {money::%player%}
  226. play sound "block.note.chime" with volume 0.8 and pitch 1 to the player
  227. else if line 2 is "&c&l株を十株買う":
  228. {money::%player%} >= {kabuka} * 10
  229. add 10 to {kabu::%player%}
  230. remove {kabuka} * 10 from {money::%player%}
  231. play sound "block.note.chime" with volume 0.8 and pitch 1 to the player
  232. else if line 2 is "&b&l株を一株売る":
  233. {kabu::%player%} >= 1
  234. remove 1 from {kabu::%player%}
  235. add {kabuka} to {money::%player%}
  236. play sound "block.note.guitar" with volume 0.8 and pitch 1 to the player
  237. else if line 2 is "&b&l株を十株売る":
  238. {kabu::%player%} >= 10
  239. remove 10 from {kabu::%player%}
  240. add {kabuka} * 10 to {money::%player%}
  241. play sound "block.note.guitar" with volume 0.8 and pitch 1 to the player
  242.  
  243. every 5 seconds:
  244. delete holo object "LegendSlot"
  245. create holo object "ItemStack:Diamond Block;&dレジェンドガチャ;&b料金:一回100ペル;&e現在のジャックポット:%{legend.slot.jackpot}%ペル;&cスロット限定武器の入手に必要な;&cレジェンドチケットを入手できる" with id "LegendSlot" at {LegendSlot.loc}
  246.  
  247. command /legendloc:
  248. permission: admin
  249. trigger:
  250. set {LegendSlot.loc} to player's location
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement