7mm

Untitled

7mm
Mar 17th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. command /jinrou <text> [<text>]:
  2. permission: admin
  3. description: /jinrou asa:朝にします /jinrou uranai <プレイヤー名>:プレイヤーを占います
  4. aliases: /j
  5. trigger:
  6. if arg 1 is "start":
  7. #リセット処理
  8. set {var::*} to arg 2 parsed as "%number%"
  9. {var::1} is 3
  10. reset {jinrou.joining}
  11. loop all players:
  12. loop-player is played before
  13. reset {jinrou.join.%offline-player%}
  14. #ループ処理
  15. loop all players:
  16. block under loop-player is coal
  17. add 1 to {jinrou.joining}
  18. set {jinrou.join.%loop-player%} to {jinrou.joining}
  19. #参加人数過多
  20. if {jinrou.joining} is greater than {var::1}:
  21. message "&4参加人数が%{var::1}%人以上です!参加できなかった人はロビーで待機してください。申し訳ありません。" to all players
  22. stop
  23. #参加人数過少
  24. else if {jinrou.joining} is less than 3:
  25. message "&4参加人数が3人以下です!人狼をプレイしたい方はエレベータに乗車してください。" to all players
  26. stop
  27. #正常
  28. else:
  29. message "&4参加人数が集まりました!人狼ゲームが開始されます!" to all players
  30. set {jinrou.jinrounum} to ceil({jinrou.joining} / 3)
  31. loop {jinrou.jinrounum} times:
  32. set {jinrou.chance} to random integer between 0 to {jinrou.joining}
  33. set {jinrou.chance} to {jinrou.join.%{jinrou.chance}%}
  34. set {jinrou.job.%{jinrou.chance}%} to "jinrou"
  35. else if arg 1 is "asa":
  36. execute console command "tp @a[x=-443,y=8,z=-654,dx=4,dy=4,dz=-36] -418 5 -638"
  37. set time to 7:00
  38. broadcast "&4[人狼ゲーム]&r:朝になりました"
  39. else if arg 1 is "uranai" or "ura":
  40. if arg 2 is player:
  41. if {jinrou.job.%arg 2%} is 0:
  42. message "%arg 2%は人狼ではありません!"
  43. else if {jinrou.job.%arg 2%} is 1:
  44. message "%arg 2%は人狼でした!"
  45. else:
  46. message "&rエラーが発生しました。その時の状況を記録し、運営に報告してください。可能ならゲームを続行して構いません。"
Advertisement
Add Comment
Please, Sign In to add comment