##################### MIDDLE-EARTH.RU ##########################
Sub MiningTile(t, x, y, z)
var timer
repeat
uo.canceltarget()
uo.WaitTargetTile(Str(t), Str(x), Str(y), Str(z))
uo.UseType(0x0F39)
uo.DeleteJournal()
timer = 0
    repeat
wait(500)
    timer = timer + 1
    until UO.injournal("There is no") or uo.injournal("You fail to prospect") or uo.injournal("Au aneiiaee caie?") or UO.injournal("There is no brimstone") or UO.injournal("There is nothing") or timer > 5
uo.canceltarget()
#UO.Usetype("0x0F39")
until uo.injournal("You fail to prospect") or uo.InJournal("line") or uo.InJournal("far away") or UO.injournal("There is no brimstone") or UO.injournal("There is nothing") or uo.injournal("Au aneiiaee caie?")
end sub
sub Mining()
var i, j, tile, f, b, p
f = 0
b = 0
while not uo.dead()
for i = -2 to 2
for j = -2 to 2
tile = 168
while (not uo.PrivateGetTile(uo.GetX() + i, uo.GetY() + j, 251, tile, tile)) and (tile < 1343)
if tile == 1617 then
tile = 310
else
if tile == 311 then
tile = 1
else
tile = tile + 1
endif
endif
wend
if tile < 1617 then
tile = 0
endif
if tile < 1617 then
uo.concolor(0x53)
uo.Print("Eiiaai oaee " + Str((i + 2) * 5 + j + 3) + " ec 25...")
uo.concolor(0)
MiningTile(tile, uo.GetX() + i, uo.GetY() + j, 251)
endif
next
next
uo.Print("Caaa?oee e?oa. I?iaie?a?.")
f = f + 1
if b == 2 then
for p=1 to 11
wait(1000)
uo.press(36)
next
uo.press(34)
f = 0
b = 0
else
if f == 3 then
for p=1 to 5
wait(1000)
uo.press(34)
next
f = 0
b = b + 1
endif
endif
wend
end sub
##################### MIDDLE-EARTH.RU ##########################