7mm

Skript: Board Games 全般

7mm
Feb 21st, 2018
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.60 KB | None | 0 0
  1. #===============================================
  2. #/joingameコマンド
  3. #===============================================
  4. command /joingame:
  5. description: ゲームに参加します
  6. usage: /joingame
  7. aliases: /jg
  8. trigger:
  9. if {status.joined.%player%} is 0:
  10. set {status.joined.%player%} to 1
  11. message "&e&l[system] &aゲームに参加しました"
  12. play sound "block.note.snare" with volume 10 and pitch 1 at player
  13. else:
  14. set {status.joined.%player%} to 0
  15. message "&e&l[system] &cゲームへの参加を取り消しました"
  16. play sound "block.note.basedrum" with volume 10 and pitch 1 at player
  17.  
  18. #===============================================
  19. #/*ninetynineコマンド
  20. #===============================================
  21. command /*ninetynine <text> [<text>] [<text>]:
  22. description: 運営用のコマンドです
  23. usage: &e/*nn <start|settings> ...
  24. aliases: /*nn
  25. permission: skript.admin
  26. permission message: &c実行失敗:権限を持っていません
  27. trigger:
  28. if arg 1 is "settings" or "1":
  29. if arg 2 is "list" or "0":
  30. message "&e&l[system] &6&l=====&c&l設定名リスト&6&l====="
  31. message "&d&l・gamemaster-play&9&l&o( or 1)&d&l: &6&lゲームマスターが参加できるかの設定です"
  32. else if arg 2 is "gamemaster-play" or "1":
  33. if arg 3 is "false" or "0":
  34. set {settings.ninetynine.1} to 0
  35. message "&e&l[system] &d<NinetyNineゲーム設定> &7ゲームマスターの参加をオフにしました"
  36. else if arg 3 is "true" or "1":
  37. set {settings.ninetynine.1} to 1
  38. message "&e&l[system] &d<NinetyNineゲーム設定> &7ゲームマスターの参加をオンにしました"
  39. else:
  40. message "Correct usage: &e/*ninetynine settings gamemaster-play <true|false>"
  41. else:
  42. message "Correct usage: &e/*ninetynine settings <設定名|list> ..."
  43. if arg 1 is "stop" or "2":
  44. if {status.playing-game} is not 1:
  45. message "&e&l[system] &c現在NinetyNineの試合中ではありません"
  46. stop
  47. message "&c&l[NinetyNine] &dゲームが強制終了されました"
  48. set {status.playing-game} to 0
  49. if arg 1 is "start" or "0":
  50. if {status.playing-game} is not 0:
  51. message "&e&l[system] &c現在試合中です"
  52. stop
  53. set {status.joined-player} to 0
  54. loop all players:
  55. set {status.joined.%loop-player%} to 0
  56. if {status.setjoin.%loop-player%} is 1:
  57. set {status.joined.%loop-player%} to 1
  58. add 1 to {status.joined-player}
  59. if {settings.ninetynine.1} is 1:
  60. set {status.joined.%player%} to 1
  61. add 1 to {status.joined-player}
  62. else:
  63. set {status.joined.%player%} to 0
  64. if {status.joined.%player%} is less than 2:
  65. message "&e&l[system] &c人数が足りないため開始できませんでした"
  66. stop
  67. broadcast "&c&l[NinetyNine] &6ゲームが開始されました"
  68. set {status.game-scene} to 1
  69. set {status.playing-game} to 1
  70. if arg 1 is "testplay" or "3":
  71. if {status.playing-game} is not 0:
  72. message "&e&l[system] &c現在試合中です"
  73. stop
  74. set {status.joined-player} to 0
  75. loop all players:
  76. set {status.joined.%loop-player%} to 0
  77. if {status.setjoin.%loop-player%} is 1:
  78. set {status.joined.%loop-player%} to 1
  79. add 1 to {status.joined-player}
  80. if {settings.ninetynine.1} is 1:
  81. set {status.joined.%player%} to 1
  82. add 1 to {status.joined-player}
  83. else:
  84. set {status.joined.%player%} to 0
  85. broadcast "&c&l[NinetyNine] &6ゲームのテストプレイが開始されました"
  86. set {status.game-scene} to 1
  87. set {status.playing-game} to 1
  88.  
  89. #===============================================
  90. #fourcard試合中進行コード
  91. #===============================================
  92. every minecraft tick:
  93. if {status.playing-game} is 1:
  94. if {status.game-scene} is 1:
  95. set {status.ninetynine.playerNumber} to 0
  96. loop all players:
  97. set {status.ninetynine.playerNumber.%loop-player%} to 0
  98. if {status.joined.%loop-player%} is 1:
  99. add 1 to {status.ninetynine.playerNumber}
  100. set {status.ninetynine.playerNumber.%loop-player%} to {status.ninetynine.playerNumber}
  101. set {status.game-scene} to 2
  102. set {status.game-turn} to 1
  103. else if {status.game-scene} is 2:
  104. loop all players:
  105. loop {status.ninetynine.playerNumber} times:
  106. if {status.game-turn} is {status.ninetynine.playerNumber.%loop-player%}:
  107. open chest with 3 rows named "&9&lYour Turn" to loop-player
  108. # format slot (SLOT) of loop-player with (ID) named "(NAME)" with lore "(LORE)" to run "(CMD)"
  109. format slot 0 of loop-player with redstone_block named "&e&l所持カード" with lore "" to run ""
  110. stop
Advertisement
Add Comment
Please, Sign In to add comment