; ====================================================================================================== ; '|| ||` '||` || /.\ '||` ; || || || || '' // \\ || '' ; || || || ''||'' || '||),,(|, '''|. //...\\ || || '''|. `||''|, '''/ '''|. ; || || || || || || || || .|''|| // \\ || || .|''|| || || // .|''|| ; `|...|' .||. `|..' .||. .|| ||. `|..||. .// \\. .||. .||. `|..||. .|| ||. /... `|..||. ; ====================================================================================================== ; ; Script Name: Entrenar Familiar ; __ __ ; ( _) ( _) ; / / \\ / /\_\_ ; / / \\ / / | \ \ ; / / \\ / / |\ \ \ ; / / , \ , / / /| \ \ ; / / |\_ /| / / / \ \_\ ; / / |\/ _ '_| \ / / / \ \\ ; | / |/ 0 \0\ / | | \ \\ ; | |\| \_\_ / / | \ \\ ; | | |/ \.\ o\o) / \ | \\ ; \ | /\\`v-v / | | \\ ; | \/ /_| \\_| / | | \ \\ ; | | /__/_ / _____ | | \ \\ ; \| [__] \_/ |_________ \ | \ () ; / [___] ( \ \ |\ | | // ; | [___] |\| \| / |/ ; /| [____] \ |/\ / / || ; snd ( \ [____ / ) _\ \ \ \| | || ; \ \ [_____| / / __/ \ / / // ; | \ [_____/ / / \ | \/ // ; | / '----| /=\____ _/ | / // ; __ / / | / ___/ _/\ \ | || ; (/-(/-\) / \ (/\/\)/ | / | / ; (/\/\) / / // ; _________/ / / ; \____________/ ( ; Author: Sthil Lauda ; Version: 1.4 ; Client Tested with: 2.0.3 ; EUO version tested with: EasyUO 1.5 Version 243 ; Shard: Ultima Alianza (¡Hasta la muerte!) ; Public Release: 28/03/2019 ; Revison Date: 18/07/2020 ; Global Variables Used: none ; Purpose: Subir de nivel al pobre familiar :( ;________________________________ ; ; /////////////////////////////// ; ******** CONFIGURACIÓN ******** ; /////////////////////////////// ;________________________________ ; set %tiempo_atacando 30 ; Total de tiempo atacando al objetivo. set %tiempo_kill 10 ; Cada cuantos segundos ordenar atacar al objetivo. set %tiempo_stop 60s ; Cuántos segundos quedarse parado después de haber atacado durante el total de tiempo (%tiempo_atacando). set %tiempo_curacion 300 ; Cada cuantos segundos curar al objetivo. set %max_vendas_sucias 50 ; Máximo de vendas sucias antes de limpiarlas (en caso de activar la veterinaria). ;________________________________________________ ; ; ////////////////////////////////////////////// ; ************* FIN CONFIGURACIÓN ************* ; ////////////////////////////////////////////// ;________________________________________________ ; set %siguiente_kill #SCNT set %siguiente_invasmani #SCNT + %tiempo_curacion ; 5 Minutos set %cofre_timer #SCNT set %presencia IJB set %cofres JIB_HIF_BUD_IKF_IIF set %vendas_limpias ZLF set %vendas_sucias AMF set %pilones TEE_QEE_WEE_VEE_UEG set %comida RGG_NRD_QSD_ZBG_WLI_QRD_END_FUD_YLI_WLI_HGI +_KGI_EGI_QLI_KLI_MLI_KRD_HQD_AQD_MQE_VQE_TQE_JQE_IQE +_GQE_SPE_ZPE_OQE_BDF_KPE_RQE_YSD_SQD_YWI_AXI_PQD_QQD set %proxima_vez #SCNT gosub setupMacro gosub setupHeal gosub setupObjetivo loop: finditem %objetivo G_3 if #FINDCNT = 0 ; No hay objetivo... { wait 1s ; Esperamos... goto loop } else ; Hay un objetivo... { if ( %golem ) ; Hemos elegido macrear un Golem... { if ( #SCNT < %kill_time ) { if ( #SCNT >= %siguiente_kill ) { gosub allKill } if ( %curar_objetivo ) { if ( #SCNT >= %siguiente_invasmani ) { gosub inVasMani } } } else { event macro 1 0 All Stop wait %tiempo_stop ; Este el tiempo de espera para que te de tiempo a curar al Wyrm después de haberlo atacado durante %tiempo_atacando. set %kill_time #SCNT + %tiempo_atacando ; Ampliamos el contador de tiempo para seguir atacando durante %tiempo_atacando. } } else ; Hemos elegido macrear un Familiar... { if ( %familiar ) { if ( %modo_presencias ) { set %ID_presencia #FINDID } if ( %modo_cofre ) { if ( #SCNT >= %cofre_timer ) { _cofreBackpack: finditem %cofres C_ , #BACKPACKID if #FINDCNT > 0 ; OK, tenemos el cofre... { set #SYSMSGCOL 73 event sysmessage TIRANDO EL COFRE... :D wait 20 exevent drag #FINDID #FINDSTACK exevent dropg %Presencia_X %Presencia_Y %Presencia_Z wait 30 finditem %cofres G_2 if #FINDCNT > 0 ; OK, ha caido bien en el suelo... { set %cofre_timer #SCNT + 180 } else ; Igual es que ha caido encima de la pierna del Wyrm y ha vuelto a la mochila... xDDDDD { goto _cofreBackpack ; Repetimos a ver si hay suerte... } } else ; No está en la mochila... miramos a ver si ya está en el suelo... { finditem %cofres G_2 if #FINDCNT > 0 ; Nos los echamos en la mochila... { set #SYSMSGCOL 73 event sysmessage RECOGIENDO COFRE... :D wait 20 exevent drag #FINDID #FINDSTACK exevent dropc #BACKPACKID wait 30 goto _cofreBackpack } else ; Tampoco está en la mochila o está demasiado lejos... { finditem %cofres G_5 if #FINDCNT > 0 ; Está, pero más lejos de lo que debería... { if #FINDDIST > 2 { set #SYSMSGCOL 88 event sysmessage ESTAS MUY LEJOS DEL COFRE! wait 20 event sysmessage PARANDO MACRO... :-( wait 20 halt } } else ; No está... Nos lo han robado o algo, jaja... xDDD { set #SYSMSGCOL 88 event sysmessage NO ENCUENTRO EL COFRE! :-( wait 20 event sysmessage PARANDO MACRO... :-( wait 20 halt } } } } } if ( #SCNT >= %siguiente_kill ) { gosub allKill } if ( %curar_objetivo ) { if ( #SCNT >= %siguiente_invasmani ) { gosub inVasMani } } if ( %curar_vendas ) { gosub limpiavendas gosub curar } } } } goto loop sub limpiavendas ; <==========================> finditem %vendas_sucias C_ , #BACKPACKID if #FINDSTACK >= %max_vendas_sucias { set #LOBJECTID #FINDID finditem %pilones C_ , #BACKPACKID if #FINDCNT > 0 { event macro 17 0 target 3s set #LTARGETID #FINDID set #LTARGETKIND 1 event macro 22 wait 20 } } return sub curar ; <==========================> set %jstart #jindex finditem %vendas_limpias C_ , #BACKPACKID if #FINDCNT > 0 { set #LOBJECTID #FindID event macro 17 target 3s set #LTARGETID %animal set #LTARGETKIND 1 event macro 22 wait 10 } else ; No hay vendas! { event macro 1 0 all come wait 5s event macro 1 0 all stop wait 1s event macro 1 0 all stop wait 1s set #SYSMSGCOL 38 event sysmessage NO HAY VENDAS!! :-( halt } gosub wait_for MSG aplicas_las pones_el_vendas curas_a pero_fallas no_necesita_curarse estas_demasiado estas_demasiado 15 if ( #true in #result ) { if ( aplicas_las in #result || pones_el_vendas in #result ) { wait 8s } if ( curas_a in #result || pero_fallas in #result ) { return } if ( no_necesita_curarse in #result || estas_demasiado in #result || you_can in #result ) { wait 6s return } } return sub setupHeal display yesno ¿Quieres curar al objetivo usando la magia? (In Vas Mani) if #DISPRES = Yes { set %curar_objetivo #TRUE } else { set %curar_objetivo #FALSE } return sub setupMacro display yesno ¿Quieres entrenar un Familiar? (Wyrm, Oso, Wisp, etc) if #DISPRES = Yes { set %familiar #TRUE set %golem #FALSE display yesno ¿Quieres curarlo con vendas? if #DISPRES = Yes { set %curar_vendas #TRUE ; Comprobar la suerte [ 2020-05-22 - SirDrunk: + Veterinaria si tienes +25 de suerte sube más rapido. ] if ( #LUCK < 25 ) ; 25 son dos o tres joyas de suerte (collar, anillo, brazalete, etc), o se le puede añadir una armadura de cota de mallas de oro con arma y escudo ^^ { set #SYSMSGCOL 1264 event sysmessage =============================== event sysmessage Llevas poca suerte encima :-( event sysmessage =============================== wait 2s display OK ! Tener +25 de suerte ayuda a subir Veterinaria más rapido ! } finditem %pilones C_ , #BACKPACKID if #FINDKIND = -1 ; Si no hay ninguno, paramos. { event exmsg #charid 0 89 CONSIGUE UN PILON DE AGUA!! wait 1s halt } else { set %pilon #FINDID set #SYSMSGCOL 53 event sysmessage OK: Pilon %pilon wait 2s } set #SYSMSGCOL 88 event sysmessage Haz click tu Familiar wait 20 set #TARGCURS 1 target while #TARGCURS = 1 { wait 1 } set #SYSMSGCOL 18 set %animal #LTARGETID event sysmessage OK Familiar: %animal wait 40 } else { set %curar_vendas #FALSE } display yesno ¿Quieres entrenarlo con un cofre en la mochila? (Para familiares que tienen MAGIA) $$ + NOTA: ¡Debes estar a dos casillas de la presencia para poder manejar el cofre! if #DISPRES = Yes { set %modo_cofre #TRUE } else { set %modo_cofre #FALSE } } else { display yesno ¿Quieres entrenar un Golem? $$ +Tendrás que ir ajustando "tiempo_atacando" +en la configuración de la macro a medida que +el Golem se vaya haciendo más fuerte. if #DISPRES = Yes { set %familiar #FALSE set %curar_vendas #FALSE set %golem #TRUE set %kill_time #SCNT + %tiempo_atacando } else { set #SYSMSGCOL 38 event sysmessage DEBES ELEGIR UNA OPCION! halt } } return sub setupObjetivo set #SYSMSGCOL 73 event sysmessage CLICK EN EL OBJETIVO wait 20 set #TARGCURS 1 while #TARGCURS = 1 { wait 1 } wait 3s set %objetivo #LTARGETID gosub GetName %objetivo nombre_objetivo set #SYSMSGCOL 88 event sysmessage OBJETIVO: %nombre_objetivo wait 40 finditem %objetivo if #FINDCNT > 0 { if %presencia in #FINDTYPE ; Si el objetivo es una presencia { set %objetivo %presencia ; Entonces fijamos como objetivo el TYPE de las presencias en lugar de un ID único... set %modo_presencias #TRUE set %Presencia_X #FINDX set %Presencia_Y #FINDY set %Presencia_Z #FINDZ set #SYSMSGCOL 18 event sysmessage OK: USANDO PRESENCIAS... wait 40 } else { set %modo_presencias #FALSE return } } else { set #SYSMSGCOL 38 event sysmessage NO ENCUENTRO EL OBJETIVO! :( halt } return sub allKill event macro 1 0 All Kill target if ( %modo_presencias ) { set #LTARGETID %ID_presencia } else { set #LTARGETID %objetivo } set #LTARGETKIND 1 event macro 22 wait 20 set %siguiente_kill #SCNT + %tiempo_kill return sub inVasMani event macro 15 28 ; Mayor Curación (In Vas Mani). target 2s set #LTARGETID %objetivo set #LTARGETKIND 1 event macro 22 wait 3s set %siguiente_invasmani #SCNT + %tiempo_curacion return ;* @name GetName ;* @author Roadkill ;* @ver 1.0 24Jan04 ;* @purpose get the name of a creature/vendor ;* @params %1= the id of the thing whose name you want, required ;* @%2= variable name to return the ID in, required ;* @returns @%2 and #result ;* @changes #property, #strres, @%2, !strlength ;* @example call rksubs.txt GetName %beetle beetlename ;* @status: tested sub GetName set %id_property %1 gosub waitforprop %id_property str pos #property $ set !strlength #strres - 1 str left #property !strlength set % . %2 #strres return % . %2 sub waitforprop ; <===================================================> event property #charid wait 1 set %oldprop #property event property %1 _testforprop: if #property = %oldprop { goto _testforprop } return ;====================================================================== sub wait_for ;================================================================= ; This "wait_for" sub package was created by Locke. If you use these subs please keep this header intact. ; // end header ; 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. ; Thanks to ~BookWibble~ for helping with all the debugging and spotting a bug or three. ; "wait_for core dispatcher" version 1.3 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 ignoreitem reset LLWAITFOR 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_MSG ; version 1.4 ~Locke ;================================================================= if !_A0 < 3 { display ok You haven't specified enough vars.$ +The basic format is: gosub wait_for MSG %message % , time_out_in_seconds$ +Script is halting halt } set !_timeout ( #scnt + !_A . !_A0 ) _lets_wait_for_a_message: for %i %jstart #jindex { scanjournal %i for %ii 2 !_A0 { if !_A . %ii in #journal && %jstart <> %i set #result #true , #spc , !_A . %ii } } if #true notin #result { set #result #false if !_timeout =< #scnt return #result wait 1 goto _lets_wait_for_a_message } else return #result wait 1 goto _lets_wait_for_a_message ;====================================================================== sub wait_for_GUMP ; version 1.4 ~Locke ;================================================================= 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 #scnt + !_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 { 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 =< #scnt && !_A4 = N/A return #false if !_A4 <> N/A && !_timeout =< #scnt { 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 #scnt + !_A3 } else return #false } wait 1 goto _lets_wait_for_a_gump ;====================================================================== sub wait_for_HOTKEY ; Version 0.8 ~Locke ;================================================================= if !_A0 < 4 { display ok You haven't specified enough vars.$ +The basic format is: gosub wait_for HOTKEY KEY ACTION % , time_out_in_seconds$ +Script is halting halt } set #lpc 300 set %key_pressed N/A set !_Timeout !_A . !_A0 + #scnt repeat { for %i 2 !_A0 { set !_key !_A . %i onhotkey !_key set %key_pressed !_Key } } until !_timeout =< #scnt || %key_pressed <> N/A if %key_pressed <> N/A { for !i 2 !_A0 { set !key_pos !_A . !i if %key_pressed in !key_pos break } set !i !i + 1 set !next_var !_A . !i } if set in !next_var && %key_pressed <> N/A { set !string !next_var str pos !string _ str del !string 1 #strres set !string #strres str pos !string _ set !pos #strres - 1 set !realpos #strres str left !string !pos set !var #strres str del !string 1 !realpos set % . !var #strres return % . !var } if %key_pressed <> N/A return !next_var return #false ;====================================================================== 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 + #scnt repeat { finditem !_A2 !_A3 if #findkind <> -1 return #true wait 1 } until #scnt => !_timeout return #false