Balerias

Untitled

Mar 26th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.33 KB | None | 0 0
  1. #author: karingijs272
  2. # _____________________
  3. #+ + + + + + / /++/
  4. #+ Edit + / WorldEdit++ /++/
  5. #+ This + / Version 1.4.3 /++/
  6. #+ Block + / /++/
  7. #+ + + + + + /_________________/++/
  8. #With the world edit /tool
  9. #all right reserved by karingijs
  10. #Copyright © karingijs
  11.  
  12. #Recomended to hold this to false there are allready more antylags in code
  13. #when you turn antylag to true worldedit will place 20 blocks per second
  14. options:
  15. antylag: false
  16. procentage: true
  17.  
  18. on left click with stick:
  19. if player is op:
  20. if player has stick named "&cWorld_Edit_tool":
  21. set {X1::%player%} to x-coordinate of event-block
  22. set {Y1::%player%} to y-coordinate of event-block
  23. set {Z1::%player%} to z-coordinate of event-block
  24. send "&8[&cWorldEdit++&8] &7< &4X: &c%{X1::%player%}% &4y: &c%{Y1::%player%}% &4z: &c%{Z1::%player%}% &7>"
  25. cancel event
  26. on right click with stick:
  27. if player is op:
  28. if player has stick named "&cWorld_Edit_tool":
  29. set {X2::%player%} to x-coordinate of event-block
  30. set {Y2::%player%} to y-coordinate of event-block
  31. set {Z2::%player%} to z-coordinate of event-block
  32. send "&8[&cWorldEdit++&8] &7< &4X: &c%{X2::%player%}% &4y: &c%{Y2::%player%}% &4z: &c%{Z2::%player%}% &7>"
  33. cancel event
  34.  
  35. command /worldedit++ [<string>]:
  36. aliases: worldedit, wand, wd
  37. trigger:
  38. if player is op:
  39. if arg 1 is not set:
  40. send "&8* &4/&cwd tool &8- &7The world edit tool for everything"
  41. send "&8* &4/&cwd info &8- &7Information about this skipt and author"
  42. send "&8* &4/&cwd commands &8- &7List of commands to use"
  43. if arg 1 is "tool":
  44. give stick named "&cWorld_Edit_tool" to player
  45. send "&8[&cWorldEdit++&8] &cSelect (2) points with &4left &cand &4right &cclick"
  46. if arg 1 is "info":
  47. send "&cAuthor : karingijs"
  48. send "&cVersion: 1.4.3"
  49. if arg 1 is "command" or "commands":
  50. send "&7* &2/&aball &e- make a ball around the player"
  51. send "&7* &2/&awalls &e- to make a cube wall"
  52. else:
  53. send "&8[&cWorldEdit++&8] &cSkript Version 1.0"
  54. command /tool:
  55. aliases: tools
  56. trigger:
  57. if player is op:
  58. give stick named "&cWorld_Edit_tool" to player
  59. send "&8[&cWorldEdit++&8] &cSelect (2) points with &4left &cand &4right &cclick"
  60. else:
  61. send "&8[&cWorldEdit++&8] Only ops"
  62.  
  63. command /place [<item>] [<item>] [<item>] [<item>] [<item>] [<item>] [<item>] [<item>] [<item>] [<item>]:
  64. trigger:
  65. if player is op:
  66. if arg 1 is not set:
  67. send "&c/place [Block-ID] or more..."
  68. stop
  69. add 1 to {WORLDEDIT::%player%::TIMES}
  70. if {X1::%player%} is smaller than {X2::%player%}:
  71. set {_x1} to 1
  72. set {_x2} to 2
  73. else:
  74. set {_x1} to 2
  75. set {_x2} to 1
  76. if {Y1::%player%} is smaller than {Y2::%player%}:
  77. set {_y1} to 1
  78. set {_y2} to 2
  79. else:
  80. set {_y1} to 2
  81. set {_y2} to 1
  82. if {Z1::%player%} is smaller than {Z2::%player%}:
  83. set {_z1} to 1
  84. set {_z2} to 2
  85. else:
  86. set {_z1} to 2
  87. set {_z2} to 1
  88. if {WORLDEDIT::%player%::STATUS} is set:
  89. send "&4Error(1/1)"
  90. stop
  91. set {WORLDEDIT::%player%::STATUS} to true
  92. set {_x} to difference between {X%{_x1}%::%player%} and {X%{_x2}%::%player%}
  93. set {_y} to difference between {Y%{_y1}%::%player%} and {Y%{_y2}%::%player%}
  94. set {_z} to difference between {Z%{_z1}%::%player%} and {Z%{_z2}%::%player%}
  95. add 1 to {_x}
  96. add 1 to {_y}
  97. add 1 to {_z}
  98. set {_Blocks} to 0
  99. set {_xx} to "%{X%{_x1}%::%player%} - 1%" parsed as number
  100. set {_yy} to "%{Y%{_y1}%::%player%} - 1%" parsed as number
  101. set {_zz} to "%{Z%{_z1}%::%player%} - 1%" parsed as number
  102. set {_Amount} to "%{_x} * {_z}%" parsed as number
  103. set {_Amount} to "%{_Amount} * {_y}%" parsed as number
  104. set {_procent} to "%{_Amount} / 100%" parsed as number
  105. set {_procentadd} to "%{_procent}%" parsed as number
  106. if {_Amount} is greater than 20000:
  107. set {_antylag} to true
  108. send "&8[&cWorldEdit++&8] &7< &cAntyLag protect to many blocks you can't use /unplace for this "
  109. wait 2.5 second
  110. else:
  111. send "&8[&cWorldEdit++&8] &7< &cchange %{_Amount}% blocks &7>"
  112. wait 2 second
  113. if arg 1 is set:
  114. add arg 1 to {_BLOCKTYPES::*}
  115. if arg 2 is set:
  116. add arg 2 to {_BLOCKTYPES::*}
  117. if arg 3 is set:
  118. add arg 3 to {_BLOCKTYPES::*}
  119. if arg 4 is set:
  120. add arg 4 to {_BLOCKTYPES::*}
  121. if arg 5 is set:
  122. add arg 5 to {_BLOCKTYPES::*}
  123. if arg 6 is set:
  124. add arg 6 to {_BLOCKTYPES::*}
  125. if arg 7 is set:
  126. add arg 7 to {_BLOCKTYPES::*}
  127. if arg 8 is set:
  128. add arg 8 to {_BLOCKTYPES::*}
  129. if arg 9 is set:
  130. add arg 9 to {_BLOCKTYPES::*}
  131. if arg 10 is set:
  132. add arg 10 to {_BLOCKTYPES::*}
  133. set {_randMax} to size of {_BLOCKTYPES::*}
  134. loop {_y} times:
  135. add 1 to {_yy}
  136. if "%loop-number%" is not "1":
  137. set {_xx} to "%{X%{_x1}%::%player%} - 1%" parsed as number
  138. set {_zz} to "%{Z%{_z1}%::%player%} - 1%" parsed as number
  139. loop {_z} times:
  140. if {_procent} is greater than {_procentold}:
  141. set {_procentold} to "%{_procent}%" parsed as number
  142. if {@procentage} is true:
  143. send "&8[&cWorldEdit++&8] &7< &aFinished &2%{_procents}% &aProcent! &7>"
  144. wait 2 tick
  145. add 1 to {_zz}
  146. loop {_x} times:
  147. set {_randBlock} to random number between 1 and {_randMax}
  148. #send "&a%{_randBlock}%"
  149. set {_randBlock} to rounded {_randBlock}
  150. #send "&c%{_randBlock}%"
  151. if {_blocks} is greater or equal to {_procent}:
  152. set {_procentold} to "%{_procent}%" parsed as number
  153. add {_procentadd} to {_procent}
  154. add 1 to {_procents}
  155. add 1 to {_Blocks}
  156. add 1 to {_xx}
  157. if {_antylag} is not set:
  158. set {WORLDEDIT::%player%::LOCATION::%{WORLDEDIT::%player%::TIMES}%::%{_blocks}%} to location at ({_xx}, {_yy}, {_zz})
  159. set {WORLDEDIT::%player%::BLOCKS::%{WORLDEDIT::%player%::TIMES}%::%{_blocks}%} to block at location of {WORLDEDIT::%player%::LOCATION::%{WORLDEDIT::%player%::TIMES}%::%{_blocks}%}
  160. set {WORLDEDIT::%player%::BLOCKS::%{WORLDEDIT::%player%::TIMES}%::%{_blocks}%} to "%{WORLDEDIT::%player%::BLOCKS::%{WORLDEDIT::%player%::TIMES}%::%{_blocks}%}%" parsed as item
  161. set block at location ({_xx}, {_yy}, {_zz}) to {_BLOCKTYPES::%{_randBlock}%}
  162. if {@antylag} is true:
  163. wait 0.03 second
  164. #else:
  165. # send "&cX: %{_xx}% Y:%{_yy}% Z: %{_zz}% %loop-number-1%/%loop-number-2%/%loop-number-3%"
  166. if "%{_zz}%" is "%{Z%{_z2}%::%player%} + 1%":
  167. set {_zz} to "%{Z%{_z1}%::%player%} - 1%" parsed as number
  168. if "%{_xx}%" is "%{X%{_x2}%::%player%}%":
  169. set {_xx} to "%{X%{_x1}%::%player%} - 1%" parsed as number
  170. send "&8[&cWorldEdit++&8] &7< &cYou replaced %{_Amount}% bolcks with %arg 1%. &7>"
  171. wait 10 tick
  172. if {_antylag} is not set:
  173. send "&8[&cWorldEdit++&8] &7< &c/unplace for unplace of %{_Amount}% blocks &7>"
  174. delete {WORLDEDIT::%player%::STATUS}
  175. stop
  176.  
  177. command /ball [<item>] [<number>]:
  178. trigger:
  179. if player is op:
  180. if arg 1 is not set:
  181. send "&c/ball &c&l[Item-ID] &c[Radius]"
  182. stop
  183. if arg 2 is not set:
  184. send "&c/ball [Item-ID] &c&l[Radius]"
  185. stop
  186. loop blocks in radius arg 2 around the player:
  187. set loop-block to arg 1
  188. add 1 to {_Amount}
  189. send "&8[&cWorldEdit++&8] &7< &cYou replaced %{_Amount}% bolcks with %arg 1%. &7>"
  190.  
  191. command /walls [<item>]:
  192. aliases: wall
  193. trigger:
  194. if player is op:
  195. if arg 1 is not set:
  196. send "&c/walls [Block-ID]"
  197. stop
  198. add 1 to {WORLDEDIT::%player%::TIMES}
  199. if {X1::%player%} is smaller than {X2::%player%}:
  200. set {_x1} to 1
  201. set {_x2} to 2
  202. else:
  203. set {_x1} to 2
  204. set {_x2} to 1
  205. if {Y1::%player%} is smaller than {Y2::%player%}:
  206. set {_y1} to 1
  207. set {_y2} to 2
  208. else:
  209. set {_y1} to 2
  210. set {_y2} to 1
  211. if {Z1::%player%} is smaller than {Z2::%player%}:
  212. set {_z1} to 1
  213. set {_z2} to 2
  214. else:
  215. set {_z1} to 2
  216. set {_z2} to 1
  217. set {_x} to difference between {X%{_x1}%::%player%} and {X%{_x2}%::%player%}
  218. set {_y} to difference between {Y%{_y1}%::%player%} and {Y%{_y2}%::%player%}
  219. set {_z} to difference between {Z%{_z1}%::%player%} and {Z%{_z2}%::%player%}
  220. set {_z} to {Z%{_z1}%::%player%}
  221. loop numbers between {Y%{_y1}%::%player%} and {Y%{_y2}%::%player%}:
  222. loop numbers between {X%{_x1}%::%player%} and {X%{_x2}%::%player%}:
  223. set {_y} to "%loop-number-1%" parsed as number
  224. set {_x} to "%loop-number-2%" parsed as number
  225. set block at location ({_x}, {_y}, {_z}) to arg 1
  226. set {_z} to {Z%{_z2}%::%player%}
  227. loop numbers between {Y%{_y1}%::%player%} and {Y%{_y2}%::%player%}:
  228. loop numbers between {X%{_x1}%::%player%} and {X%{_x2}%::%player%}:
  229. set {_y} to "%loop-number-1%" parsed as number
  230. set {_x} to "%loop-number-2%" parsed as number
  231. set block at location ({_x}, {_y}, {_z}) to arg 1
  232. set {_x} to {X%{_x1}%::%player%}
  233. loop numbers between {Y%{_y1}%::%player%} and {Y%{_y2}%::%player%}:
  234. loop numbers between {Z%{_z1}%::%player%} and {Z%{_z2}%::%player%}:
  235. set {_y} to "%loop-number-1%" parsed as number
  236. set {_z} to "%loop-number-2%" parsed as number
  237. set block at location ({_x}, {_y}, {_z}) to arg 1
  238. set {_x} to {X%{_x2}%::%player%}
  239. loop numbers between {Y%{_y1}%::%player%} and {Y%{_y2}%::%player%}:
  240. loop numbers between {Z%{_z1}%::%player%} and {Z%{_z2}%::%player%}:
  241. set {_y} to "%loop-number-1%" parsed as number
  242. set {_z} to "%loop-number-2%" parsed as number
  243. set block at location ({_x}, {_y}, {_z}) to arg 1
  244.  
  245. on quit:
  246. loop {WORLDEDIT::%player%::TIMES} times:
  247. loop {WORLDEDIT::%player%::BLOCKS::%{WORLDEDIT::%player%::TIMES}%::*}:
  248. delete {WORLDEDIT::%player%::BLOCKS::%{WORLDEDIT::%player%::TIMES}%::%loop-index%}
  249. delete {WORLDEDIT::%player%::LOCATION::%{WORLDEDIT::%player%::TIMES}%::%loop-index%}
  250. set {WORLDEDIT::%player%::TIMES} to 0
  251. delete {WORLDEDIT::%player%::STATUS}
  252.  
  253. command /unplace:
  254. trigger:
  255. if player is op:
  256. if {WORLDEDIT::%player%::TIMES} is set:
  257. if {WORLDEDIT::%player%::STATUS} is not set:
  258. if {WORLDEDIT::%player%::TIMES} is greater than 0:
  259. set {WORLDEDIT::%player%::STATUS} to true
  260. loop {WORLDEDIT::%player%::BLOCKS::%{WORLDEDIT::%player%::TIMES}%::*}:
  261. add 1 to {_blocks}
  262. set {_procent} to "%{_blocks} / 100%" parsed as number
  263. set {_procentadd} to "%{_procent}%" parsed as number
  264. set {_blocks} to 0
  265. loop {WORLDEDIT::%player%::BLOCKS::%{WORLDEDIT::%player%::TIMES}%::*}:
  266. add 1 to {_blocks}
  267. if {_blocks} is greater than {_procent}:
  268. add 1 to {_procents}
  269. set {_procent} to "%{_procent} + {_procentadd}%" parsed as number
  270. if {@procentage} is true:
  271. send "&8[&cWorldEdit++&8] &7< &aFinished &2%{_procents}% &aProcent! &7>"
  272. wait 2 tick
  273. set block at {WORLDEDIT::%player%::LOCATION::%{WORLDEDIT::%player%::TIMES}%::%loop-index%} to {WORLDEDIT::%player%::BLOCKS::%{WORLDEDIT::%player%::TIMES}%::%loop-index%}
  274. delete {WORLDEDIT::%player%::BLOCKS::%{WORLDEDIT::%player%::TIMES}%::%loop-index%}
  275. delete {WORLDEDIT::%player%::LOCATION::%{WORLDEDIT::%player%::TIMES}%::%loop-index%}
  276. if {@antylag} is true:
  277. wait 0.03 second
  278. subtract 1 from {WORLDEDIT::%player%::TIMES}
  279. delete {WORLDEDIT::%player%::STATUS}
  280. else:
  281. send "&cError(3/3)"
  282. else:
  283. send "&cError(2/3)"
  284. else:
  285. send "&cError(1/3)"
Add Comment
Please, Sign In to add comment