Code: Select all
var Chest='0x40DE0612' ; ID sunduka kuda vikidivat logi...
var zona = 6;
var m, i, a, tX, tY, tr = 1
sub main()
uo.Print('Âûáåðè Ðóíó äîìîé: ')
uo.Exec('addobject Runeh')
while uo.Targeting()
wait(300)
wend
uo.Print('Âûáåðè Ðóíó ê ìåñòó âûðóáêè: ')
uo.Exec('addobject Runel')
while uo.Targeting()
wait(300)
wend
; + EDIT +++++++++++++++++++++++++++++++++++++++++++++++
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++
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("Logs|useable wood|reach this.|far away.|to chop.") || TrT || UO.Dead()
if uo.Weight>=615 then ;################################################### VEs dla recalla
vernemsa:
uo.WaitTargetObject('Runeh')
uo.Exec('warmode 0')
uo.Cast('Recall')
WaitForRecall()
if uo.injournal('The spell fizzles') then
uo.deletejournal()
goto vernemsa
end if
DropLogs()
wait(1000)
vernemsas:
uo.WaitTargetObject('Runel')
uo.Exec('warmode 0')
uo.Cast('Recall')
WaitForRecall()
if uo.injournal('The spell fizzles') then
uo.deletejournal()
goto vernemsas
end if
end if
; ********* 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("to chop.|reach this.|far away.") || 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("Logs") ;
F_DeleteJournal("useable wood") ;
F_DeleteJournal("far away.");
F_DeleteJournal("reach this.") ;
F_DeleteJournal("to chop.") ;
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
sub DropLogs()
wait(1000)
uo.press(38)
wait(500)
uo.press(38)
wait(500)
uo.press(38)
wait(500)
if uo.Waiting() then
uo.CancelTarget()
end if
var a,Exit
dim Logs[1]
Logs[0]=0x1BDD
uo.Print('Âûêëàäûâàåì Ëîãè.')
uo.SetReceivingContainer(Chest)
wait(500)
for a=0 to 0
Exit=0
repeat
uo.FindType(Logs[a])
if uo.GetQuantity('finditem')>0 then
uo.Grab('0','finditem')
wait(1500)
else
Exit=1
end if
until Exit==1
next
uo.UnSetReceivingContainer(Chest)
uo.Print('Ëîãè Âûëîæåíû.')
end sub
sub WaitForRecall()
var Text1=uo.GetName()+': The spell fizzles.'
var LastX=uo.GetX()
var LastY=uo.GetY()
var mess=''
for var i=0 to 200
mess=uo.Journal(0)
if uo.Journal(0)==Text1 then
return 0
end if
if uo.GetX()<>LastX or uo.GetY()<>LastY then
return 1
end if
wait(200)
next
return 0
end sub
Вобщем вот скрипт ламбера.
Может кто-нибудь исправить его.
Вобщем вот проблема: Я лечу в лес запускаю скрипт он рубит ну через определённое время он автоматически отключаеться (сделайте чтобы не отключался).
Далее после того как он рекольнулся дамой скинул там логи он рекольнулся опять в лес и стоит как истукан а скрипт работает но он не рубит. (исправьте это пожалуйста чтобы рубил)
и если можете то если физланул то ещё раз чтобы рекол сделал и так пока удачно не пройдёт и дальше процесс чтобы пошел.
Заранее блогодарю.