7mm

アスレ総合

7mm
Apr 21st, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.83 KB | None | 0 0
  1. command /timer <integer> [<integer>] [<boolean>]:
  2. usage: "&d/timer &e<limit&9:int&e> [countdown&9:int&e] [limit-msg&9:bool&e]"
  3. permission: skript.admin
  4. trigger:
  5. if arg 1 is 0:
  6. if {timer.use} is true:
  7. set {timer.use} to false
  8. set {timer.sec} to 0
  9. set {timer.msg} to false
  10. message "&2Success: &aタイマーのリセットに成功しました。"
  11. stop
  12. else:
  13. message "&4Error: &cタイマーをリセットする必要がありません。(制限時間に0を指定するとタイマーがリセットされます)"
  14. if arg 1 is less than 0:
  15. message "&4Error: &c0(リセット)か自然数を指定してください。"
  16. stop
  17. if arg 2 is more than 0:
  18. if arg 3 is true:
  19. message "&2Success: &aタイマーを開始しました。(開始前%arg 2%秒カウントダウン/残り時間アラート表示)"
  20. set {timer.msg} to true
  21. else:
  22. message "&2Success: &aタイマーを開始しました。(開始前%arg 2%秒カウントダウン/残り時間アラート非表示)"
  23. loop arg 2 times:
  24. set {_countdown} to arg 2-loop-number+1
  25. broadcast "&e&l[Timer] &7&o<Count Down> &b%{_countdown}%..."
  26. execute console command "/execute @a ~ ~ ~ playsound block.note.bass master @p"
  27. wait 20 ticks
  28. else:
  29. message "&2Success: &aタイマーを開始しました。(開始前カウントダウンなし/残り時間アラート非表示)"
  30. set {timer.use} to true
  31. set {timer.sec} to arg 1
  32. execute console command "/execute @a ~ ~ ~ playsound block.note.pling master @p"
  33. broadcast "&e&l[Timer] &b&lTimer Starting!"
  34. loop {timer.sec} times:
  35. if {timer.use} is false:
  36. exit loop
  37. execute console command "/title @a actionbar [{""text"":""[Time Left] "",""color"":""gold"",""bold"":true},{""text"":""%{timer.sec}%"",""color"":""aqua"",""bold"":true}]"
  38. wait 20 ticks
  39. remove 1 from {timer.sec}
  40. if {timer.msg} is true:
  41. if {timer.sec} is 180:
  42. broadcast "&e&l[Timer] &dTime Left is &l180s."
  43. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  44. if {timer.sec} is 150:
  45. broadcast "&e&l[Timer] &dTime Left is &l150s."
  46. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  47. if {timer.sec} is 120:
  48. broadcast "&e&l[Timer] &dTime Left is &l120s."
  49. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  50. if {timer.sec} is 90:
  51. broadcast "&e&l[Timer] &dTime Left is &l90s."
  52. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  53. if {timer.sec} is 60:
  54. broadcast "&e&l[Timer] &dTime Left is &l60s."
  55. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  56. if {timer.sec} is 30:
  57. broadcast "&e&l[Timer] &dTime Left is &l30s."
  58. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  59. if {timer.sec} is 20:
  60. broadcast "&e&l[Timer] &dTime Left is &l20s."
  61. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  62. if {timer.sec} is 10:
  63. broadcast "&e&l[Timer] &dTime Left is &l10s."
  64. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  65. if {timer.sec} is 9:
  66. broadcast "&e&l[Timer] &dTime Left is &l9s."
  67. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  68. if {timer.sec} is 8:
  69. broadcast "&e&l[Timer] &dTime Left is &l8s."
  70. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  71. if {timer.sec} is 7:
  72. broadcast "&e&l[Timer] &dTime Left is &l7s."
  73. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  74. if {timer.sec} is 6:
  75. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  76. broadcast "&e&l[Timer] &dTime Left is &l6s."
  77. if {timer.sec} is 5:
  78. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  79. broadcast "&e&l[Timer] &dTime Left is &l5s."
  80. if {timer.sec} is 4:
  81. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  82. broadcast "&e&l[Timer] &dTime Left is &l4s."
  83. if {timer.sec} is 3:
  84. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  85. broadcast "&e&l[Timer] &dTime Left is &l3s."
  86. if {timer.sec} is 2:
  87. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  88. broadcast "&e&l[Timer] &dTime Left is &l2s."
  89. if {timer.sec} is 1:
  90. execute console command "/execute @a ~ ~ ~ playsound ui.button.click master @p"
  91. broadcast "&e&l[Timer] &dTime Left is &l1s."
  92. broadcast "&e&l[Timer] &bTimer Finish."
  93. execute console command "/execute @a ~ ~ ~ playsound entity.generic.burn master @p"
  94. execute console command "/title @a actionbar [{""text"":""[Time Left] "",""color"":""gold"",""bold"":true},{""text"":""0"",""color"":""aqua"",""bold"":true}]"
  95. set {timer.use} to false
  96. set {timer.msg} to false
  97.  
  98. command /push <text> <player> [<number>] [<number>]:
  99. trigger:
  100. if arg 3 is not set:
  101. set {_pushPowerLow} to 0.3
  102. else:
  103. set {_pushPowerLow} to arg 3
  104. if arg 4 is not set:
  105. set {_pushPowerHigh} to 1.5
  106. else:
  107. set {_pushPowerHigh} to arg 4
  108. set {_pushPower} to random number between {_pushPowerLow} to {_pushPowerHigh}
  109. if arg 1 is "px":
  110. push arg-2 east at speed {_pushPower}
  111. if arg 1 is "py":
  112. push arg-2 upwards at speed {_pushPower}
  113. if arg 1 is "pz":
  114. push arg-2 south at speed {_pushPower}
  115. if arg 1 is "nx":
  116. push arg-2 west at speed {_pushPower}
  117. if arg 1 is "ny":
  118. push arg-2 downwards at speed {_pushPower}
  119. if arg 1 is "nz":
  120. push arg-2 north at speed {_pushPower}
Advertisement
Add Comment
Please, Sign In to add comment