; Macro de ARTESANIA
; Antes de empezar, hay que ajustar las cinco variables del
; principio. MochilaX y MochilaY son las coordenadas de la
; mochila del paperdoll, ahi se dejarán los lingotes que
; cojamos del cofre. %contLingotesID es la ID del cofre que
; contiene los lingotes que vayamos a utilizar (dicho cofre solo
; debería contener lingotes de hierro). %x y %y es la posición
; del cofre o bolsa donde vayamos a depositar los engranajes.
; Nota por ^pampano^: Para saber la ID del cofre, abrirlo
; en UO y mirar en "Container Info" a la derecha ------->
; en "#CONTID"
; MODIFICADO por ^pampano^: Sólo creará herramientas si hay menos de 3 en la mochila (para que no se almacenen muchas...).
; MODIFICADO por ^pampano^: Arreglado el sobrepeso por coger lingotes de más. Configurar
; dos variables más: LingotesX y LingotesY será la localización del cofre donde tenemos los lingotes
; (para que deje los que sobren y evitar el sobrepeso).
; ---->Original por Da Vinci<----
; ------------------------------------------------------------------------------------
; Configurad estos valores
set %mochilaX 961
set %mochilaY 233
set %contLingotesID VKVJMPD
set %x 382
set %y 321
set %LingotesX 428
set %LingotesY 298
; A partir de aqui, no tocar nada
set %lingotes 0
set %engranajes 0
chooseskill TINK REAL
set %habilidadInicial #SKILL
INICIO:
setuotitle ARTESANIA | Inicial: %habilidadInicial | Actual: #SKILL | Lingotes: %lingotes | Engranajes: %engranajes
nextCPos 0 350
set #LOBJECTID %contLingotesID
event Macro 17 0 0
wait 5
gosub EsperaContenedor #CONTID %contLingotesID
finditem RMK C_ , #BACKPACKID
wait 1s
if #FINDSTACK < 30
{
finditem RMK C_ , #BACKPACKID ; Primero deja todos los lingotes de la mochila :P.
wait 1s
event Drag #FINDID
wait 5
gosub EsperaVentana CONTNAME stack_gump
msg #FINDSTACK $
click %LingotesX %LingotesY p
wait 1s
finditem RMK C_ , %contLingotesID
wait 5
event Drag #FINDID
wait 5
gosub EsperaVentana CONTNAME stack_gump
msg 54 $
click %mochilaX %mochilaY p
wait 1s
set %lingotes %lingotes + 54
setuotitle ARTESANIA | Inicial: %habilidadInicial | Actual: #SKILL | Lingotes: %lingotes | Engranajes: %engranajes
}
CREAHERRAMIENTAS:
finditem GTL C_ , #BACKPACKID
wait 5
if #findcnt < 3 ; Aquí se pondría el número de herramientas máximo a tener en la mochila .
{
set #LOBJECTID #FINDID
event Macro 17 0 0
gosub EsperaVentana CONTNAME objpicker_gump
if #SKILL < 900
{
click 238 66 d
}
else
{
click 267 68 f
wait 10
click 238 66 d
}
wait 1
gosub EsperaVentana CONTNAME objpicker_gump
click 266 67 x 10
wait 1
click 266 67 x 10
wait 1
click 266 67 x 10
wait 1
click 266 67 x 10
click 60 66 d
wait 35
}
FABRICANDO:
finditem RMK C_ , #BACKPACKID
wait 1s
if #FINDSTACK > 20
{
finditem GTL C
wait 5
set #LOBJECTID #FINDID
event Macro 17 0 0
gosub EsperaVentana CONTNAME objpicker_gump
if #SKILL < 900
{
click 175 64 d
}
else
{
click 226 64 d
}
wait 1
gosub EsperaVentana CONTNAME objpicker_gump
click 104 55 d
wait 35
setuotitle ARTESANIA | Inicial: %habilidadInicial | Actual: #SKILL | Lingotes: %lingotes | Engranajes: %engranajes
finditem GTL C_ , #BACKPACKID
wait 5
if #findcnt < 3 ; Testea de nuevo para que no se quede sin herramientas a mitad :P.
{
goto CREAHERRAMIENTAS:
}
goto FABRICANDO
}
wait 35
nextCPos 0 150
finditem RCG C_ , #BACKPACKID
wait 5
set %engranajes %engranajes + #FINDSTACK
event Drag #FINDID
wait 5
gosub EsperaVentana CONTNAME stack_gump
msg $
click %x %y p
goto INICIO
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;,
sub EsperaVentana
set %tMax #SCNT
ESPERA1:
if # . %1 <> %2
{
wait 1
if %tMax + 5 < #SCNT
return #FALSE
goto ESPERA1
}
return #TRUE
sub EsperaCofre
set %tMax #SCNT
ESPERA2:
if # . %3 <> 180_240 || # . %1 <> %2
{
wait 1
if %tMax + 5 < #SCNT
return #FALSE
goto ESPERA2
}
return #TRUE
sub EsperaContenedor
set %tMax #SCNT
ESPERA3:
if %1 <> %2
{
wait 1
if %tMax + 5 < #SCNT
return #FALSE
goto ESPERA3
}
return #TRUE