не всёравно заглючует(( становится у какогонибуть дерева и пытается рубить хотя пишется что дерева уже нету((
вот весь скрипт, подправтье плиз..
Code: Select all
sub main()
var usetile
UO.DeleteJournal()
wait(1000)
start:
gotoxy (3090,613,0)
gotoxy (3088,613,0)
Chopping('3278 3088 612 0')
gotoxy (3092,610,0)
Chopping('3293 3092 609 0')
gotoxy (3096,613,0)
Chopping('3296 3096 612 0')
gotoxy (3100,610,0)
Chopping('3289 3100 609 0')
gotoxy (3104,610,0)
Chopping('3280 3104 609 0')
gotoxy (3108,610,0)
Chopping('3287 3108 609 0')
gotoxy (3109,610,0)
gotoxy (3109,613,0)
Chopping('3296 3108 612 0')
gotoxy (3109,615,0)
Chopping('3296 3108 615 0')
gotoxy (3111,615,0)
Chopping('3286 3112 615 0')
gotoxy (3111,612,0)
Chopping('3296 3112 612 0')
gotoxy (3111,610,0)
Chopping('3283 3112 609 0')
gotoxy (3115,612,0)
Chopping('3293 3116 612 0')
gotoxy (3115,615,0)
Chopping('3283 3116 615 0')
gotoxy (3115,618,0)
Chopping('3293 3116 618 0')
Chopping('3316 3115 617 0')
gotoxy (3104,618,0)
gotoxy (3099,613,0)
zahod()
goto start
end sub
sub Chopping(usetile)
var i, k, NoStop
k=0
Wait(200)
lb1:
uo.exec("waittargettile "+usetile)
Wait(200)
UO.usetype("0x0F43")
Wait(1000)
svs()
Wait(3000)
if uo.waiting() then
UO.Press(117)
Wait(500)
goto lb1
endif
NoStop=true
while NoStop
if (UO.InJournal("You fail")or UO.InJournal("You put")or UO.InJournal("You hack")or UO.InJournal("appears"))<>0 || k>30 then
UO.DeleteJournal()
goto lb1
endif
if (UO.InJournal("There is")or UO.InJournal("appears")or UO.InJournal("You decide"))<>0 || k>30 then
NoStop=false
endif
Wait(500)
k=k+1
wend
UO.DeleteJournal()
end sub
sub svs()
if UO.InJournal("Saving in 5 ")<>0 then
Wait(35000)
UO.DeleteJournal()
endif
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:
;uo.exec("sayu 'help'")
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>15 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
sub WaitIfSave()
If (UO.LastMessage()=="Saving in 5") <>0 Then
Wait(20000)
endif
end sub
sub DropLogs2()
var Self_Pos,k
Self_Pos=STR(UO.GetX())+" "+STR(UO.GetY())+" "+STR(UO.GetZ())
DIM ColorOfLogs[23]
ColorOfLogs[1]=0x0000 #simple
ColorOfLogs[2]=0x048A #jade
for k=1 to 2
uo.exec("findtype derevo "+str(ColorOfLogs[k])+" my")
uo.exec("moveitem finditem all ground "+Self_Pos)
wait(300)
next
end sub
sub zahod()
gotoxy (3090,613,0)
svs()
Wait(1000)
gotoxy (3090,613,0)
wait(1000)
end sub