; ====================================================================================================== ; '|| ||` '||` || /.\ '||` ; || || || || '' // \\ || '' ; || || || ''||'' || '||),,(|, '''|. //...\\ || || '''|. `||''|, '''/ '''|. ; || || || || || || || || .|''|| // \\ || || .|''|| || || // .|''|| ; `|...|' .||. `|..' .||. .|| ||. `|..||. .// \\. .||. .||. `|..||. .|| ||. /... `|..||. ; ===================================================================================================== ; Script Name: Fabricar Morteros ; Author: Sthil Lauda ; Version: 1.1 ; Client Tested with: 2.0.3 ; EUO version tested with: EasyUO 1.5 Version 243 ; Shard: Ultima Alianza (¡Hasta la muerte!) ; Revision Date: 14/06/2020 ; Public Release: 15/04/2020 ; Global Variables Used: Ninguna. ; Purpose: Fabrica morteros hasta llenar una bolsa entera (255). ;________________________________ ; ; /////////////////////////////// ; ******** CONFIGURACIÓN ******** ; /////////////////////////////// ;________________________________ ; set %cofre_lingotes UXVXMND set %bolsa_morteros IRDTUND set %bolsa_herramientas LWHDKOD ;________________________________________________ ; ; ////////////////////////////////////////////// ; ************* FIN CONFIGURACIÓN ************* ; ////////////////////////////////////////////// ;________________________________________________ ; set %herramienta GTL set %lingotes RMK set %morteros RQF set %start #TRUE set #SYSMSGCOL 1187 event sysmessage ======================= wait 20 set #SYSMSGCOL 1165 event sysmessage Fabricar Morteros v1.1 wait 20 set #SYSMSGCOL 1187 event sysmessage ======================= wait 20 ignoreitem reset ; ;======================================================== ; ; ******************* LOOP PRINCIPAL ******************** ; ;======================================================== ; loop: gosub lingotes gosub herramientas gosub morteros gosub descargar goto loop ; ;======================================================== ; ; ***************** FIN LOOP PRINCIPAL ***************** ; ;======================================================== ; sub lingotes _ingot: finditem %lingotes C_ , #BACKPACKID if #FINDSTACK <= 5 { finditem %lingotes C_ , %cofre_lingotes if #FINDCNT > 0 { for #FINDINDEX 1 #FINDCNT { gosub waitforprop #FINDID if Hierro in #PROPERTY { if #FINDSTACK >= 60 { exevent drag #FINDID 60 wait 10 exevent dropc #BACKPACKID gosub wait_for ITEM #FINDID C_ , #BACKPACKID 40 } else { set #SYSMSGCOL 38 event sysmessage NO QUEDAN LINGOTES! :( halt } } else { ignoreitem #FINDID BAD_INGOTS goto _ingot } } } else { set #SYSMSGCOL 38 event sysmessage NO QUEDAN LINGOTES! :( halt } } return sub morteros if ( %start ) || ( #CONTSIZE <> 530_480 ) { finditem %herramienta C_ , #BACKPACKID if #FINDCNT > 0 { set #LOBJECTID #FINDID event macro 17 gosub wait_for GUMP 530_480 30 contpos 40 40 click 70 169 f dmc ; Herramientas gosub wait_for GUMP 530_480 30 contpos 40 40 click 274 251 f dmc ; Mortero set %start #FALSE } } click 323 496 f dmc ; Fabricar último gosub wait_for GUMP 530_480 100 contpos 40 40 return sub herramientas _repon: finditem %herramienta C_ , #BACKPACKID if #FINDCNT < 3 { finditem %herramienta C_ , %bolsa_herramientas if #FINDCNT > 0 { exevent drag #FINDID #FINDSTACK wait 10 exevent dropc #BACKPACKID gosub wait_for ITEM #FINDID C_ , #BACKPACKID 40 ; Esperamos a que caiga el objeto en la mochila goto _repon } else { set #SYSMSGCOL 38 event sysmessage NO HAY HERRAMIENTAS! :( halt } } return sub descargar finditem %morteros C_ , #BACKPACKID if ( #WEIGHT >= #MAXWEIGHT - 30 ) || ( #FINDCNT >= 10 ) { _vaciar: finditem %morteros C_ , %bolsa_morteros if #FINDCNT < 255 { finditem %morteros C_ , #BACKPACKID if #FINDCNT > 0 { exevent drag #FINDID #FINDSTACK wait 10 exevent dropc %bolsa_morteros gosub wait_for ITEM #FINDID C_ , %bolsa_morteros 40 goto _vaciar } } else { set #SYSMSGCOL 88 event sysmessage BOLSA DE MORTEROS LLENA! :D halt } } return sub waitforprop event property #charid wait 1 set %oldprop #property event property %1 _testforprop: if #property = %oldprop { goto _testforprop } return ;-@ ============================== @-; ;-@ ############################## @-; ;-@ SUBS públicos del Foro EasyUO @-; ;-@ ############################## @-; ;-@ ============================== @-; ;================================================================= sub wait_for ;================================================================= ; This "wait_for" sub package was created by Locke. If you use these subs please keep this header intact. ; Documentation: the sub package grew to large with all the comments. To load them call the sub like this: ; gosub wait_for docs | or you can use doc, documention, what, or my personal favorite, kickass. ; "wait_for core dispatcher" version 1.2 by Locke if %1 = doc || if %1 = docs || if %1 = documentation || if %1 = what || if %1 = kickass { Display ok Please click ok and wait for your browser to start. execute http://www.easyuo.com/forum/viewtopic.php?t=24716 halt } nameSpace Push namespace local LLNS set #result N/A ; if #result isn't set by one of my wait_for subs it'll throw an error. set !LPC #lpc set #lpc 200 for %i 0 %0 set !_A . %i % . %i gosub wait_for_ , !_A1 set #lpc !lpc namespace clear LLNS namespace pop if #result <> N/A return #result else display ok You specified an unknown wait_for command. Script returned #result and is halting. halt ;====================================================================== sub wait_for_GUMP ; version 1.4 ~Locke ;================================================================= ; Añadido #CONTID ^^ if !_A0 < 3 { display ok You haven't specified enough vars.$ +The basic format is: gosub wait_for GUMP XXX_YYY time_out_in_seconds$ +Script is halting halt } if !_A3 <> CLOSE set !_timeout #scnt2 + !_A3 else set !_timeout 0 ; no gump wait if %3 = CLOSE since we already believe it to be open. _lets_wait_for_a_gump: if #CONTSIZE = !_A2 || #CONTKIND = !_A2 || #CONTNAME = !_A2 || #CONTTYPE = !_A2 || #CONTID = !_A2 { if !_A5 <> N/A && !_A6 <> N/A { set !clickx !_A5 + #contposx set !clicky !_A6 + #contposy click !clickx !clicky } if !_A3 = CLOSE || if !_A4 = CLOSE || !_A5 = CLOSE || !_A6 = CLOSE { set !string #contsize str pos !string _ set !pos #strres str del !string #strres #strres set !clickX #contposx + ( #strres / 2 ) str del !string 1 !pos set !clickY #contposy + ( #strres / 2 ) click !clickx !clicky R } return #true } if ( !_timeout =< #scnt2 ) && ( !_A4 = N/A ) { return #false } if !_A4 <> N/A && !_timeout =< #scnt2 { finditem !_A4 if #findkind <> -1 { for #findindex 1 #findcnt { if #finddist > 2 ignoreitem #findid LLWAITFOR else break } set #lobjectid #findid event macro 17 0 set !_timeout #scnt2 + !_A3 } else return #false } wait 1 goto _lets_wait_for_a_gump ;====================================================================== sub wait_for_ITEM ; Version 0.1 ~Locke ;================================================================= ; %A2 = #findid ; %A3 = C_ , %mod || G_ , %mod ; %A4 = wait_time in seconds if !_A0 < 4 { display ok You haven't specified enough vars.$ +The basic format is: gosub wait_for ITEM # , findid C_ , % , mod % , timeout +Script is halting halt } set !_timeout !_A4 + #scnt2 repeat { finditem !_A2 !_A3 if #findkind <> -1 return #true wait 1 } until #scnt2 => !_timeout return #false