Sub tohome() Go_To(1992,262,8) Go_To(1996,259,8) Go_To(1998,257,8) wait(200) unloadore() wait(200) Go_To(1998,257,8) Go_To(1995,262,8) Go_To(1989,262,15) wait(200) 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,"0x40081C3E") wait(200) Else Exit=1 endif until Exit==1 Next end sub
sub main() VAR i while 1==1
Go_To(1989,262,8) min() Go_To(1982,265,8) min() Go_To(1980,265,8) min() Go_To(1978,267,8) min() Go_To(1976,269,8) min() Go_To(1974,272,8) min() Go_To(1982,263,8) min() Go_To(1968,271,8) min() Go_To(1979,259,8) min() Go_To(1969,267,8) min()
Go_To(1972,265,8) min() Go_To(1974,267,8) min() Go_To(1976,265,8) min() Go_To(1975,263,8) min() Go_To(1980,263,8) min() Go_To(1983,262,8) min() Go_To(1986,261,8) min() Go_To(1988,261,8) min() Go_To(1990,262,8) min() Go_To(2004,252,15) 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 > 1300 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(200) 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+70 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=200 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 end
помогите!когда выкапуется елементал...чтоб хамер брал!!когда убил брал кирку и дальше копал!!если вам не трудно помогите
|