подправьте пожалуйста скрипт чтобы вставал в хайд и рубил в хайде
Code: sub main() ; + EDIT +++++++++++++++++++++++++++++++++++++++++++++++ var zona = 6; ; ++++++++++++++++++++++++++++++++++++++++++++++++++++++ var m, i, a, tX, tY, tr = 1 tX = UO.GetX('self') tY = UO.GetY('self') for i=1 to zona if tr then m = - 5 else m = 5 endif for a=1 to zona tY = tY + m GotoXY(tX,tY) Lamber() next tX = tX - 5 if tr then tr = 0 else tr = 1 endif next endsub
sub Lamber() ; + EDIT +++++++++++++++++++++++++++++++++++++++++++++++ var MaxFailCount = 10; fizzle var MaxRange = 3 ; 3 tiles var mDebug = false; ; ++++++++++++++++++++++++++++++++++++++++++++++++++++++
var X, Y, Z, FailCount = 0, LTimer, Tiles var mX, mY, mZ, TrWeight, TrT, TrW, adX, adY
; ** Debug *********************** if mDebug then UO.TextOpen() UO.TextClear() endif ; ********************************
mX = UO.GetX('self') mY = UO.GetY('self') mZ = UO.GetZ('self') for Y = MaxRange - ( MaxRange * 2 ) to MaxRange for X = MaxRange - ( MaxRange * 2 ) to MaxRange Tiles = F_HarvestTiles(mX+X, mY+Y) if Tiles then adX = mX+X adY = mY+Y repeat F_DelJournalMine(); UO.Warmode(0) UO.WaitTargetTile(Tiles, mX+X, mY+Y, mZ)
; ******************************** if UO.Count(0x0F43) then UO.UseType(0x0F43); <-- Axe else return 1 endif ; ********************************
; ************ Triger ************ ; ErrorExitTimer LTimer=UO.Timer() TrT = UO.Timer() > LTimer + 60; !!! 60/10 = 6 sec !!! ; MyWeight + Ore TrWeight = UO.Weight TrW = UO.Weight <> TrWeight ; ********************************
repeat wait(100) until UO.InJournal("put|but|reach|далеко|nothing") || TrT || UO.Dead()
; ********* ON=@FailCount ******** if TrW then FailCount = 0 else FailCount = FailCount + 1 endif ; ********************************
; ***** Debug Harvest Tiles ****** if mDebug then if TrT then UO.TextPrint(Tiles); !Harvest else ; UO.TextPrint(Tiles); Harvest endif endif ; ********************************
until UO.InJournal("nothing|reach|далеко") || FailCount >= MaxFailCount || UO.Dead() endif next next UO.Sound(61) return 0 end sub
sub F_HarvestTiles(X,Y) var i if UO.PrivateGetTile(X, Y, -1, 3274, 3302) then for i=3274 to 3302 if UO.PrivateGetTile(X, Y, -1, i, i) then
; ***** Patch ******************************************** if i==3278 || i==3279 || i==3281 || i==3282 then return 0 endif if i==3284 || i==3285 || i==3287 || i==3289 then return 0 endif if i==3291 || i==3292 || i==3294 || i==3295 then return 0 endif if i==3297 || i==3298 || i==3300 || i==3301 then return 0 endif ; ********************************************************
return i end if next end if return 0 end sub
sub F_DelJournalMine() F_DeleteJournal("put") ; F_DeleteJournal("but") ; F_DeleteJournal("далеко"); F_DeleteJournal("reach") ; F_DeleteJournal("nothing") ; end sub
sub F_DeleteJournal( string1 ) var nom = UO.InJournal( string1 ) if nom > 0 then UO.SetJournalLine( Nom - 1, "string replaced" ) F_DeleteJournal( string1 ) endif 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
|