UDON_JP

Dominion

Dec 5th, 2020 (edited)
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.75 KB | None | 0 0
  1. on load:
  2. delete {ookoku.card::*}
  3. add "職人" to {ookoku.card::*}
  4. add "山賊" to {ookoku.card::*}
  5. add "役人" to {ookoku.card::*}
  6. add "地下貯蔵庫" to {ookoku.card::*}
  7. add "礼拝堂" to {ookoku.card::*}
  8. add "議事堂" to {ookoku.card::*}
  9. add "祝祭" to {ookoku.card::*}
  10. add "庭園" to {ookoku.card::*}
  11. add "前駆者" to {ookoku.card::*}
  12. add "研究所" to {ookoku.card::*}
  13. add "書庫" to {ookoku.card::*}
  14. add "市場" to {ookoku.card::*}
  15. add "商人" to {ookoku.card::*}
  16. add "民兵" to {ookoku.card::*}
  17. add "鉱山" to {ookoku.card::*}
  18. add "堀" to {ookoku.card::*}
  19. add "金貸し" to {ookoku.card::*}
  20. add "密猟者" to {ookoku.card::*}
  21. add "改築" to {ookoku.card::*}
  22. add "衛兵" to {ookoku.card::*}
  23. add "鍛冶屋" to {ookoku.card::*}
  24. add "王座の間" to {ookoku.card::*}
  25. add "家臣" to {ookoku.card::*}
  26. add "村" to {ookoku.card::*}
  27. add "魔女" to {ookoku.card::*}
  28. add "工房" to {ookoku.card::*}
  29.  
  30. command /newgame <number> <number>:
  31. usage: /newgame <最小人数> <最大人数>
  32. aliases: /ng
  33. trigger:
  34. if arg-1 > 1:
  35. if arg-2 < 5:
  36. if {game.%player%} is true:
  37. send "&c既にほかの部屋を作成しています。"
  38. else:
  39. command "/execute %player% ~ ~ ~ /playsound block.anvil.use master %player%"
  40. set {game.%player%} to true
  41. add player to {game::*}
  42. send "&a部屋を作成しました。"
  43. add player to {player.%player%::*}
  44. set {minplayer.%player%} to arg-1
  45. set {maxplayer.%player%} to arg-2
  46. else:
  47. send "&c最大人数は4以下である必要があります。"
  48. else:
  49. send "&c最小人数は2以上である必要があります。"
  50.  
  51. command /leave:
  52. trigger:
  53. if {game::*} contains player:
  54. loop {player.%player%::*}:
  55. command "/execute %player% ~ ~ ~ /playsound block.iron_trapdoor.close master %player%"
  56. delete {game.%loop-value%}
  57. send "&cルームマスターが部屋を解散しました。" to loop-value
  58. remove player from {game::*}
  59. delete {player.%player%::*}
  60. send "&c部屋を削除しました。"
  61. else:
  62. if {game.%player%} is true:
  63. loop {game::*}:
  64. if {player.%loop-value%::*} contains player:
  65. remove player from {player.%loop-value%::*}
  66. send "&c部屋から退出しました。"
  67. command /room:
  68. trigger:
  69. command "/execute %player% ~ ~ ~ /playsound ui.button.click master %player%"
  70. open chest with 6 rows named "&6&l部屋を探す" to player
  71. set slot 48 of player's current inventory to glowstone dust named "&e&lレート" with lore "&7&l%{rate.%player's uuid%}%"
  72. if {game.%player%} is true:
  73. set slot 49 of player's current inventory to chest named "&6&lあなたの部屋" with lore "&7&l%number of {player.%player%::*}% / %{maxplayer.%player%}%"
  74. else:
  75. set slot 49 of player's current inventory to chest named "&6&lあなたの部屋" with lore "&c&lまだ部屋を立てていません。"
  76. set {slotnum} to 0
  77. loop {game::*}:
  78. if {minplayer.%loop-value%} > number of {player.%loop-value%::*}:
  79. set slot {slotnum} of player's current inventory to white shulker box named "&8&l%loop-value%" with lore "&7&l%number of {player.%loop-value%::*}% / %{maxplayer.%loop-value%}%" and "&f&l部屋が空いています。"
  80. if {minplayer.%loop-value%} <= number of {player.%loop-value%::*}:
  81. set slot {slotnum} of player's current inventory to yellow shulker box named "&8&l%loop-value%" with lore "&7&l%number of {player.%loop-value%::*}% / %{maxplayer.%loop-value%}%" and "&e&lまもなくゲームが始まります。"
  82. if {maxplayer.%loop-value%} = number of {player.%loop-value%::*}:
  83. set slot {slotnum} of player's current inventory to red shulker box named "&8&l%loop-value%" with lore "&7&l%number of {player.%loop-value%::*}% / %{maxplayer.%loop-value%}%" and "&c&l部屋がいっぱいです。"
  84. add 1 to {slotnum}
  85.  
  86. command /start:
  87. trigger:
  88. if {game::*} contains player:
  89. if {minplayer.%player%} <= number of {player.%player%::*}:
  90. set {_ookokucard::*} to {ookoku.card::*}
  91. loop 10 times:
  92. add random string of {_ookokucard::*} to {_ookokucard}
  93. remove {_ookokucard} from {ookokucard.%player%::*}
  94. add {_ookokucard} to {ookokucard.%player%::*}
  95. delete {_ookokucard}
  96. loop {player.%player%::*}:
  97. send "&b今回の王国カードはこちらです。"
  98. send "&3&l%{ookokucard.%player%::*}%"
  99. set {point.%loop-value-1%} to 3
  100. set {decknumber.%loop-value-1%} to 0
  101. set {myroom.%loop-value-1%} to player
  102. loop 7 times:
  103. add "銅貨" to {deck.%loop-value-1%::*}
  104. loop 3 times:
  105. add "屋敷" to {deck.%loop-value-1%::*}
  106. set {_loop} to number of {deck.%loop-value-1%::*}
  107. loop {_loop} times:
  108. add 1 to {decknumber.%loop-value-1%}
  109. set {_mycard} to random string of {deck.%loop-value-1%::*}
  110. set {deck.%{decknumber.%loop-value-1%}%.%loop-value-1%} to {_mycard}
  111. remove {_mycard} from {deck.%loop-value-1%::*}
  112. set {_slot} to 1
  113. loop 7 times:
  114. add 1 to {_slot}
  115. set slot {_slot} of loop-value-1's inventory to light gray stained glass pane
  116. set {_turnplayer} to random player of {player.%{myroom.%loop-value-1%}%::*}
  117. loop 100 times:
  118. loop 5 times:
  119. set {_mycard} to random string of {deck.%loop-value-1%::*}
  120. if {_mycard} = "銅貨":
  121. give brick named "&6銅貨" with lore "&e&l➀" and "-------------------" and "&e&l" to loop-value-1
  122. if {_mycard} = "銀貨":
  123. give iron ingot named "&7銀貨" with lore "&e&l➁" to loop-value-1
  124. if {_mycard} = "金貨":
  125. give gold ingot named "&e金貨" with lore "&e&l➂" to loop-value-1
  126. if {_mycard} = "屋敷":
  127. give apple named "&2屋敷" with lore "&a&l➀" to loop-value-1
  128. if {_mycard} = "公領":
  129. give golden apple named "&2公領" with lore "&a&l➂" to loop-value-1
  130. if {_mycard} = "属州":
  131. give enchanted golden apple named "&2属州" with lore "&a&l➅" to loop-value-1
  132. if {_mycard} = "職人":
  133. give bread named "&6職人" with lore "&8コスト&e&l➄&8までのカード1枚を獲得し、" and "&8あなたの手札に加える。" and "&8手札を1枚、デッキの上に置く。" to loop-value-1
  134. if {_mycard} = "研究所":
  135. give potion named "&7研究所" with lore "&0&l+2 カードを引く" and "&0&l+1 アクション" to loop-value-1
  136. if {_mycard} = "密猟者":
  137. give bow named "&a密猟者" with lore "&0&l+1 カードを引く" and "&0&l+1 アクション" and "&0&l+ &e&l➀" to loop-value-1
  138. if {_mycard} = "改築":
  139. give oak wood plank named "&b改築" with lore "&8あなたの手札のカードを1枚廃棄する。" and "&8廃棄したカードよりコストが最大&e&l➁" and "&8多いカードを1枚獲得する。" to loop-value-1
  140. if {_mycard} = "村":
  141. give grass named "&2村" with lore "&0&l+1 カードを引く" and "&0&l+2 アクション" to loop-value-1
  142. if {_mycard} = "鍛冶屋":
  143. give anvil named "&8鍛冶屋" with lore "&0&l+3 カードを引く" to loop-value-1
  144. if {_mycard} = "民兵":
  145. give iron sword named "&f民兵" with lore "&0&l+ &e&l➁" and "&8他のプレイヤーは全員、自分の手札" and "&8が3枚になるまで住手札する。" to loop-value-1
  146. if {_mycard} = "山賊":
  147. give gold nugget named "&9山賊" with lore "&8金貨を1枚獲得する。他のプレイヤーは" and "&8山札の上からカードを2枚公開して、" and "&8公開された銅貨以外の財宝カードを" and "&8ランダムで一枚廃棄し、残りのカードを捨て札にする。" to loop-value-1
  148. if {_mycard} = "衛兵":
  149. give shield named "&c衛兵" with lore "&0&l+1 カードを引く" and "&0&l+1 アクション" and "&8デッキの上から2枚のカードを見て、" and "&8その中から好きな枚数を廃棄し、" and "&8好きな枚数を捨て札にする。残った" and "&8カードを好きな順番で山札に戻す。" to loop-value-1
  150. if {_mycard} = "金貸し":
  151. give paper named "&e金貸し" with lore "&8あなたの手札から銅貨を1枚廃棄する。" and "&8そうした場合&0&l+&e&l➂&8を使用できる。" to loop-value-1
  152. if {_mycard} = "礼拝堂":
  153. give torch named "&d礼拝堂" with lore "&8あなたの手札から、" and "&8最大4枚までのカードを廃棄する。" to loop-value-1
  154. if {_mycard} = "衛兵":
  155. give shield named "&c衛兵" with lore "&0&l+1 カードを引く" and "&0&l+1 アクション" and "&8デッキの上から2枚のカードを見て、" and "&8その中から好きな枚数を廃棄し、" and "&8好きな枚数を捨て札にする。残った" and "&8カードを好きな順番で山札に戻す。" to loop-value-1
  156.  
  157.  
  158.  
  159. on inventory click:
  160. if name of player's current inventory contain "&6&l部屋を探す":
  161. cancel event
  162. command "/execute %player% ~ ~ ~ /playsound ui.button.click master %player%"
  163. loop {game::*}:
  164. if name of clicked item is "&8&l%loop-value%":
  165. close player's inventory
  166. if {game.%player%} is true:
  167. send "&c既にほかの部屋に入っています。"
  168. else:
  169. if {maxplayer.%loop-value%} = number of {player.%loop-value%::*}:
  170. send "&c既に部屋が埋まっています。"
  171. command "/execute %player% ~ ~ ~ /playsound entity.endermen.teleport master %player% ~ ~ ~ 1 0"
  172. else:
  173. set {game.%player%} to true
  174. add player to {player.%loop-value%::*}
  175. send "&a部屋に入りました。"
  176. command "/execute %player% ~ ~ ~ /playsound entity.arrow.hit_player master %player%"
  177.  
  178. on quit:
  179. if {game::*} contains player:
  180. loop {player.%player%::*}:
  181. delete {game.%loop-value%}
  182. send "&cルームマスターが部屋を解散しました。" to loop-value
  183. remove player from {game::*}
  184. delete {player.%player%::*}
  185. if {game.%player%} is true:
  186. loop {game::*}:
  187. if {player.%loop-value%::*} contains player:
  188. remove player from {player.%loop-value%::*}
Add Comment
Please, Sign In to add comment