Advertisement
Guest User

Untitled

a guest
Jun 18th, 2017
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.44 KB | None | 0 0
  1. if arg-1 is "map":
  2. set {_center} to player's location#location you want to loop the chunks around
  3. set {_radius} to 4
  4. set {_pos} to {_center}
  5. set {_counter} to 1
  6. if facing of player is north:
  7. loop 2 * {_radius} + 1 times:
  8. set z-coordinate of {_pos} to z-coordinate of {_center} - 16 * {_radius} + (loop-number - 1) * 16
  9. set x-coordinate of {_pos} to x-coordinate of {_center} - 16 * {_radius}
  10. loop 2 * {_radius} + 1 times:
  11. set {_chunks::%{_counter}%} to chunk at {_pos}
  12. add 1 to {_counter}
  13. add 16 to x-coordinate of {_pos}
  14. else if facing of player is south:
  15. loop 2 * {_radius} + 1 times:
  16. set z-coordinate of {_pos} to z-coordinate of {_center} + 16 * {_radius} - (loop-number - 1) * 16
  17. set x-coordinate of {_pos} to x-coordinate of {_center} + 16 * {_radius}
  18. loop 2 * {_radius} + 1 times:
  19. set {_chunks::%{_counter}%} to chunk at {_pos}
  20. add 1 to {_counter}
  21. add -16 to x-coordinate of {_pos}
  22. else if facing of player is west:
  23. loop 2 * {_radius} + 1 times:
  24. set x-coordinate of {_pos} to x-coordinate of {_center} - 16 * {_radius} + (loop-number - 1) * 16
  25. set z-coordinate of {_pos} to z-coordinate of {_center} + 16 * {_radius}
  26. loop 2 * {_radius} + 1 times:
  27. set {_chunks::%{_counter}%} to chunk at {_pos}
  28. add 1 to {_counter}
  29. add -16 to z-coordinate of {_pos}
  30. else if facing of player is east:
  31. loop 2 * {_radius} + 1 times:
  32. set x-coordinate of {_pos} to x-coordinate of {_center} + 16 * {_radius} - (loop-number - 1) * 16
  33. set z-coordinate of {_pos} to z-coordinate of {_center} - 16 * {_radius}
  34. loop 2 * {_radius} + 1 times:
  35. set {_chunks::%{_counter}%} to chunk at {_pos}
  36. add 1 to {_counter}
  37. add 16 to z-coordinate of {_pos}
  38.  
  39. #comienzo buscar enemigos
  40. #broadcast "%{_chunks::*}%"
  41. set {_cont} to 0
  42. set {_l1} to ""
  43. set {_l2} to ""
  44. set {_l3} to ""
  45. set {_l4} to ""
  46. set {_l5} to ""
  47. set {_l6} to ""
  48. set {_l7} to ""
  49. set {_l8} to ""
  50. set {_l9} to ""
  51.  
  52. set {_1} to "&8*"
  53. set {_2} to "&8@"
  54. set {_3} to "&8!"
  55. set {_4} to "&8@"
  56. set {_6} to "&8$"
  57. set {_7} to "&8~"
  58. set {_8} to "&8^"
  59. set {_9} to "&8&"
  60. loop {_chunks::*}:
  61. if chunk at player's location is loop-value:
  62. set {_ico} to "&b+&f"
  63. else if {x_factions_FAC::chunks::%loop-value%} is set:
  64. if {x_factions_FAC::chunks::%loop-value%.owner} is "&4WarZone":
  65. set {_ico} to "&4+"
  66. else:
  67. set {_F} to {x_factions_FAC::chunks::%loop-value%.owner}
  68. if {_faction.%{_F}%.icon} isn't set:
  69. if {_1.used} isn't set:
  70. set {_ico} to {_1}
  71. set {_1.used} to {_F}
  72. set {_faction.%{_F}%.icon} to {_1}
  73. else if {_2.used} isn't set:
  74. set {_ico} to {_2}
  75. set {_2.used} to {_F}
  76. set {_faction.%{_F}%.icon} to {_2}
  77.  
  78. else if {_3.used} isn't set:
  79. set {_ico} to {_3}
  80. set {_2.used} to {_F}
  81. set {_faction.%{_F}%.icon} to {_3}
  82.  
  83. else if {_4.used} isn't set:
  84. set {_ico} to {_4}
  85. set {_4.used} to {_F}
  86. set {_faction.%{_F}%.icon} to {_4}
  87.  
  88. else if {_5.used} isn't set:
  89. set {_ico} to {_5}
  90. set {_5.used} to {_F}
  91. set {_faction.%{_F}%.icon} to {_5}
  92.  
  93. else if {_6.used} isn't set:
  94. set {_ico} to {_6}
  95. set {_6.used} to {_F}
  96. set {_faction.%{_F}%.icon} to {_6}
  97.  
  98. else if {_7.used} isn't set:
  99. set {_ico} to {_7}
  100. set {_7.used} to {_F}
  101. set {_faction.%{_F}%.icon} to {_7}
  102.  
  103. else if {_8.used} isn't set:
  104. set {_ico} to {_8}
  105. set {_8.used} to {_F}
  106. set {_faction.%{_F}%.icon} to {_8}
  107.  
  108. else if {_9.used} isn't set:
  109. set {_ico} to {_9}
  110. set {_9.used} to {_F}
  111. set {_faction.%{_F}%.icon} to {_9}
  112. else:
  113. set {_ico} to {_faction.%{_F}%.icon}
  114. else:
  115. set {_ico} to "&7-"
  116. if {_cont} is less than 9:
  117. set {_l1} to "%{_l1}% %{_ico}%"
  118. add 1 to {_cont}
  119. else if {_cont} is less than 18:
  120. set {_l2} to "%{_l2}% %{_ico}%"
  121. add 1 to {_cont}
  122. else if {_cont} is less than 27:
  123. set {_l3} to "%{_l3}% %{_ico}%"
  124. add 1 to {_cont}
  125. else if {_cont} is less than 36:
  126. set {_l4} to "%{_l4}% %{_ico}%"
  127. add 1 to {_cont}
  128. else if {_cont} is less than 45:
  129. set {_l5} to "%{_l5}% %{_ico}%"
  130. add 1 to {_cont}
  131. else if {_cont} is less than 54:
  132. set {_l6} to "%{_l6}% %{_ico}%"
  133. add 1 to {_cont}
  134. else if {_cont} is less than 63:
  135. set {_l7} to "%{_l7}% %{_ico}%"
  136. add 1 to {_cont}
  137. else if {_cont} is less than 72:
  138. set {_l8} to "%{_l8}% %{_ico}%"
  139. add 1 to {_cont}
  140. else if {_cont} is less than 81:
  141. set {_l9} to "%{_l9}% %{_ico}%"
  142. add 1 to {_cont}
  143.  
  144. set {_n} to "N"
  145. set {_s} to "S"
  146. set {_e} to "E"
  147. set {_w} to "W"
  148. if facing of player is north:
  149. set {_n} to "&4N&6"
  150. else if facing of player is south:
  151. set {_s} to "&4S&6"
  152. else if facing of player is west:
  153. set {_w} to "&4W&6"
  154. else if facing of player is east:
  155. set {_e} to "&4E&6"
  156. set {_owner} to "Land of: %{x_factions_FAC::chunks::%chunk at player's location%.owner}%"
  157. set {_encabezado} to "&6---------[&2%chunk at player's location%&6 %{_owner}% ]-----------"
  158. replace "chunk" in {_encabezado} with ""
  159. replace "of %player's world%" in {_encabezado} with ""
  160. replace "<none>" in {_encabezado} with "nobody"
  161. send "%{_encabezado}%"
  162. send "%{_l1}%"
  163. send "%{_l2}%"
  164. send "%{_l3}%"
  165. send "%{_l4}% &6\%{_n}%/"
  166. send "%{_l5}% &6%{_w}%+%{_e}%"
  167. send "%{_l6}% &6/%{_s}%\"
  168. send "%{_l7}%"
  169. send "%{_l8}%"
  170. send "%{_l9}%"
  171.  
  172. if {_1.used} is set:
  173. set {_l10} to "&8%{_1}% &9%{_1.used}%"
  174.  
  175. if {_2.used} is set:
  176. set {_l10} to "%{_l10}% &f,%{_2}% &9%{_2.used}%"
  177.  
  178. if {_3.used} is set:
  179. set {_l10} to "%{_l10}% &f,%{_3}% &9%{_3.used}%"
  180.  
  181. if {_4.used} is set:
  182. set {_l10} to "%{_l10}% &f,%{_4}% &9%{_4.used}%"
  183.  
  184. if {_5.used} is set:
  185. set {_l10} to "%{_l10}% &f,%{_5}% &9%{_5.used}%"
  186.  
  187. if {_6.used} is set:
  188. set {_l10} to "%{_l10}% &f,%{_6}% &9%{_6.used}%"
  189.  
  190. if {_7.used} is set:
  191. set {_l10} to "%{_l10}% &f,%{_7}% &9%{_7.used}%"
  192.  
  193. if {_8.used} is set:
  194. set {_l10} to "%{_l10}% &f,%{_8}% &9%{_8.used}%"
  195.  
  196. if {_9.used} is set:
  197. set {_l10} to "%{_l10}% &f,%{_9}% &9%{_9.used}%"
  198. if {_l10} is set:
  199. send "%{_l10}%"
  200. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement