; ====================================================================================================== ; '|| ||` '||` || /.\ '||` ; || || || || '' // \\ || '' ; || || || ''||'' || '||),,(|, '''|. //...\\ || || '''|. `||''|, '''/ '''|. ; || || || || || || || || .|''|| // \\ || || .|''|| || || // .|''|| ; `|...|' .||. `|..' .||. .|| ||. `|..||. .// \\. .||. .||. `|..||. .|| ||. /... `|..||. ; ===================================================================================================== ; ; Script Name: Domar en Yew ; ; ; ; ; ~~`~~ ; ; ~`~ ~~`~~`~ `~` ; ~~`~~ `~~~`~~~~ `~`~` , ; ~~`~~`~ ~`~~~`~ `~`~`"_/O\""\ ; ~`~~`~~`~~~ ~~~`~~~`~ ~|`~_ |[|##| ; `~~`~~~`~ ~~~|~~~` '_--...__ ; ~`~|~\_~\_ __/¯¯) | _- _- _ _ ; | |/ .'( ) | _- _- _ ; | / -\ __`/\ \ |_- _- ¯_ - ; _____/ /--'(^,__ /\ \ //\ _ ; /' GM \ | | \ \ ||\\_- _- _ ; \....( / ;;;___;;; /||~~`~~ ; || \\ | | _/ ||~~~`~~~ - ; \\ \\ |=| /_( ||~~`~~~` _ ; \\_ \\_ , (__| _ ~~~~`~~~_- _- _ ; _- _- _ - <`_\ __; _- _ ~~~`~~ ; _ - _ - (_ __) _ ~~;~~ -_ ; _- _- _ < / < \ _- _ - _- _ ; set %version v1.15 ; ; *** NOTAS "MÁGICAS" ^^ *** : ; - Si la macro de domar se os para en un determinado sitio y el pj no se mueve, pausad la macro, ; abrid una nueva pestaña en el EasyUO, y escribid lo siguiente: set *posicion 0 ; Le dais al play una vez, y otra al stop. Una vez hecho esto, volver a encender la macro de domar. ; ; MEJORAS : ; - Añadido modo "Killer" para limpiar Yew de animales que ya están tameados por otras personas ¬¬ ; - Añadidas opciones para resetear los animales ya domados y la ruta por el mapa. ; - Añadidas protecciones. ; - Añadido un "sub" para comer cada cierto tiempo hasta quedar saciado. ; - Añadido un "sub" para activar el modo "always run" para que vaya corriendo por el mapa en lugar de ir andando. ; - Añadido el "sub" pathFind para moverse (Author: ScriptFellow). ; - Añadida un "sub" para evitar que el PJ entre a domar animales en zonas que están bugeadas (Ejem: 493,803,-3 ). Si detectáis otras locations que dan problemas, avisadme por Discord para que las incluya en la macro. ; - Añadida opción de subir la habilidad de "Ocultarse". ;------------------------------------------------------- set %tiempo_alimentacion 360 ; Cada cuántos segundos va a comprobar si tiene hambre (6 minutos). set %ignore_locs_X 256_259_268_284_316_340_418_419_420_421_423_426_427_428_444_456_488_492_530 set %ignore_locs_Y 1002_999_948_940_1066_936_836_835_834_822_831_833_821_1100_824_809_804_806 set %ignore_locs_Z -4_-3_-5 set %tiempo_actual #SCNT ; Reloj set %proxima_vez #SCNT ; Trigger set %hay_regs #TRUE 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 %armas FMH_GFF_EPH_LPH_BPH_CUO_TSF_LPO_JPH_ZTH_RMH_SOH_TLH_ +FUO_WSF_ATF_OMH_XPO_NMH_BNF_LTF_VPO_WTH_VRH_KTF_ +OLH_FFF_ZSF_YTH_BUO_ASF_ISF_BSF_QPF_KPH_CUH_NPO_MPH_UOH_TRH_XRH_CSF_ +KPO_POH_RRH_WPO_EMH_MSF_OPO_BUH_GUO_VTH_BFF_QMH_YSF_NSF_LSF_ +GMH_JTF_SRH_CNF_FBG_HNF_ZPF_GBG_OSF_INF_HSF_AUO_ZTO_FSF_WRH_MTF_JPO_ +RPF_HFF_XSF_YPO_DMH_XTH_QOH_URH_CQF_CFF_PMH_AUH_SPO_CPH_AQF_ +MPO_YRH_JOH_KSF_ZRF_PPF_SMH_NPO_GUO_XHF_NPF set %siguiendo 0 set #LPC 900 ; ; ********* MACRO ********* ; set #SYSMSGCOl 88 event SysMessage TammingGenius by Nilaween event SysMessage [ MOD+ Sthil %version ] chooseskill Anim real gosub setupHid gosub resetDomados gosub resetCamino gosub comprobar_armamento gosub comprobar_comida gosub choose_pace run ; Lo primero, cambiar el modo de moverse a "correr". goto movimiento INICIO: chooseskill Anim real set *posicion *posicion + 1 gosub hiding nuevotarget: set %fail 0 set %intentos 0 set %distancia 0 set #LTARGETID N/A set %tiempo_actual #SCNT if %proxima_vez <= %tiempo_actual ; Comer cada cierto tiempo si hay hambre { gosub comprobar_comida } finditem * G_25 if #FINDCNT > 0 && #FINDKIND = 1 { for #FINDINDEX 1 #FINDCNT { if #FINDREP <> 3 { ignoreitem #FINDID IGNORE_NOT_ANIMALS set *bloqueados *bloqueados , _ , #FINDID } else { if ( #FINDREP = 3 && #FINDID notIn %recientameados ) ; && #FINDX < 755 { set %tmp_animal #FINDID set %distancia #FINDDIST event PROPERTY %tmp_animal if ( OSO in #PROPERTY && #SKILL < 601 ) || SERPIENTE in #PROPERTY || HORRENDO in #PROPERTY || Cuerpo in #PROPERTY { set %recientameados %recientameados , _ , %tmp_animal if Cuerpo in #PROPERTY ; Animal muerto... { ignoreitem #FINDID IGNORE_NOT_ANIMALS } goto nuevotarget } break } } } gosub checkBugTarget repitiendotarget: finditem %tmp_animal if #FINDCNT > 0 { if #FINDDIST < 2 { set %siguiendo 0 set %jstart #jindex event macro 13 35 target set #LTARGETID %tmp_animal set #LTARGETKIND 1 event macro 22 gosub wait_for MSG TE_ACEPTA TU_HABILIDAD YA_ESTA NO_PUEDE_SER NO_PUEDES_DOMAR GET_THERE NO_PUEDES_VER SEE_THE_TARGET UNEXPECTED_TARGET FUERA_DE_TU ESTAS_DEMASIADO_LEJOS NO_CONSIGUES 200 if ( #TRUE in #RESULT ) { if TE_ACEPTA in #RESULT || TU_HABILIDAD in #RESULT || %fail > 5 { if TE_ACEPTA in #RESULT { event macro 1 0 all release wait 1s } gosub hiding set %recientameados %recientameados , _ , %tmp_animal ignoreitem %tmp_animal IGNORE_TAMED_ANIMALS goto nuevotarget } if SEE_THE_TARGET in #RESULT || YA_ESTA in #RESULT || NO_PUEDE_SER in #RESULT || NO_PUEDES_DOMAR in #RESULT || GET_THERE in #RESULT || %intentos > 5 { if YA_ESTA in #RESULT { if ( %kill_ya_domadas ) { event exmsg #charid 3 88 Uhmm... ??? wait 40 event exmsg #charid 3 73 ¡MUERTEEEEE! >:-) wait 40 gosub kill gosub hiding goto nuevotarget } else { goto _descartar_animal } } else { _descartar_animal: set *bloqueados *bloqueados , _ , %tmp_animal ignoreitem %tmp_animal IGNORE_TAMED_ANIMALS set #SYSMSGCOL 1570 event sysmessage IGNORANDO ANIMAL :( wait 20 gosub hiding goto nuevotarget } if NO_PUEDES_VER in #RESULT || UNEXPECTED_TARGET in #RESULT || FUERA_DE_TU in #RESULT { set %fail %fail + 1 gosub seguir gosub hiding goto repitiendotarget } if ESTAS_DEMASIADO_LEJOS in #RESULT { gosub seguir gosub hiding goto repitiendotarget } if NO_CONSIGUES in #RESULT { set %intentos %intentos + 1 gosub hiding } } else { set %fail %fail + 1 gosub hiding goto repitiendotarget } } else { set %fail %fail + 1 if %fail >= 15 { goto movimiento } gosub seguir gosub hiding goto repitiendotarget } } else { goto nuevotarget } } else { goto movimiento } goto INICIO sub kill finditem %tmp_animal if ( #FINDCNT > 0 ) { set #LTARGETID %tmp_animal set #LOBJECTID %arma_elegida event sysmessage SACRIFICANDO ANIMAL ... chooseskill Mage real if #SKILL >= 300 && %hay_regs ; Llegamos al tercer círculo, y tenemos regs. { _reNox: if #MANA >= 9 ; Tenemos suficiente maná... { set %jstart #jindex event macro 15 19 ; Cast Spell Poison / Envenenar (In Nox): Envenena al individuo seleccionado. target set #LTARGETKIND 1 event macro 22 gosub wait_for MSG Necesitas El_hechizo_falla 40 if ( #TRUE in #RESULT ) { if ( Necesitas in #RESULT ) { set %hay_regs #FALSE } if ( El_hechizo_falla in #RESULT ) { goto _reNox } } } } finditem %arma_elegida C_ , #CHARID if ( #FINDCNT < 1 ) ; Si no tenemos el arma puesta { finditem %arma_elegida C_ , #BACKPACKID if ( #FINDCNT > 0 ) ; La equipamos si es que está en la mochila { set #LOBJECTID %arma_elegida event macro 17 0 wait 20 } else ; Mal asunto, no encontramos el arma... pedimos una... { gosub comprobar_armamento } } repeat { finditem %tmp_animal ; Buscamos si sigue existiendo... if #FINDCNT > 0 { repeat { if #FINDDIST > 1 ; Si no estamos cerca... { gosub pathFind #FINDX #FINDY #FINDZ 1 2 ; Andamos hacia ella... Tolerancia 1 wait 2s } } until #FINDDIST <= 1 ; Hasta estar cerca para pegarle } event macro 27 0 ; Atacamos sin parar... wait 3s finditem %tmp_animal ; Buscamos si sigue existiendo... } until #FINDCNT = 0 ; Hasta que desaparezca del mapa... wait 40 } return sub checkBugTarget ; <==============================> finditem %tmp_animal if #FINDCNT > 0 { if ( #FINDX In %ignore_locs_X && #FINDY In %ignore_locs_Y && #FINDZ In %ignore_locs_Z ) || %siguiendo >= 3 ; El animal está en una parte del mapa (Yew) bugeado, y el PJ se queda atrapado. { set *bloqueados *bloqueados , _ , #FINDID ignoreitem #FINDID ANIMAL_BUGEADO set #SYSMSGCOL 1570 event sysmessage IGNORANDO ANIMAL! :-(( %siguiendo wait 20 set %siguiendo 0 } else ; Podemos acercarnos al bicho sin que nos quedemos flapados... :P { set %siguiendo %siguiendo + 1 gosub seguir } } return sub seguir ; <==============================> finditem %tmp_animal if #FINDCNT > 0 && #FINDDIST > 1 { gosub pathFind #FINDX #FINDY #FINDZ 1 5 } return MOVIMIENTO: set %nuevaronda 1 goto *posicion 0: move 636 866 set * . #TIME #TIME goto INICIO 1: move 646 915 goto INICIO 2: move 568 919 goto INICIO 3: move 547 875 goto INICIO 4: move 510 838 goto INICIO 5: move 450 860 goto INICIO 6: move 439 894 goto INICIO 7: move 366 957 goto INICIO 8: move 306 1000 goto INICIO 9: move 343 1030 goto INICIO 10: move 408 1024 goto INICIO 11: move 491 963 goto INICIO 12: move 536 984 goto INICIO 13: move 534 989 goto INICIO 14: move 514 1065 goto INICIO 15: move 484 1102 goto INICIO 16: move 506 1153 goto INICIO 17: move 538 1130 goto INICIO 18: move 552 1065 goto INICIO 19: move 576 1037 goto INICIO 20: move 615 1017 goto INICIO 21: move 636 963 goto INICIO 22: move 602 934 goto INICIO 23: move 682 907 move 721 925 set *posicion -1 set #SYSMSGCOL 120 event sysmessage NUEVA RONDA ! :D wait 20 ignoreitem reset IGNORE_TAMED_ANIMALS deletevar recientameados goto INICIO sub setupHid ; <==============================> display yesno ********************** [ HIDING ] **********************$$ + ¿Quieres intentar OCULTAR tu PJ mientras macreas? $$ + ******************************************************* $$ if ( #dispres = yes ) { set %hiding #TRUE } else { set %hiding #FALSE } return sub resetDomados ; <==============================> display yesno ******** [ RESETEO ANIMALES ] ********** $$ + ¿Quieres RESETEAR la LISTA DE ANIMALES ? $$ + **************************************** $$ if ( #dispres = yes ) { deletevar recientameados set *bloqueados N/A ignoreitem reset IGNORE_TAMED_ANIMALS } return sub resetCamino ; <==============================> display yesno ********* [ RESETEO CAMINO ] ******* $$ + ¿Quieres RESETEAR el CAMINO ANDADO ? $$ + ************************************ $$ if ( #dispres = yes ) { set *posicion N/A } else { set #SYSMSGCOl 43 event SysMessage Intentando acudir a la ultima posicion. Por favor, ayudame a llegar. wait 40 } return sub hiding ; <==============================> if ( %hiding ) { if ( H Notin #CHARSTATUS ) { event macro 13 21 ; Use skill Hiding gosub waitForSysVar CHARSTATUS = H 55 } } return ;===================================================== ; Rutina para, en caso de hambre, comer hasta saciarse ;===================================================== ; v2.2 sub comprobar_comida { hambriento: set %jrnl #jindex ; Marcamos un índice de las líneas del diario. event macro 4 0 .hungry wait 20 while #true { if #jindex > %jrnl ; Si aparece una nueva línea. { set %jrnl %jrnl + 1 ; Seleccionamos ese numero de línea. scanjournal %jrnl ; La leemos... if Dentro_de_1_minuto in #journal { wait 120s ; Save del server... } if Estas_no_le_afecta_el_hambre in #journal || Estas_tan_lleno_que_no_puedes in #journal || Estas_totalmente_saciado in #journal { set %proxima_vez %tiempo_actual + %tiempo_alimentacion return } else { if Estas_lleno in #journal || Estas_contento in #journal || Estas_en_inanicion in #journal || Estas_hambriento in #journal || Sientes_mucho in #journal || Estas_con_hambre in #journal || Estas_parcialmente in #journal || Estas_bien_lleno in #journal || Te_sientes_casi_lleno in #journal { finditem %comida C_ , #backpackid if #findcnt > 0 { set #lobjectid #findid event macro 17 wait 20 goto hambriento } else { event exmsg #charid 3 48 COMPRA COMIDA!! wait 40 set %proxima_vez %tiempo_actual + %tiempo_alimentacion } } else ; Mensaje extraño, repetimos... { goto hambriento } } } return } ; FIN While } return sub setup_arma set %arma_elegida #FINDID event property %arma_elegida set %descripcion_arma #property gosub split %descripcion_arma $ PROPIEDADES_ARMA if ( Durabilidad in %descripcion_arma ) ; Nos quedamos con el primer arma válida que veamos... { set #sysmsgcol 73 event sysmessage OK, Arma: %PROPIEDADES_ARMA1 wait 40 if Durabilidad in %PROPIEDADES_ARMA8 { event sysmessage %PROPIEDADES_ARMA8 wait 40 } if Durabilidad in %PROPIEDADES_ARMA9 { event sysmessage %PROPIEDADES_ARMA9 wait 40 } if Durabilidad in %PROPIEDADES_ARMA11 { event sysmessage %PROPIEDADES_ARMA11 wait 40 } if Durabilidad in %PROPIEDADES_ARMA12 { event sysmessage %PROPIEDADES_ARMA12 wait 40 } if Durabilidad in %PROPIEDADES_ARMA10 { event sysmessage %PROPIEDADES_ARMA10 wait 40 } finditem %arma_elegida C_ , #CHARID if ( #FINDCNT = 0 ) ; Si la elegida no está ya puesta, nos la equipamos... { set #LOBJECTID %arma_elegida event macro 17 0 wait 20 } set #sysmsgcol 1570 event sysmessage AUTO-KILL ON >:-) wait 40 set %kill_ya_domadas #TRUE if #AR < 25 ; Mineral de Aqua { set #SYSMSGCOL 38 event sysmessage *** PELIGRO ! *** event sysmessage Nivel de Armadura: #AR wait 40 display Se recomienda llevar algo de armadura :D $$ + ¡ALGUNOS ANIMALES HACEN DAÑO! O_O } else { set #SYSMSGCOL 88 event sysmessage OK Armadura: #AR wait 40 } } else ; No parece un arma de filo estándard, tipo Kryss { set #sysmsgcol 28 event sysmessage NO ME VALE UN %PROPIEDADES_ARMA1 ... wait 40 ignoreitem #FINDID goto busca_arma ; Volvemos a revisar el pj y la mochila } return sub comprobar_armamento busca_arma: finditem %armas C_ , #CHARID if ( #FINDCNT > 0 ) { gosub setup_arma return } else ; Si no hay un arma equipada en el pj { finditem %armas C_ , #BACKPACKID if ( #FINDCNT > 0 ) { gosub setup_arma return } else ; Si tampoco encontramos en la mochila... { display ********* PROBLEMA CON LAS ARMAS *********$ + ¡ATENCIÓN! ¡Necesito un arma de filo decente!$ + o si no, ¡No podré exterminar a los animales que$ + ya están domados y olvidados por el mapa!$ + *********************** :-( ***********************$ set #sysmsgcol 43 event sysmessage AUTOKILL OFF :-( wait 40 set %kill_ya_domadas #FALSE } } return ;-@ ============================== @-; ;-@ ############################## @-; ;-@ SUBS públicos del Foro EasyUO @-; ;-@ ############################## @-; ;-@ ============================== @-; ; ;** ;* Splits a string by a divider into an array and ;* copies the result into the desired namespace ;* @param %1 The string to split ;* @param %2 Divider ;* @param %3 Array name ;* @param %4 {optional} Result namespace. If no ;* namespace is given it will create the ;* array using the %-notation ;* @sideEffects Creates a number of variables ;* with name as given in %3 followed by ;* a digit ;* @returns The length of the array sub split namespace Push namespace Local split , #systime set !lpc #lpc if #lpc < 500 set #lpc 500 set !string %1 set !divider %2 set !arrayName %3 if %0 > 3 set !namespace %4 else set !namespace #false set !length 0 repeat { set !length !length + 1 str Pos !string !divider 1 if #strRes = 0 { set !done #true set ! . !arrayName , !length !string } else { set !pos #strRes set !len !pos - 1 str Left !string !len set ! . !arrayName , !length #strRes str Del !string 1 !pos set !string #strRes } } until ( !done = #true ) set #result !length if !namespace <> #false { namespace Copy !arrayName , * To Local !namespace } else { for !i 1 #result { set !value !arrayName , !i set % . !arrayName , !i ! . !value } } set #lpc !lpc namespace Clear namespace Pop return #result ;=========================================================== ; Name: pathFind ; Author: ScriptFellow (the.WZA) ; Parameters: %1 = X ; %2 = Y ; %3 = Z ; %4 = tolerance ; %5 = timeout (in seconds) ; Purpose: Pathfind to the given coordinates ; Return: %return (#true or #false ) ;----------------------------------------------------------- sub pathFind set %_x %1 set %_y %2 if %0 <= 2 || %2 = N/A set %_z -1 else set %_z %3 if %0 <= 3 || %3 = N/A set %_tolerance 0 else set %_tolerance %4 if %0 <= 4 set %_endTime #sCnt + 15 else set %_endTime #sCnt + %5 set %return #false deleteJournal scanJournal 2 event PathFind %_x %_y %_z _pathFindScanAgain: scanJournal 1 if pathfinding in #journal goto _pathFindOkay if can't_get_there in #journal || #sCnt > %_endTime return goto _pathFindScanAgain _pathFindOkay: gosub _pathFindDist %_x %_y %_z #charPosX #charPosY #charPosZ set %return %return <= %_tolerance if %return { if %_tolerance > 0 { set %1 #cliLeft + #cliXRes / 2 set %2 #cliTop + #cliYRes / 2 if #charDir < 3 set %1 %1 + 1 else { if #charDir > 3 && #charDir < 7 set %1 %1 - 1 } if #charDir = 0 || #charDir = 6 set %2 %2 - 1 else { if #charDir > 1 && #charDir < 5 set %2 %2 + 1 } click %1 %2 R } return } if #sCnt > %_endTime return goto _pathFindOkay sub _pathFindDist set %1 %1 - %4 abs set %2 %2 - %5 abs set %3 %3 - %6 abs gosub max %1 %2 %3 return ; to be defined sub max set %return %1 for %_idx 2 %0 { if % . %_idx > %return set %return % . %_idx } return ;================================================================= 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_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 ( #scnt2 + !_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 =< #scnt2 return #result wait 1 goto _lets_wait_for_a_message } else return #result wait 1 goto _lets_wait_for_a_message ;================================== ; Script Name: Peragrins' Pace choosing sub ; Author: Peragrin ; Version: v1.1 ; Client Tested with: 4.0.10b ; EUO version tested with: 1.42.00A5 ; Shard OSI / FS: OSI ; Revision Date: 05/06/05 ; Public Release: 22/09/04 ; Purpose: callable subroutine to pick whether always run is on or off ; Revisions: v1.1 now uses Namespace and better journal scanning ;============================================ sub choose_pace ;%0 - 1 ;%1 - WALK/RUN if %0 <> 1 || %1 notin WALK_RUN { display OK Incorrect arguments passed to ChoosePace subroutine, script halted. halt } namespace push namespace LOCAL ChoosePace set !desired_pace %1 _TOGGLE_PACE: set !jindex #jindex + 1 event macro 32 0 _CHOOSE_PACE_JOURNAL_SCAN: gosub ScanJournal ALWAYS_RUN !jindex 1 if #result { if ON in #journal && !desired_pace = WALK goto _toggle_pace if OFF in #journal && !desired_pace = RUN goto _toggle_pace } if ! #result { set !error !error + 1 if !error > 5 { set !error 0 goto _toggle_pace } goto _choose_pace_journal_scan } return ;================================== ; Script Name: Peragrins' journal scanning sub ; Author: Peragrin ; Version: v1.0 ; Client Tested with: 4.0.10b ; EUO version tested with: 1.42.00A5 ; Shard OSI / FS: OSI ; Revision Date: 05/06/05 ; Public Release: 22/09/04 ; Purpose: callable subroutine to scan for phrases passed to the sub ;============================================ sub scanJournal ;%0 - 2 ;%1 - phrase to scan for ;%2 - #jindex to scan from ;%3 - time to scan for namespace push namespace local ScanJournal for !timeout 1 %3 { for !line %2 #jindex { scanjournal !line wait 1 if %1 in #journal { namespace pop return #true } } wait 1s } namespace pop return #false ;======================================= sub waitForSysVar if %0 < 4 || %4 = N/A set %4 %_defaultWaitForTimeout if %0 < 5 set %5 return set %4 #sCnt2 + %4 _waitForSysVar: set % . %5 # . %1 %2 %3 if ! % . %5 && #sCnt2 < %4 { Wait 1 goto _waitForSysVar } return ;=======================================