UDON_JP

Untitled

Apr 28th, 2020
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.71 KB | None | 0 0
  1. command /slot [<text>] [<text>] [<number>]:
  2. permission: skript.admin
  3. trigger:
  4. if arg-1 is not set:
  5. message "&c/slot new <名前> - 新しいスロットマシン"
  6. message "&c/slot set <名前> <1,2,3> - 回る部分を設定"
  7. if arg-1 is set:
  8. if arg-1 is "new":
  9. if arg-2 is not set:
  10. message "&c/slot new <名前> - 新しいスロットマシン"
  11. else:
  12. if {slot::%arg-2%} is true:
  13. message "&cすでにそのスロットは存在します。"
  14. else:
  15. message "&a%arg-2%を作成しました。"
  16. message "&a次に、スロットの画面を設定します。"
  17. message "&a/slot set %arg-2% <1,2,3> - 3個設定してください。"
  18. set {slot::%arg-2%} to true
  19. else if arg-1 is "set":
  20. if arg-2 is not set:
  21. message "&c/slot set <名前> <1,2,3> - 回る部分を設定"
  22. else:
  23. if arg-3 is not 1 or 2 or 3:
  24. message "&c/slot set <名前> <1,2,3> - 回る部分を設定"
  25. else:
  26. if {slot::%arg-2%} is true:
  27. if arg-3 is 1:
  28. if {slot.set::%uuid of player%} is true:
  29. message "&c使用できませんでした。"
  30. stop
  31. else:
  32. message "&a1つ目のブロックをカーソルに合わせてクリックしてください。"
  33. message "&aキャンセルする場合は/slot setcancel と打ってください。"
  34. set {slot.set.1::%uuid of player%} to true
  35. set {slot.set::%uuid of player%} to true
  36. set {slot.set.g::%uuid of player%} to arg-2
  37. stop
  38. if arg-3 is 2:
  39. if {slot.set::%uuid of player%} is true:
  40. message "&c使用できませんでした。"
  41. stop
  42. else:
  43. message "&a2つ目のブロックをカーソルに合わせてクリックしてください。"
  44. message "&aキャンセルする場合は/slot setcancel と打ってください。"
  45. set {slot.set.2::%uuid of player%} to true
  46. set {slot.set::%uuid of player%} to true
  47. stop
  48. if arg-3 is 3:
  49. if {slot.set::%uuid of player%} is true:
  50. message "&c使用できませんでした。"
  51. stop
  52. else:
  53. message "&a3つ目のブロックをカーソルに合わせてクリックしてください。"
  54. message "&aキャンセルする場合は/slot setcancel と打ってください。"
  55. set {slot.set.3::%uuid of player%} to true
  56. set {slot.set::%uuid of player%} to true
  57. stop
  58. else:
  59. message "&cそのスロットはありません。"
  60. else if arg-1 is "setcancel":
  61. if {slot.set::%uuid of player%} is true:
  62. message "&aキャンセルしました。"
  63. set {slot.set.1::%uuid of player%} to false
  64. set {slot.set.2::%uuid of player%} to false
  65. set {slot.set.3::%uuid of player%} to false
  66. set {slot.set::%uuid of player%} to false
  67. stop
  68. else:
  69. message "&c使用できませんでした。"
  70.  
  71. on right click:
  72. if {slot.set::%uuid of player%} is true:
  73. if target block is not air:
  74. if {slot.set.1::%uuid of player%} is true:
  75. set {slot.%{slot.set.g::%uuid of player%}%.1} to location of target block
  76. message "&a%{slot.set.g::%uuid of player%}%の1つ目のスロットを設定"
  77. set {slot.set.1::%uuid of player%} to false
  78. set {slot.set::%uuid of player%} to false
  79. if {slot.set.2::%uuid of player%} is true:
  80. set {slot.%{slot.set.g::%uuid of player%}%.2} to location of target block
  81. message "&a%{slot.set.g::%uuid of player%}%の2つ目のスロットを設定"
  82. set {slot.set.2::%uuid of player%} to false
  83. set {slot.set::%uuid of player%} to false
  84. if {slot.set.3::%uuid of player%} is true:
  85. set {slot.%{slot.set.g::%uuid of player%}%.3} to location of target block
  86. message "&a%{slot.set.g::%uuid of player%}%の2つ目のスロットを設定"
  87. set {slot.set.3::%uuid of player%} to false
  88. set {slot.set::%uuid of player%} to false
  89.  
  90. on sign change:
  91. if line 1 is "Slot":
  92. if line 2 is set:
  93. if line 3 is set:
  94. if line 4 is set:
  95. if {slot::%line 2%} is true:
  96. message "&a%line 2%を作成しました。"
  97. message "&a金額: %line 3%"
  98. message "&a当たり金額: %line 4%"
  99. set {slot.t::%location%} to true
  100. set {slot.name::%location%} to line 2
  101. set {slot.money::%location%} to line 3 parsed as number
  102. set {slot.win:%location%} to line 4 parsed as number
  103. set line 1 to "&4&lスロットマシン"
  104. set line 2 to "&0&l%line 2%"
  105. set line 3 to "&a&l金額: &0%line 3%"
  106. set line 4 to "&a&l当たり金額: &0%line 4%"
  107. else:
  108. message "&cそのスロットはありません。"
  109. else:
  110. message "&c4行目に当たり金額を書いてください。"
  111. else:
  112. message "&c3行目に金額を書いてください。"
  113. else:
  114. message "&c2行目にスロット名を書いてください。"
  115.  
  116. on right click:
  117. if {slot.t::%location of target block%} is true:
  118. if player's money is greater than or equal to {slot.money::%location of target block%}:
  119. if {slot.can::%uuid of player%} is true:
  120. remove {slot.money::%location of target block%} from player's money
  121. set {slot.can::%uuid of player%}
  122. message "&aスロットを引いています〜"
  123. wait 1 second
  124. chance of 33%:
  125. set {_a} to "1"
  126. set block at {slot.%{slot.name::%location of target block%}%.1} to 35:4
  127. else:
  128. chance of 50%:
  129. set {_a} to "2"
  130. set block at {slot.%{slot.name::%location of target block%}%.1} to 35:5
  131. else:
  132. set {_a} to "3"
  133. set block at {slot.%{slot.name::%location of target block%}%.1} to 35:6
  134. wait 1 second
  135. chance of 33%:
  136. set {_b} to "1"
  137. set block at {slot.%{slot.name::%location of target block%}%.2} to 35:4
  138. else:
  139. chance of 50%:
  140. set {_b} to "2"
  141. set block at {slot.%{slot.name::%location of target block%}%.2} to 35:5
  142. else:
  143. set {_b} to "3"
  144. set block at {slot.%{slot.name::%location of target block%}%.2} to 35:6
  145. wait 1 second
  146. chance of 33%:
  147. set {_c} to "1"
  148. set block at {slot.%{slot.name::%location of target block%}%.3} to 35:4
  149. else:
  150. chance of 50%:
  151. set {_c} to "2"
  152. set block at {slot.%{slot.name::%location of target block%}%.3} to 35:5
  153. else:
  154. set {_c} to "3"
  155. set block at {slot.%{slot.name::%location of target block%}%.3} to 35:6
  156. if {_a} is {_b}:
  157. if {_b} is {_c}:
  158. message "&a当たりました!賞金: &e%{slot.win::%location of target block%}%"
  159. add {slot.win::%location of target block%} to player's money
  160. set {slot.can::%uuid of player%} to true
  161. else:
  162. message "&c時間をあけてください。"
  163. else:
  164. message "&c所持金が足りません。"
Add Comment
Please, Sign In to add comment