Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /tastart [<player>]:
- trigger:
- if player does not have permission "ta.start":
- send "&cあなたは「&ata.start&c」の権限を持っていないため、タイムアタックの開始を行うことができません。"
- stop
- set {_player} to arg 1
- if arg 1 is not set:
- set {_player} to player
- if {_player} is flying:
- send "&c対象のプレイヤーは飛行中です。飛行中はタイムアタックを行うことができません。"
- stop
- if {_player}'s gamemode is creative:
- send "&c対象のプレイヤーのゲームモードはクリエイティブです。"
- send "&cタイムアタックは、サバイバル、アドベンチャーのどちらかで行う必要があります。"
- stop
- if {_player}'s gamemode is spectator:
- send "&c対象のプレイヤーのゲームモードはスペクテイターです。"
- send "&cタイムアタックは、サバイバル、アドベンチャーのどちらかで行う必要があります。"
- stop
- if {%{_player}%.ta} is true:
- send "&eタイムをリセットしました!" to {_player}
- set {%{_player}%.minutes} to 0
- set {%{_player}%.seconds} to 0
- stop
- send "&bタイムアタックをスタートしました!" to {_player}
- set {%{_player}%.minutes} to 0
- set {%{_player}%.seconds} to 0
- set {%{_player}%.ta} to true
- command /taend [<player>]:
- trigger:
- if player does not have permission "ta.end":
- send "&cあなたは「&ata.end&c」の権限を持っていないため、タイムアタックの終了を行うことができません。"
- stop
- set {_player} to arg 1
- if arg 1 is not set:
- set {_player} to player
- if {%{_player}%.ta} is not true:
- send "&cプレイヤーはタイムアタックを行っていません。"
- send "&d/tastart&cでタイムアタックを開始できます。"
- stop
- send "&bタイムアタック終了!" to {_player}
- send "&b今回のタイム:&e%{%{_player}%.minutes}%&b分&e%{%{_player}%.seconds}%&b秒" to {_player}
- set {%{_player}%.minutes} to 0
- set {%{_player}%.seconds} to 0
- set {%{_player}%.ta} to false
- every second:
- loop all players:
- if {%loop-player%.ta} is true:
- add 1 to {%loop-player%.seconds}
- if {%loop-player%.seconds} is 60:
- set {%loop-player%.seconds} to 0
- add 1 to {%loop-player%.minutes}
- on flight toggle:
- wait 1 tick
- player is flying
- if {%player%.ta} is true:
- send "&cタイムアタックを終了しました!タイムアタック中の飛行は禁止されています!" to player
- set {%player%.minutes} to 0
- set {%player%.seconds} to 0
- set {%player%.ta} to false
- on gamemode change:
- if {%player%.ta} is true:
- send "&cタイムアタックを終了しました!タイムアタック中にゲームモードを変更してはいけません!" to player
- set {%player%.minutes} to 0
- set {%player%.seconds} to 0
- set {%player%.ta} to false
- on quit:
- if {%player%.ta} is true:
- set {%player%.minutes} to 0
- set {%player%.seconds} to 0
- set {%player%.ta} to false
Advertisement
Add Comment
Please, Sign In to add comment