worldedit_old.txt 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. %setVar no-join true;
  2. %addList allowed;
  3. %addListElement allowed marvinius;
  4. %addListElement allowed kajetanjohannes;
  5. %addListElement allowed eropster;
  6. %addListElement allowed Kargam;
  7. %addListElement allowed sunrise_xD;
  8. %setVars %getQuestLeader;;
  9. %if %checkForListElement allowed $player-name; == true goto start;
  10. %term;
  11. @start
  12. %msg all §rDu hast nun §bWorldedit.;
  13. %loadEvent block-click;
  14. %loadEvent block-break;
  15. %loadEvent chat;
  16. %goto wait;
  17. @wait
  18. %wait;
  19. %if $event == block-break && $player-item-type == WOOD_SPADE goto cancel;
  20. %if $event == chat goto checkarg0;
  21. %if $event == block-click && $player-item-type == WOOD_SPADE && $action == LEFT_CLICK_BLOCK goto setblockpos1;
  22. %if $event == block-click && $player-item-type == WOOD_SPADE && $action == RIGHT_CLICK_BLOCK goto setblockpos2;
  23. %if $event == player-leave goto giveup;
  24. %goto wait;
  25. @cancel
  26. %setVar cancel true;
  27. %goto wait;
  28. @syntax
  29. %speak $player-name §dWorldEdit §r-----------------------------------------;
  30. %speak $player-name §dWorldEdit §3%percent;set <block-name> §r--> §7Setzt den ausgewählten Bereich auf eine Blockart;
  31. %speak $player-name §dWorldEdit §3%percent;undo §r--> §7Macht die letzte Aktion rückgängig;
  32. %speak $player-name §dWorldEdit §3%percent;replace <old-block> <new-block> §r--> §7Ersetzt im ausgewählten Bereich alle alten Blöcke durch die neuen.;
  33. %speak $player-name §dWorldEdit §3%percent;copy §r--> §7Speichert die Auswahl;
  34. %speak $player-name §dWorldEdit §3%percent;paste §r--> §7Kopiert die Auswahl;
  35. %speak $player-name §dWorldEdit §3%percent;clone §r--> §7Setzt den zu klonenden Bereich fest.;
  36. %speak $player-name §dWorldEdit §3%percent;clone confirm §r--> §7Klont die Auswahl korrekt.;
  37. %speak $player-name §dWorldEdit §3%percent;pos1 §r--> §7Setzt deine aktuelle Position auf Pos1;
  38. %speak $player-name §dWorldEdit §3%percent;pos2 §r--> §7Setzt deine aktuelle Position auf Pos2;
  39. %goto wait;
  40. @checkarg0
  41. %if %getListElementAt args 0; == we && %getListSize args; == 1 goto syntax;
  42. %if %getListElementAt args 0; == pos1 && %getListSize args; == 1 goto setplayerpos1;
  43. %if %getListElementAt args 0; == pos2 && %getListSize args; == 1 goto setplayerpos2;
  44. %if %getListElementAt args 0; == undo && %getListSize args; == 1 && $undo == true goto undo;
  45. %if %getListElementAt args 0; == paste && %getListSize args; == 1 goto dopaste1;
  46. %if %getListElementAt args 0; == clone && %getListSize args; == 1 goto prepareclone;
  47. %goto check;
  48. @check
  49. %if $world1 == $world2 goto checks1;
  50. %speak $player-name §dWorldEdit §rDie Welten der ausgewählten Blöcke stimmen nicht überein bzw. die Ecken wurden nicht ausgewählt.;
  51. %goto wait;
  52. @checks1
  53. %if %getListElementAt args 0; == clone && %getListSize args; == 2 goto checkclone;
  54. %if %getListElementAt args 0; == copy && %getListSize args; == 1 goto copy;
  55. %if %getListElementAt args 0; == set && %getListSize args; == 2 goto checkset;
  56. %if %getListElementAt args 0; == replace && %getListSize args; == 3 goto checkreplace;
  57. %goto syntax;
  58. @checkclone
  59. %if %getListElementAt args 1; == confirm || %getListElementAt args 1; == co goto doclone;
  60. %goto syntax;
  61. @checkset
  62. %if %isValidStack %getListElementAt args 1;; == true goto set;
  63. %speak $player-name §dWorldEdit §rDer angegebene Block ist nicht gültig.;
  64. %goto wait;
  65. @checkreplace
  66. %if %isValidStack %getListElementAt args 1;; == true && %isValidStack %getListElementAt args 2;; == true goto replace;
  67. %speak $player-name §dWorldEdit §rDer angegebene Block ist nicht gültig.;
  68. %goto wait;
  69. @setplayerpos1
  70. %setVar x1 %coords $player-loc x;;
  71. %setVar y1 %coords $player-loc y;;
  72. %setVar z1 %coords $player-loc z;;
  73. %setVar world1 %coords $player-loc w;;
  74. %speak $player-name §dWorldEdit %concat §3Pos1: $x1 : $y1 : $z1;;
  75. %goto wait;
  76. @setplayerpos2
  77. %setVar x2 %coords $player-loc x;;
  78. %setVar y2 %coords $player-loc y;;
  79. %setVar z2 %coords $player-loc z;;
  80. %setVar world2 %coords $player-loc w;;
  81. %speak $player-name §dWorldEdit %concat §3Pos2: $x2 : $y2 : $z2;;
  82. %goto wait;
  83. @setblockpos1
  84. %setVar x1 %coords $block-loc x;;
  85. %setVar y1 %coords $block-loc y;;
  86. %setVar z1 %coords $block-loc z;;
  87. %setVar world1 %coords $block-loc w;;
  88. %speak $player-name §dWorldEdit %concat §3Pos1: $x1 : $y1 : $z1;;
  89. %goto wait;
  90. @setblockpos2
  91. %setVar x2 %coords $block-loc x;;
  92. %setVar y2 %coords $block-loc y;;
  93. %setVar z2 %coords $block-loc z;;
  94. %setVar world2 %coords $block-loc w;;
  95. %speak $player-name §dWorldEdit %concat §3Pos2: $x2 : $y2 : $z2;;
  96. %goto wait;
  97. @copy
  98. %setVar aktion copy;
  99. %goto change;
  100. @replace
  101. %setVar aktion replace;
  102. %goto change;
  103. @set
  104. %setVar aktion set;
  105. %goto change;
  106. @change
  107. %if $aktion != copy goto override5;
  108. %addList copyblocktype;
  109. %addList copyblockdata;
  110. @override5
  111. %if $aktion == copy goto override6;
  112. %removeList undoblocktype;
  113. %removeList undoblockdata;
  114. %removeList undoblockloc;
  115. %addList undoblocktype;
  116. %addList undoblockdata;
  117. %addList undoblockloc;
  118. @override6
  119. %setVar world $world1;
  120. %setVar counter 0;
  121. %if $x1 < $x2 goto override1;
  122. %setVar helper $x2;
  123. %setVar x2 $x1;
  124. %setVar x1 $helper;
  125. @override1
  126. %if $y1 < $y2 goto override2;
  127. %setVar helper $y2;
  128. %setVar y2 $y1;
  129. %setVar y1 $helper;
  130. @override2
  131. %if $z1 < $z2 goto override3;
  132. %setVar helper $z2;
  133. %setVar z2 $z1;
  134. %setVar z1 $helper;
  135. @override3
  136. %setVar helper null;
  137. %setVar x $x1;
  138. @start_x
  139. %setVar y $y1;
  140. @start_y
  141. %setVar z $z1;
  142. @start_z
  143. %setVar loc %concat $world : $x : $y : $z;;
  144. @doset
  145. %if $aktion != set goto doreplace;
  146. %addListElement undoblocktype %blockType $loc;;
  147. %addListElement undoblockdata %blockData $loc;;
  148. %addListElement undoblockloc $loc;
  149. %setBlock $loc %getListElementAt args 1;;
  150. %setVar counter %add $counter 1;;
  151. %goto override4;
  152. @doreplace
  153. %if $aktion != replace goto docopy;
  154. %if %blockType $loc; != %getListElementAt args 1; goto override4;
  155. #split requested
  156. %addListElement undoblocktype %blockType $loc;;
  157. %addListElement undoblockdata %blockData $loc;;
  158. %addListElement undoblockloc $loc;
  159. %setBlock $loc %getListElementAt args 2;;
  160. %setVar counter %add $counter 1;;
  161. %goto override4;
  162. @docopy
  163. %if $aktion != copy goto override4;
  164. %setVar pasteable true;
  165. %setVar xedgedistance %sub $x2 $x1;;
  166. %setVar yedgedistance %sub $y2 $y1;;
  167. %setVar zedgedistance %sub $z2 $z1;;
  168. %setVar xdistance %sub $x1 %coords $player-loc x;;;
  169. %setVar ydistance %sub $y1 %coords $player-loc y;;;
  170. %setVar zdistance %sub $z1 %coords $player-loc z;;;
  171. %addListElement copyblocktype %blockType $loc;;
  172. %addListElement copyblockdata %blockData $loc;;
  173. %setVar counter %add $counter 1;;
  174. %goto override4;
  175. @override4
  176. %setVar z %add $z 1;;
  177. %if $z <= $z2 goto start_z;
  178. %setVar y %add $y 1;;
  179. %if $y <= $y2 goto start_y;
  180. %setVar x %add $x 1;;
  181. %if $x <= $x2 goto start_x;
  182. %if $aktion == copy goto override8;
  183. %setVar undo true;
  184. %speak $player-name §dWorldEdit §3Done: $counter blocks affected;
  185. %setVar aktion null;
  186. %goto wait;
  187. @override8
  188. %speak $player-name §dWorldEdit §3Done: $counter blocks stored;
  189. %setVar topaste $counter;
  190. %setVar aktion null;
  191. %goto wait;
  192. @doclone
  193. %setVar x $x1;
  194. @start_x
  195. %setVar y $y1;
  196. @start_y
  197. %setVar z $z1;
  198. @start_z
  199. %setVar loc %concat $world : $x : $y : $z;;
  200. @doclone1
  201. %if $cloneable == true goto doclone2;
  202. %speak $player-name §dWorldEdit §3Es wurde nichts zum Klonen gespeichert.;
  203. %goto wait;
  204. @doclone2
  205. %addListElement undoblocktype %blockType $loc;;
  206. %addListElement undoblockdata %blockData $loc;;
  207. %addListElement undoblockloc $loc;
  208. %setVar aimloc %modLoc $takefromloc
  209. %setVar relloc %modLoc $takefromloc
  210. %blockClone $relloc $loc;
  211. %setVar counter %add $counter 1;;
  212. %setVar cloneable false;
  213. %goto override4;
  214. @dopaste1
  215. %if $pasteable == true goto dopaste2;
  216. %speak $player-name §dWorldEdit §3Es wurde nichts zum Kopieren gespeichert.;
  217. %goto wait;
  218. @dopaste2
  219. %setVar startloc %modLoc $player-loc $xdistance $ydistance $zdistance;;
  220. %removeList undoblocktype;
  221. %removeList undoblockdata;
  222. %removeList undoblockloc;
  223. %addList undoblocktype;
  224. %addList undoblockdata;
  225. %addList undoblockloc;
  226. %setVar i 0;
  227. %setVar x 0;
  228. @start1_x
  229. %setVar y 0;
  230. @start1_y
  231. %setVar z 0;
  232. @start1_z
  233. @pastelabel
  234. %setVar relloc %modLoc $startloc $x $y $z;;
  235. %addListElement undoblocktype %blockType $relloc;;
  236. %addListElement undoblockdata %blockData $relloc;;
  237. %addListElement undoblockloc $relloc;
  238. %setBlock $relloc %concat %getListElementAt copyblocktype $i; : %getListElementAt copyblockdata $i;;;
  239. %setVar i %add $i 1;;
  240. %if $i < %sub %getListSize copyblocktype; $topaste; goto pastelabel;
  241. %setVar z %add $z 1;;
  242. %if $z <= $zedgedistance goto start1_z;
  243. %setVar y %add $y 1;;
  244. %if $y <= $yedgedistance goto start1_y;
  245. %setVar x %add $x 1;;
  246. %if $x <= $xedgedistance goto start1_x;
  247. %setVar undo true;
  248. %speak $player-name §dWorldEdit §3Done: $i blocks affected;
  249. %goto wait;
  250. @prepareclone
  251. %setVar world $world1;
  252. %if $x1 < $x2 goto override9;
  253. %setVar helper $x2;
  254. %setVar x2 $x1;
  255. %setVar x1 $helper;
  256. @override9
  257. %if $y1 < $y2 goto override10;
  258. %setVar helper $y2;
  259. %setVar y2 $y1;
  260. %setVar y1 $helper;
  261. @override10
  262. %if $z1 < $z2 goto override11;
  263. %setVar helper $z2;
  264. %setVar z2 $z1;
  265. %setVar z1 $helper;
  266. @override11
  267. %setVar helper null;
  268. %setVar takefromloc %concat $world : $x1 : $y1 : $z1;;
  269. %setVar toclonex %sub $x2 $x1;;
  270. %setVar tocloney %sub $y2 $y1;;
  271. %setVar toclonez %sub $z2 $z1;;
  272. %setVar cloneable true;
  273. %speak $player-name §dWorldEdit §3Setze nun per Linksklick mit der Holzschaufel den untersten südwestlichsten Punkt.;
  274. %goto wait;
  275. @undo
  276. %setVar i 0;
  277. @undolabel
  278. %setVar type %getListElementAt undoblocktype $i;;
  279. %setVar data %getListElementAt undoblockdata $i;;
  280. %setVar loc %getListElementAt undoblockloc $i;;
  281. %setBlock $loc %concat $type : $data;;
  282. %setVar i %add $i 1;;
  283. %if $i < %getListSize undoblocktype; goto undolabel;
  284. %removeList undoblocktype;
  285. %removeList undoblockdata;
  286. %removeList undoblockloc;
  287. %setVar undo false;
  288. %speak $player-name §dWorldEdit §3Done: $i blocks affected;
  289. %goto wait;
  290. @giveup
  291. %term;