Помогите плиз найти ошибку.
Posted: 2005-01-14 04:56:57
Вот скрипт на майнинг (Переделанный Шахтёр 2.3 с рунбуков на руны)
Проблемма в том, что когда чар доходит до последней рунки
if NRuna>6 then
NRuna=1
вылетает ошибка "Unhandled error in parser" (вроде так)
Помогите плиз найти ошибку, если не сложно.
Вот скрипт:
Проблемма в том, что когда чар доходит до последней рунки
if NRuna>6 then
NRuna=1
вылетает ошибка "Unhandled error in parser" (вроде так)
Помогите плиз найти ошибку, если не сложно.
Вот скрипт:
Code: Select all
Var DRuna='0x406FF2E9' ; АЙДИ рунки домой
Var NRuna=1
Var UnloadCont='0x402FFA68' ; АЙДИ сундука для руды
sub maning()
var mx, my, mz, i, j, jor, ser, noto
DIM MRuna[5] ; Массив из АЙДИ рунок в шахты
MRuna[1]='0x40B3734E'
MRuna[2]='0x40B3734A'
MRuna[3]='0x40B378B5'
MRuna[4]='0x40B378B3'
MRuna[5]='0x40B3734D'
uo.print('!!SELECT PICKAXE!! ')
uo.exec('addobject Shovel')
while uo.targeting()
wait(100)
wend
na4alo:
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
for i = mx-4 to mx+4
for j = my -4 to my+4
while not UO.Hidden()
UO.Warmode("0")
uo.print("Hiding...")
UO.UseSkill("Hiding")
wait(4000)
wend
UO.Print("Mining in: "+str(mx-i)+" "+str(my-j))
infologs()
while not UO.InJournal("no ore here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock")
##while not UO.InJournal("no ore here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock") and not UO.InJournal("Iron Ore")
UO.DeleteJournal()
if uo.waiting() then
uo.canceltarget()
endif
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Useobject("Shovel")
while not UO.InJournal("You put") and not UO.InJournal("heavy") and not UO.InJournal("location") and not UO.InJournal("no ore") and not UO.InJournal("but fail") and not UO.InJournal("far away") and not UO.InJournal("in rock")
wait (500)
if uo.injournal("heavy") then
##Pause()
endif
if uo.dead() then
##Pause()
endif
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
goto end
endif
next
wend
if uo.weight > 550 then ; Максимальный вес при котором домой с рудой
goto end
endif
wend
UO.DeleteJournal()
next
next
end:
if uo.waiting() then
uo.canceltarget()
endif
RecallRune(DRuna)
wait(5000)
while not UO.Hidden()
UO.Warmode("0")
uo.print("Hiding...")
UO.UseSkill("Hiding")
wait(4000)
wend
loot()
UO.SetReceivingContainer(UnloadCont)
Wait(100)
UO.Grab('0',MRuna[NRuna])
Wait(1000)
NRuna=NRuna+1
if NRuna>6 then
NRuna=1
endif
UO.UnSetReceivingContainer()
uo.useobject(UnloadCont)
Wait(100)
UO.Grab('0',MRuna[NRuna])
GetRegy()
wait(1000)
reccal:
uo.deletejournal()
if uo.waiting() then
uo.canceltarget()
endif
RecallRune(MRuna[NRuna])
wait(5000)
goto na4alo
end sub
sub GetRegy()
if uo.count('0x0F7B')<10 then
uo.FindType('0x0F7B',-1,UnloadCont) ;Blood Moss
wait(100)
uo.Grab('10','finditem')
wait(500)
end if
if uo.count('0x0F86')<10 then
uo.FindType('0x0F86',-1,UnloadCont) ;Mandrake Roots
wait(100)
uo.Grab('10','finditem')
wait(500)
end if
if uo.count('0x0F8D')<5 then
uo.FindType('0x0F8D',-1,UnloadCont) ;Spider's Silk
wait(100)
uo.Grab('5','finditem')
wait(500)
end if
if uo.count('0x0F7A')<5 then
uo.FindType('0x0F7A',-1,UnloadCont) ;Black Pearls
wait(100)
uo.Grab('5','finditem')
wait(500)
end if
end sub
sub loot() ; перекладка руды в сундук
if uo.waiting() then
uo.canceltarget()
endif
VAR a,Exit
DIM Ore[20]
Ore[0]=0x19B9 ; 4 and more ore
Ore[1]=0x19B7 ; 1 ore
Ore[2]=0x19BA ; 2 ore
Ore[3]=0x19B8 ; 3 ore
Ore[4]=0x0F11 ; saphires
Ore[5]=0x0F16 ; amethysts
Ore[6]=0x0F18 ; tourmalines
Ore[7]=0x0F15 ; citrines
Ore[8]=0x0F10 ; emeralds
Ore[9]=0x0F0F ; star sapphires
Ore[10]=0x0F26 ; diamonds
Ore[11]=0x1F4C ; recall scrolls
Ore[12]=0x0EED ; gold
Ore[13]=0x0F20 ; tourmaline
UO.SetReceivingContainer(UnloadCont)
wait(500)
For a=0 to 13
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
sub RecallRune(rn) ; Рекол по рункам
var mx, my
reccal:
uo.deletejournal()
if uo.waiting() then
uo.canceltarget()
endif
mx = UO.GetX("self")
my = UO.GetY("self")
UO.DeleteJournal()
UO.Cast('Recall',rn)
wait(4000)
if not UO.GetX("self") <> mx and not UO.GetY("self") <> my then
goto reccal
endif
end sub
sub pwav() ; звук при выкапывании ЭЛЕМЕНТАЛА
uo.playwav("C:\WINDOWS\Media\ding.wav")
endsub
sub pwavw(); звук при появлении ПК
uo.playwav("C:\WINDOWS\Media\ding.wav")
endsub
sub infologs()
UO.Print('You have '+Str(UO.Count('0x19B7')+UO.Count('0x19B8')+UO.Count('0x19B9')+UO.Count('0x19BA'))+' ore in backpack')
UO.Print('It's '+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')))+' colored ore')
end sub