Code:
sub mining()
var mx, my, mz, i, j, f
mx = UO.GetX('self')
my = UO.GetY('self')
mz = UO.GetZ('self')
while UO.Weight <= (UO.STR * 2)
sbroska()
for i = mx-4 to mx+4
for j = my -4 to my+4
BEGIN:
UO.Print('Копаем в координатах: '+str(mx-i)+' '+str(my-j))
for f=1 to 10
if uo.count('0x0F39')==0 and uo.count('0x0F3A')==0 and uo.count('0x0E86')==0 and uo.count('0x0E85')==0 then
return
endif
InfoOre()
UO.DeleteJournal()
Tohide()
if uo.waiting() then
uo.canceltarget()
endif
UO.Waittargettile('1341', str(i), str(j), str(mz))
DigAhole(i,j,mz)
if uo.InJournal('OOPS') or uo.InJournal('attacking you') then
pwav()
endif
if waitforore()==1 then
f=10
endif
next
if uo.journal(0)==uo.getname('self')+': You loosen some rocks but fail to find any useable ore.' then
wait(10000)
goto BEGIN
endif
if checkelem()==1 then
return
endif
next
next
wend
endsub
sub sbroska()
var i,j
Dim OreType[4]
OreType[01]='0x19B7' ## 1 ore
OreType[02]='0x19BA' ## 2 ore
OreType[03]='0x19B8' ## 3 ore
OreType[04]='0x19B9' ## 4 and more ore
Dim OreColor[8] ## массив цветов трешевой руды
OreColor[1] = '0x0000'
OreColor[2] = '0x0750'
OreColor[3] = '0x0590'
OreColor[4] = '0x060A'
OreColor[5]='0x0088' ; Copper
OreColor[6]='0x0488' ; Bronze
OreColor[7]='0x0482' ; Silver
OreColor[8]='0x096B' ; Shadow
for j=1 to 4
for i=1 to 8
uo.findtype(OreType[j],OreColor[i],'backpack')
while uo.findcount()>0
uo.moveitem('finditem',-1,'ground')
wait(500)
uo.findtype(OreType[j],OreColor[i],'backpack')
wend
next
next
end sub
sub InfoOre()
uo.Print('У вас всего '+str(uo.Count('0x19B7')+uo.Count('0x19B8')+uo.Count('0x19B9')+uo.Count('0x19BA'))+' руды в сумке')
uo.Print('Из нее '+str(uo.Count('0x19B7','0x0000')+uo.Count('0x19B8','0x0000') +uo.Count('0x19B9','0x0000')+uo.Count('0x19BA','0x0000'))+' железо и ' +str (uo.Count('0x19B7')+uo.Count('0x19B8')+uo.Count('0x19B9')+uo.Count('0x19BA')- (uo.Count('0x19B7','0x0000')+uo.Count('0x19B8','0x0000')+uo.Count ('0x19B9','0x0000')+uo.Count('0x19BA','0x0000')))+' цветмет')
end sub
sub DigAhole(i,j,mz)
var f
for f=0 to 10
checklag()
uo.waittargettile('1341',i,j,mz)
uo.useobject(pickaxe)
if waitforore()==1 then
return
endif
next
endsub
sub ws()
if uo.journal(0)=='World is saving now...' then
repeat
wait(700)
until uo.journal(0)<>'World is saving now...'
endif
endsub
sub waitforore()
var n
for n=0 to 50
if UO.InJournal('You put the Bloodrock Ore in your pack') then
return
endif
if UO.InJournal('You put the Rose Ore in your pack') then
return
endif
if UO.InJournal('You put the Agapite Ore in your pack') then
return
endif
if UO.InJournal('You put the Gold Ore in your pack') then
return
endif
if uo.injournal('no ore here|location|far away|in rock|You have been revealed|You put') then
return 1
endif
if UO.InJournal('You put|heavy|but fail') then
return
endif
wait(500)
ws()
next
endsub
народ как зделать чтобы после того как выкопал вокруг себя в радиусе 4 тайла переходил на другой коорденат
но чтобы координаты каторый будут чтобы не мешали другим скриптам работать
Code:
sub main()
var markflag
uo.addobject('Runehome')
while uo.targeting()
wait(500)
wend
Runehome=uo.getserial('Runehome')
GrabBlankRune()
while not uo.dead()
Open(sunduk)
Open(Runebag)
uo.findtype(rune,-1,Runebag)
while uo.findcount()
Runegorod=uo.getserial('finditem')
uo.moveitem('finditem',0,Dropbag)
RegCheck()
GetPickaxe()
toeat()
RecallRune(Runegorod)
uo.ignorereset()
if uo.injournal('The recall rune fades completely.') then
markflag=1
end if
wait(2000)
mining()
checkelem1()
RecallRune(Runehome)
if Runinetu==1 then
GrabBlankRune()
endif
ContCharges(RuneHome,1)
wait(100)
if markflag==1 then
uo.moveitem(Runegorod,0,Dropbag)
checklag()
wait(700)
endif
DropOre()
if flagpk==1 then
wait(100)
endif
Open(Runebag)
uo.findtype(rune,-1,Runebag)
wend
DropbagCheck()
wend
endsub
вот кусок каторый я запускаю
в Этом скрипте он почемута не маркает руну каторый в шаХте
Code:
if uo.injournal('The recall rune fades completely.') then
markflag=1
end if
вот этот кусок отвечает за то чтобы он маркал руну