JimmyF

Imitação da colheita do besouro automatizada

Jan 16th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.91 KB | None | 0 0
  1. $${
  2. //Macro Mega Fazendeiro para 1.8
  3. //Desenvolvido por Nugou
  4.  
  5. // a key_auto serve para substituir um KEY_N para automatizar o processo de escolha
  6. set(key_auto);
  7. // os locais com comando "prompt" foram substituidos por um "set" para selecionar o numero desejado
  8.  
  9. if(cc)
  10. log(&6[Macro]&b Mega Fazendeiro &4[Off]);
  11. unset(cc);
  12. unset(@rec);
  13. unset(@des);
  14. keyup(sneak);
  15. keyup(forward);
  16. keyup(left);
  17. keyup(right);
  18. keyup(jump);
  19. unset(sai);
  20. if(!vender);
  21. if(pos);
  22. #xtemp[%#plant%]=%XPOS%;#ztemp[%#plant%]=%ZPOS%;
  23. if(%#plant%=1);}$$/sethome fungotemp$${endif;
  24. if(%#plant%=2);}$$/sethome canatemp$${endif;
  25. if(%#plant%=3);}$$/sethome trigotemp$${endif;
  26. if(%#plant%=4);}$$/sethome cenouratemp$${endif;
  27. if(%#plant%=5);}$$/sethome batatatemp$${endif;
  28. set(reload);
  29. log(&6[Macro]&b Posição salva!);
  30. elseif(reload);
  31. log(&6[Macro]&b Posição não reconhecida);
  32. log(&6[Macro]&b Posição não será salva!);
  33. log(&6[Macro]&b Sua home foi atualizada para antiga posição);
  34. endif;
  35. endif;
  36. stop;
  37. else;
  38. unset(sai);
  39. set(cc);
  40. set(@rec);
  41. set(@pergunta);
  42. @&chave[%@#idp%]=%KEYNAME%;
  43. if(!@des);
  44. unset(reset);for(#i,1,5);unset(p%#i%);set(&at[%#i%],&0Rejeitado);next;#plant=0;
  45. do;
  46. unset(pos);
  47. clearchat;
  48. log(&b ==== &6Qual sua plantação? &b====);
  49. log( &61 &b- &7Plant de &3Fungo &6Status: %&at[1]%);
  50. log( &62 &b- &7Plant de &3Cana &6Status: %&at[2]%);
  51. log( &63 &b- &7Plant de &3Trigo &6Status: %&at[3]%);
  52. log( &64 &b- &7Plant de &3Cenoura &6Status: %&at[4]%);
  53. log( &65 &b- &7Plant de &3Batata &6Status: %&at[5]%);
  54. log( &60 &b- &fContinuar);
  55. if(KEY_1);wait(1t);if(!p1);&item="nether_wart";for(#i,1,5);unset(p%#i%);set(&at[%#i%],&0Rejeitado);next;set(&at[1],&aSelecionado);#plant=1;#piso=1;#piso1=0;#blo=0;set(p1);endif;endif;
  56. if(key_auto);wait(1t);if(!p2);&item="reeds";for(#i,1,5);unset(p%#i%);set(&at[%#i%],&0Rejeitado);next;set(&at[2],&aSelecionado);#plant=2;#piso=0;#piso1=-1;#blo=-1;set(p2);endif;endif;
  57. if(KEY_3);wait(1t);if(!p3);&item="wheat_seeds";for(#i,1,5);unset(p%#i%);set(&at[%#i%],&0Rejeitado);next;set(&at[3],&aSelecionado);#plant=3;#piso=0;#piso1=-1;#blo=-1;set(p3);endif;endif;
  58. if(KEY_4);wait(1t);if(!p4);&item="carrots";for(#i,1,5);unset(p%#i%);set(&at[%#i%],&0Rejeitado);next;set(&at[4],&aSelecionado);#plant=4;#piso=0;#piso1=-1;#blo=-1;set(p4);endif;endif;
  59. if(KEY_5);wait(1t);if(!p5);&item="potatoes";for(#i,1,5);unset(p%#i%);set(&at[%#i%],&0Rejeitado);next;set(&at[5],&aSelecionado);#plant=5;#piso=0;#piso1=-1;#blo=-1;set(p5);endif;endif;
  60. if(key_auto);break;endif;
  61. loop;
  62. if(%#plant%=0);
  63. log(&6[Macro]&b Você não seleciono nenhuma opção);
  64. log(&6[Macro]&b Mega Fazendeiro &4[Off]);
  65. unset(cc);
  66. stop;
  67. endif;
  68. wait(500ms);
  69. set(&cor[1],&6&l»);set(&cor[2],&0);unset(p1);unset(vender);
  70. do;
  71. clearchat;
  72. log(&b====&6O que fazer?&b====);
  73. log( &61 &b- %&cor[1]%Colher &f--- %&cor[2]%Vender);
  74. log( &60 &b- &fContinuar);
  75. if(KEY_1);wait(1t);if(!p1);set(&cor[1],&6&l»);set(&cor[2],&0);unset(vender);set(p1);else;set(&cor[1],&0);set(&cor[2],&6&l»);unset(p1);set(vender);endif;endif;
  76. if(key_auto);break;endif;
  77. loop;
  78. wait(500ms);
  79. endif;
  80. if(!vender);
  81. if(!@des);
  82. if(reload);
  83. unset(reset);set(&cor[1],&6&l»);set(&cor[2],&0);set(p1);set(repos);set(reload);
  84. do;
  85. clearchat;
  86. log(&b====&6Continuar de onde paro?&b====);
  87. log( &61 &b- %&cor[1]%Sim &f--- %&cor[2]%Não );
  88. log( &60 &b- &fContinuar);
  89. if(KEY_1);wait(1t);if(!p1);set(&cor[1],&6&l»);set(&cor[2],&0);unset(reset);set(repos);set(p1);set(reload);else;set(&cor[1],&0);set(&cor[2],&6&l»);unset(p1);unset(reload);set(reset);unset(repos);endif;endif;
  90. if(key_auto);break;endif;
  91. loop;
  92. endif;
  93. if(reset);
  94. //prompt(#andar[%#plant%],$$?,Quantos andares?(ate 6));
  95. //----------------------------------------------------------------------
  96. set(#andar[%#plant%],2);
  97. //----------------------------------------------------------------------
  98. if(%#andar[%#plant%]%=0);
  99. log(&6[Macro]&b A quantidade de andar é igual a zero !!!);
  100. log(&6[Macro]&b Finalizando macro ....);
  101. unset(cc);
  102. set(reload);
  103. unset(pos);
  104. stop;
  105. endif;
  106. if(%#andar[%#plant%]%>6);
  107. log(&6[Macro]&b A quantidade de andar é maior que 6 !!!);
  108. log(&6[Macro]&b Finalizando macro ....);
  109. unset(cc);
  110. set(reload);
  111. unset(pos);
  112. stop;
  113. endif;
  114. if(%#andar[%#plant%]%>1);
  115. //prompt(#nt[%#plant%],$$?,Deseja começar por qual andar?);
  116. //----------------------------------------------------------------------
  117. set(#andar[%#plant%],1);
  118. //----------------------------------------------------------------------
  119. else;
  120. #nt[%#plant%]=1;
  121. endif;
  122. if(%#nt[%#plant%]%>%#andar[%#plant%]%);
  123. log(&6[Macro]&b O andar selecionado é maior que a quantidade de andar !!!);
  124. log(&6[Macro]&b Finalizando macro ....);
  125. unset(cc);
  126. set(reload);
  127. unset(pos);
  128. stop;
  129. endif;
  130. if(%#nt[%#plant%]%=0);
  131. log(&6[Macro]&b O andar selecionado é igual a zero !!!);
  132. log(&6[Macro]&b Finalizando macro ....);
  133. unset(cc);
  134. set(reload);
  135. unset(pos);
  136. stop;
  137. endif;
  138. #rod=1;
  139. endif;
  140. set(pos);
  141. #fil=1;
  142. #bau=4;
  143. #temp=0;
  144. &det="air|stone_slab|wooden_slab|sandstone_slab|cobblestone_slab|brick_slab|stone_brick_slab|nether_brick_slab|quartz_slab|reeds|nether_wart|wheat|carrots|potatoes";
  145. &terrain="grass|sand|soul_sand|dirt|farmland";
  146. log(&6[Macro]&b Mega Fazendeiro &2[On]);
  147. for(#i,1,9);
  148. getslotitem(%#i%,&id);
  149. ifmatches(%&id%,pickaxe|axe);
  150. &fer=%&id%;
  151. break;
  152. endif;
  153. next;
  154. endif;
  155. do;
  156. do;
  157. #x=%XPOS%;#z=%ZPOS%;wait(100ms);
  158. if(repos);
  159. do(2);
  160. if(%#plant%=1);}$$/home fungotemp$${endif;
  161. if(%#plant%=2);}$$/home canatemp$${endif;
  162. if(%#plant%=3);}$$/home trigotemp$${endif;
  163. if(%#plant%=4);}$$/home cenouratemp$${endif;
  164. if(%#plant%=5);}$$/home batatatemp$${endif;
  165. wait(10);
  166. until((%XPOS%=%#xtemp[%#plant%]%)&&(%ZPOS%=%#ztemp[%#plant%]%));
  167. wait(500ms);
  168. unset(repos);
  169. else;
  170. if(%#nt[%#plant%]%=1);if(%#plant%=1);}$$/home fungo1$${elseif(%#plant%=2);}$$/home cana1$${elseif(%#plant%=3);}$$/home trigo1$${elseif(%#plant%=4);}$$/home cenoura1$${elseif(%#plant%=5);}$$/home batata1$${endif;endif;
  171. if(%#nt[%#plant%]%=2);if(%#plant%=1);}$$/home fungo2$${elseif(%#plant%=2);}$$/home cana2$${elseif(%#plant%=3);}$$/home trigo2$${elseif(%#plant%=4);}$$/home cenoura2$${elseif(%#plant%=5);}$$/home batata2$${endif;endif;
  172. if(%#nt[%#plant%]%=3);if(%#plant%=1);}$$/home fungo3$${elseif(%#plant%=2);}$$/home cana3$${elseif(%#plant%=3);}$$/home trigo3$${elseif(%#plant%=4);}$$/home cenoura3$${elseif(%#plant%=5);}$$/home batata3$${endif;endif;
  173. if(%#nt[%#plant%]%=4);if(%#plant%=1);}$$/home fungo4$${elseif(%#plant%=2);}$$/home cana4$${elseif(%#plant%=3);}$$/home trigo4$${elseif(%#plant%=4);}$$/home cenoura4$${elseif(%#plant%=5);}$$/home batata4$${endif;endif;
  174. if(%#nt[%#plant%]%=5);if(%#plant%=1);}$$/home fungo5$${elseif(%#plant%=2);}$$/home cana5$${elseif(%#plant%=3);}$$/home trigo5$${elseif(%#plant%=4);}$$/home cenoura5$${elseif(%#plant%=5);}$$/home batata5$${endif;endif;
  175. if(%#nt[%#plant%]%=6);if(%#plant%=1);}$$/home fungo6$${elseif(%#plant%=2);}$$/home cana6$${elseif(%#plant%=3);}$$/home trigo6$${elseif(%#plant%=4);}$$/home cenoura6$${elseif(%#plant%=5);}$$/home batata6$${endif;endif;
  176. do(2);log(&6[Macro]&b Teleportando....);wait(5);until((%XPOS%!=%#x%)|(%ZPOS%!=%#z%));
  177. wait(1);
  178. #xtemp[%#plant%]=%XPOS%;#ztemp[%#plant%]=%ZPOS%;
  179. if(%#plant%=1);}$$/sethome fungotemp$${endif;
  180. if(%#plant%=2);}$$/sethome canatemp$${endif;
  181. if(%#plant%=3);}$$/sethome trigotemp$${endif;
  182. if(%#plant%=4);}$$/sethome cenouratemp$${endif;
  183. if(%#plant%=5);}$$/sethome batatatemp$${endif;
  184. endif;
  185. #xf=%XPOS%;#zf=%ZPOS%;
  186. if(%#plant%=1);
  187. #temp´=0;
  188. do;
  189. keydown(forward);
  190. keydown(jump);
  191. keydown(sneak);
  192. inc(#temp);
  193. if(%#temp%=25);
  194. break;
  195. endif;
  196. until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%-1));
  197. #temp=0;
  198. wait(500ms);
  199. keyup(forward);
  200. keyup(sneak);
  201. keyup(jump);
  202. wait(1);
  203. #xf=%XPOS%;#zf=%ZPOS%;
  204. do;
  205. keydown(back);
  206. keydown(sneak);
  207. inc(#temp);
  208. if(%#temp%=50);
  209. break;
  210. endif;
  211. until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%-1));
  212. #temp=0;
  213. if(%#plant%=1);wait(10t);else;wait(5t);endif;
  214. keyup(back);
  215. keyup(sneak);
  216. else;
  217. do(3);keydown(jump);wait(5t);loop;
  218. keyup(jump);
  219. endif;
  220. wait(1);
  221. if(!reload);
  222. ifmatches(%DIRECTION%,N);&dir=NORTH;#frente_z[1%#plant%]=-1;#frente_x[1%#plant%]=0;#frente_z[2%#plant%]=1;#frente_x[2%#plant%]=0;endif;
  223. ifmatches(%DIRECTION%,S);&dir=SOUTH;#frente_z[1%#plant%]=1;#frente_x[1%#plant%]=0;#frente_z[2%#plant%]=-1;#frente_x[2%#plant%]=0;endif;
  224. ifmatches(%DIRECTION%,W);&dir=WEST;#frente_z[1%#plant%]=0;#frente_x[1%#plant%]=-1;#frente_z[2%#plant%]=0;#frente_x[2%#plant%]=1;endif;
  225. ifmatches(%DIRECTION%,E);&dir=EAST;#frente_z[1%#plant%]=0;#frente_x[1%#plant%]=1;#frente_z[2%#plant%]=0;#frente_x[2%#plant%]=-1;endif;
  226. look(%&dir%);
  227. //condição primaria
  228. //norte
  229. ifmatches(%&dir%,NORTH);
  230. getidrel(+1,%#piso%,0,&bl1);//direita
  231. getidrel(-1,%#piso%,0,&bl2);//esquerda
  232. ifmatches(%&bl1%,%&det%);
  233. &ld[1%#plant%]=left;
  234. &ld[2%#plant%]=right;
  235. endif;
  236. ifmatches(%&bl2%,%&det%);
  237. &ld[1%#plant%]=right;
  238. &ld[2%#plant%]=left;
  239. endif;
  240. &lok[1%#plant%]=NORTH;
  241. &lok[2%#plant%]=SOUTH;
  242. endif;
  243. //sul
  244. ifmatches(%&dir%,SOUTH);
  245. getidrel(-1,%#piso%,0,&bl1);//direita
  246. getidrel(+1,%#piso%,0,&bl2);//esquerda
  247. ifmatches(%&bl1%,%&det%);
  248. &ld[1%#plant%]=left;
  249. &ld[2%#plant%]=right;
  250. endif;
  251. ifmatches(%&bl2%,%&det%);
  252. &ld[1%#plant%]=right;
  253. &ld[2%#plant%]=left;
  254. endif;
  255. &lok[1%#plant%]=SOUTH;
  256. &lok[2%#plant%]=NORTH;
  257. endif;
  258. //leste
  259. ifmatches(%&dir%,WEST);
  260. getidrel(0,%#piso%,-1,&bl1);//direita
  261. getidrel(0,%#piso%,+1,&bl2);//esquerda
  262. ifmatches(%&bl1%,%&det%);
  263. &ld[1%#plant%]=left;
  264. &ld[2%#plant%]=right;
  265. endif;
  266. ifmatches(%&bl2%,%&det%);
  267. &ld[1%#plant%]=right;
  268. &ld[2%#plant%]=left;
  269. endif;
  270. &lok[1%#plant%]=WEST;
  271. &lok[2%#plant%]=EAST;
  272. endif;
  273. //oeste
  274. ifmatches(%&dir%,EAST);
  275. getidrel(0,%#piso%,+1,&bl1);//direita
  276. getidrel(0,%#piso%,-1,&bl2);//esquerda
  277. ifmatches(%&bl1%,%&det%);
  278. &ld[1%#plant%]=left;
  279. &ld[2%#plant%]=right;
  280. endif;
  281. ifmatches(%&bl2%,%&det%);
  282. &ld[1%#plant%]=right;
  283. &ld[2%#plant%]=left;
  284. endif;
  285. &lok[1%#plant%]=EAST;
  286. &lok[2%#plant%]=WEST;
  287. endif;
  288. endif;
  289. ///////////////////////////////////////////////
  290. ///////////////////////////////////////////////
  291. do;
  292. #xq=%XPOS%;#zq=%ZPOS%;
  293. do;
  294. if(%#plant%!=2);look(%&lok[%#rod%%#plant%]%);look(,90);else;look(%&lok[%#rod%%#plant%]%);endif;
  295. ifmatches(%GUI%,CHAT|INVENTORY);
  296. keyup(forward);
  297. log(&6[Macro]&b Chat ou inventario aberto !!!&6 Feche-o para continuar);
  298. do;until(%GUI%="NONE");
  299. endif;
  300. keydown(forward);
  301. if(%#plant%!=2);
  302. if(%#plant%!=1);keydown(sneak);endif;
  303. if((%#xq%!=%XPOS%)|(%#zq%!=%ZPOS%));#xq=%XPOS%;#zq=%ZPOS%;pick(%&fer%);key(attack);else;pick(%&item%);key(use);endif;
  304. else;
  305. getidrel(0,0,0,&blc);if((%&blc%!="reeds"));look(,90);wait(50ms);pick(%&item%);key(use);wait(10ms);else;if(%HITID%="reeds");key(attack);endif;endif;
  306. endif;
  307. if(KEY_P);
  308. keyup(forward);
  309. wait(1);
  310. if(KEY_P);
  311. unset(pos);set(reload);
  312. keyup(forward);
  313. #xtemp[%#plant%]=%XPOS%;#ztemp[%#plant%]=%ZPOS%;
  314. if(%#plant%=1);}$$/sethome fungotemp$${endif;
  315. if(%#plant%=2);}$$/sethome canatemp$${endif;
  316. if(%#plant%=3);}$$/sethome trigotemp$${endif;
  317. if(%#plant%=4);}$$/sethome cenouratemp$${endif;
  318. if(%#plant%=5);}$$/sethome batatatemp$${endif;
  319. log(&6[Macro]&b Macro Pausado ....);
  320. log(&6[Macro]&b Aperte &6P &bnovamente para voltar a macro....);
  321. wait(2);
  322. do;
  323. if(KEY_P);
  324. wait(1);
  325. if(KEY_P);
  326. if((%XPOS%=%#xtemp[%#plant%]%)&&(%ZPOS%=%#ztemp[%#plant%]%));
  327. log(&6[Macro]&b Voltando a funcionar !!!);
  328. else;
  329. do(2);
  330. log(&6[Macro]&b Teleportando....);
  331. if(%#plant%=1);}$$/home fungotemp$${endif;
  332. if(%#plant%=2);}$$/home canatemp$${endif;
  333. if(%#plant%=3);}$$/home trigotemp$${endif;
  334. if(%#plant%=4);}$$/home cenouratemp$${endif;
  335. if(%#plant%=5);}$$/home batatatemp$${endif;
  336. wait(10);
  337. until((%XPOS%=%#xtemp[%#plant%]%)&&(%ZPOS%=%#ztemp[%#plant%]%));
  338. if(%#plant%=1);
  339. #xf=%XPOS%;#zf=%ZPOS%;
  340. #temp=0;
  341. do;
  342. keydown(forward);
  343. keydown(jump);
  344. keydown(sneak);
  345. inc(#temp);
  346. if(%#temp%=25);
  347. break;
  348. endif;
  349. until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%-1));
  350. #temp=0;
  351. wait(500ms);
  352. keyup(forward);
  353. keyup(sneak);
  354. keyup(jump);
  355. wait(1);
  356. #xf=%XPOS%;#zf=%ZPOS%;
  357. do;
  358. keydown(back);
  359. keydown(sneak);
  360. inc(#temp);
  361. if(%#temp%=50);
  362. break;
  363. endif;
  364. until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%-1));
  365. #temp=0;
  366. if(%#plant%=1);wait(10t);else;wait(1t);endif;
  367. keyup(back);
  368. keyup(sneak);
  369. else;
  370. do(3);keydown(jump);wait(5t);loop;
  371. keyup(jump);
  372. endif;
  373. endif;
  374. wait(1);
  375. set(pos);unset(reload);
  376. break;
  377. endif;
  378. endif;
  379. loop;
  380. endif;
  381. endif;
  382. getidrel(%#frente_x[%#rod%%#plant%]%,%#piso%,%#frente_z[%#rod%%#plant%]%,&block);
  383. getidrel(%#frente_x[%#rod%%#plant%]%,%#piso1%,%#frente_z[%#rod%%#plant%]%,&block1);
  384. while(((%&block%="nether_wart")|(%&block%="reeds")|(%&block%="wheat")|(%&block%="carrots")|(%&block%="potatoes")|(%&block%="air"))&&((%&block1%="dirt")|(%&block1%="farmland")|(%&block1%="grass")|(%&block1%="sand")|(%&block1%="soul_sand")));
  385. if(%#plant%!=2);key(attack);endif;
  386. keyup(forward);
  387. if(%#plant%=1);getidrel(0,0,0,&piso);else;getidrel(0,-1,0,&piso);endif;
  388. ifmatches(%&piso%,%&terrain%);
  389. look(+180,);
  390. ifmatches(%DIRECTION%,N);#ladox[1]=1;#ladox[2]=-1;#ladoz[1]=0;#ladoz[2]=0;endif;
  391. ifmatches(%DIRECTION%,S);#ladox[1]=-1;#ladox[2]=1;#ladoz[1]=0;#ladoz[2]=0;endif;
  392. ifmatches(%DIRECTION%,W);#ladox[1]=0;#ladox[2]=0;#ladoz[1]=-1;#ladoz[2]=1;endif;
  393. ifmatches(%DIRECTION%,E);#ladox[1]=0;#ladox[2]=0;#ladoz[1]=1;#ladoz[2]=-1;endif;
  394. set(mudar);
  395. for(#i,1,2);
  396. getidrel(%#ladox[%#i%]%,%#blo%,0,&block);
  397. ifmatches(%&block%,air);
  398. unset(mudar);
  399. break;
  400. endif;
  401. getidrel(0,%#blo%,%#ladoz[%#i%]%,&block);
  402. ifmatches(%&block%,air);
  403. unset(mudar);
  404. break;
  405. endif;
  406. next;
  407. if(mudar);
  408. unset(mudar);
  409. do;
  410. #x=%XPOS%;#z=%ZPOS%;#temp=0;
  411. do;
  412. inc(#temp);
  413. if(%#temp%=50);
  414. break;
  415. endif;
  416. keydown(%&ld[%#rod%%#plant%]%);
  417. keydown(sneak);
  418. look(,90);
  419. ifmatches(%HITID%,%&terrain%);key(use);endif;
  420. pick(%&item%);
  421. until((%XPOS%=%#x%+1)|(%XPOS%=%#x%-1)|(%ZPOS%=%#z%+1)|(%ZPOS%=%#z%-1));
  422. getidrel(0,%#blo%,0,&block);
  423. if(%#temp%=50);
  424. break;
  425. else;
  426. #temp=0;
  427. endif;
  428. until((%&block%="soul_sand")|(%&block%="farmland")|(%&block%="dirt")|(%&block%="grass")|(%&block%="sand"));
  429. else;
  430. #temp=50;
  431. endif;
  432. if(%#plant%=1);wait(10t);else;wait(5t);endif;
  433. keyup(%&ld[%#rod%%#plant%]%);
  434. keyup(sneak);
  435. wait(500ms);
  436. if(%#plant%=1);}$$/sethome fungotemp$${endif;
  437. if(%#plant%=2);}$$/sethome canatemp$${endif;
  438. if(%#plant%=3);}$$/sethome trigotemp$${endif;
  439. if(%#plant%=4);}$$/sethome cenouratemp$${endif;
  440. if(%#plant%=5);}$$/sethome batatatemp$${endif;
  441. #xtemp[%#plant%]=%XPOS%;#ztemp[%#plant%]=%ZPOS%;
  442. if(%#rod%=1);#rod=2;else;#rod=1;endif;
  443. else;
  444. do(5);
  445. log(&6[Macro]&b Teleportando....);
  446. if(%#plant%=1);}$$/home fungotemp$${endif;
  447. if(%#plant%=2);}$$/home canatemp$${endif;
  448. if(%#plant%=3);}$$/home trigotemp$${endif;
  449. if(%#plant%=4);}$$/home cenouratemp$${endif;
  450. if(%#plant%=5);}$$/home batatatemp$${endif;
  451. wait(10);
  452. until((%XPOS%=%#xtemp[%#plant%]%)&&(%ZPOS%=%#ztemp[%#plant%]%));
  453. wait(1);
  454. if(%#plant%=1);
  455. #temp=0;
  456. do;
  457. keydown(forward);
  458. keydown(jump);
  459. keydown(sneak);
  460. inc(#temp);
  461. if(%#temp%=25);
  462. break;
  463. endif;
  464. until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%-1));
  465. #temp=0;
  466. wait(500ms);
  467. keyup(forward);
  468. keyup(sneak);
  469. keyup(jump);
  470. wait(1);
  471. #xf=%XPOS%;#zf=%ZPOS%;
  472. do;
  473. keydown(back);
  474. keydown(sneak);
  475. inc(#temp);
  476. if(%#temp%=50);
  477. break;
  478. endif;
  479. until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%-1));
  480. if(%#plant%=1);wait(10t);else;wait(2t);endif;
  481. keyup(back);
  482. #temp=0;
  483. keyup(sneak);
  484. else;
  485. do(3);keydown(jump);wait(5t);loop;
  486. keyup(jump);
  487. endif;
  488. wait(1);
  489. endif;
  490. do;gui(inventory);wait(1);until(%GUI%="GUIINVENTORY");
  491. #vazio=0;
  492. for(#i,9,44);
  493. getslotitem(%#i%,&id);
  494. ifmatches(%&id%,"air");
  495. inc(#vazio);
  496. endif;
  497. if((%#i%>=9)&&(%#i%<=35));
  498. ifmatches(%&id%,%&item%);
  499. slotclick(%#i%,l,true);
  500. wait(100ms);
  501. endif;
  502. endif;
  503. next;
  504. if(%#plant%=3);
  505. for(#i,36,44);
  506. getslotitem(%#i%,&id);
  507. if(%&id%="wheat");
  508. slotclick(%#i%,l,true);
  509. wait(70ms);
  510. endif;
  511. next;
  512. for(#i,9,35);
  513. getslotitem(%#i%,&id);
  514. if(%&id%="wheat_seeds");
  515. slotclick(%#i%,l,true);
  516. wait(70ms);
  517. endif;
  518. next;
  519. endif;
  520. if(%#vazio%<4);
  521. do;gui();until(%GUI%="NONE");
  522. #x=%XPOS%;#z=%ZPOS%;
  523. #xtemp[%#plant%]=%XPOS%;#ztemp[%#plant%]=%ZPOS%;
  524. if(%#plant%=1);}$$/sethome fungotemp$${endif;
  525. if(%#plant%=2);}$$/sethome canatemp$${endif;
  526. if(%#plant%=3);}$$/sethome trigotemp$${endif;
  527. if(%#plant%=4);}$$/sethome cenouratemp$${endif;
  528. if(%#plant%=5);}$$/sethome batatatemp$${endif;
  529. log(&6[Macro]&b %#vazio% slot disponivel -- Indo guarda);
  530. do;
  531. log(&6[Macro]&b Teleportando....);
  532. if(%#plant%=1);}$$/home fungobau$${endif;
  533. if(%#plant%=2);}$$/home canabau$${endif;
  534. if(%#plant%=3);}$$/home trigobau$${endif;
  535. if(%#plant%=4);}$$/home cenourabau$${endif;
  536. if(%#plant%=5);}$$/home batatabau$${endif;
  537. wait(10);
  538. until((%XPOS%!=%#x%)|(%ZPOS%!=%#z%));
  539. unset(pos);set(reload);
  540. do(3);keydown(jump);wait(5t);loop;
  541. keyup(jump);
  542. wait(1);
  543. #x = %XPOS%;
  544. #z = %ZPOS%;
  545. wait(1);
  546. do;
  547. #exit = 0;
  548. do;
  549. ifmatches(%DIRECTION%,N);getidrel(0,%#bau%,-2,&vbau);&dir_bau=North;#pos = %XPOS%;#posf = %#x% + (%#fil% - 1);endif;
  550. ifmatches(%DIRECTION%,S);getidrel(0,%#bau%,2,&vbau);&dir_bau=South;#pos = %XPOS%;#posf = %#x% - (%#fil% - 1);endif;
  551. ifmatches(%DIRECTION%,W);getidrel(-2,%#bau%,0,&vbau);&dir_bau=West;#pos = %ZPOS%;#posf = %#z% - (%#fil% - 1);endif;
  552. ifmatches(%DIRECTION%,E);getidrel(2,%#bau%,0,&vbau);&dir_bau=East;#pos = %ZPOS%;#posf = %#z% + (%#fil% - 1);endif;
  553. look(%&dir_bau%);
  554. if(%#bau% = 4);look(,-62);endif;
  555. if(%#bau% = 3);look(,-50);endif;
  556. if(%#bau% = 2);look(,-25);endif;
  557. if(%#bau% = 1);look(,0);endif;
  558. if(%#bau% = 0);look(,35);endif;
  559. if(%#pos% != %#posf%);keydown(right);keydown(sneak);endif;
  560. until(%#pos% = %#posf%);
  561. wait(100ms);
  562. keyup(right);
  563. keyup(sneak);
  564. wait(1);
  565. if((%&vbau%="chest")|(%&vbau%="trapped_chest"));
  566. do;
  567. if(%HIT%="PLAYER");random(#r,1,10);#xt = %XPOS%;#zt = %ZPOS%;
  568. do;keydown(sneak);keydown(back);until((%XPOS%=%#xt%-1)|(%XPOS%=%#xt%+1)|(%ZPOS%=%#zt%-1)|(%ZPOS%=%#zt%+1));
  569. keyup(back);wait(%#r%);#xt = %XPOS%;#zt = %ZPOS%;
  570. do;keydown(sneak);keydown(forward);until((%XPOS%=%#xt%-1)|(%XPOS%=%#xt%+1)|(%ZPOS%=%#zt%-1)|(%ZPOS%=%#zt%+1));
  571. keyup(forward);
  572. endif;
  573. key(use);
  574. wait(5);
  575. until(%GUI%="GUICHEST");
  576. wait(1);
  577. #sbv = 0;
  578. for(#i,0,53);
  579. getslotitem(%#i%,&id);
  580. if(%&id% = "air");
  581. #sbv = 1;
  582. break;
  583. endif;
  584. next;
  585. if(%#sbv% = 1);
  586. for(#i,54,89);
  587. getslotitem(%#i%,&id);
  588. ifmatches(%&id%,%&item%|wheat|written_book);
  589. slotclick(%#i%,l,true);
  590. wait(150ms);
  591. endif;
  592. next;
  593. #exit = 0;
  594. for(#i,0,53);
  595. getslotitem(%#i%,&id);
  596. if(%&id% = "air");
  597. #exit = 1;
  598. if(%#plant%!=2);
  599. if(%#plant%!=3);
  600. do(3);slotclick(0,l,true);wait(100ms);loop;
  601. else;
  602. for(#i,0,54);
  603. getslotitem(%#i%,&id);
  604. if(%&id%="wheat_seeds");
  605. slotclick(%#i%,l,true);
  606. wait(100ms);
  607. break;
  608. endif;
  609. next;
  610. endif;
  611. endif;
  612. break;
  613. endif;
  614. next;
  615. if(%#exit% = 0);
  616. dec(#bau);
  617. gui();
  618. if(%#bau% = -1);
  619. #bau = 4;
  620. inc(#fil);
  621. endif;
  622. endif;
  623. gui();
  624. else;
  625. dec(#bau);
  626. if(%#bau% = -1);
  627. #bau = 4;
  628. inc(#fil);
  629. endif;
  630. gui();
  631. endif;
  632. else;
  633. log(&6[Macro] &bAcabo os baus!!!);
  634. log(&6[Macro]&b Mega Fazendeiro &4[Off]);
  635. unset(cc);
  636. stop;
  637. endif;
  638. until(%#exit% = 1);
  639. do(2);
  640. log(&6[Macro]&b Teleportando....);
  641. if(%#plant%=1);}$$/home fungotemp$${endif;
  642. if(%#plant%=2);}$$/home canatemp$${endif;
  643. if(%#plant%=3);}$$/home trigotemp$${endif;
  644. if(%#plant%=4);}$$/home cenouratemp$${endif;
  645. if(%#plant%=5);}$$/home batatatemp$${endif;
  646. wait(10);
  647. until((%#xtemp[%#plant%]%=%XPOS%)&&(%#ztemp[%#plant%]%=%ZPOS%));
  648. wait(1);
  649. #xf=%XPOS%;#zf=%ZPOS%;
  650. if(%#plant%=1);
  651. #temp=0;
  652. do;
  653. keydown(forward);
  654. keydown(jump);
  655. keydown(sneak);
  656. inc(#temp);
  657. if(%#temp%=25);
  658. break;
  659. endif;
  660. until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%-1));
  661. #temp=0;
  662. wait(500ms);
  663. keyup(forward);
  664. keyup(sneak);
  665. keyup(jump);
  666. wait(1);
  667. #xf=%XPOS%;#zf=%ZPOS%;
  668. do;
  669. keydown(back);
  670. keydown(sneak);
  671. inc(#temp);
  672. if(%#temp%=50);
  673. break;
  674. endif;
  675. until((%XPOS%=%#xf%+1)|(%XPOS%=%#xf%-1)|(%ZPOS%=%#zf%+1)|(%ZPOS%=%#zf%-1));
  676. #temp=0;
  677. keyup(back);
  678. keyup(sneak);
  679. endif;
  680. set(pos);unset(reload);
  681. else;
  682. do;gui();wait(1);until(%GUI%="NONE");
  683. log(&6[Macro]&b %#vazio% slot disponivel -- continuando a colheita);
  684. endif;
  685. until(%#temp%=50);
  686. inc(#nt[%#plant%]);
  687. until(%#nt[%#plant%]%>%#andar[%#plant%]%);
  688. unset(reload);
  689. log(&6[Macro]&b Fim do ultimo andar !!!);
  690. log(&6[Macro]&b Voltando ao primeiro andar !!!);
  691. #nt[%#plant%]=1;
  692. #rod=1;
  693. loop;
  694. else;
  695. if(%#plant%=1);#xplant=722;endif;
  696. if(%#plant%=2);#xplant=725;endif;
  697. if(%#plant%=3);#xplant=721;endif;
  698. if(%#plant%=4);#xplant=718;endif;
  699. if(%#plant%=5);#xplant=717;endif;
  700. #bau =4;
  701. #fil =1;
  702. if(!@des);
  703. set(&cor[1],&6&l»);set(&cor[2],&0);unset(p1);set(wv);
  704. do;
  705. clearchat;
  706. log(&b====&6Vender na?&b====);
  707. log( &61 &b- %&cor[1]%Warp Vip &f--- %&cor[2]%Warp Loja);
  708. log( &60 &b- &fContinuar);
  709. if(KEY_1);wait(1t);if(!p1);set(&cor[1],&6&l»);set(&cor[2],&0);set(wv);set(p1);else;set(&cor[1],&0);set(&cor[2],&6&l»);unset(p1);unset(wv);endif;endif;
  710. if(key_auto);break;endif;
  711. loop;
  712. wait(500ms);
  713. endif;
  714. do;
  715. #x=%XPOS%;#z=%ZPOS%;
  716. do(2);
  717. log(&6[Macro]&b Teleportando....);
  718. if(%#plant%=1);}$$/home fungobau$${endif;
  719. if(%#plant%=2);}$$/home canabau$${endif;
  720. if(%#plant%=3);}$$/home trigobau$${endif;
  721. if(%#plant%=4);}$$/home cenourabau$${endif;
  722. if(%#plant%=5);}$$/home batatabau$${endif;
  723. wait(10);
  724. until((%XPOS%!=%#x%)|(%ZPOS%!=%#z%));
  725. do(3);keydown(jump);wait(5t);loop;
  726. keyup(jump);
  727. wait(1);
  728. #x = %XPOS%;
  729. #z = %ZPOS%;
  730. do;
  731. #exit = 0;
  732. do;
  733. ifmatches(%DIRECTION%,N);getidrel(0,%#bau%,-2,&vbau);&dir_bau=North;#pos = %XPOS%;#posf = %#x% + (%#fil% - 1);endif;
  734. ifmatches(%DIRECTION%,S);getidrel(0,%#bau%,2,&vbau);&dir_bau=South;#pos = %XPOS%;#posf = %#x% - (%#fil% - 1);endif;
  735. ifmatches(%DIRECTION%,W);getidrel(-2,%#bau%,0,&vbau);&dir_bau=West;#pos = %ZPOS%;#posf = %#z% - (%#fil% - 1);endif;
  736. ifmatches(%DIRECTION%,E);getidrel(2,%#bau%,0,&vbau);&dir_bau=East;#pos = %ZPOS%;#posf = %#z% + (%#fil% - 1);endif;
  737. look(%&dir_bau%);
  738. if(%#bau% = 4);look(,-62);endif;
  739. if(%#bau% = 3);look(,-50);endif;
  740. if(%#bau% = 2);look(,-25);endif;
  741. if(%#bau% = 1);look(,0);endif;
  742. if(%#bau% = 0);look(,35);endif;
  743. if(%#pos% != %#posf%);keydown(right);keydown(sneak);endif;
  744. until(%#pos% = %#posf%);
  745. wait(100ms);
  746. keyup(right);
  747. keyup(sneak);
  748. wait(1);
  749. if((%&vbau%="chest")|(%&vbau%="trapped_chest"));
  750. do;
  751. if(%HIT%="PLAYER");random(#r,1,10);#xt = %XPOS%;#zt = %ZPOS%;
  752. do;keydown(sneak);keydown(back);until((%XPOS%=%#xt%-1)|(%XPOS%=%#xt%+1)|(%ZPOS%=%#zt%-1)|(%ZPOS%=%#zt%+1));
  753. keyup(back);wait(%#r%);#xt = %XPOS%;#zt = %ZPOS%;
  754. do;keydown(sneak);keydown(forward);until((%XPOS%=%#xt%-1)|(%XPOS%=%#xt%+1)|(%ZPOS%=%#zt%-1)|(%ZPOS%=%#zt%+1));
  755. keyup(forward);
  756. endif;
  757. key(use);
  758. wait(5);
  759. until(%GUI%="GUICHEST");
  760. wait(1);
  761. #sbv = 0;
  762. if(%#plant%=3);&item=wheat;endif;
  763. for(#i,0,53);
  764. getslotitem(%#i%,&id);
  765. if(%&id%=%&item%);
  766. #sbv = 1;
  767. break;
  768. endif;
  769. next;
  770. if(%#sbv% = 1);
  771. for(#i,0,53);
  772. getslotitem(%#i%,&id);
  773. ifmatches(%&id%,%&item%);
  774. slotclick(%#i%,l,true);
  775. wait(150ms);
  776. endif;
  777. next;
  778. #exit = 1;
  779. for(#i,54,89);
  780. getslotitem(%#i%,&id);
  781. if(%&id% = "air");
  782. #exit = 0;
  783. break;
  784. endif;
  785. next;
  786. if(%#exit% = 0);
  787. dec(#bau);
  788. gui();
  789. if(%#bau% = -1);
  790. #bau = 4;
  791. inc(#fil);
  792. endif;
  793. endif;
  794. gui();
  795. else;
  796. dec(#bau);
  797. if(%#bau% = -1);
  798. #bau = 4;
  799. inc(#fil);
  800. endif;
  801. gui();
  802. endif;
  803. else;
  804. set(sai);
  805. break;
  806. endif;
  807. until(%#exit% = 1);
  808. if(wv);
  809. do;}$$/warp vip$${wait(10);until((%XPOS%=702)&&(%ZPOS%=656));
  810. do;
  811. look(south);
  812. keydown(forward);
  813. if(%ZPOS%>=668);keydown(sneak);endif;
  814. getidrel(0,0,1,&bl);if(%&bl%!="air");keydown(jump);else;keyup(jump);endif;
  815. until((%XPOS%=702)&&(%ZPOS%=671));
  816. keyup(sneak);keyup(forward);
  817. do;
  818. keydown(forward);
  819. look(east);
  820. if(%XPOS%>=%#xplant%-3);keydown(sneak);endif;
  821. getidrel(1,0,0,&bl);if(%&bl%!="air");keydown(jump);else;keyup(jump);endif;
  822. until((%XPOS%=%#xplant%)&&(%ZPOS%=671));
  823. keyup(sneak);keyup(forward);
  824. do;
  825. look(south);
  826. keydown(forward);
  827. getidrel(0,0,1,&bl);
  828. until(%&bl%!="air");
  829. keyup(forward);
  830. do;
  831. look(south);
  832. look(175,15);
  833. if(%HITID%="wall_sign");
  834. do(3);key(attack);wait(3t);loop;
  835. break;
  836. endif;
  837. if(%HIT%="PLAYER");random(#r,1,10);#x = %XPOS%;#z = %ZPOS%;
  838. do;keydown(sneak);keydown(back);until((%XPOS%=%#x%-1)|(%XPOS%=%#x%+1)|(%ZPOS%=%#z%-1)|(%ZPOS%=%#z%+1));
  839. keyup(back);wait(%#r%);#x = %XPOS%;#z = %ZPOS%;
  840. do;keydown(sneak);keydown(forward);until((%XPOS%=%#x%-1)|(%XPOS%=%#x%+1)|(%ZPOS%=%#z%-1)|(%ZPOS%=%#z%+1));
  841. keyup(forward);
  842. endif;
  843. loop;
  844. else;
  845. do(2);
  846. log(&6[Macro]&b Teleportando....);
  847. if(%#plant%=1);}$$/home venderfungo$${endif;
  848. if(%#plant%=2);}$$/home vendercana$${endif;
  849. if(%#plant%=3);}$$/home vendertrigo$${endif;
  850. if(%#plant%=4);}$$/home vendercenoura$${endif;
  851. if(%#plant%=5);}$$/home venderbatata$${endif;
  852. wait(10);
  853. until((%XPOS%=%#x%)|(%ZPOS%!=%#z%));
  854. do(3);keydown(jump);wait(5t);loop;
  855. keyup(jump);
  856. wait(1);
  857. do;
  858. if(%HIT%="PLAYER");random(#r,1,10);#x = %XPOS%;#z = %ZPOS%;
  859. do;keydown(sneak);keydown(back);until((%XPOS%=%#x%-1)|(%XPOS%=%#x%+1)|(%ZPOS%=%#z%-1)|(%ZPOS%=%#z%+1));
  860. keyup(back);wait(%#r%);#x = %XPOS%;#z = %ZPOS%;
  861. do;keydown(sneak);keydown(forward);until((%XPOS%=%#x%-1)|(%XPOS%=%#x%+1)|(%ZPOS%=%#z%-1)|(%ZPOS%=%#z%+1));
  862. keyup(forward);
  863. endif;
  864. if(%HITID%="wall_sign");
  865. do(3);key(attack);wait(3t);loop;
  866. break;
  867. endif;
  868. loop;
  869. endif;
  870. if(sai);
  871. unset(sai);
  872. log(&6[Macro] &bAcabo os baus!!!);
  873. log(&6[Macro]&b Mega Fazendeiro &4[Off]);
  874. unset(cc);
  875. unset(vender);
  876. unset(@rec);
  877. stop;
  878. endif;
  879. loop;
  880. endif;
  881. endif;
  882. }$$
Advertisement
Add Comment
Please, Sign In to add comment