; | / \ | . ; _ -O- . ) (( )) ( -O- ; (@) | + /|\ ))_(( /|\ | . ; |-| / | \ (/\|/\) / | \ (@) ; | | --------------------------/--|-voV---\`|'/--Vov-|--\---------------------------|-| . ; |-| '^` (o o) '^` | | ; | | `\Y/' |-| ; |-| _______ __ __ __ _______ __ __ | | ; | | | | | | |_|__|.--------.---.-.| _ | |__|.---.-.-----.-----.---.-. |-| . o ; |-| | | | | _| || | _ || | | || _ | |-- __| _ | | | ; | | |_______|__|____|__||__|__|__|___._||___|___|__|__||___._|__|__|_____|___._| |-| ; |_|________________________________________________________________________________| | ; (@) l /\ / ( ( \ /\ l `\|-| . ; o l / V \ \ V \ l + (@) ; l/ _) )_ \I + ; + `\ /' ; ; Script: AutoLoot ; ; ; /`._ , ; / \ / \ ; ) ,-==-> /\/ \ ; )__\\/ // \ | ; / /' \// | | ; / ( /|/ | / ; / //| /,' ; // / (( ) ' ; // // \ | ; // (#) | ; / )\/ \ ' ____ ; / /#/ ) /,.__\__,,--=_, ; / \#\ /) __/ + \____,--==< ; //gnv_____/#/_/' (\_\__+/_, ---<^ ; '==--==' ; ; Author: Sthil Lauda ; Version: 3.1 ; Client Tested with: 2.0.3 ; EUO version tested with: EasyUO 1.5 Version 243 ; Shard: Ultima Alianza (¡Hasta la muerte!) ; Public Release: 24/08/2019 ; Revised On: 08/01/2020 ; Purpose: Lotear y cortar el cadaver. ; Instrucciones: - Configurar las teclas rápidas (hotkeys). ; - Si quieres que no lotee alguna cosa, desactiva la línea correspondiente añadiendo un ";" delante Ejem: " ;gosub moveItem %gemas %contenedor %bolsa_loot ". ; Agradecimientos a: Bishop, Samara y Gargamel ^^ set %version v3.1 ; ------------- ; *** NOTAS *** ; ------------- ; - Añadida auto-configuración de la bolsa de loot. ; - Añadida comprobación de arma de filo para cortar cuerpos. ; - Arreglado fallo al lotear bolsas de segundo nivel en cofres. ; - Arreglado fallo en la aspiradora de PvP. ; - Mejora en PvM: Si el NPC desaparece al cortarlo, ahora lo lotea del suelo. ; - Mejora en PvM: Ampliado el filtro de joyas (se añade "Suerte" (además de "Incompleta")). ; - Mejora en PvM: Añadido nuevo filtro para minerales (se incluye "Eclipse"). ; - Añadido mensaje de aviso por sobrecarga de peso. ; - Corregidas varias listas de ID's. ; - Incrementada la velocidad general de la macro. ; - Añadido al loot de PvM: instrumentos musicales, mineral, pieles, y plumas. ; - Añadido al loot de PvP: Flechas. ; - Añadidos nuevos mensajes y colores. ;________________________________ ; ; /////////////////////////////// ; ******** CONFIGURACIÓN ******** ; /////////////////////////////// ;________________________________ ; ;---------------------------------------------------------- ; *************** TECLAS DE ACCIÓN RÁPIDA **************** ;---------------------------------------------------------- ; Aqui ponemos las teclas que queramos para Lotear, en mi caso la tecla "control" y la letra zeta "z". ; También se puede hacer con ; A-Z, 0-9, F1-F12, ESC, BACK, TAB, ENTER, PAUSE, CAPSLOCK, SPACE, PGDN, PGUP, ; END, HOME, LEFT, RIGHT, UP, DOWN, PRNSCR, INSERT, DELETE, NUMLOCK, SCROLLLOCK. ; ; TECLA: Lotear Cuerpos. set %auto_loot_toggle_key_1 x set %auto_loot_toggle_key_2 ctrl ; ; TECLA: Cambio de "Modo Loot" [ PvM / PvP ] durante el funcionamiento de la macro. set %switch_loot_toggle_key_1 c ; ¡Configura esto si vas a hacer PVP! set %switch_loot_toggle_key_2 ctrl ; ¡Configura esto si vas a hacer PVP! ;--------------------------- ; ******* MODO LOOT ******* ;--------------------------- set %mode 1 ; [ 1 = PvM / 0 = PvP ] ; Modo de arranque por defecto. ;-------------------------------- ; **** Abrir y lotear bolsas **** ;-------------------------------- set %lotear_bolsas #TRUE ; [ #TRUE = SÍ o #FALSE = NO ] ;------------------------------ ; **** Aviso por sobrepeso **** ;------------------------------ set %limite_peso 30 ; Peso libre antes de empezar a avisar. ;----------------------------------- ; *** SONIDO AL COMPLETAR LOTEO *** ;----------------------------------- ; /| ; = = = / | ; ____| || || |____/ | -_-_-_-_-_-_ ; |)----| || || |____ | BEEP! ; (( | || || | ))\ | _-_-_-_-_-_- ; \\_|_||_||_|_// \ | ; \___________/ \| ; set %sonido #FALSE ; [ #TRUE o #FALSE ] ;------------------------------------------------------------------------------- ; ; ==================================================================== ; _______ __ _______ _______ ______ ______ _______ ; | | |.-----.--| |.-----.|_ _| | | __ \ __ \ | ; | || _ | _ || _ | | | | | | < __ < - | ; |__|_|__||_____|_____||_____| |___| |_______|___|__|______/_______| ; ; ==================================================================== ; ; _.-'"""`-. ; |\ _.--' _.._ `. ; .-'""`-._ \ ( __.--' _.-'" \ \_._ ; .-'.-'_.---.`-. .-_)\\\ \ _.-'' __.\ _L `. ; / .'.' `-.`._.-' \ \|||_|--'| / `-\' \ \ ; J J / ' .-'`. __|--'|_|--Y _.-' \_\-') \ ; F .-')|_|---' | | _.-' __ || L ; J | .'_.-'/' ||--.___ | _|--' /| .' < | ; J | `-' |<_. `--.-' ( \ (_' L J ; L \ F | `--.-' \_`-' | | ; A \ / F .-' " J F ; |\ `. ` . _ ' .' | _.' ; | \ . .' / F-' ; |\ `. - .' .-'-' ; J L `. .'/ .-' ; FJ `--..--' / _.----'-'.\ ; | \ / / / / _.-'.'_.--._ `\ ; .'|\\ / / / J .' /.' `. \\ ; <_.->\\ / /\/ F // //--. \ \\ ; _.-'-_) \\ / J J/ JJ | `. \ \`-. ; -'"--' \\ | F || | )\ L L | ; \' \ .---./\\ | J| || .-./ L | |< ; \ L/ .-./ \\ | || JJ((_))--| | J|L ; L J (_) \\ .| |J \\`-' F J ||| ; J \ | L ' _.-'> J \ \\`. F / F | ; \ _>-' J _.-'<-' \ \ `. `./ .'./ | ; _>-' | \ J`. \ _. \ `. `.. _.' .' F ; < \| \ | O| |'-' `. `. `-._.--' J ; L | \ \ |.-' `-._ _.--' |) ; J J `'\-' "" / ; \ .-' \ / ; ) --' L \ / ; //\ \ `. .' ; .''.-. \ `. .' ; || (_) `-. .' ; `-. \ \ `--.____ ___.-/ ; `. \ \ \ \"""_.' / ; \ \ _ _.______.__`.`.--`-' .'\ ; `-.__.-' \ /\ \ \ .<' \ ; L || | __||_______.-' \ .-'> ; ) `--'""" ' _/ <-' \ ; .' _.-' __.-'" \ \ ; .' .-' _.--' \ \ VK ; \' _.-' \ .'| ; \_.-' <_.- ; ; El modo turbo, en vez de usar un tiempo de espera fijo (wait) a la hora de mover un item, ; observa el cambio de peso en el personaje al levantar el item, y luego espera a detectarlo cuando pasa ; del cadáver a la mochila (drop). De esta forma se evita esperar de sobra "a ciegas" para darle el suficiente ; tiempo a moverse de un sitio a otro, dependiendo del lag, etc. ; set #LPC 1000 ; Líneas por ciclo de ejecución. set %actionwait 10 ; Tiempo de espera entre acciones. set %dragdropwait 15 ; Tiempo de espera para el drag & drop. ;________________________________________________ ; ; ////////////////////////////////////////////// ; ************* FIN CONFIGURACIÓN ************* ; ////////////////////////////////////////////// ;________________________________________________ ; set %dineroycheques POF_TVH_EWH_XVH_YWI ; + Recetas, Mapas, Monedas de logro... set %joyas IJG_SJG_UJG_HJG set %runas QWL_SWL_RWL_PWL set %pociones WUF set %flechas LNK_RWF set %custom_pvm LGG_XYF_SEE_UZF_EAG_GUF_QEJ_LWK_WXD_EWS_NLF ; Pólvoras, Libros, Vasijas, Escamas, Madera muerta, Huesos, Cristal de fundición, Corazón nórdico, Tejido del Caos, etc... set %golems YWL_RCG_QSL_LYAB set %gemas UVF_EWF_TVF_DWF_MWF_XVF_BVF_SVF_AWF_YVF_EVF_CWF_DVF_CVF_GWF_QVF_ +JVF_KVF_WVF_MVF_OVF_ZVF_BWF_GVF_FVF_LVF_VVF_PVF_NVF_VUF_IVF_RVF_FWF_HVF set %regsmagia RZF_SZF_KZF_JZF_KUF_WZF_MZF_JUF set %regsnigro FUF_TZF_XZF_PZF_YZF_EUF_VZF_NZF set %regsalquimiaysastre QZF_DAG_OZF_IUF_LZF_HUF set %varitas HFF_IFF_CFF_BFF set %instrumentos MQF_LQF_QRF_PRF set %pieles_y_plumas VLK_MSG_OSG ; Plumas, Pieles Oscura, Pieles CLaras. set %pergas NUL_GUL_FUL set %vendas ZLF set %minerales DWJ_EWJ set %bolsasycajitas CKF_IUD_LKF_ZJF set %instrumentos QRF_MQF_LQF_PRF set %armormineral HSH_KSH_LSH_WSH_MSH_JSH_ISH_USH_OSH_TSH_NSH_MSK set %armorescamas QKH_DLH_VKH_ELH_KKH_SKH_UKH_PKH_JKH_NJL_QJL_HKH set %escudos CIK_BIK_AIK_OIK_NIK_FIK_GIK_LIK_CQF_PMH_MIK_QMH set %bastones ZPF_CQF_GFF_FFF_QMH_PMH_NZH set %sword ATF_CUO_ZSF_HSF_KSF_EPH_BPH_KTF_JTF_QOD_NMH_POH_SOH_KPH_JPH_ +YTH_XTH_FUO_GUO_ZTO_TSF set %fencing VOD_OPO_LTF_MTF_PPF_AQF_SRH_RRH_VRH_WRH_XRH_YRH_OMH_ANJ_SOD_BUO set %mace CUH_BUH_ZTH_AUH_YSF_XSF_URH_TRH_VOH_QOH_WTH_VTH_AUO set %lumber BSF_MSF_NSF_ISF_ZRF_CSF_RMH_SMH_LSF_OSF_MPH_LPH_NPO_JOH_UOH_FSF set %archery TOH_QPO_WOH_MMH_LMH_TMJ_JSF_USF_ROD set %ropamagica DCI_CDP_JWI_YVI_VSH_ODI_IWI_KZH_FWL_AWL_DPH_TDI_GZH_ +JWI_ZPH_YPH_WVI_HZH_CZH_XVI_EWI_WWI_YVI_BWI_HWI_QZH_NZH_BWI_OZH_DZH_ +MKH ; Lista completa para filtrar y descartar las armas y bastones que no sean mágicos ("basura" XD). set %tipos_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_QOD_VOD_ANJ_SOD_VOH_ +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_FUO_QOH_URH_CQF_CFF_PMH_AUH_SPO_CPH_AQF_ +MPO_YRH_JOH_KSF_ZRF_PPF_SMH_XHF_UPO_TOH_QPO_WOH_MMH_LMH_TMJ_ +JSF_USF_ROD_AUO ; Lista para comprobar el tajador de cuerpos. set %armas_de_filo ATF_CUO_ZSF_HSF_KSF_EPH_BPH_KTF_JTF_QOD_NMH_POH_SOH_ +KPH_JPH_YTH_XTH_FUO_VOD_OPO_LTF_MTF_PPF_AQF_SRH_RRH_VRH_WRH_XRH_YRH_OMH_ +ANJ_SOD_BSF_MSF_NSF_ISF_ZRF_CSF_RMH_SMH_LSF_OSF_MPH_LPH_NPO_GUO_ZTO_JOH_ +UOH_BUO_FSF_TSF set %tipos_bolsas ZJF_LKF_CFK_YNF_BKF_HKF_CUD_ +KKF_ZTD_WMF_VMF_UMF_KIF_JIF_EDE_BDE_NVD_CVD_ +OVD_QVD_PVD_EVD_OZD_CZD_GZD_UYD_SPF_AUD_IKF_ +IIF_HIF_BUD_GDE_VCE_HDE_FDE_CDE_IDE_YMF_CKF_ +OKF_LNF_JNF_MNF_VNF_TXM_UXM_CTD_KUD_TMF_IUD set %corpse_fail 0 set %num_containers 0 set %tipo_bolsa N/A set %aviso_limite #SCNT set %aviso_peso #SCNT ignoreitem reset set #SYSMSGCOL 1187 event sysmessage ============== wait 20 set #SYSMSGCOL 53 event sysmessage AutoLoot %version wait 20 set #SYSMSGCOL 1187 event sysmessage ============== wait 20 ;===================================== ; ***** AVISO MODO LOOT PVM/PVP ***** ;===================================== if %mode = 1 { set #sysmsgcol 1462 event SysMessage MODO LOOT: *** PvM *** wait 20 } else { if %mode = 0 { set #sysmsgcol 1659 event SysMessage MODO LOOT: *** PvP *** wait 20 } else { set #sysmsgcol 38 event SysMessage ERROR DE CONFIGURACION wait 20 halt } } ;===================================== ; ** CONFIGURAR CONTENEDOR DE LOOT ** ;===================================== display yesno ¿Quieres usar tu mochila como bolsa de Loot? if #dispres = no { display ok Target en la bolsita donde quieres guardar el LOOT.$ + Si se trata de tu propia mochila, haz target en la del paperdol.$ _configura_bolsa: set #targcurs 1 targ_loop: if #targcurs = 1 { goto targ_loop } set %bolsa_loot #LTARGETID gosub abrir_bolsa if ( %tipo_bolsa Notin %tipos_bolsas ) ; Si lo que hemos elegido no es una bolsa normal { display OK CONTENEDOR NO COMPATIBLE! ELIGE OTRO DISTINTO!! goto _configura_bolsa } else { set #sysmsgcol 1570 ; Color Verde event sysmessage [ OK ] Bolsa: %bolsa_loot [ X: %PosicionBolsaLootX Y: %PosicionBolsaLootY ] wait 10 } } else { if #dispres = yes { set %bolsa_loot #BACKPACKID set #sysmsgcol 1570 ; Color Verde event sysmessage [ OK ] Mochila: %bolsa_loot wait 10 } } ;=========================================== ; ** CONFIGURAR ARMA PARA CORTAR CUERPOS ** ;=========================================== _configurarTajador: display yesno ¿Quieres CORTAR los cuerpos de tus enemigos? >8-] if #dispres = yes { set %cortar_cadaver #TRUE ; OK cortar cuerpos activado. if ( %cortar_cadaver ) { display OK Target en el arma para cortar cuerpos gosub getTargetIDType set %cuchillo #result finditem %cuchillo if #FINDCNT > 0 { if #FINDTYPE In %armas_de_filo { set #sysmsgcol 1081 gosub GetName %cuchillo nombre_cuchillo event sysmessage [ OK ] Tajador: %nombre_cuchillo wait 20 } else { set #SYSMSGCOL 38 event sysmessage ERROR: Ese arma no parece tener filo! goto _configurarTajador } } else { set #SYSMSGCOL 38 event sysmessage ERROR: No encuentro el arma! :-( goto _configurarTajador } } } else { set %cortar_cadaver #FALSE ; OK cortar cuerpos desactivado. set #sysmsgcol 1165 event sysmessage [ OK ] Loteo simple. wait 20 } set #SYSMSGCOL 1187 event sysmessage ============== wait 20 set #SYSMSGCOL 1930 event sysmessage TODO OK! :D wait 20 set #SYSMSGCOL 1187 event sysmessage ============== wait 20 ;======================================================== ; ; ******************* LOOP PRINCIPAL ******************** ; ;======================================================== loop: gosub checkPeso OnHotKey %auto_loot_toggle_key_1 %auto_loot_toggle_key_2 { if %mode = 1 ; Modo PvM [ 18/26 tipos de items exclusivos de PvM ] { gosub findCorpse ; Buscamos un cadáver en el suelo en un radio de 3 tiles if ( ! %cadaver ) ; Si NO lo encontramos... { set %loot_suelo #TRUE gosub lotear_suelo_pvm gosub lootStats } else ; OK, hemos encontrado un cuerpo... { if ( %cortar_cadaver ) ; ¿Cortar el cuerpo? { gosub cortar_cadaver %cuerpo finditem %cuerpo G_3 ; Lo volvemos a buscar por si ha desaparecido al cortarlo... if #FINDCNT > 0 ; Ok. sigue ahí... { set %loot_suelo #FALSE gosub openCorpse ; Abrir el cadáver. if ( %lotear_bolsas ) { set %num_containers_cadaver 0 set %sub_containers 0 gosub all_open %cuerpo ; Abrir todas las bolsas. ignoreitem reset bags } gosub loot_corpse ; Lotearlo todo. gosub lootStats } else ; El cuerpo ha desparecido, entonces loteamos del suelo... { set %loot_suelo #TRUE gosub lotear_suelo_pvm gosub lootStats } } else ; No hay que cortar... { set %loot_suelo #FALSE gosub openCorpse ; Abrir el cadáver. if ( %lotear_bolsas ) { set %num_containers_cadaver 0 set %sub_containers 0 gosub all_open %cuerpo ; Abrir todas las bolsas. ignoreitem reset bags } gosub loot_corpse ; Lotearlo todo. gosub lootStats } } } else { if %mode = 0 ; Modo PvP [ 15/26 tipos de items exclusivos de PvP ] { gosub findCorpse ; Buscamos un cadáver en el suelo en un radio de 3 tiles if ( %cadaver <> #false ) ; Lo hemos encontrado... { if ( %cortar_cadaver ) ; Cortamos y loteamos... { set %loot_suelo #TRUE gosub equiparArma gosub cortar_cadaver %cuerpo gosub loot_corpse gosub lootStats } else ; No hay que cortar el cuerpo, pero sí lotearlo... { set %loot_suelo #FALSE gosub openCorpse gosub loot_corpse gosub lootStats } } else ; Si no hay cuerpo, loteamos el suelo... { set %loot_suelo #TRUE gosub loot_corpse gosub lootStats } } } } onhotkey %switch_loot_toggle_key_1 %switch_loot_toggle_key_2 { gosub switchLootMode } wait 1 goto loop ;======================================================== ; ; ***************** FIN LOOP PRINCIPAL ***************** ; ;======================================================== ;-@ ============================== @-; ;-@ ############################## @-; ;-@ ############ SUBS ############ @-; ;-@ ############################## @-; ;-@ ============================== @-; ; sub loot_corpse set %count 0 set #sysmsgcol 73 ; Color verde para el mensaje if %mode = 1 ; Modo PvM [ 18/26 tipos de items exclusivos de PvM ] { gosub lotear_pvm %cuerpo if ( %lotear_bolsas ) { if %num_containers_cadaver > 0 { set %sub_containers 0 for %s 1 %num_containers_cadaver ; Para cada una de los cofres o bolsas... { finditem %tipos_bolsas C_ , %cuerpo set %bolsa #FINDID gosub lotear_pvm %bolsa ; Loteamos el contenedor que ya está abierto gosub all_open %bolsa ; Buscamos otra vez más bolsitas dentro y las abrimos... ignoreitem %bolsa sub_lv0_bags ; La desechamos } set %sub_lv2_containers 0 if %sub_containers > 0 { for %i 1 %sub_containers ; Para cada una de los cofres o bolsas... { gosub lotear_pvm %container_ . %i ; Loteamos el contenedor que ya está abierto gosub open %container_ . %i ; Buscamos otra vez más bolsitas dentro y las abrimos... ignoreitem %container_ . %i sub_lv1_bags ; La desechamos } } if %sub_lv2_containers > 0 { for %i 1 %sub_lv2_containers ; Para cada una de los cofres o bolsas... { gosub lotear_pvm %sub_container_ . %i ; Loteamos el contenedor que ya está abierto gosub open %sub_container_ . %i ; Buscamos otra vez más bolsitas dentro y las abrimos... ignoreitem %sub_container_ . %i sub_lv2_bags ; La desechamos } } ignoreitem reset bags ignoreitem reset sub_lv0_bags ignoreitem reset sub_lv1_bags ignoreitem reset sub_lv2_bags } } } else { if %mode = 0 ; Modo PvP [ 15/26 tipos de items exclusivos de PvP ] { set #sysmsgcol 43 ; Color verde para el mensaje set %tiempo_loot #scnt gosub lotear_pvp %cuerpo } } return sub lootStats set %tiempo_loot #scnt - %tiempo_loot ignoreitem %cuerpo ; Nos olvidamos de volver a lotear el mismo cuerpo... if %count > 0 ; Hemos encontrado algo para lotear... { set #sysmsgcol 88 event sysmessage LOOT!: [ %tiempo_loot , #spc , Secs ] [ %count , #spc , Items ] wait 10 } else { set #sysmsgcol 1264 event sysmessage **** NO ENCUENTRO NADA *** wait 10 } if ( %sonido ) { sound } return sub lotear_pvm set %contenedor %1 set %tiempo_loot #scnt gosub moveItem %dineroycheques %contenedor %bolsa_loot gosub moveItem %regsmagia %contenedor %bolsa_loot gosub moveItem %regsalquimiaysastre %contenedor %bolsa_loot gosub moveItem %custom_pvm %contenedor %bolsa_loot gosub moveItem %gemas %contenedor %bolsa_loot gosub moveItem %varitas %contenedor %bolsa_loot gosub moveItem %pociones %contenedor %bolsa_loot gosub moveItem %joyas %contenedor %bolsa_loot gosub moveItem %golems %contenedor %bolsa_loot gosub moveItem %flechas %contenedor %bolsa_loot gosub moveItem %armormineral %contenedor %bolsa_loot gosub moveItem %sword %contenedor %bolsa_loot gosub moveItem %fencing %contenedor %bolsa_loot gosub moveItem %lumber %contenedor %bolsa_loot gosub moveItem %archery %contenedor %bolsa_loot gosub moveItem %mace %contenedor %bolsa_loot gosub moveItem %bastones %contenedor %bolsa_loot gosub moveItem %regsnigro %contenedor %bolsa_loot gosub moveItem %minerales %contenedor %bolsa_loot gosub moveItem %pieles_y_plumas %contenedor %bolsa_loot gosub moveItem %instrumentos %contenedor %bolsa_loot return sub lotear_suelo_pvm set %tiempo_loot #scnt set %count 0 gosub moveItem %dineroycheques %bolsa_loot gosub moveItem %regsmagia %bolsa_loot gosub moveItem %regsalquimiaysastre %bolsa_loot gosub moveItem %custom_pvm %bolsa_loot gosub moveItem %gemas %bolsa_loot gosub moveItem %varitas %bolsa_loot gosub moveItem %pociones %bolsa_loot gosub moveItem %joyas %bolsa_loot gosub moveItem %golems %bolsa_loot gosub moveItem %flechas %bolsa_loot gosub moveItem %sword %bolsa_loot gosub moveItem %fencing %bolsa_loot gosub moveItem %lumber %bolsa_loot gosub moveItem %archery %bolsa_loot gosub moveItem %mace %bolsa_loot gosub moveItem %bastones %bolsa_loot gosub moveItem %regsnigro %bolsa_loot gosub moveItem %minerales %bolsa_loot gosub moveItem %instrumentos %bolsa_loot set %loot_suelo #FALSE return sub lotear_pvp set %contenedor %1 set %tiempo_loot #scnt set %count 0 gosub moveItem %joyas %bolsa_loot gosub moveItem %bastones %bolsa_loot gosub moveItem %armorescamas %bolsa_loot gosub moveItem %armormineral %bolsa_loot gosub moveItem %tipos_armas %bolsa_loot gosub moveItem %ropamagica %bolsa_loot gosub moveItem %sword %bolsa_loot gosub moveItem %fencing %bolsa_loot gosub moveItem %lumber %bolsa_loot gosub moveItem %archery %bolsa_loot gosub moveItem %mace %bolsa_loot gosub moveItem %escudos %bolsa_loot gosub moveItem %pergas %bolsa_loot gosub moveItem %runas %bolsa_loot gosub moveItem %flechas %bolsa_loot set %loot_suelo #FALSE return sub cortar_cadaver finditem %cuerpo G_3 if #FINDCNT > 0 { if #FINDDIST <= 3 { set #LOBJECTID %cuchillo event macro 17 target 2s set #LTARGETID %cuerpo set #LTARGETKIND 1 event macro 22 wait 10 ; Aquí se puede hacer más inteligente a la macro escaneando mensajes en el diario y realizando acciones extra... ^^ } } return sub equiparArma finditem %cuchillo C_ , #CHARID if #FINDCNT = 0 ; Si el arma no está en el pj, nos la equipamos. { finditem %cuchillo C_ , #BACKPACKID if #FINDCNT > 0 { set #LOBJECTID %cuchillo event macro 17 gosub waitForItem %cuchillo C_ , #CHARID 40 ; Sub especial anti-lagazos, fijado a 2 segundos máximo. return } } return sub switchLootMode if %mode = 0 { set #sysmsgcol 1462 event SysMessage MODO LOOT: *** PvM *** set %mode 1 } else { set #sysmsgcol 1659 event SysMessage MODO LOOT: *** PvP *** set %mode 0 } return sub findCorpse set %cadaver #FALSE for %i 0 3 ; En un radio de 3 tiles { finditem YFM_QNF G_ , %i if #FINDCNT > 0 { set %cuerpo #FINDID set %cadaver #TRUE } } return sub openCorpse if #CONTID <> %cuerpo ; Si el cuerpo no está abierto { _repiteCorpse: set #LOBJECTID %cuerpo event macro 17 gosub wait_for GUMP %cuerpo 10 ; Esperamos 1s a que se abra el contenedor con el ID del cuerpo a lotear if ( ! #result ) { set %corpse_fail %corpse_fail + 1 if ( %corpse_fail >= 4 ) ; Fijamos un máximo de 4 intentos para abrir el cadaver { set #sysmsgcol 33 set %corpse_fail 0 event sysmessage LOOT FAIL!! :-( wait 10 goto loop } goto _repiteCorpse } } return sub abrir_bolsa finditem %bolsa_loot C_ , #BACKPACKID if #FINDCNT > 0 { set %tipo_bolsa #FINDTYPE set #LOBJECTID %bolsa_loot event macro 17 gosub wait_for GUMP %bolsa_loot 20 if ( #RESULT ) { set #SYSMSGCOL 1072 event sysmessage PON LA BOLSA EN SU SITIO Y PULSA ESCAPE while #TRUE { onhotkey ESC { set %PosicionBolsaLootX #CONTPOSX set %PosicionBolsaLootY #CONTPOSY break } wait 1 } gosub wait_for GUMP %bolsa_loot CLOSE set #LOBJECTID %bolsa_loot event macro 17 gosub wait_for GUMP %bolsa_loot 20 if ( #RESULT ) { contpos %PosicionBolsaLootX %PosicionBolsaLootY wait 20 } } } return sub checkPeso set %curlbs #WEIGHT set %maxlbs #MAXWEIGHT if ( %maxlbs - %curlbs <= 0 ) && ( #SCNT >= %aviso_limite ) { set #SYSMSGCOL 1560 event sysmessage SOBRECARGA! : #WEIGHT / #MAXWEIGHT set %aviso_limite #SCNT + 10 goto loop } if ( %maxlbs - %curlbs < %limite_peso ) && ( %maxlbs - %curlbs > 0 ) && ( #SCNT >= %aviso_peso ) { set #SYSMSGCOL 1916 event sysmessage LIMITE DE PESO : #WEIGHT / #MAXWEIGHT set %aviso_peso #SCNT + 20 goto loop } return sub open set %num 0 set %sub_contenedor_loot %1 Finditem %tipos_bolsas C_ , %sub_contenedor_loot if %sub_lv2_containers = 0 { set %sub_lv2_containers #findcnt } open_again: Finditem %tipos_bolsas C_ , %sub_contenedor_loot if #Findkind = -1 return set %num %num + 1 set %sub_container , _ , %num #FindID ignoreitem #FindID sub_lv2_bags _repiteSubBag: set #LObjectID #FindID event macro 17 gosub wait_for GUMP #FindID 10 if ( ! #RESULT ) ; Si falla al abrirse, repetimos... { goto _repiteSubBag } goto open_again ;-@ ============================== @-; ;-@ ############################## @-; ;-@ SUBS públicos del Foro EasyUO @-; ;-@ ############################## @-; ;-@ ============================== @-; ;** ;* @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 finditem %1 if #findkind = -1 return error-cant_find event property #findid str pos #property $ set !strlength #strres - 2 str left #property !strlength set %string #strres str Del %string 1 1 set % . %2 #strres return % . %2 ;================================== ; Script Name: All-bag opener ; Author: Orngrimm [Sthil GUMP +MOD] ; Version: 1.1 ; Client Tested with: 4.0.0.1a ; EasyUO version tested with: 1.40 005C ; Shard OSI / FS: OSI ; Revision Date: 26.09.2004 ; Public Release: 2.12.03 ; Purpose: Opens all bags and Subbags in your backpack and other (already opened) containers ; !!! WARNING !!!: If you add boxes to the list, you may die because of trapped boxes! ; Disclaimer: Dont change this script and release it under own name. ; Let this header intact and dont distribute without it! ; DONT distribute without my permission!! (PM Orngrimm @ easyuo.com) ; Copyright: by Orngrimm ;================================== ; ----------------------------------------- sub all_open set %contenedor_loot %1 set %num 0 Finditem %tipos_bolsas C_ , %contenedor_loot if %contenedor_loot = %cuerpo { set %num_containers_cadaver #findcnt } else { if %sub_containers = 0 { set %sub_containers #findcnt } } all_open_do_again: Finditem %tipos_bolsas C_ , %contenedor_loot if #Findkind = -1 ; If I dont find more bags: All are open! return set %num %num + 1 set %container , _ , %num #FindID ignoreitem #FindID bags ; I only want to open a bag once! _repiteBag: set #LObjectID #FindID event macro 17 gosub wait_for GUMP #FindID 10 if ( ! #RESULT ) ; Si falla al abrirse, repetimos... { goto _repiteBag } goto all_open_do_again ; The bag should be open now ; Search again for a non opened bag... ;================================== ; Script Name: sub moveItem *ExEvent* ; Author: Tecmo, Bad_Maniac, Sthil ; Version: 1.12 ; Client Tested with: 5.0.1a patch 21 ; EUO version tested with: 1.50 build 60 ; Shard OSI / FS: OSI and FS ; Revision Date: 2005-Oct-07 ; Public Release: 2005-Aug-04 ; Copyright: Tecmo, Bad_Maniac ; ********************************* ;* @packageversion 1.12 ;* @purpose move an item from one location to another ;* @author Tecmo, Bad_Maniac ;* @param ; %1 req Item to move ; %2 req Move from location ; %3 req Move to location ; %4 opt Quantity ;* @return Returns the value True or False ;* @Calling Example ; Inside script = gosub moveItem [Item to Move] [From location] [To location] [Quantity] (nothing in qty uses #findstack) ; Outside calling = call subMoveItem.txt [Item to Move] [From location] [To location] [Quantity] (nothing in qty uses #findstack) ; Examples: ;user Variable such as %loot ;system Variable such as #findid ;--> Move from Location - 2nd Variable aka %2 (Required) ; This is the variable that tells the sub where to look for the items. ; Examples: ;user Variable = a storage container, etc., %lootBag ;system Variable = #contid, #backpackid, etc. ;open Containers = C ;specific Container = C_ , %corpse ;Ground = G_4 ;--> Move to Location - 3rd Variable aka %3 (Required) ; This is the variable that tells the sub where to move the item(s) to. ; Examples: ;user Variable = a storage container, etc., %storageBag ;system Variable = #contid, #backpackid, etc. ;Ground = G_4 ;--> Quantity - 4th Variable aka %4 (Optional) ; This is the variable that tells the sub how many of the item(s) you wish to move. ; Examples: ;nothing / left blank = Sub will grab the complete stack if #findstack > ;1 or more = grabs up to specified amount. ; Calling the sub ; You are required to include AT LEAST 3 parameters when calling this sub. The 4th is optional as noted above. ; Examples: ; gosub moveItem %loot %corpse #BACKPACKID (moves all selected loot from corpse to your pack) ; gosub moveItem %loot %corpse #BACKPACKID 1 (moves 1 item from stack off of corpse to pack ; gosub moveItem %loot C #BACKPACKID (moves selected items from any open pack to your main pack) ;================================== SUB moveItem { SET %_itemId %1 IF %mode = 1 && ! %loot_suelo ; Modo PvM [ Lotear del cuerpo -> PvM ] { SET %_itemLocation C_ , %2 SET %_newItemLocation %3 } else { IF %mode = 0 || %loot_suelo ; Modo PvP [ Lotear del suelo, máx 3 tiles de distancia -> PvP ] { IF ( %loot_suelo ) { SET %_itemLocation G_3 } else { SET %_itemLocation C_ , %contenedor } IF %mode = 1 { SET %_newItemLocation %2 } else { IF %mode = 0 { SET %_newItemLocation %2 } } } } IF %0 = 4 SET %_qty %4 ELSE SET %_qty 0 moveLoop: FINDITEM %_itemId %_itemLocation IF #FINDKIND <> -1 { SET %_litemID #FINDID SET %_litemTypeID #FINDTYPE IF %mode = 1 ; Modo PvM [ Filtrar armas, joyas de poco valor, y eclipse ] { IF ( %_litemTypeID in %minerales ) ; Filtro para Eclipse. { if ( #FINDCOL <> 1953 ) { ignoreitem %_litemID GOTO moveLoop } } IF ( %_litemTypeID in %tipos_armas || %_litemTypeID in %joyas ) ; Filtro para armas, bastones, y joyas. { event property %_litemID IF ( %_litemTypeID in %tipos_armas ) ; Armas { IF ( Magico Notin #property ) ; Descartamos armas malas... ^^ { ignoreitem %_litemID GOTO moveLoop } } IF ( %_litemTypeID in %joyas ) ; Joyas { IF ( Incompleto Notin #property && Suerte Notin #property ) ; Descartamos joyas cutres... ^^ { ignoreitem %_litemID GOTO moveLoop } } } } SET %qty %_qty IF %qty = 0 SET %qty #FINDSTACK set %peso #Weight EXEVENT drag %_litemID %qty WAIT %dragdropwait SET %droptimeout #SYSTIME + 1000 dropwait: EXEVENT dropc %_newItemLocation FINDITEM %_litemID %_newItemLocation IF #FINDKIND <> -1 && #SYSTIME < %droptimeout { GOTO dropwait } SET %count %count + 1 GOSUB BMWaitAction %actionwait GOTO moveLoop } RETURN } ;=============================== ; BMWaitAction ; %1 time to wait in 10th of a second ; If no arguments are passed, it sets ; the timer to the current time ;=============================== SUB BMWaitAction IF %0 < 1 || %1 = N/A || %bmwatimer = N/A { SET %bmwatimer #SCNT2 RETURN } bmwa_wait: IF ( %bmwatimer + %1 ) > #SCNT2 GOTO bmwa_wait 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_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_tenth_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 waitForItem { namespace push namespace local wfi set %time #SCNT2 + %4 ; Décimas de segundo dropwait: finditem %1 %2 , %3 if ( #FINDKIND = -1 ) ; Not Found { wait 1 if ( #SCNT2 >= %time ) { return #false } goto dropwait } namespace clear namespace pop return } sub GetTargetIDType set #targCurs 1 targLoop: if #targCurs = 1 { wait 1 goto targLoop } finditem #lTargetID if %1 = Type { return #FINDTYPE } return #lTargetID 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