Code:
sub mining() ; By kishi Iruka (para Mina de Minoc DMS)
var t,x,y,dir,px,py
uo.useobject ('BANK')
wait(500)
uo.lClick(314,439)
UO.AddObject ('CONTAINER')
While UO.Targeting()
Wait(1000)
uo.useobject ('BOOK1')
wait(500)
uo.lClick(181,201)
wait(12000)
Wend
inicio:
t=3 #Quantos tiles seu char vai andar depois que minerar tudo a sua volta.
ChecarLimite(488,6) #Limite X ou Y da Mina. #Quantos tiles seu char vai andar pra voltar depois de ultrapassar do limite.
IF (uo.weight >= 100) then #Peso maximo antes de comecar a guardar os Ores no Bank.
GuardarOres()
endif
for x = -2 to 2
for y = -2 to 2
denovo:
UO.DeleteJournal()
if ((y == 0) and (x == 0)) or ((num(x) == 2) and (num(y) == 2)) then
goto jump
endif
uo.waittargettile('#0x400', str(uo.GetX() + x), str(uo.GetY() + y), STR(UO.GetZ('self')))
uo.usetype('0x0E85')
repeat
wait(200)
until UO.InJournal("Voce pos|Tente miner|Voce nao|Nao ha|You cann|O alvo|target canc")
if not UO.InJournal("Tente minerar|Nao ha|uma linha|Iron ore|Ceramic|Gold ore|Verite ore|Valorite ore") then
goto denovo
endif
#Iron:
IF UO.InJournal("Iron ore") then
DropOre('0x19B7')
endif
#Ceramic:
IF UO.InJournal("Ceramic ore") then
DropOre('0x008F')
endif
IF UO.InJournal("Gold ore") then
DropOre('0x08A5')
endif
#Verite:
IF UO.InJournal("Verite ore") then
DropOre('0x089F')
endif
#Valorite:
IF UO.InJournal("Valorite ore") then
DropOre('0x08AB')
endif
jump:
next
next
walk:
px=UO.GetX('self')
py=UO.GetY('self')
dir=UO.Random(8)
while (t >= 0)
uo.press(dir+33)
wait(100)
t=t-1
wend
if (px == UO.GetX('self')) and (py == UO.GetY('self')) then
t=3
goto walk
endif
goto inicio
end sub
Sub num(X)
if X>0 then
return X
else
return (-X)
end if
end sub
sub ChecarLimite(limite,passos)
IF (UO.GetY('self') >= limite) then
uo.press(33)
wait(100)
uo.press(33)
while (passos >= 0)
wait(100)
uo.press(39)
passos=passos-1
wend
endif
end sub
sub GuardarOres()
var n
DIM ID[12]
ID[1]='0x19B9'
ID[2]='0x19B8'
ID[3]='0x19BA'
ID[4]='0x19B7'
ID[5] = '0x0F16'; amesthysts
ID[6] = '0x0F10'; emerald
ID[7] = '0x0F15'; citrine
ID[8] = '0x0F26'; diamond
ID[9] = '0x0F0F'; star sapphire
ID[10] = '0x0F11'; sapphire
ID[11] = '0x0F18'; tourmaline
ID[12] = '0x0F13'; rubi
uo.useobject ('BOOK1')
wait(500)
uo.lClick(181,186)
wait(12000)
uo.useobject ('BANK')
wait(500)
uo.lClick(308,443)
Wait(1000)
For n=1 To 12
while uo.count(ID[n]) >= 1
wait(1600)
UO.FindType(ID[n],'-1','my')
if n < 9 then
uo.moveitem('finditem', '0', 'CONTAINER')
else
uo.moveitem('finditem', '0', 'ground')
endif
wend
Next
end sub
PS. Where did you find that script?