Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getLocationInfo(loc: location) :: string:
- 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}%"
- command /stage [<text>] [<text>] [<text>]:
- permission: zombiebow.admin
- permission message: &cYou do not have permission to use this command.
- trigger:
- if arg-1 is not set:
- send "&cU使用法: /stage <save|remove|point1|point2|bowsp|zombiesp|info> <stagename> もしくは /stage housyuu <stagename> 報酬 もしくは /stage time <stagename> 制限時間(秒) もしくは /stage list"
- 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":
- send "&cU使用法: /stage <save|remove|point1|point2|bowsp|zombiesp|info> <stagename> もしくは /stage housyuu <stagename> 報酬 もしくは /stage time <stagename> 制限時間(秒) もしくは /stage list"
- else if arg-1 is "save" or "remove" or "point1" or "point2" or "bowsp" or "zombiesp" or "housyuu" or "time" or "info":
- if arg-2 is not set:
- send "&cU使用法: /stage <save|remove|point1|point2|bowsp|zombiesp|info> <stagename> もしくは /stage housyuu <stagename> 報酬 もしくは /stage time <stagename> 制限時間(秒) もしくは /stage list"
- else if arg-1 is "save" or "remove" or "point1" or "point2" or "bowsp" or "zombiesp" or "info":
- if arg-1 is "save":
- if {zombiebow.stage::%arg-2%} is set:
- send "&cステージ%arg-2 in lower case%は既に存在しています"
- else if {zombiebow.stage::%arg-2%} is not set:
- set {zombiebow.stage::%arg-2%} to "%arg-2 in lower case%"
- set {zombiebow.point1::%arg-2%} to location of player
- set {zombiebow.point2::%arg-2%} to location of player
- set {zombiebow.bowsp::%arg-2%} to location of player
- set {zombiebow.zombiesp::%arg-2%} to location of player
- send "&2ステージ&9%arg-2 in lower case%&2を新しく登録しました"
- else if arg-1 is "remove":
- if {zombiebow.stage::%arg-2%} is not set:
- send "&cステージ%arg-2 in lower case%は存在していません"
- else if {zombiebow.stage::%arg-2%} is set:
- delete {zombiebow.stage::%arg-2%}
- delete {zombiebow.point1::%arg-2%}
- delete {zombiebow.point2::%arg-2%}
- delete {zombiebow.bowsp::%arg-2%}
- delete {zombiebow.zombiesp::%arg-2%}
- send "&2ステージ&9%arg-2 in lower case%&2を消去しました"
- else if arg-1 is "point1":
- if {zombiebow.stage::%arg-2%} is not set:
- send "&cステージ%arg-2 in lower case%は存在していません"
- else if {zombiebow.stage::%arg-2%} is set:
- set {zombiebow.point1::%arg-2%} to location of block at location of player
- set yaw of {zombiebow.point1::%arg-2%} to yaw of player
- set pitch of {zombiebow.point1::%arg-2%} to pitch of player
- send "&2ステージ&9%arg-2 in lower case%&2の範囲を更新しました"
- send "&7Point1: %getLocationInfo({zombiebow.point1::%arg-2%})%"
- send "&7Point2: %getLocationInfo({zombiebow.point2::%arg-2%})%"
- set {_sizex} to abs(x-coordinate of {zombiebow.point1::%arg-2%} - x-coordinate of {zombiebow.point2::%arg-2%})
- set {_sizey} to abs(y-coordinate of {zombiebow.point1::%arg-2%} - y-coordinate of {zombiebow.point2::%arg-2%})
- set {_sizez} to abs(z-coordinate of {zombiebow.point1::%arg-2%} - z-coordinate of {zombiebow.point2::%arg-2%})
- send "&7Size: %{_sizex}%x%{_sizey}%x%{_sizez}%"
- else if arg-1 is "point2":
- if {zombiebow.stage::%arg-2%} is not set:
- send "&cステージ%arg-2 in lower case%は存在していません"
- else if {zombiebow.stage::%arg-2%} is set:
- set {zombiebow.point2::%arg-2%} to location of block at location of player
- set yaw of {zombiebow.point2::%arg-2%} to yaw of player
- set pitch of {zombiebow.point2::%arg-2%} to pitch of player
- send "&2ステージ&9%arg-2 in lower case%&2の範囲を更新しました"
- send "&7Point1: %getLocationInfo({zombiebow.point1::%arg-2%})%"
- send "&7Point2: %getLocationInfo({zombiebow.point2::%arg-2%})%"
- set {_sizex} to abs(x-coordinate of {zombiebow.point1::%arg-2%} - x-coordinate of {zombiebow.point2::%arg-2%})
- set {_sizey} to abs(y-coordinate of {zombiebow.point1::%arg-2%} - y-coordinate of {zombiebow.point2::%arg-2%})
- set {_sizez} to abs(z-coordinate of {zombiebow.point1::%arg-2%} - z-coordinate of {zombiebow.point2::%arg-2%})
- send "&7Size: %{_sizex}%x%{_sizey}%x%{_sizez}%"
- else if arg-1 is "bowsp":
- if {zombiebow.stage::%arg-2%} is not set:
- send "&cステージ%arg-2 in lower case%は存在していません"
- else if {zombiebow.stage::%arg-2%} is set:
- set {zombiebow.bowsp::%arg-2%} to location of block at location of player
- set yaw of {zombiebow.bowsp::%arg-2%} to yaw of player
- set pitch of {zombiebow.bowsp::%arg-2%} to pitch of player
- send "&2ステージ&9%arg-2 in lower case%&2の人間のスポーン地点を設定しました"
- send "&7Spawn1: %getLocationInfo({zombiebow.bowsp::%arg-2%})%"
- else if arg-1 is "zombiesp":
- if {zombiebow.stage::%arg-2%} is not set:
- send "&cステージ%arg-2 in lower case%は存在していません"
- else if {zombiebow.stage::%arg-2%} is set:
- set {zombiebow.zombiesp::%arg-2%} to location of block at location of player
- set yaw of {zombiebow.zombiesp::%arg-2%} to yaw of player
- set pitch of {zombiebow.zombiesp::%arg-2%} to pitch of player
- send "&2ステージ&9%arg-2 in lower case%&2のゾンビのスポーン地点を設定しました"
- send "&7Spawn2: %getLocationInfo({zombiebow.zombiesp::%arg-2%})%"
- else if arg-1 is "info":
- if {zombiebow.stage::%arg-2%} is not set:
- send "&cステージ%arg-2 in lower case%は存在していません"
- else if {zombiebow.stage::%arg-2%} is set:
- send "&2ステージ&9%arg-2 in lower case%&2の範囲を更新しました"
- send "&7Point1: %getLocationInfo({zombiebow.point1::%arg-2%})%"
- send "&7Point2: %getLocationInfo({zombiebow.point2::%arg-2%})%"
- set {_sizex} to abs(x-coordinate of {zombiebow.point1::%arg-2%} - x-coordinate of {zombiebow.point2::%arg-2%})
- set {_sizey} to abs(y-coordinate of {zombiebow.point1::%arg-2%} - y-coordinate of {zombiebow.point2::%arg-2%})
- set {_sizez} to abs(z-coordinate of {zombiebow.point1::%arg-2%} - z-coordinate of {zombiebow.point2::%arg-2%})
- send "&7Size: %{_sizex}%x%{_sizey}%x%{_sizez}%"
- send "&7Spawn1: %getLocationInfo({zombiebow.bowsp::%arg-2%})%"
- send "&7Spawn2: %getLocationInfo({zombiebow.zombiesp::%arg-2%})%"
- else if arg-1 is "housyuu" or "time":
- if arg-3 is not set:
- if arg-1 is "housyuu":
- set {_usagearg3} to "報酬"
- else if arg-1 is "time":
- set {_usagearg3} to "制限時間(秒)"
- send "&c使用法: /stage %arg-1 in lower case% <stagename> %{_usagearg3}%"
- else if arg-3 parsed as integer is not set:
- send "&c引数の指定が不正です"
- else if arg-1 is "housyuu":
- if {zombiebow.stage::%arg-2%} is not set:
- send "&cステージ%arg-2 in lower case%は存在していません"
- else if {zombiebow.stage::%arg-2%} is set:
- set {zombiebow.housyuu::%arg-2%} to arg-3 parsed as integer
- send "&2ステージ&9%arg-2 in lower case%&2の報酬を&6%arg-3 parsed as integer%G&2に設定しました"
- else if arg-1 is "time":
- if {zombiebow.stage::%arg-2%} is not set:
- send "&cステージ%arg-2 in lower case%は存在していません"
- else if {zombiebow.stage::%arg-2%} is set:
- set {zombiebow.time::%arg-2%} to arg-3 parsed as integer
- send "&2ステージ&9%arg-2 in lower case%&2の制限時間をを&9%arg-3 parsed as integer%秒&2に設定しました"
- else if arg-1 is "list":
- if {zombiebow.stage::*} is not set:
- send "&cステージはひとつも登録されていません"
- else if {zombiebow.stage::*} is set:
- set {_strstages} to join {zombiebow.stage::*} by "&f, &9"
- send "&7Stages (%size of {zombiebow.stage::*}%): &9%{_strstages}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement