7mm

Skript: Murder

7mm
Aug 4th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.27 KB | None | 0 0
  1. every minecraft tick:
  2. {murder.system.gamestat} is "wait"
  3. clear {murder.system.waitamount}
  4. loop all players:
  5. {murder.stat::%loop-player%} is "wait"
  6. add 1 to {murder.system.waitamount}
  7. if {murder.system.waitamount} > 3:
  8. command "/execute @a ~ ~ ~ playsound block.note.pling master @s ~ ~ ~ 1 1.33"
  9. command "/murder start"
  10.  
  11. command /murder [<text>] [<text>] [<text>]:
  12. permission: murder.admin
  13. trigger:
  14. if arg 1 is "start":
  15. if arg 2 is not set:
  16. set {_sec} to 30
  17. else:
  18. set {_sec} to arg 2 parsed as integer
  19. set {_count} to {_sec}
  20. set {murder.system.gamestat} to "ready"
  21. loop {_sec} times:
  22. remove 1 from {_count}
  23. set {murder.system.waitamount} to 0
  24. loop all players:
  25. {murder.stat::%loop-player%} is "wait"
  26. add 1 to {murder.system.waitamount}
  27. if {murder.system.waitamount} < 4:
  28. arg 3 is not "false"
  29. message ""
  30. command "/execute @a ~ ~ ~ playsound block.note.pling master @s ~ ~ ~ 1 0.67"
  31. loop all players:
  32. set action bar of loop-player to coloured "&cキャンセルされました"
  33. wait 2 second
  34. stop
  35. if {_count} > 9:
  36. loop all players:
  37. if {murder.stat::%loop-player%} is "wait":
  38. set action bar of loop-player to coloured "&6開始の準備が整いました"
  39. else:
  40. set action bar of loop-player to coloured "&7開始の準備が整いました"
  41. else:
  42. command "/execute @a ~ ~ ~ playsound ui.button.click master @s ~ ~ ~ 1 1.2"
  43. loop all players:
  44. if {murder.stat::%loop-player%} is "wait":
  45. set action bar of loop-player to coloured "&6残り%{_count}%秒で開始します"
  46. else:
  47. set action bar of loop-player to coloured "&7残り%{_count}%秒で開始します"
  48. wait a second
  49. set {murder.system.gamestat} to "game"
  50. set {murder.system.plamount} to 0
  51. loop all players:
  52. {murder.stat::%loop-player%} is "wait"
  53. add 1 to {murder.system.plamount}
  54. if {murder.system.plamount} < 4:
  55. arg 3 is not "false"
  56. message ""
  57. command "/execute @a ~ ~ ~ playsound block.note.pling master @s ~ ~ ~ 1 0.67"
  58. loop all players:
  59. set action bar of loop-player to coloured "&cキャンセルされました"
  60. wait 2 second
  61. stop
  62. while true:
  63. set {_murder} to random integer between 1 to {murder.system.plamount}
  64. set {_detective} to random integer between 1 to {murder.system.plamount}
  65. if {_murder} = {_detective}:
  66. wait a tick
  67. else:
  68. exit loop
  69. loop all players:
  70. if {_murder} is loop-number:
  71. set {murder.role.%player%} to "murder"
  72. send player title "&7You are &c&lMurder" with subtitle "&9Win: Destroy Innocent" for 1 seconds
  73. else if {_detective} is loop-number:
  74. set {murder.role.%player%} to "detective"
  75. send player title "&7You are &e&lDetective" with subtitle "&9Win: Find Murder" for 1 seconds
  76. else:
  77. set {murder.role.%player%} to "innocent"
  78. send player title "&7You are &e&lDetective" with subtitle "&9Win: Find Murder" for 1 seconds
  79. set {murder.system.gamestat} to "wait"
  80. else:
  81. message "&c*引数が不正です" to player
  82. message "&6/murder &estart [sec] [cancel]&7>> &bゲーム開始 [sec]は待機秒数(デフォルトで30秒) [cancel]をfalseにするとキャンセルなし" to player
Add Comment
Please, Sign In to add comment