Вопрос по манингу (программа Инжект) у меня есть скрипт(см. ниже), он все делает но как доходит до плавки - стоит и все. В чём может быть проблема? (желательно ткнуть носом в строку)
Code:
sub Mining()
start:
gotoXY(2557,498)
minround()
gotoXY(2557,495)
minround()
gotoXY(2560,495)
minround()
gotoXY(2560,492)
minround()
gotoXY(2563,492)
minround()
gotoXY(2566,489)
minround()
gotoXY(2563,489)
minround()
gotoXY(2560,489)
minround()
gotoXY(2561,487)
minround()
gotoXY(2563,486)
minround()
gotoXY(2566,486)
minround()
gotoXY(2569,486)
minround()
gotoXY(2569,488)
minround()
gotoXY(2572,486)
minround()
gotoXY(2572,483)
minround()
gotoXY(2575,480)
minround()
gotoXY(2572,480)
minround()
gotoXY(2569,480)
minround()
gotoXY(2566,483)
minround()
gotoXY(2563,483)
minround()
gotoXY(2563,480)
minround()
gotoXY(2566,480)
minround()
gotoXY(2563,477)
minround()
gotoXY(2566,477)
minround()
gotoXY(2566,474)
minround()
gotoXY(2569,475)
minround()
gotoXY(2569,477)
minround()
gotoXY(2572,477)
minround()
gotoXY(2575,477)
minround()
goto start:
endsub
Sub minround()
VAR Kirka = '0x0E86'
VAR MaxVes = 1040
VAR Tiles
VAR x, y, t, k, mX, mY, mZ
VAR MaxTime = 100
VAR ms1 = "There is nothing"
VAR ms2 = "You can't use"
VAR ms3 = "You put "
VAR ms4 = "You loosen some rocks"
VAR ms5 = "location"
VAR ms6 = "Try mining"
VAR ms7 = "Цель слишком далеко"
VAR ms8 = "У вас не получилось ничего добыть"
mX = UO.GetX('self')
mY = UO.GetY('self')
mZ = UO.GetZ('self')
for y=-1 to 1
for x=-1 to 1
If UO.Weight > MaxVes Then
Plavca()
BS()
Endif
Tiles = F_HarvestTiles(mX+x, mY+y)
k = 0
repeat
UO.DeleteJournal()
t = UO.Timer()
k = k + 1
UO.WaitTargetTile(Tiles, mX+x, mY+y, mZ)
UO.UseType( Kirka )
repeat
wait(300)
until UO.InJournal(ms1) OR UO.InJournal(ms2) OR UO.InJournal(ms3) OR UO.InJournal(ms4) OR UO.InJournal(ms5) OR UO.InJournal(ms6) OR UO.InJournal(ms7) OR ((t + MaxTime) < UO.Timer()) or UO.Weight > MaxVes
until ( NOT UO.InJournal(ms4) AND NOT UO.InJournal(ms3) OR (k > 10) ) or UO.Weight > MaxVes
next
next
Drop() ; функция сброса чтобы закоментировать поставь перед ней ;
endsub
Sub F_HarvestTiles(x,y)
var i
if UO.PrivateGetTile(x, y, -1, 1339, 1343) then
for i=1339 to 1343
if UO.PrivateGetTile(x, y, -1, i, i) then
return i
end if
next
end if
return 0
end sub
Sub Drop() ; сотри ненужное...
;---------------------------------------------------------------------
uo.findtype('0x19B9','0x0000','backpack') ;????? ??????
if uo.findcount() > 0 then
UO.Drop('-1',1,1,0,'finditem')
wait(300)
endif
;--------------------------------------------------------------------
uo.findtype('0x19B9','0x0AB2','backpack') ;сброс меди
if uo.findcount() > 0 then
UO.Drop('-1',1,1,0,'finditem')
wait(300)
endif
;-------------------------------------------------------------------
uo.findtype('0x19B9','0x0488','backpack') ;сброс бронзы
if uo.findcount() > 0 then
UO.Drop('-1',1,1,0,'finditem')
endif
;-----------------------------------------------------------------------
endsub
sub BS()
uo.findtype('0x1BEF','0x0AB2','backpack')
UO.WaitTargetType('0x1BEF')
UO.UseType('0x13E3')
wait(3000)
While uo.count('0x1BEF') > 9
UO.SendGumpSelect(508)
wait(7000)
PlavcaItem()
wend
endsub
Sub Plavca()
gotoXY(2573,474)
uo.findtype('0x19B9',-1,'backpack')
while uo.count('0x19B9') > 0
uo.usetype('0x19B9')
wait(300)
wend
endsub
sub PlavcaItem()
uo.findtype('0x1413','0x0AB2','backpack')
while uo.findcount() > 0
UO.WaitTargetObject('finditem')
UO.UseObject('0x40008433')
wait(300)
uo.findtype('0x1413','0x0AB2','backpack')
wend
endsub
Sub gotoXY(x,y)
var ld=0,ldc=0
var dx,dy
var mx,my
var ox,oy,mk,k
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<=0 then
return
end if
if not ldc then
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<=0 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.Press(33)
goto start
endif
UO.Press(35)
goto start
end if
if mx<x then
if my>y then
UO.Press(39)
goto start
endif
if my==y then
UO.Press(34)
goto start
endif
UO.Press(40)
goto start
end if
if my<y then
UO.Press(37)
goto start
endif
if my==y then
UO.Press(36)
goto start
endif
UO.Press(38)
goto start
end sub
по идее делает перчатки из стали (Type=0x13EB) или последнюю вещь я так и не разобрался