7mm

Skript: NamedLocation

7mm
Aug 7th, 2018
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.99 KB | None | 0 0
  1. command /nlo.int [<text>] [<text>] [<text>] [<text>]:
  2. permission: skript.admin
  3. trigger:
  4. if arg 1 is set:
  5. if arg 2 is set:
  6. if arg 3 is set:
  7. if arg 4 is not set:
  8. message "&c引数が足りません"
  9. message "&9/nlo.int <NLO Name> &6[x] [y] [z]"
  10. stop
  11. set {nlo.x::%arg 1%} to round(arg 2 parsed as number)
  12. set {nlo.y::%arg 1%} to round(arg 3 parsed as number)
  13. set {nlo.z::%arg 1%} to round(arg 4 parsed as number)
  14. set {nlo.loc::%arg 1%} to location ({nlo.x::%arg 1%}, {nlo.y::%arg 1%}, {nlo.z::%arg 1%})
  15. message "&aNLO名'%arg 1%'に座標を設定しました&d(%{nlo.x::%arg 1%}%, %{nlo.y::%arg 1%}%, %{nlo.z::%arg 1%}%)"
  16. else:
  17. set {_arg2} to arg 2 parsed as player
  18. if {_arg2} is online:
  19. set {nlo.x::%arg 1%} to round({_arg2}'s x-coordinate)
  20. set {nlo.y::%arg 1%} to round({_arg2}'s y-coordinate)
  21. set {nlo.z::%arg 1%} to round({_arg2}'s z-coordinate)
  22. set {nlo.loc::%arg 1%} to location ({nlo.x::%arg 1%}, {nlo.y::%arg 1%}, {nlo.z::%arg 1%})
  23. message "&aNLO名'%arg 1%'に座標を設定しました&d(%{nlo.x::%arg 1%}%, %{nlo.y::%arg 1%}%, %{nlo.z::%arg 1%}%)"
  24. else:
  25. message "&cそのプレイヤーはオフラインです"
  26. else:
  27. set {nlo.x::%arg 1%} to round(player's x-coordinate)
  28. set {nlo.y::%arg 1%} to round(player's y-coordinate)
  29. set {nlo.z::%arg 1%} to round(player's z-coordinate)
  30. set {nlo.loc::%arg 1%} to location ({nlo.x::%arg 1%}, {nlo.y::%arg 1%}, {nlo.z::%arg 1%})
  31. message "&aNLO名'%arg 1%'に座標を設定しました&d(%{nlo.x::%arg 1%}%, %{nlo.y::%arg 1%}%, %{nlo.z::%arg 1%}%)"
  32. else:
  33. message "&c引数が足りません"
  34. message "&9/nlo.int &6<NLO Name> &9[Player]"
  35. message "&9/nlo.int &6<NLO Name> &9[x] [y] [z]"
  36.  
  37. command /nlo.set [<text>] [<text>] [<text>] [<text>]:
  38. permission: skript.admin
  39. trigger:
  40. if arg 1 is set:
  41. if arg 2 is set:
  42. if arg 3 is set:
  43. if arg 4 is not set:
  44. message "&c引数が足りません"
  45. message "&9/nlo.set <NLO Name> &6[x] [y] [z]"
  46. stop
  47. set {nlo.x::%arg 1%} to round(arg 2 parsed as number)+0.5
  48. set {nlo.y::%arg 1%} to round(arg 3 parsed as number)+0.5
  49. set {nlo.z::%arg 1%} to round(arg 4 parsed as number)+0.5
  50. set {nlo.loc::%arg 1%} to location ({nlo.x::%arg 1%}, {nlo.y::%arg 1%}, {nlo.z::%arg 1%})
  51. message "&aNLO名'%arg 1%'に座標を設定しました&d(%{nlo.x::%arg 1%}%, %{nlo.y::%arg 1%}%, %{nlo.z::%arg 1%}%)"
  52. else:
  53. set {_arg2} to arg 2 parsed as player
  54. if {_arg2} is online:
  55. set {nlo.x::%arg 1%} to round({_arg2}'s x-coordinate)+0.5
  56. set {nlo.y::%arg 1%} to round({_arg2}'s y-coordinate)+0.5
  57. set {nlo.z::%arg 1%} to round({_arg2}'s z-coordinate)+0.5
  58. set {nlo.loc::%arg 1%} to location ({nlo.x::%arg 1%}, {nlo.y::%arg 1%}, {nlo.z::%arg 1%})
  59. message "&aNLO名'%arg 1%'に座標を設定しました&d(%{nlo.x::%arg 1%}%, %{nlo.y::%arg 1%}%, %{nlo.z::%arg 1%}%)"
  60. else:
  61. message "&cそのプレイヤーはオフラインです"
  62. else:
  63. set {nlo.x::%arg 1%} to round(player's x-coordinate)+0.5
  64. set {nlo.y::%arg 1%} to round(player's y-coordinate)+0.5
  65. set {nlo.z::%arg 1%} to round(player's z-coordinate)+0.5
  66. set {nlo.loc::%arg 1%} to location ({nlo.x::%arg 1%}, {nlo.y::%arg 1%}, {nlo.z::%arg 1%})
  67. message "&aNLO名'%arg 1%'に座標を設定しました&d(%{nlo.x::%arg 1%}%, %{nlo.y::%arg 1%}%, %{nlo.z::%arg 1%}%)"
  68. else:
  69. message "&c引数が足りません"
  70. message "&9/nlo.set &6<NLO Name> &9[Player]"
  71. message "&9/nlo.set &6<NLO Name> &9[x] [y] [z]"
  72.  
  73. command /nlo.dub [<text>] [<text>] [<text>] [<text>]:
  74. permission: skript.admin
  75. trigger:
  76. if arg 1 is set:
  77. if arg 2 is set:
  78. if arg 3 is set:
  79. if arg 4 is not set:
  80. message "&c引数が足りません"
  81. message "&9/nlo.dub <NLO Name> &6[x] [y] [z]"
  82. stop
  83. set {nlo.x::%arg 1%} to arg 2 parsed as number
  84. set {nlo.y::%arg 1%} to arg 3 parsed as number
  85. set {nlo.z::%arg 1%} to arg 4 parsed as number
  86. set {nlo.loc::%arg 1%} to location ({nlo.x::%arg 1%}, {nlo.y::%arg 1%}, {nlo.z::%arg 1%})
  87. message "&aNLO名'%arg 1%'に座標を設定しました&d(%{nlo.x::%arg 1%}%, %{nlo.y::%arg 1%}%, %{nlo.z::%arg 1%}%)"
  88. else:
  89. set {_arg2} to arg 2 parsed as player
  90. if {_arg2} is online:
  91. set {nlo.x::%arg 1%} to {_arg2}'s x-coordinate
  92. set {nlo.y::%arg 1%} to {_arg2}'s y-coordinate
  93. set {nlo.z::%arg 1%} to {_arg2}'s z-coordinate
  94. set {nlo.loc::%arg 1%} to location ({nlo.x::%arg 1%}, {nlo.y::%arg 1%}, {nlo.z::%arg 1%})
  95. message "&aNLO名'%arg 1%'に座標を設定しました&d(%{nlo.x::%arg 1%}%, %{nlo.y::%arg 1%}%, %{nlo.z::%arg 1%}%)"
  96. else:
  97. message "&cそのプレイヤーはオフラインです"
  98. else:
  99. set {nlo.x::%arg 1%} to player's x-coordinate
  100. set {nlo.y::%arg 1%} to player's y-coordinate
  101. set {nlo.z::%arg 1%} to player's z-coordinate
  102. set {nlo.loc::%arg 1%} to location ({nlo.x::%arg 1%}, {nlo.y::%arg 1%}, {nlo.z::%arg 1%})
  103. message "&aNLO名'%arg 1%'に座標を設定しました&d(%{nlo.x::%arg 1%}%, %{nlo.y::%arg 1%}%, %{nlo.z::%arg 1%}%)"
  104. else:
  105. message "&c引数が足りません"
  106. message "&9/nlo.dub &6<NLO Name> &9[Player]"
  107. message "&9/nlo.dub &6<NLO Name> &9[x] [y] [z]"
  108.  
  109. command /nlo.clear [<text>]:
  110. permission: skript.admin
  111. trigger:
  112. if arg 1 is set:
  113. clear {nlo.x::%arg 1%}
  114. clear {nlo.y::%arg 1%}
  115. clear {nlo.z::%arg 1%}
  116. clear {nlo.loc::%arg 1%}
  117. message "&aNLO名'%arg 1%'を初期化しました"
  118. else:
  119. message "&c引数が足りません"
  120. message "&9/nlo.set &6<NLO Name>"
  121.  
  122. command /nlo.tp [<text>] [<player>]:
  123. permission: skript.admin
  124. trigger:
  125. if arg 1 is not set:
  126. message "&c引数が足りません"
  127. message "&9/nlo.tp &6<NLO Name> &9[player]"
  128. set {_player} to arg 2
  129. if arg 2 is not set:
  130. set {_player} to player
  131. teleport {_player} to location of {nlo.loc::%arg 1%}
  132. message "&aテレポートしました"
Advertisement
Add Comment
Please, Sign In to add comment