melzneni

quarry.cmds

Mar 19th, 2020
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.83 KB | None | 0 0
  1. /*
  2. inventory(default):
  3. 1-4: pc1 | pc2 | pc3 | pc4
  4. 5-8: tess1 | tess2 | tess3 | tess4
  5. 9-12: modem | quarry | empty | empty
  6. 13-16: empty | empty | empty | empty
  7. */
  8. fillFromArea(slot,x1,z1,x2,z2,y,id):{
  9. for(x=x1;x<=x2;x=x+1){
  10. for(z=z1;z<=z2;z=z+1){
  11. dig(slot,[x,y,z])
  12. };
  13. };
  14. };
  15. main:{
  16. while(true){
  17. navi_setNullPos();
  18. navi_setSpace([-3, 0, -3], [28, 5, 12]);
  19.  
  20. if (getFuelLevel()<1000){
  21. place($TESSERACT3$,[1,1,1]);
  22. moveTo([0,1,1],0);
  23. sleep(2);
  24. dig($TESSERACT3$,[1,1,1]);
  25. refuel();
  26. };
  27.  
  28. if (getItemCount($DIRT$)<20){
  29. navi_setSpace([-3, -2, -3], [28, 5, 12]);
  30. fillFromArea($DIRT$,8,-1,10,10,-2,$ID_DIRT$);
  31. navi_setSpace([-3, 0, -3], [28, 5, 12]);
  32. };
  33.  
  34. //placeQuarry(9,1,-2,3,$TESSERACT1$); //p1
  35. //destroyQuarry(0,1,-2,$TESSERACT1$); //d1
  36. //placeQuarry(11,1,9,0,$TESSERACT2$); //p2
  37. //destroyQuarry(11,1,0,$TESSERACT2$); //d2
  38. //placeQuarry(0,1,11,1,$TESSERACT1$); //p3
  39. //destroyQuarry(9,1,11,$TESSERACT1$); //d3
  40. //placeQuarry(-2,1,0,2,$TESSERACT1$); //p4
  41. //destroyQuarry(-2,1,9,$TESSERACT1$); //d4
  42.  
  43. //setup 1 -> setup 2
  44.  
  45. destroyQuarry(9,1,11,$TESSERACT2$); //d3
  46.  
  47. //destroyQuarry(11,1,0,$TESSERACT2$); //d2
  48.  
  49. //move 2
  50. destroyQuarry(11,1,0,$TESSERACT1$); //d2
  51. placeQuarry(11,1,9,0,$TESSERACT1$); //p2
  52. //destroyQuarry(0,1,-2,$TESSERACT1$); //d1
  53. //placeQuarry(9,1,-2,3,$TESSERACT1$); //p1
  54.  
  55. //move 1
  56. destroyQuarry(0,1,-2,$TESSERACT1$); //d1
  57. placeQuarry(9,1,-2,3,$TESSERACT1$); //p1
  58. //destroyQuarry(-2,1,9,$TESSERACT1$); //d4
  59. //placeQuarry(-2,1,0,2,$TESSERACT1$); //p4
  60.  
  61. //move 4
  62. destroyQuarry(-2,1,9,$TESSERACT1$); //d4
  63. placeQuarry(-2,1,0,2,$TESSERACT1$); //p4
  64. //destroyQuarry(9,1,11,$TESSERACT1$); //d3
  65. //placeQuarry(0,1,11,1,$TESSERACT1$); //p3
  66.  
  67. //placeQuarry(11,1,9,0,$TESSERACT2$); //p2
  68. placeQuarry(0,1,11,1,$TESSERACT2$); //p3
  69.  
  70. sleep(770);
  71.  
  72. //setup2 -> setup1 && move sensor
  73.  
  74. //move 2
  75. destroyQuarry(11,1,9,$TESSERACT1$); //d2
  76. placeQuarry(27,1,0,0,$TESSERACT1$); //p2
  77.  
  78. //move sensor
  79. buildSensor(20,1,4);
  80. sleep(30);
  81. destroySensor(4,1,4);
  82.  
  83. //move 1
  84. destroyQuarry(9,1,-2,$TESSERACT1$); //d1
  85. placeQuarry(16,1,-2,3,$TESSERACT1$); //p1
  86.  
  87. //move 3
  88. destroyQuarry(0,1,11,$TESSERACT1$); //d3
  89. placeQuarry(25,1,11,1,$TESSERACT1$); //p3
  90.  
  91. //move 4
  92. destroyQuarry(-2,1,0,$TESSERACT1$); //d4
  93. placeQuarry(14,1,9,2,$TESSERACT1$); //p4
  94.  
  95. moveTo([17,1,1],0);
  96.  
  97. sleep(730);
  98. }
  99. };
  100. buildSensor(x, y, z):{
  101. place($COMPUTER1$, [x, y + 3, z - 3]);
  102. peripheral("front", "turnOn");
  103. place($MODEM$, [x, y + 4, z - 3]);
  104. place($COMPUTER2$, [x - 3, y, z]);
  105. peripheral("front", "turnOn");
  106. place($MODEM$, [x - 3, y + 1, z]);
  107. place($COMPUTER3$, [x + 3, y, z]);
  108. peripheral("front", "turnOn");
  109. place($MODEM$, [x + 3, y + 1, z]);
  110. place($COMPUTER4$, [x, y + 3, z + 3]);
  111. peripheral("front", "turnOn");
  112. place($MODEM$, [x, y + 4, z + 3]);
  113. };
  114. destroySensor(x, y, z):{
  115. dig($MODEM$, [x, y + 4, z - 3], $ID_MODEM$);
  116. dig($COMPUTER1$, [x, y + 3, z - 3], $ID_COMPUTER$);
  117. dig($MODEM$, [x - 3, y + 1, z], $ID_MODEM$);
  118. dig($COMPUTER2$, [x - 3, y, z], $ID_COMPUTER$);
  119. dig($MODEM$, [x + 3, y + 1, z], $ID_MODEM$);
  120. dig($COMPUTER3$, [x + 3, y, z], $ID_COMPUTER$);
  121. dig($MODEM$, [x, y + 4, z + 3], $ID_MODEM$);
  122. dig($COMPUTER4$, [x, y + 3, z + 3], $ID_COMPUTER$);
  123. };
  124. placeQuarry(x, y, z, direction,t1):{
  125. place($DIRT$,[x,y-1,z]);
  126. place($QUARRY$, [x, y, z], direction);
  127. place(t1, [x, y + 1, z]);
  128. };
  129. destroyQuarry(x,y,z,t1):{
  130. dig(t1, [x, y + 1, z], $ID_TESSERACT$);
  131. dig($QUARRY$, [x, y, z], $ID_QUARRY$);
  132. dig($DIRT$,[x,y-1,z],$ID_DIRT$);
  133. };
  134. init:{
  135. $COMPUTER1$ = 1;
  136. $COMPUTER2$ = 2;
  137. $COMPUTER3$ = 3;
  138. $COMPUTER4$ = 4;
  139. $TESSERACT1$ = 5;
  140. $TESSERACT2$ = 6;
  141. $TESSERACT3$ = 7;
  142. $TESSERACT4$ = 8;
  143. $MODEM$ = 9;
  144. $QUARRY$ = 10;
  145. $DIRT$ = 11;
  146. $ID_MODEM$ = "ComputerCraft:CC-Peripheral";
  147. $ID_COMPUTER$ = "ComputerCraft:CC-Computer";
  148. $ID_TESSERACT$ = "ThermalExpansion:Tesseract";
  149. $ID_QUARRY$ = "BuildCraft|Builders:machineBlock";
  150. $ID_HOPPER$ = "EnderIO:blockVacuumChest";
  151. $ID_DIRT$ = "minecraft:dirt"
  152. };
  153. //pastebin run 0YB9PsQV startup={files={lib_defaultFunctions=<pb:BuLTbHg6>,quarryLib=<pb:Qwa20MrA>,quarry.cmds=<pb:WbYhHPrX>},delay=10,cmds={{'quarryLib','quarry.cmds',$arg1$,$arg2$}}} reboot=true label=<input:'Label'>
  154. //cp disk/pastebin pastebin
Add Comment
Please, Sign In to add comment