Advertisement
akon1248

Untitled

Mar 20th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.11 KB | None | 0 0
  1. function getLocationInfo(loc: location) :: string:
  2. return "X: %x-coordinate of {_loc}%, Y: %y-coordinate of {_loc}%, Z: %z-coordinate of {_loc}%, World: %{_loc}'s world%, Yaw: %yaw of {_loc}%, Pitch %pitch of {_loc}%"
  3. command /stage [<text>] [<text>] [<text>]:
  4. permission: zombiebow.admin
  5. permission message: &cYou do not have permission to use this command.
  6. trigger:
  7. if arg-1 is not set:
  8. send "&cU使用法: /stage <save|remove|point1|point2|bowsp|zombiesp|info> <stagename> もしくは /stage housyuu <stagename> 報酬 もしくは /stage time <stagename> 制限時間(秒) もしくは /stage list"
  9. else if arg-1 is not "save" or "remove" or "point1" or "point2" or "bowsp" or "zombiesp" or "housyuu" or "time" or "info" or "list":
  10. send "&cU使用法: /stage <save|remove|point1|point2|bowsp|zombiesp|info> <stagename> もしくは /stage housyuu <stagename> 報酬 もしくは /stage time <stagename> 制限時間(秒) もしくは /stage list"
  11. else if arg-1 is "save" or "remove" or "point1" or "point2" or "bowsp" or "zombiesp" or "housyuu" or "time" or "info":
  12. if arg-2 is not set:
  13. send "&cU使用法: /stage <save|remove|point1|point2|bowsp|zombiesp|info> <stagename> もしくは /stage housyuu <stagename> 報酬 もしくは /stage time <stagename> 制限時間(秒) もしくは /stage list"
  14. else if arg-1 is "save" or "remove" or "point1" or "point2" or "bowsp" or "zombiesp" or "info":
  15. if arg-1 is "save":
  16. if {zombiebow.stage::%arg-2%} is set:
  17. send "&cステージ%arg-2 in lower case%は既に存在しています"
  18. else if {zombiebow.stage::%arg-2%} is not set:
  19. set {zombiebow.stage::%arg-2%} to "%arg-2 in lower case%"
  20. set {zombiebow.point1::%arg-2%} to location of player
  21. set {zombiebow.point2::%arg-2%} to location of player
  22. set {zombiebow.bowsp::%arg-2%} to location of player
  23. set {zombiebow.zombiesp::%arg-2%} to location of player
  24. send "&2ステージ&9%arg-2 in lower case%&2を新しく登録しました"
  25. else if arg-1 is "remove":
  26. if {zombiebow.stage::%arg-2%} is not set:
  27. send "&cステージ%arg-2 in lower case%は存在していません"
  28. else if {zombiebow.stage::%arg-2%} is set:
  29. delete {zombiebow.stage::%arg-2%}
  30. delete {zombiebow.point1::%arg-2%}
  31. delete {zombiebow.point2::%arg-2%}
  32. delete {zombiebow.bowsp::%arg-2%}
  33. delete {zombiebow.zombiesp::%arg-2%}
  34. send "&2ステージ&9%arg-2 in lower case%&2を消去しました"
  35. else if arg-1 is "point1":
  36. if {zombiebow.stage::%arg-2%} is not set:
  37. send "&cステージ%arg-2 in lower case%は存在していません"
  38. else if {zombiebow.stage::%arg-2%} is set:
  39. set {zombiebow.point1::%arg-2%} to location of block at location of player
  40. set yaw of {zombiebow.point1::%arg-2%} to yaw of player
  41. set pitch of {zombiebow.point1::%arg-2%} to pitch of player
  42. send "&2ステージ&9%arg-2 in lower case%&2の範囲を更新しました"
  43. send "&7Point1: %getLocationInfo({zombiebow.point1::%arg-2%})%"
  44. send "&7Point2: %getLocationInfo({zombiebow.point2::%arg-2%})%"
  45. set {_sizex} to abs(x-coordinate of {zombiebow.point1::%arg-2%} - x-coordinate of {zombiebow.point2::%arg-2%})
  46. set {_sizey} to abs(y-coordinate of {zombiebow.point1::%arg-2%} - y-coordinate of {zombiebow.point2::%arg-2%})
  47. set {_sizez} to abs(z-coordinate of {zombiebow.point1::%arg-2%} - z-coordinate of {zombiebow.point2::%arg-2%})
  48. send "&7Size: %{_sizex}%x%{_sizey}%x%{_sizez}%"
  49. else if arg-1 is "point2":
  50. if {zombiebow.stage::%arg-2%} is not set:
  51. send "&cステージ%arg-2 in lower case%は存在していません"
  52. else if {zombiebow.stage::%arg-2%} is set:
  53. set {zombiebow.point2::%arg-2%} to location of block at location of player
  54. set yaw of {zombiebow.point2::%arg-2%} to yaw of player
  55. set pitch of {zombiebow.point2::%arg-2%} to pitch of player
  56. send "&2ステージ&9%arg-2 in lower case%&2の範囲を更新しました"
  57. send "&7Point1: %getLocationInfo({zombiebow.point1::%arg-2%})%"
  58. send "&7Point2: %getLocationInfo({zombiebow.point2::%arg-2%})%"
  59. set {_sizex} to abs(x-coordinate of {zombiebow.point1::%arg-2%} - x-coordinate of {zombiebow.point2::%arg-2%})
  60. set {_sizey} to abs(y-coordinate of {zombiebow.point1::%arg-2%} - y-coordinate of {zombiebow.point2::%arg-2%})
  61. set {_sizez} to abs(z-coordinate of {zombiebow.point1::%arg-2%} - z-coordinate of {zombiebow.point2::%arg-2%})
  62. send "&7Size: %{_sizex}%x%{_sizey}%x%{_sizez}%"
  63. else if arg-1 is "bowsp":
  64. if {zombiebow.stage::%arg-2%} is not set:
  65. send "&cステージ%arg-2 in lower case%は存在していません"
  66. else if {zombiebow.stage::%arg-2%} is set:
  67. set {zombiebow.bowsp::%arg-2%} to location of block at location of player
  68. set yaw of {zombiebow.bowsp::%arg-2%} to yaw of player
  69. set pitch of {zombiebow.bowsp::%arg-2%} to pitch of player
  70. send "&2ステージ&9%arg-2 in lower case%&2の人間のスポーン地点を設定しました"
  71. send "&7Spawn1: %getLocationInfo({zombiebow.bowsp::%arg-2%})%"
  72. else if arg-1 is "zombiesp":
  73. if {zombiebow.stage::%arg-2%} is not set:
  74. send "&cステージ%arg-2 in lower case%は存在していません"
  75. else if {zombiebow.stage::%arg-2%} is set:
  76. set {zombiebow.zombiesp::%arg-2%} to location of block at location of player
  77. set yaw of {zombiebow.zombiesp::%arg-2%} to yaw of player
  78. set pitch of {zombiebow.zombiesp::%arg-2%} to pitch of player
  79. send "&2ステージ&9%arg-2 in lower case%&2のゾンビのスポーン地点を設定しました"
  80. send "&7Spawn2: %getLocationInfo({zombiebow.zombiesp::%arg-2%})%"
  81. else if arg-1 is "info":
  82. if {zombiebow.stage::%arg-2%} is not set:
  83. send "&cステージ%arg-2 in lower case%は存在していません"
  84. else if {zombiebow.stage::%arg-2%} is set:
  85. send "&2ステージ&9%arg-2 in lower case%&2の範囲を更新しました"
  86. send "&7Point1: %getLocationInfo({zombiebow.point1::%arg-2%})%"
  87. send "&7Point2: %getLocationInfo({zombiebow.point2::%arg-2%})%"
  88. set {_sizex} to abs(x-coordinate of {zombiebow.point1::%arg-2%} - x-coordinate of {zombiebow.point2::%arg-2%})
  89. set {_sizey} to abs(y-coordinate of {zombiebow.point1::%arg-2%} - y-coordinate of {zombiebow.point2::%arg-2%})
  90. set {_sizez} to abs(z-coordinate of {zombiebow.point1::%arg-2%} - z-coordinate of {zombiebow.point2::%arg-2%})
  91. send "&7Size: %{_sizex}%x%{_sizey}%x%{_sizez}%"
  92. send "&7Spawn1: %getLocationInfo({zombiebow.bowsp::%arg-2%})%"
  93. send "&7Spawn2: %getLocationInfo({zombiebow.zombiesp::%arg-2%})%"
  94. else if arg-1 is "housyuu" or "time":
  95. if arg-3 is not set:
  96. if arg-1 is "housyuu":
  97. set {_usagearg3} to "報酬"
  98. else if arg-1 is "time":
  99. set {_usagearg3} to "制限時間(秒)"
  100. send "&c使用法: /stage %arg-1 in lower case% <stagename> %{_usagearg3}%"
  101. else if arg-3 parsed as integer is not set:
  102. send "&c引数の指定が不正です"
  103. else if arg-1 is "housyuu":
  104. if {zombiebow.stage::%arg-2%} is not set:
  105. send "&cステージ%arg-2 in lower case%は存在していません"
  106. else if {zombiebow.stage::%arg-2%} is set:
  107. set {zombiebow.housyuu::%arg-2%} to arg-3 parsed as integer
  108. send "&2ステージ&9%arg-2 in lower case%&2の報酬を&6%arg-3 parsed as integer%G&2に設定しました"
  109. else if arg-1 is "time":
  110. if {zombiebow.stage::%arg-2%} is not set:
  111. send "&cステージ%arg-2 in lower case%は存在していません"
  112. else if {zombiebow.stage::%arg-2%} is set:
  113. set {zombiebow.time::%arg-2%} to arg-3 parsed as integer
  114. send "&2ステージ&9%arg-2 in lower case%&2の制限時間をを&9%arg-3 parsed as integer%秒&2に設定しました"
  115. else if arg-1 is "list":
  116. if {zombiebow.stage::*} is not set:
  117. send "&cステージはひとつも登録されていません"
  118. else if {zombiebow.stage::*} is set:
  119. set {_strstages} to join {zombiebow.stage::*} by "&f, &9"
  120. send "&7Stages (%size of {zombiebow.stage::*}%): &9%{_strstages}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement