Проверьте плиз скрипт на мининг , я его слепил из нескольких скриптов ну и само собой дописал отсебя ,вообщем проблема такая - когда чар 1 раз ударяет киркой скрипт вылетает.
почему так происходит я понять никак немогу - инжа ошибок у меня непишет никаких
Code:
sub adad() # его запускать чтоб скрипт на мининг работал
begin:
gotoxy(2432,93,0)
Miningg()
gotoxy(2431,93,0)
gotoxy(2430,93,0)
gotoxy(2429,93,0)
gotoxy(2429,94,0)
gotoxy(2428,94,0)
Miningg()
gotoxy(2428,93,0)
gotoxy(2428,92,0)
gotoxy(2428,91,0)
gotoxy(2428,90,0)
gotoxy(2428,89,0)
gotoxy(2428,88,0)
Miningg()
sub Miningg()
var mx, my, mz, i, j, jor, ser, noto
Uo.exec("set norbcheck 1"); для рекола
uo.exec("set norbcalc 1"); тоже
uo.print('!!Выбери Лопату!! ')
uo.exec('addobject Shovel')
while uo.targeting()
wait(100)
wend
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("Прячемся...")
UO.UseSkill("Hiding")
wait(4000)
wend
UO.Print("Копаем в координатах: "+str(mx-i)+" "+str(my-j))
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") and not UO.InJournal("Copper") and not UO.InJournal("Rusty 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") or uo.dead() then
pwav()
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
endif
next
wend
if uo.weight > 500 then # Максимальный вес при котором домой с рудой
wait(500)
uo.exec("recall 0x401A3FC9") # Go to Home ########################
xodilka()
wait(10000)
loot()
wait(3000)
reccal:
uo.deletejournal()
if uo.waiting() then
uo.canceltarget()
endif
uo.exec("recall 0x401A3FE7") # Go to Mine #########################
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 Miningg
end sub
sub xodilka() # ходилка к разгрузочному судуку
gotoxy(2545,120,1)
gotoxy(2546,120,1)
gotoxy(2547,120,1)
gotoxy(2548,120,1)
gotoxy(2549,120,1)
gotoxy(2547,118,1)
gotoxy(2547,115,1)
gotoxy(2547,112,1)
end sub
sub loot() ; перекладка руды в сундук
begin:
if uo.waiting() then
uo.canceltarget()
endif
VAR a,Exit
VAR UnloadCont='0x40118DFF' ; ID сундука для руды
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
sub tohide()
while NOT UO.Hidden()
UO.DeleteJournal()
UO.UseSkill('Stealth')
repeat
wait(50)
until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide')
wend
end sub
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(50)
until UO.InJournal('backpack')
end sub
sub getcoord()
var a,b,c
a = UO.GetX("self")
b = UO.GetY("self")
c = UO.GetZ("self")
UO.Print("Position "+STR(a)+", "+STR(b)+", "+STR(c))
end sub
sub gotoxy(x,y,prec) #ходилка
var ld=0,ldc=0
var dx,dy
var mx,my
var ox,oy,mk,k
#uo.print(">")
#uo.track("1",str(x),str(y))
start:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if not ldc then
uo.print(STR(dx))
end if
if dx<3 then
mk=70
else
mk=15
end if
ox=mx
oy=my
for k=1 to mk
mx=UO.GetX()
my=UO.GetY()
if mx<>ox or my<>oy then
goto sdidapl
end if
wait(10)
next
sdidapl:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if ld==dx then
ldc=ldc+1
if ldc>100 then
uo.print("Can not reach location!")
return
end if
else
ld=dx
end if
if mx==x then
if my==y then
return
endif
if my>y then
#UO.Print("UR")
UO.Press(33)
goto start
endif
#UO.Print("DL")
UO.Press(35)
goto start
end if
if mx<x then
if my>y then
#UO.Print("R")
UO.Press(39)
goto start
endif
if my==y then
#UO.Print("DR")
UO.Press(34)
goto start
endif
#UO.Print("D")
UO.Press(40)
goto start
end if
if my<y then
#UO.Print("L")
UO.Press(37)
goto start
endif
if my==y then
#UO.Print("LU")
UO.Press(36)
goto start
endif
#UO.Print("U")
UO.Press(38)
goto start
end sub