Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /timer <integer> [<integer>] [<boolean>]:
- usage: "&d/timer &e<limit&9:int&e> [countdown&9:int&e] [limit-msg&9:bool&e]"
- permission: skript.admin
- trigger:
- if arg 1 is 0:
- if {timer.use} is true:
- set {timer.use} to false
- set {timer.sec} to 0
- set {timer.msg} to false
- message "&2Success: &aタイマーのリセットに成功しました。"
- stop
- else:
- message "&4Error: &cタイマーをリセットする必要がありません。(制限時間に0を指定するとタイマーがリセットされます)"
- if arg 1 is less than 0:
- message "&4Error: &c0(リセット)か自然数を指定してください。"
- stop
- if arg 2 is more than 0:
- if arg 3 is true:
- message "&2Success: &aタイマーを開始しました。(開始前%arg 2%秒カウントダウン/残り時間アラート表示)"
- set {timer.msg} to true
- else:
- message "&2Success: &aタイマーを開始しました。(開始前%arg 2%秒カウントダウン/残り時間アラート非表示)"
- loop arg 2 times:
- set {_countdown} to arg 2-loop-number+1
- broadcast "&e&l[Timer] &7&o<Count Down> &b%{_countdown}%..."
- execute console command "/execute @a ~ ~ ~ playsound block.note.bass master @p"
- wait 20 ticks
- else:
- message "&2Success: &aタイマーを開始しました。(開始前カウントダウンなし/残り時間アラート非表示)"
- set {timer.use} to true
- set {timer.sec} to arg 1
- execute console command "/execute @a ~ ~ ~ playsound block.note.pling master @p"
- broadcast "&e&l[Timer] &b&lTimer Starting!"
- loop {timer.sec} times:
- if {timer.use} is false:
- exit loop
- execute console command "/title @a actionbar [{""text"":""[Time Left] "",""color"":""gold"",""bold"":true},{""text"":""%{timer.sec}%"",""color"":""aqua"",""bold"":true}]"
- wait 20 ticks
- remove 1 from {timer.sec}
- if {timer.msg} is true:
- if {timer.sec} is 180:
- broadcast "&e&l[Timer] &dTime Left is &l180s."
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- if {timer.sec} is 150:
- broadcast "&e&l[Timer] &dTime Left is &l150s."
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- if {timer.sec} is 120:
- broadcast "&e&l[Timer] &dTime Left is &l120s."
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- if {timer.sec} is 90:
- broadcast "&e&l[Timer] &dTime Left is &l90s."
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- if {timer.sec} is 60:
- broadcast "&e&l[Timer] &dTime Left is &l60s."
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- if {timer.sec} is 30:
- broadcast "&e&l[Timer] &dTime Left is &l30s."
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- if {timer.sec} is 20:
- broadcast "&e&l[Timer] &dTime Left is &l20s."
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- if {timer.sec} is 10:
- broadcast "&e&l[Timer] &dTime Left is &l10s."
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- if {timer.sec} is 9:
- broadcast "&e&l[Timer] &dTime Left is &l9s."
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- if {timer.sec} is 8:
- broadcast "&e&l[Timer] &dTime Left is &l8s."
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- if {timer.sec} is 7:
- broadcast "&e&l[Timer] &dTime Left is &l7s."
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- if {timer.sec} is 6:
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- broadcast "&e&l[Timer] &dTime Left is &l6s."
- if {timer.sec} is 5:
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- broadcast "&e&l[Timer] &dTime Left is &l5s."
- if {timer.sec} is 4:
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- broadcast "&e&l[Timer] &dTime Left is &l4s."
- if {timer.sec} is 3:
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- broadcast "&e&l[Timer] &dTime Left is &l3s."
- if {timer.sec} is 2:
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- broadcast "&e&l[Timer] &dTime Left is &l2s."
- if {timer.sec} is 1:
- execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
- broadcast "&e&l[Timer] &dTime Left is &l1s."
- broadcast "&e&l[Timer] &bTimer Finish."
- execute console command "/execute @a ~ ~ ~ playsound entity.generic.burn master @p"
- execute console command "/title @a actionbar [{""text"":""[Time Left] "",""color"":""gold"",""bold"":true},{""text"":""0"",""color"":""aqua"",""bold"":true}]"
- set {timer.use} to false
- set {timer.msg} to false
- command /push <text> <player> [<number>] [<number>]:
- trigger:
- if arg 3 is not set:
- set {_pushPowerLow} to 0.3
- else:
- set {_pushPowerLow} to arg 3
- if arg 4 is not set:
- set {_pushPowerHigh} to 1.5
- else:
- set {_pushPowerHigh} to arg 4
- set {_pushPower} to random number between {_pushPowerLow} to {_pushPowerHigh}
- if arg 1 is "px":
- push arg-2 east at speed {_pushPower}
- if arg 1 is "py":
- push arg-2 upwards at speed {_pushPower}
- if arg 1 is "pz":
- push arg-2 south at speed {_pushPower}
- if arg 1 is "nx":
- push arg-2 west at speed {_pushPower}
- if arg 1 is "ny":
- push arg-2 downwards at speed {_pushPower}
- if arg 1 is "nz":
- push arg-2 north at speed {_pushPower}
Advertisement
Add Comment
Please, Sign In to add comment