Yoko

All sides of Injection
It is currently 2024-03-29 17:59:39

All times are UTC+02:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 2007-06-23 14:12:06 
Offline

Joined: 2006-12-26 09:32:20
Posts: 54
Проблемка в том, когда опкопает вокруг себя идет к сундуку, а потом ко второй точке, а хотельсь бы, чтоб скрипт обходил все точки потом относил все в сундук
Code:
sub Na4alokopki() 
repeat
while gotoxy(1661,2933,0)
Mining()
GoToHome()
GoToMine()
gotoxy(1656,2930,0)
Mining()
GoToHome()
GoToMine()
gotoxy(1653,2923,0)
Mining()
GoToHome()
GoToMine()
gotoxy(1651,2915,0)
Mining()
GoToHome()
GoToMine()
gotoxy(1648,2909,0)
Mining()
GoToHome()
GoToMine()
gotoxy(1647,2897,0)
Mining()
GoToHome()
GoToMine()
gotoxy(1646,2892,0)
end sub

sub GoToHome()
gotoxy(1647,2893,0)
gotoxy(1652,2893,0)
gotoxy(1652,2885,0) 
gotoxy(1625,2885,0)
gotoxy(1619,2879,0) 
loot()
end sub

sub GoToMine()
gotoxy(1625,2885,0)
gotoxy(1652,2885,0)
gotoxy(1652,2893,0)
gotoxy(1647,2893,0)
gotoxy(1647,2911,0)
gotoxy(1654,2918,0)
gotoxy(1654,2929,0)
gotoxy(1658,2933,0)
gotoxy(1661,2933,0)
end sub


sub Mining()
     var x,y,z, n
     VAR LastTimer
  UO.Set('finddistance','4')
    n=0
    z=UO.GetZ("self")
       for x=-2 to 2
       for y=-2 to 2
      UO.Print(str(x)+" "+str(y))
           Repeat
              if UO.InJournal('TORMOZ') then
                pause()
              endif
              UO.DeleteJournal()             
              UO.Warmode("0")
              UO.WaitTargetTile("1341",STR(UO.GetX()+x),STR(UO.GetY()+Y),str(z))
              UO.UseType('0x0E85')
              LastTimer=UO.Timer()
              Repeat
                 wait(500)
              Until UO.InJournal("You put")  or UO.InJournal("heavy") or UO.InJournal("can't see") or UO.InJournal("You cant mine in this Region.") or UO.InJournal("stop") or UO.InJournal("location") or UO.InJournal("no ore") or UO.InJournal("but fail") or UO.InJournal("far away") or UO.InJournal("in rock") or UO.InJournal("must wait") or UO.InJournal("nothing") or UO.InJournal("elsewhere") or UO.InJournal("where it") OR UO.Timer()>LastTimer+200
              if UO.InJournal("You put") then
                  n=0
              else
                 n=n+1
              endif
           Until UO.InJournal("nothing") or UO.InJournal("elsewhere") or UO.InJournal("no ore here") or UO.InJournal("location") or UO.InJournal("far away") or UO.InJournal("in rock") or UO.InJournal("where it") or UO.InJournal("Iron Ore") or UO.InJournal("Rusty Ore") or UO.InJournal("Bronze Ore") or UO.InJournal("Gold Ore") or UO.InJournal("Rose Ore") or UO.InJournal("Copper Ore") or UO.InJournal("Agapite Ore") or UO.InJournal("Shadow Ore") or UO.InJournal("Dull Copper Ore") or UO.InJournal("Old Copper Ore") or UO.InJournal("Silver Ore") or n>=5
        next
     next
end sub

sub loot()
uo.UseSkill('Stealth')
wait(3000)
begin:
if uo.waiting() then
uo.canceltarget()
endif
VAR a,Exit
VAR UnloadCont='0x402374BC' ; ID sunduka
DIM Ore[5]
Ore[0]=0x19B9 ; 4 and more ore
Ore[1]=0x19B7 ; 1 ore
Ore[2]=0x19BA ; 2 ore
Ore[3]=0x19B8 ; 3 ore
UO.SetReceivingContainer(UnloadCont)
wait(500)
For a=0 to 3
Exit=0
repeat
UO.FindType(Ore[a])
if UO.GetQuantity('finditem')>0 then
UO.Grab('0','finditem')
wait(1500)
Else
Exit=1
endif
until Exit==1
Next
UO.UnSetReceivingContainer()
end sub

sub ToHide()
while not UO.Hidden()
uo.print('Пытаемся уйти в хайд...')
uo.deletejournal()
UO.UseSkill("Stealth")
wait(4100)
wend
wait(100)
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:
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>100 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


Last edited by Greidon[Gods] on 2007-06-23 17:41:22, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2007-06-23 17:40:44 
Offline

Joined: 2006-12-26 09:32:20
Posts: 54
Что никто не поможет? :roll:


Top
   
 Post subject:
PostPosted: 2007-06-25 15:20:25 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
да чувак, тебе помогут но только не тут
ты думаешь за интервал с 4-х часов ночи до 7 часов утра тут только и ожидают таких как ты, которым лень юзать поиск?


Top
   
 Post subject:
PostPosted: 2007-06-25 15:26:01 
Offline

Joined: 2006-12-26 09:32:20
Posts: 54
Mihail wrote:
да чувак, тебе помогут но только не тут
ты думаешь за интервал с 4-х часов ночи до 7 часов утра тут только и ожидают таких как ты, которым лень юзать поиск?

Этот скрипт итак нашел по поиску, то что было в моих силах, я исправил, за остальным обратился к экспертам.


Top
   
 Post subject:
PostPosted: 2007-06-29 09:27:51 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
такое тут 100% есть
просто всем впадлу править зная что аналогичный скрипт (зачастую даже лучше) тут есть


Top
   
PostPosted: 2007-06-29 11:43:38 
Offline

Joined: 2004-05-26 16:39:57
Posts: 38
Location: www.myruo.ru
Greidon[Gods] wrote:
Проблемка в том, когда опкопает вокруг себя идет к сундуку, а потом ко второй точке, а хотельсь бы, чтоб скрипт обходил все точки потом относил все в сундук

я такой скрипт выкладывал одним из первых своих постов. Ищи)


Top
   
PostPosted: 2007-07-02 12:59:23 
Offline

Joined: 2006-12-26 09:32:20
Posts: 54
arch wrote:
Greidon[Gods] wrote:
Проблемка в том, когда опкопает вокруг себя идет к сундуку, а потом ко второй точке, а хотельсь бы, чтоб скрипт обходил все точки потом относил все в сундук

я такой скрипт выкладывал одним из первых своих постов. Ищи)

:D эксперты... поиском и так пользуюсь по мере необходимости, а в этом скрипте ошибка не думаю, что таких глобальных размеров.
arch, если ты писал, тогда в чем проблема?


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 32 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