sub katorga() var f=file("C:\trees3.dat") var TreeCount=0,i dim TreeX[500],TreeY[500],TreeT[500] uo.print('Topor... ') uo.exec('addobject axe') while uo.targeting() wait(100) wend uo.print('load file...') f.open() TreeCount=safe call f.readNumber() for i=1 to TreeCount TreeT[i]=safe call f.ReadNumber() TreeX[i]=safe call f.ReadNumber() TreeY[i]=safe call f.ReadNumber() next f.close() while not uo.dead() for i=1 to TreeCount GotoXY(treex[i],treey[i]) GetTree(str(treeT[i]),str(treeX[i]),str(TreeY[i]),str(uo.getz())) next DropLogs() wend endsub
Sub GetTree(type,x,y,z) var ms1="logs in your pack" var ms2="logs here to chop" var ms3="log in your pack" var ms4="You hack at the tree for a while" var ms5="That is too far away" var ms6="You can't reach this" wait(200) repeat uo.deletejournal() uo.waittargettile(type,x,y,z) uo.useobject('axe') repeat wait(100) until uo.injournal(ms1) or uo.injournal(ms2) or uo.injournal(ms3) or uo.injournal(ms4) or uo.injournal(ms5) or uo.injournal(ms6) until uo.injournal(ms2) or uo.injournal(ms5) or uo.injournal(ms6) end sub
Sub DropLogs() GotoXY(1318,949) wait(1000) uo.useobject('0x401258E1') wait(1000) end sub
Sub GotoXY(x,y) var myX,myY,lastX=0,lastY=0,i,halt=0,z,r=0 for i=1 to 60 myX=uo.getX(); myY=uo.getY(); if LastX==myX and LastY==myY then halt=halt+1 else halt=0 end if if halt>=10 then if uo.GetDir()==1 then for z=0 to 8 uo.Press(40) next end if if uo.GetDir()==3 then for z=0 to 8 uo.Press(37) next end if if uo.GetDir()==5 then for z=0 to 8 uo.Press(38) next end if if uo.GetDir()==7 then for z=0 to 8 uo.Press(39) next end if halt=15 end if if Numb(x-myX)<=1 and Numb(y-myY)<=2 then return 1 end if if x<=myX then if y<=myY then for z=0 to 3 uo.Press(38) next else for z=0 to 3 uo.Press(37) next end if else if y<=myY then for z=0 to 3 uo.Press(39) next else for z=0 to 3 uo.Press(40) next end if end if lastX=myX lastY=myY wait(200) next return 0 end sub
Sub Numb(num) if num>=0 then return num else return num*(-1) end if end sub
Sub CheckLag() UO.DeleteJournal() UO.Click('backpack') repeat wait(50) until UO.InJournal('backpack') end sub