Yoko

All sides of Injection
It is currently 2025-10-23 08:34:28

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Lumber + EasyUO walk
PostPosted: 2009-04-29 09:28:19 
Offline

Joined: 2008-01-07 23:56:04
Posts: 24
Code:
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:
                       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


Собсно вот скрипт, работает на простейшей ходилеке от изи уо. НО проблема в том, что и ета ходилка не всегда обходит даже простейшые препятствия... Можете помоч прикрутить какуюнить ходилку "по-надежней"?


Top
   
 Post subject:
PostPosted: 2009-04-29 10:36:56 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
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.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2009-04-29 23:03:10 
Offline

Joined: 2009-04-12 13:03:57
Posts: 11
В топ квалите разделе замечательный скрипт на рубку.


Top
   
 Post subject:
PostPosted: 2009-04-30 08:53:11 
Offline

Joined: 2008-01-07 23:56:04
Posts: 24
Знал бы я какую строку...)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited