помогите с криптом
Posted: 2014-11-08 19:10:37
Sub tohome()
Go_To(2582,2809,0)
Go_To(2591,2809,5)
Go_To(2597,2805,0)
wait(100)
unloadore()#Выгружаемся
wait(100)
Go_To(2597,2805,0)
Go_To(2592,2808,5)
Go_To(2583,2809,0)
wait(100)
end sub
Sub unloadore()
VAR TempX,TempY,i,Exit, Exit1, ConTainer, j
VAR Index=14
DIM Ore[4]
TempX=UO.GetX()
TempY=UO.GetY()
Ore[0]=0x19B9
Ore[1]=0x19B7
Ore[2]=0x19BA
Ore[3]=0x19B8
For i=0 to 3
Exit=0
repeat
UO.FindType(Ore[i])
if UO.GetQuantity('finditem')>0 then
Exit1=0
j=0
UO.MoveItem('finditem',0,"0x401ACB56")
wait(300)
Else
Exit=1
endif
until Exit==1
Next
end sub
sub main()
VAR i
while 1==1
Go_To(2583,2809,0)
min()
Go_To(2583,2811,0)
min()
Go_To(2583,2815,0)
min()
Go_To(2583,2819,0)
min()
Go_To(2583,2823,0)
min()
Go_To(2583,2827,0)
min()
Go_To(2583,2831,0)
min()
Go_To(2579,2831,0)
min()
Go_To(2578,2828,0)
min()
Go_To(2578,2824,0)
min()
Go_To(2578,2820,0)
min()
Go_To(2578,2816,0)
min()
Go_To(2578,2813,0)
min()
Go_To(2578,2809,0)
min()
Go_To(2575,2806,0)
min()
Go_To(2571,2809,0)
min()
Go_To(2571,2813,0)
min()
Go_To(2571,2817,0)
min()
Go_To(2570,2820,0)
min()
Go_To(2570,2824,0)
min()
Go_To(2570,2828,0)
min()
Go_To(2570,2832,0)
min()
Go_To(2564,2833,0)
min()
wend
end sub
Sub min()
var x,y,z
VAR LastTimer
VAR ms1 = "There is nothing here to mine for."
VAR ms2 = "You can't use"
VAR ms3 = "Вы переместили"
VAR ms4 = "You loosen some rocks"
VAR ms5 = "location"
VAR ms6 = "Try mining"
VAR ms7 = "You can't see that"
VAR ms8 = "You stop"
VAR ms9 = "That is too"
VAR ms10= "Вы не смогли"
VAR ms11= "You cannot mine"
z=UO.GetZ("self")
for y=-2 to 2
for x=-2 to 2
UO.Print(str(x)+" "+str(y))
if uo.weight > 500 then #Вес при котором идем домой
tohome()
endif
repeat
uo.deletejournal()
UO.WaitTargetTile("1341",STR(UO.GetX()+x),STR(UO.GetY()+Y),str(z))
UO.UseType('0x0E85')
LastTimer=UO.Timer()
repeat
wait(50)
until UO.InJournal(ms1) OR UO.InJournal(ms3) OR UO.InJournal(ms4) OR UO.InJournal(ms5) OR UO.InJournal(ms7) OR UO.InJournal(ms9) OR UO.InJournal(ms10) OR UO.InJournal(ms11) OR UO.Timer()>LastTimer+100
if UO.InJournal(ms3) then
else
endif
until UO.InJournal(ms2) OR UO.InJournal(ms1) OR UO.InJournal(ms5) OR UO.InJournal(ms6) OR UO.InJournal(ms7) OR UO.InJournal(ms9) OR UO.InJournal(ms11)
next
next
end sub
Sub Step(x,y,mx,my,forstep)
if uo.GetX('self') <> x then
if uo.GetY('self') <> y then
if mx<0 then
if my<0 then
uo.Press(40)
wait(forstep)
else
uo.Press(39)
wait(forstep)
end if
else
if my<0 then
uo.Press(37)
wait(forstep)
else
uo.Press(38)
wait(forstep)
end if
end if
else
if mx<0 then
uo.Press(34)
wait(forstep)
else
uo.Press(36)
wait(forstep)
end if
end if
else
if my<0 then
uo.Press(35)
wait(forstep)
else
uo.Press(33)
wait(forstep)
end if
end if
end sub
Sub Go_To(x,y,abc)
var mx,my,fx,fy
var xx=x
var yy=y
var DistX=0
var DistY=1
var forstep=300
repeat
mx=uo.GetX('self')-x
my=uo.GetY('self')-y
fx=mx+x
fy=my+y
Step(xx,yy,mx,my,forstep)
until x==fx+DistX && y==fy+DistY || x==fx-DistX && y==fy+DistY || x==fx+DistX && y==fy-DistY || x==fx-DistX && y==fy-DistY || x==fx && y==fy
end sub
капает только в одном месте!и пишет далеко!!!что делать?если кто то знает помогите.просто стоит и тупит на одном месте
Go_To(2582,2809,0)
Go_To(2591,2809,5)
Go_To(2597,2805,0)
wait(100)
unloadore()#Выгружаемся
wait(100)
Go_To(2597,2805,0)
Go_To(2592,2808,5)
Go_To(2583,2809,0)
wait(100)
end sub
Sub unloadore()
VAR TempX,TempY,i,Exit, Exit1, ConTainer, j
VAR Index=14
DIM Ore[4]
TempX=UO.GetX()
TempY=UO.GetY()
Ore[0]=0x19B9
Ore[1]=0x19B7
Ore[2]=0x19BA
Ore[3]=0x19B8
For i=0 to 3
Exit=0
repeat
UO.FindType(Ore[i])
if UO.GetQuantity('finditem')>0 then
Exit1=0
j=0
UO.MoveItem('finditem',0,"0x401ACB56")
wait(300)
Else
Exit=1
endif
until Exit==1
Next
end sub
sub main()
VAR i
while 1==1
Go_To(2583,2809,0)
min()
Go_To(2583,2811,0)
min()
Go_To(2583,2815,0)
min()
Go_To(2583,2819,0)
min()
Go_To(2583,2823,0)
min()
Go_To(2583,2827,0)
min()
Go_To(2583,2831,0)
min()
Go_To(2579,2831,0)
min()
Go_To(2578,2828,0)
min()
Go_To(2578,2824,0)
min()
Go_To(2578,2820,0)
min()
Go_To(2578,2816,0)
min()
Go_To(2578,2813,0)
min()
Go_To(2578,2809,0)
min()
Go_To(2575,2806,0)
min()
Go_To(2571,2809,0)
min()
Go_To(2571,2813,0)
min()
Go_To(2571,2817,0)
min()
Go_To(2570,2820,0)
min()
Go_To(2570,2824,0)
min()
Go_To(2570,2828,0)
min()
Go_To(2570,2832,0)
min()
Go_To(2564,2833,0)
min()
wend
end sub
Sub min()
var x,y,z
VAR LastTimer
VAR ms1 = "There is nothing here to mine for."
VAR ms2 = "You can't use"
VAR ms3 = "Вы переместили"
VAR ms4 = "You loosen some rocks"
VAR ms5 = "location"
VAR ms6 = "Try mining"
VAR ms7 = "You can't see that"
VAR ms8 = "You stop"
VAR ms9 = "That is too"
VAR ms10= "Вы не смогли"
VAR ms11= "You cannot mine"
z=UO.GetZ("self")
for y=-2 to 2
for x=-2 to 2
UO.Print(str(x)+" "+str(y))
if uo.weight > 500 then #Вес при котором идем домой
tohome()
endif
repeat
uo.deletejournal()
UO.WaitTargetTile("1341",STR(UO.GetX()+x),STR(UO.GetY()+Y),str(z))
UO.UseType('0x0E85')
LastTimer=UO.Timer()
repeat
wait(50)
until UO.InJournal(ms1) OR UO.InJournal(ms3) OR UO.InJournal(ms4) OR UO.InJournal(ms5) OR UO.InJournal(ms7) OR UO.InJournal(ms9) OR UO.InJournal(ms10) OR UO.InJournal(ms11) OR UO.Timer()>LastTimer+100
if UO.InJournal(ms3) then
else
endif
until UO.InJournal(ms2) OR UO.InJournal(ms1) OR UO.InJournal(ms5) OR UO.InJournal(ms6) OR UO.InJournal(ms7) OR UO.InJournal(ms9) OR UO.InJournal(ms11)
next
next
end sub
Sub Step(x,y,mx,my,forstep)
if uo.GetX('self') <> x then
if uo.GetY('self') <> y then
if mx<0 then
if my<0 then
uo.Press(40)
wait(forstep)
else
uo.Press(39)
wait(forstep)
end if
else
if my<0 then
uo.Press(37)
wait(forstep)
else
uo.Press(38)
wait(forstep)
end if
end if
else
if mx<0 then
uo.Press(34)
wait(forstep)
else
uo.Press(36)
wait(forstep)
end if
end if
else
if my<0 then
uo.Press(35)
wait(forstep)
else
uo.Press(33)
wait(forstep)
end if
end if
end sub
Sub Go_To(x,y,abc)
var mx,my,fx,fy
var xx=x
var yy=y
var DistX=0
var DistY=1
var forstep=300
repeat
mx=uo.GetX('self')-x
my=uo.GetY('self')-y
fx=mx+x
fy=my+y
Step(xx,yy,mx,my,forstep)
until x==fx+DistX && y==fy+DistY || x==fx-DistX && y==fy+DistY || x==fx+DistX && y==fy-DistY || x==fx-DistX && y==fy-DistY || x==fx && y==fy
end sub
капает только в одном месте!и пишет далеко!!!что делать?если кто то знает помогите.просто стоит и тупит на одном месте