Code: Select all
sub mining()
var mx, my, mz, i, j, jor, ser, noto
Uo.exec("set norbcheck 1"); dlja rekola
uo.exec("set norbcalc 1"); tozhe
na4alo:
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
for i = mx-3 to mx+3
for j = my-3 to my+3
while not UO.Hidden()
UO.Warmode("0")
uo.print("Prachemsa...")
UO.UseSkill("Hiding")
wait(4000)
wend
UO.Print("Kopaem v koordinatah: "+str(mx-i)+" "+str(my-j))
while not UO.InJournal("no ore") and not UO.InJournal("nothing") and not UO.InJournal("far away") and not UO.InJournal("Try another") and not UO.InJournal("in rocks") and not UO.InJournal("see the target") and not UO.InJournal("lack mining")
UO.DeleteJournal()
if uo.waiting() then
uo.canceltarget()
endif
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Usetype("0x0E85")
while not UO.InJournal("no ore") and not UO.InJournal("nothing") and not UO.InJournal("far away") and not UO.InJournal("Try another") and not UO.InJournal("in rocks") and not UO.InJournal("see the target") and not UO.InJournal("lack mining")
wait (500)
for jor = 0 to 9
ser = uo.journalserial(jor)
noto = uo.getnotoriety(ser)
if noto <> 1 and noto <> 0 and not uo.injournal("elemental") then
if uo.waiting() then
uo.canceltarget()
endif
Save()
pwavw()
wait(180000) ; ozhidanie poka PK ujdet
loot()
wait(3000)
goto reccal
endif
next
wend
if uo.weight > 615 then ; max ves
goto end
endif
wend
UO.DeleteJournal()
next
next
goto na4alo
end:
if uo.waiting() then
uo.canceltarget()
endif
uo.exec("recall 0x4003EBDB 2") ; tut letit po po rune v 1. slote v runebooke (domoj)
wait(15000)
uo.press(36)
wait(1000)
uo.press(36)
wait(1000)
uo.press(36)
wait(1000)
uo.press(36)
wait(1000)
uo.press(36)
wait(1000)
loot()
wait(3000)
reccal:
uo.deletejournal()
if uo.waiting() then
uo.canceltarget()
endif
uo.exec("recall 0x4003EBDB 3") ; tut letit po po rune v 2. slote v runebooke (shahta)
mx = UO.GetX("self")
my = UO.GetY("self")
wait(10000)
if not UO.GetX("self") <> mx and not UO.GetY("self") <> my then
goto reccal
endif
goto na4alo
end sub
sub loot() ; perekladka rudi
if uo.waiting() then
uo.canceltarget()
endif
VAR a,Exit
VAR UnloadCont='0x400BAAA0' ; id sunduka
DIM Ore[5]
Ore[0]=0x19B9 ; 4 and more ore
Ore[1]=0x19B7 ; 1 ore
Ore[2]=0x19BA ; 2 ore
Ore[3]=0x19B8 ; 3 ore
UO.SetReceivingContainer(UnloadCont)
wait(500)
For a=0 to 3
Exit=0
repeat
UO.FindType(Ore[a])
if UO.GetQuantity('finditem')>0 then
UO.Grab('0','finditem')
wait(1500)
Else
Exit=1
endif
until Exit==1
Next
UO.UnSetReceivingContainer()
end sub