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