Code:
sub dig()
var x=uo.GetX('self')
var y=uo.GetY('self')
var dx,dy
var Tmr,j
var col=''
var i=0
var size=12
dim tpe[13]
tpe[0] = '0x07DF' ; Cooper
tpe[1] = '0x0000' ; Iron
tpe[2] = '0x0482' ; Steel
tpe[3] = '0x045E' ; Anra
tpe[4] = '0x07D6' ; Valurit
tpe[5] = '0x006F' ; Lavarock
tpe[6] = '0x09F9' ; Icerock
tpe[7] = '0x0940' ; Shadow
tpe[8] = '0x094A' ; Azurit
tpe[9] = '0x05D7' ; Gem
tpe[10] = '0x0943' ; Doom
tpe[11] = '0x094E' ; Blue Steel
tpe[12] = '0x0214' ; Dark Rubi
;------------------------------------------------------
uo.set('finddistance','2')
for dx=-2 to 2
for dy=-2 to 2
i=i+1
uo.Print(str(i))
if uo.privategettile(x+dx,y+dy,-1,1330,1360) > 0 then
for j=0 to (size-4)
col=tpe[j]
uo.findtype(Ore,col,'ground')
if uo.findcount() then
DropToStack(Ore,col)
end if
next
for j=(size-3) to size
col=tpe[j]
Grab(Ore,col)
next
rep1:
uo.CancelTarget()
uo.DeleteJournal()
uo.FindType(pickaxe,'-1','my')
if uo.findcount() then
uo.WaitTargetTile('0',x+dx,y+dy,str(uo.GetZ('self')))
wait(50)
uo.UseType(pickaxe)
else
goto rep2
end if
repeat
wait(50)
until uo.injournal("Select|cannot|already|must|broke|no item")
Tmr = uo.Timer()+600
CheckLag()
wait(1000)
if uo.injournal('already|must|broke') then
uo.deletejournal()
goto rep1
end if
if uo.injournal('no item') then
dx=2
dy=2
goto rep2
end if
repeat
wait(50)
until UO.InJournal("no more ore|must|cannot|broke") || uo.Timer() > Tmr
if uo.InJournal('broke') then
else
uo.Print(str(i))
test(dx,dy)
end if
if uo.injournal('broke') then
uo.deletejournal()
goto rep1
end if
else
wait(50)
end if
rep2:
next
next
uo.exec('mfgi clear')
end sub
вот ето копалка...)). проблема в том что иногда (в случайные моменты)
она может пропусть как 1 тайл так и серию(до окончания внутреннего цикла). Если у кого есть идеи по етому поводу... поделитесь плз.))