Macro EasyUO Mining. (Preferencias : Minas com Bank.)

; ==================================================
; Nome do Script: Mining Bank
; Criado por: Dark Spirit ou GM Joni (KDS) ou ForSek
; Revisado/Melhorado: Dark Spirit ou GM Joni (KDS) ou ForSek
; Agradecimentos: -
; ==================================================
; Versão: 0.6 Version
; Teste: 2 Players
; Aprovado: 100%
; Testado no: Dragon Shard
; Usado em: Qualquer Shard
; Data de Revisão: 31 . Dezembro . 2005
; Lançamento Publico: 17 . Agosto . 2007
; Bugs Encontrados: 0
; ==================================================
; *Necessita:
; EASY UO v.1.5 e CLIENT= Free
; ==================================================
; *Como usar:
; Vá até uma mina qalquer que tenha acceso ao Banco quando voce digitar BANK
; Configure o Macro do Seu modo.
; ==================================================
; *Duvidas? *Bugs? *Agradecimentos?
; (Mande Mensagem pelo E-mail ou addicione: viniciustrabbi@hotmail.com)
; ==================================================
; LOGS:
; 0.6 - Liberacao do Macro.
; 0.6.1 - Atual.: Adicionada a Bag do Canto Direito Superior.
; - Atual.: Adicionada Rotas para o Shard(usuarios do) que utilizava o macro na epoca.
; 0.6.2 - Add: Modo Stealth - Minera escondido.
; 0.6.3 - Add: Alimentação do Char definida por variavel.
; - Altual.: Melhoramento no Macroem geral
; - Add: Macro separado para escolher ores (foi adicionado separado pois junto, o char demoraria mais para minerar)
; - Add: Title com Dados.
; 0.7 - *Versão definitiva*.
; - Add: Adicionada as rotas para as posicoes ficarem individuais e uma conta nao atrapalhar a outra.
; 0.7.1 - Add: Suporte para o Sistema de Seguranca e Selecao de Ores.
;=====================================================================


;===================
;===== Inicio ======
;===================
initevents
;===================================
;===== Configuracoes Iniciais ======
;===================================
in:
; Open Paperdoll
event macro 8 1
wait 10

; Open status
event macro 8 2
wait 10

; Open backpack
event macro 8 7
wait 10
set #SYSMSGCOL 65
event sysmessage .::. Macro Mining Bank by Dark Spirit | Forsek .::. Versao: 1.0.1 .::.
wait 3s


;=====================================
;===== Checagem 2 (nao remova!) ======
;=====================================

check:
IF #CHARNAME <ForSek>
{
Display Adquirir: Para Aquirir este macro, faca contato com: 'viniciustrabbi@hotmail.com'.
set #SYSMSGCOL 05
Event sysmessage Este macro nao foi feito para voce!
;
halt
}
else
}
set #SYSMSGCOL 65
event sysmessage Verificado com sucesso. Obrigado #CHARNAME !!!
{
wait 4s
goto rotas

;==================
;===== Rotas ======
;==================
rotas:
set #SYSMSGCOL 65
event sysmessage Va ate o local onde voce deseja acessar o Banco para guardar os Ores e precione ENTER.
goto tempo1

tempo1:
OnHotkey ENTER
goto continuerotas
goto tempo1

continuerotas:
set %trajeto_umx #CHARPOSX
set %trajeto_umy #CHARPOSY
wait 3s
goto rotas2

rotas2:
set #SYSMSGCOL 65
event sysmessage Va ate o local onde voce deseja ir minerar apos guarda os ores e precione ENTER.
goto tempo2

tempo2:
OnHotkey ENTER
goto continuerotas2
goto tempo2

continuerotas2:
set %trajeto_doisx #CHARPOSX
set %trajeto_doisy #CHARPOSY
wait 4s
goto teste4

;======================
;===== RELATORIO ======
;======================

teste4:
set #SYSMSGCOL 65
event sysmessage Rotas finalizadas e gravadas.
wait 2s
event sysmessage Relatorio das Variveis:

IF %alimentar = 1
{
set #SYSMSGCOL 65
event sysmessage Alimento ao Char ON.
}
ELSEIF %alimentar = 0
{
set #SYSMSGCOL 65
event sysmessage Alimento ao Char OFF.
}

wait 1s

IF %hiding = 1
{
set #SYSMSGCOL 65
event sysmessage Modo Stealth ON.
}
ELSEIF %hiding = 0
{
set #SYSMSGCOL 65
event sysmessage Modo Stealth OFF.
}
wait 5s
goto rotasok

;=====================
;===== ROTAS OK ======
;=====================

rotasok:

set #SYSMSGCOL 65
event sysmessage Voce marcou as Rotas, agora, escolha qual a Bag que voce ira guardar os Ores!
wait 2s
goto Bagconfig

;=======================================
;===== Configuração - BAG de Ores ======
;=======================================

Bagconfig:
set #SYSCOLMSG 65
move %trajeto_umx %trajeto_umy
wait 3s
msg Bank$
set %Banco #CONTID
wait 3s
contpos 10 10
Event SysMessage Deixe o mouse sobre onde sera descarregado os ORES e aperte ENTER.

tempoenter:
OnHotkey ENTER
goto continueconfig
goto tempoenter

continueconfig:

set %click_positionx #CURSORX
set %click_positiony #CURSORY
wait 2s
Event SysMessage Ok! Iniciando o macro...
event macro 5 5
goto BANKCONFIG

;=========================================
;===== CONFIGURACAO DA BAG NO BANCO ======
;=========================================

BANKCONFIG:
set #SYSMSGCOL 40
event sysmessage Verificando BAG! Vai aparecer o nome da Bag que voce escolheu!
move %trajeto_umx %trajeto_umy
wait 1s
msg bank
Key Enter
wait 3s
contpos 10 10
wait 10
click %click_positionx %click_positiony
wait 4s

finditem CUD
set #LOBJECTID #FINDID
set #findY #FINDID
set #findX #FINDID
if #findkind = 0

set %X #FINDX
set %Y #FINDY
set %X %X + 20
set %Y %Y + 20
event sysmessage Bag OK! Indo Mineirar!
move %trajeto_doisx %trajeto_doisy
wait 1s


;===================================
;===== CONFIGURACAO - MINERAR ======
;===================================

if #MAXHITS > #HITS
{
msg Guards ! $
Key Enter
wait 8s
}

; Pickaxes
set %pickaxe NPF_QPF_TWF_WWF

; Numero de tentativas
set %tentativas 3

; Tempo maximo de espera em cada tentativa (em segundos)
set %tempo_max_tentativa 8

; Tempo entre cada tentativa (pode ser usado no lag ou em servidores que não aceitam minerar muito rapido)
set %tempoPickaxe 1

; Distancia maxima a minerar (distancia em tiles)
; Padrao 2 (corresponde a 25 posições diferentes sem caminhar)
set %target_max_distance 1

; ========== CONFIGURAÇÕES - ALIMENTAR

; Alimentar? (Sim ou Nao)
Set %alimentar Sim

; Comidas
Set %comida RUD_FUD_BDF_GQE_IQE_ZPE_SQD_OQE_KPE_VQE_TQE_YSD_JQE_YWI_AXI_PQD_QQD_MQE_SPE_RQE_
END_RGG_AQD_FUD_ZBG_WLI_QRD_YLI_NRD_PRD_XLI_ACG_IGI_GUD_HND_QSD

; ========== CONFIGURAÇÕES - HIDING

; Hiding? (Sim ou Nao)
Set %hiding Nao

; ========== CONFIGURAÇÕES - ANDAR

; Distancia a andar
Set %distancia_andar 5

; ========== CONFIGURAÇÕES - FIXAS (nao alterar)

Set %target_tmp_X %target_max_distance
Set %target_tmp_Y %target_max_distance

Set #ltargetid 0
Set #ltargetz 0
Set #ltargetkind 3

; ========== Title Ultima - Status do Char e Skill

sub title
set %delta #skill - %skill
setuotitle Mining Bank Macro | Skill: %Skill : ( Valor Base: %skillr1 pontos e %skillr3 décimos ) | Peso: #weight / #maxweight | .::. Mining Bank by ForSek .::.
return

; ========== INICIO
Inicio:
gosub ajusta_target

ChooseSkill %Skill
GoSub comida
GoSub skillr
GoSub skillv
Set %Skill Mining
GoSub skilli

Set %tentativa_atual 0

goto mine

; ========== MINE
mine:

if #MAXHITS > #HITS
{
msg Guards ! $
Key Enter
wait 8s
}

gosub title

hiding:
if #charstatus <> H && %hiding = Sim
{
event macro 13 21
wait 3s
goto hiding
}

wait %TempoPickaxe

Set %tentativa_atual %tentativa_atual + 1

if %tentativa_atual > %tentativas
{
goto inicio
}

gosub pickaxe

Set #SCNT 0

goto jornal

;==========================
;===== GUARDAR BANCO ======
;==========================

banco:
set #SYSMSGCOL 40
event sysmessage Voce esta muito pesado!!! Vamos visitar o banqueiro!?
key esc
event macro 8 7
contpos 600 400
set %Backpack #CONTID
move %trajeto_umx %trajeto_umy
wait 2s
msg $Bank
key enter
set %Banco #CONTID
wait 2s
contpos 10 10


GO:
FINDITEM TVJ_GWJ_EWJ_DWJ_EVF_UVF_HVF_GVF_FVF_OVF_BVF_VUF C_ , %Backpack
if #findkind = 1
{
ignoreitem #findid
goto find
}
if #findkind = 0
{
event drag #FINDID
wait 1s
key enter
wait 2s
click %click_positionx %click_positiony
goto GO
}
if #findkind = -1
{
wait 1s
move %trajeto_doisx %trajeto_doisy
wait 1s
return


; ========== JORNAL
jornal:
if #MAXHITS > #HITS
{
msg Guards !$
Key Enter
wait 8s
}
deleteJournal
scanJournal 1

;quando atacado
if #sysmsg = YOU_ARE_PREOCCUPIED_WITH_THOUGHTS_OF_BATTLE.
{
event Macro 6 0
return
}

if #WEIGHT > 350
{
goto banco
}

if #SCNT >= %tempo_max_tentativa
{
goto mine
}

;mining_los
if you_have_no_line_of_sight_to_that_location in #journal || voce_nao_tem_uma_linha_de_visao in #journal
{
goto inicio
}

;mining_reach
if that_is_too_far_away in #journal || aquele_esta_muito_distante in #journal
{
goto inicio
}

;mining_1
if try_mining_elsewhere in #journal || tente_minerar_em_outro_lugar in #journal
{
goto inicio
}

;mining_2
if there_is_nothing_here_to_mine_for in #journal || nao_a_nada_aqui_para_minerar in #journal
{
goto inicio
}

;mining_3
if there_is_no_ore_here_to_mine in #journal || Aqui_nao_ha_nada_para_minerar in #journal
{
goto inicio
}

;mining_4
if tente_minerar_em_outro_local in #journal || tente_minerar_na_rocha in #journal
{
goto inicio
}

if #MAXHITS > #HITS
{
msg Guards !$
Key Enter
wait 8s
}

if Voce_pegou_apenas_pedras in #journal || nenhum_minerio_aproveitavel in #journal
{
goto mine
}

if in_your_pack in #journal || Voce_colocou in #journal
{
goto mine
}

if you_cannot_mine_so_close_to_yourself in #journal || Esta_muito_longe in #journal
{
goto mine
}

goto jornal

; ====================Ajusta target====================
sub ajusta_target

if %target_tmp_Y < 0 - %target_max_distance
{
set %target_tmp_Y %target_max_distance
set %target_tmp_X %target_tmp_X - 1
}

if #MAXHITS > #HITS
{
msg Guards !$
Key Enter
wait 8s
}

if %target_tmp_X < 0 - %target_max_distance
{
set %target_tmp_X %target_max_distance

set %direcao %direcao + 1
set %anda_x #charposx
set %anda_y #charposy

if %direcao >= 4
{
set %anda_y #charposy - %distancia_andar
set %direcao 0
}
if %direcao = 3
{
set %anda_x #charposx - %distancia_andar
}
if %direcao = 2
{
set %anda_y #charposy + %distancia_andar
}
if %direcao = 1
{
set %anda_x #charposx + %distancia_andar
}

move %anda_x %anda_y 0 2s
}

set #ltargetx #charposx - %target_tmp_X
set #ltargety #charposy - %target_tmp_Y

set %target_tmp_Y %target_tmp_Y - 1

return

; ====================PICKAXE====================
sub pickaxe

if #MAXHITS > #HITS
{
msg Guards !$
Key Enter
wait 8s
}

finditem %Pickaxe

if #findkind = 0
{
set #LObjectID #FindID
event macro 17 0
target
event macro 25 0
event macro 22 0
return
}

if #findkind = 1
{
ignoreitem #FindID
gosub pickaxe
return
}

if #findkind = -1
{
ignoreitem reset
event sysmessage Pickaxe nao encontrada
wait 3s
return
}
return

; ====================COMIDA====================
sub comida
IF %alimentar = Sim
{
finditem %Comida
if #findkind = 0
{
set #LObjectID #FindID
event macro 17 0
}

if #findkind = 1
{
ignoreitem #FindID
gosub comida
}

if #findkind = -1
{
ignoreitem reset
event sysmessage Comida nao encontrada
}
}
return

;============================ Sub Skill Real ============================;

Sub skillr

Set %skillr1 #skill / 10
Set %skillr2 %skillr1 * 10
Set %skillr3 #skill - %skillr2
return

;============================ Sub Skill Variável ============================;

Sub skillv

Set %skillv1 %skillr1 - %skilli1
Set %skillv2 %skillr3 - %skilli3
return

;============================ Sub Skill Inicial ============================;

Sub skilli

Set %skilli1 #skill / 10
Set %skilli2 %skilli1 * 10
Set %skilli3 #skill - %skilli2
return
_____________
|=============|
|==== FIM ====|
|=============|

0 comentários: