Advertisement
jimmyfilips

bnanv2

Sep 13th, 2013
3,216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.62 KB | None | 0 0
  1. $${
  2. if(autoputv4);
  3. log("&d{MACRO} &6AutoPUT &c[OFF]");
  4. unset(autoputv4);
  5. keyup(back);
  6. keyup(sneak);
  7. stop();
  8. else;
  9. log("&d{MACRO} &6AutoPUT &a[ON]");
  10. #tic2=%@#tic2%;
  11. set(autoputv4);
  12.  
  13. PROMPT(#itemid,$$i,"ID do item que será usado:"); if(%#itemid%=0);unset(autoputv4);stop();endif;
  14. PROMPT(#nlado,$$?,"Comprimento:"); if(%#nlado%=0);unset(autoputv4);stop();endif;
  15. PROMPT(#nlado1,$$?,"Largura:"); if(%#nlado1%=0);unset(autoputv4);stop();endif;
  16. log("&d{MACRO} &6Deixe o inventório aberto!");
  17. #calc1=%#lado%/2;
  18. #calc2=%#calc1%*2;
  19. #ih45=%#lado%-%#calc1%;
  20. #nladox=%#nlado%;
  21. #nlado1x=%#nlado1%
  22. #nlado=%#nlado%;
  23. #impvar=%#nlado1%;
  24. #nlado1=%#nlado1%/2;
  25. #imp=%#impvar%-(%#nlado1%*2);
  26. if(%#imp%=1);#nlado1=%#nlado1%+1;endif;
  27.  
  28. &dir = %DIRECTION%;
  29.  
  30. ifmatches(%&dir%,N);&dir=NORTH;endif;
  31. ifmatches(%&dir%,S);&dir=SOUTH;endif;
  32. ifmatches(%&dir%,E);&dir=EAST;endif;
  33. ifmatches(%&dir%,W);&dir=WEST;endif;
  34.  
  35. set(ftpass);
  36.  
  37. gui(inventory);
  38. wait(800ms);
  39.  
  40. #dims=%#nladox%*%#nlado1x%;
  41. #tpacks=%#dims%/64;
  42. &tpacks=;
  43. if(%#tpacks%!=0);&tpacks="%#tpacks% packs e ";endif;
  44. #trest=%#dims%-(#tpacks*64);
  45. if(%#trest%!=0);&trest="%#trest% blocos";else;&trest=;endif;
  46. #stack=0;
  47. #stackx=0;
  48. gui(inventory);
  49. wait(1);
  50. for(#capac,9,44);
  51. getslotitem(%#capac%,#id,#stack);
  52. if(%#id%=%#itemid%);#stackx=%#stackx%+%#stack%;endif;
  53. next;
  54.  
  55. if(%#dims%>%#stackx%);
  56. gui();
  57. log("&d{MACRO} &cOps! &6Total de itens no inventário insuficiente. :(");
  58. log("&d{MACRO} &6Para esse tamanho são necessários &9%&tpacks%%&trest%.");
  59. log("&d{MACRO} &6AutoPUT &c[OFF]");
  60. unset(autoputv4);
  61.  
  62. stop();
  63. endif;
  64.  
  65. log("&d{MACRO} &6Área de dimensões &9%#nladox% &6por &9%#nlado1x%&6.");
  66. log("&d{MACRO} &6Total de blocos: &9%#dims% &6blocos. ");
  67.  
  68. for(#nii,1,%#nlado1%);
  69. for(#ucris,1,2);
  70.  
  71. getslot(%#itemid%,#i);
  72. if(%#i%<36);
  73. slotclick(%#i%,l,true);
  74. endif;
  75. if(%#i%=-1);unset(autoputv4);log("&d{MACRO} &6Acabaram os itens :/ &c[OFF]");log("&d{MACRO} &6AutoPUT &c[OFF]");stop();endif;
  76. if((%#ucris%=2)&&(%#nlado1%=%#nii%)&&(%#imp%=1));
  77. else;
  78.  
  79. if(%#ucris%=1);
  80. &loc=+90;
  81. &side=left;
  82. endif;
  83.  
  84. if(%#ucris%=2);
  85. &loc=-90;
  86. &side=right;
  87. endif;
  88.  
  89. &dir=%DIRECTION%;
  90. ifmatches(%&dir%,N);&dir=NORTH;endif;
  91. ifmatches(%&dir%,S);&dir=SOUTH;endif;
  92. ifmatches(%&dir%,E);&dir=EAST;endif;
  93. ifmatches(%&dir%,W);&dir=WEST;endif;
  94.  
  95. do(%#nlado%);
  96. keydown(sneak);
  97. look(%&dir%);
  98. look(,+83);
  99. #nposx1 = %XPOS%; #nposx2 = %ZPOS%;
  100. do;
  101. keydown(back);
  102. pick(%#itemid%);
  103. key(use);
  104. until((%XPOS%=%#nposx1%+1)|(%XPOS%=%#nposx1%-1)|(%ZPOS%=%#nposx2%+1)|(%ZPOS%=%#nposx2%-1));
  105. loop;
  106. #nposx1 = %XPOS%; #nposx2 = %ZPOS%;
  107.  
  108. if(((%#ucris%=1)&&(%#nlado1%=%#nii%)&&(%#imp%=1))|((%#ucris%=2)&&(%#nlado1%=%#nii%)&&(%#imp%=0)));
  109. else;
  110. look(%&loc%,);
  111. do;
  112. keydown(back);
  113. until((%XPOS%=%#nposx1%+1)|(%XPOS%=%#nposx1%-1)|(%ZPOS%=%#nposx2%+1)|(%ZPOS%=%#nposx2%-1));
  114. wait(200ms);
  115. keyup(back);
  116.  
  117. #nposx1 = %XPOS%; #nposx2 = %ZPOS%;
  118. do;
  119. keydown(%&side%);
  120. until((%XPOS%=%#nposx1%+1)|(%XPOS%=%#nposx1%-1)|(%ZPOS%=%#nposx2%+1)|(%ZPOS%=%#nposx2%-1));
  121. wait(100ms);
  122. pick(%#itemid%);
  123. key(use);
  124. wait(100ms);
  125. key(use);
  126. wait(100ms);
  127. key(use);
  128. wait(200ms);
  129. keyup(%&side%);
  130. look(%&loc%,);
  131. endif;
  132. endif;
  133. next;
  134. next;
  135.  
  136.  
  137.  
  138. #tic2=%@#tic2%-%#tic2%;
  139. #tich=%#tic2%/3600;
  140. #ticm=(%#tic2%/60)-(%#tich%*60);
  141. #tics=(%#tic2%)-(%#ticm%*60);
  142.  
  143. if(%#tich%>1);&tch="&9%#tich% &6horas, ";else;&tch="&9%#tich% &6hora, ";endif;
  144. if(%#ticm%>1);&tcm="&9%#ticm% &6minutos e ";else;&tcm="&9%#ticm% &6minuto e ";endif;
  145. if(%#tics%>1);&tcs="&9%#tics% &6segundos";else;&tcs="&9%#tics% &6segundo";endif;
  146.  
  147. if(%#tich%<1);&tch=;endif;
  148. if(%#ticm%<1);&tcm=;endif;
  149. if(%#tics%<1);&tcs=;endif;
  150.  
  151. keyup(back);
  152. do;
  153. keydown(FORWARD);
  154. until((%XPOS%=%#nposx1%+1)|(%XPOS%=%#nposx1%-1)|(%ZPOS%=%#nposx2%+1)|(%ZPOS%=%#nposx2%-1));
  155. wait(40ms);
  156. keyup(FORWARD);
  157. keyup(sneak);
  158.  
  159. gui();
  160. log(&d{MACRO} &6Tempo gasto: %&tch%%&tcm%%&tcs%);
  161. log("&d{MACRO} &6AutoPUT &c[OFF]");
  162.  
  163. unset(autoputv4);
  164. stop();
  165. endif;
  166. }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement