Lumber + EasyUO walk

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Rocker
Posts: 24
Joined: 2008-01-07 23:56:04

Lumber + EasyUO walk

Post by Rocker »

Code: Select all

var axe ="0x0F43"
sub lumber()
var f=file("D:\trees1.dat"),TreeCount=0,i
dim TreeX[500],TreeY[500],TreeT[500]
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(str(treex[i]),str(treey[i]),'2','60s') 
  GetTree(str(treeT[i]),str(treeX[i]),str(TreeY[i]),str(uo.getz())) 
if uo.weight > 300 then
GoToXY( '1022', '2633', '1', '50s' )
GoToXY( '1023', '2616', '1', '50s' )
GoToXY( '1032', '2617', '1', '50s' )
DropLogs()
end if
 next
wend
endsub

Sub ToHide()
while not UO.Hidden()
 uo.deletejournal()
 UO.UseSkill("Stealth")
 wait(4100)
wend
end sub

Sub GetTree(type,x,y,z)
var ms1="logs in your pack"
var ms2="no logs"
var ms3="log in your pack"
var ms4="You hack at the tree for a while"
var ms5="too far|not here"
var ms6="You can't reach this"
wait(200)
repeat
 uo.deletejournal()
 uo.waittargettile(type,x,y,z)
 uo.usetype(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 GoToXY( x, y, tolerance, tm )
   ; через ИзиУО!
   UO.SetEasyUO( 4, tm )
   UO.SetEasyUO( 3, tolerance )
   UO.SetEasyUO( 2, y )
   UO.SetEasyUO( 1, x )
   repeat
      wait( 50 )
   until UO.GetEasyUO( 1 ) == '0'
   return
endsub


Sub CheckLag()
    UO.DeleteJournal()
    UO.Click('backpack')
    repeat
       wait(50)
    until UO.InJournal('backpack')
end sub

sub DropLogs()
var lastx,lasty, Exit,Chest='0x418694EB',Logs='0x1BDD'
lastx=UO.GetX('self')
lasty=UO.Gety('self')
uo.findtype(Logs,'-1','backpack')
while uo.findcount()>0
 uo.moveitem('finditem','all',Chest)
 wait(700)
 uo.findtype(Logs,'-1','backpack')
wend
gotoxy(str(lastx),str(lasty),'0','60s')
end sub


Code: Select all

                       initevents
set *1 0
set *2 0
set *3 0
set *4 0

loop:
if *1 <> 0
{
   wait 2
   move *1 *2 *3 *4
   set *1 0
}
goto loop


Собсно вот скрипт, работает на простейшей ходилеке от изи уо. НО проблема в том, что и ета ходилка не всегда обходит даже простейшые препятствия... Можете помоч прикрутить какуюнить ходилку "по-надежней"?
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

viewtopic.php?p=66813#66813

Возьми да поменяй пару строк..
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
Dimon31
Posts: 11
Joined: 2009-04-12 13:03:57

Post by Dimon31 »

В топ квалите разделе замечательный скрипт на рубку.
Rocker
Posts: 24
Joined: 2008-01-07 23:56:04

Post by Rocker »

Знал бы я какую строку...)
Post Reply