Yoko

All sides of Injection
It is currently 2025-10-16 21:25:00

All times are UTC+02:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 2009-09-17 18:29:20 
Offline
User avatar

Joined: 2006-09-08 04:46:12
Posts: 62
Знатоки помогите пожалуйста,нужно сделать так когда в ручную останавливаешь макрос при повторном включении он шел и капал тот тайл на котором был выключен,а то очень тяжко когда выкапываешь елема приходиться вырубать,убивать его и начинать заного обходить все тайлы??? !!!!


Code:
sub collecting() 

var i,s=0,flag=0
var f=file("D:\_GAMES\Ultima Online\Inject\rock.txt")
dim RockX[500],RockY[500],RockT[500]
var Count=0

while not flag ==1
 
   uo.usetype ('0x0E85')
   WaitForTarget()
   
   while uo.targeting()
   wait(100)
   wend
   
   if  uo.LastTile(1)==UO.GetX("self") then
      if uo.lastTile(2)==UO.GetY("self")  then
         flag=1
      endif
   endif

   
   if flag == 0 then
      RockX[Count]=uo.LastTile(1)
      RockY[Count]=uo.lastTile(2)
      RockT[Count]=uo.LastTile(0)
      uo.print('Íàéäåíà êî÷êà ¹ '+str(count)+': x='+str(uo.lasttile(1))+' y='+str(uo.lastTile(2)))
       

      Count = Count+1
   
   endif
   
   
wend


uo.print ("Íàéäåíî " + str(Count) + " êî÷åê")
#################################################
################Çàïèñü â ôàéë####################
#################################################

f.open()
f.create()
s=safe call f.writeln(Count)
   for i=0 to Count-1
   s=safe call f.writeln(str(RockT[i])+' '+str(RockX[i])+' '+str(RockY[i]))
   next
f.close()

#################################################
#################################################
#################################################


end sub



#################################################
#################################################
#################################################
#################################################
#################################################
#################################################


sub mining()

var i,flag,j
var Count
var f=file("D:\_GAMES\Ultima Online\Inject\rock.txt")
dim RockX[500],RockY[500],RockT[500]
uo.deletejournal()

#################################################
###############Çàãðóæàåì èç ôàéëà################
#################################################

uo.print('Çàãðóæàåì êîîðäèíàòû èç ôàéëà...')
f.open()
Count=safe call f.readNumber()

uo.print("Çàãðóæåíî "+str(Count)+ " êî÷åê")

for i=0 to Count-1
RockT[i]=safe call f.ReadNumber()
RockX[i]=safe call f.ReadNumber()
RockY[i]=safe call f.ReadNumber()
next
f.close()


#################################################
###############Õîäèì ïî êîîðäèíàòàì##############
#################################################

while UO.Weight<650
uo.deletejournal()
   if Count>0 then
   for i=0 to Count-1
      flag=0
      j=0
      uo.print('Èäåì ê êî÷êå '+str(i)+': x='+str(Rockx[i])+' y='+str(RockY[i]))

      while not flag==1
         flag=gotoxy(RockX[i],RockY[i])
         wait (1000)
      wend
       
       
uo.deletejournal()
 GetRock(str(RockT[i]),str(RockX[i]),str(RockY[i]),str(uo.getz()))
       
   next
   endif
wend

uo.print ("Âûêîïàíî")   

end sub


##################################################################

sub GetRock(tile,x,y,z)

uo.print('Íà÷èíàåì êîïêó...')

while not UO.InJournal("Try") and not UO.InJournal("location") and not UO.InJournal("Ïîïðîáóéòå") and not UO.InJournal("far away") and not UO.InJournal("There is nothing here to mine for.") and not UO.InJournal ("Òóò íå îñòàëîñü ðóäû") and not UO.InJournal("äîòÿíóòüñÿ") and not UO.InJournal("You put the iron ores in your pack.")and not UO.InJournal ("You cannot mine so close to yourself.")
   uo.deletejournal()
   UO.Waittargettile(tile,x,y,z)
   uo.print ("Èñïîëüçóåì êèðêó...")
   UO.Usetype("0x0E85")
             
   while not UO.InJournal("You put") and not UO.InJournal("location") and not UO.InJournal("Ïîïðîáóéòå") and not UO.InJournal("äîòÿíóòüñÿ") and not UO.InJournal("There is nothing here to mine for.") and not UO.InJournal ("Òóò íå îñòàëîñü ðóäû") and not UO.InJournal("but fail") and not UO.InJournal("nothing") and not UO.InJournal("Try") and not UO.InJournal("You put the iron ores in your pack.") and not UO.InJournal ("You cannot mine so close to yourself.")
      wait (1000)
   wend
wend



end sub
##########################################
#############Äîïîëíèòåëüíûå###############
################Ôóíêöèè###################
##########################################


sub abs(num)
if num>=0 then
return num
else
return num*(-1)
end if
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 abs(x-myX)<=1 AND abs(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 WaitForTarget()
for var i=0 to 50
if uo.Targeting()==1 then
return 1
end if
wait(200)
next
return 0
end sub


Top
   
 Post subject:
PostPosted: 2009-09-17 18:43:55 
Offline
User avatar

Joined: 2006-09-08 04:46:12
Posts: 62
Вот нашел паузу только чето не получается сделать так чтобы он к томуже тайлу шел копать (((

Code:
sub Pauza() ; Пауза... Чтобы продолжить напиши GO или после убийства элементаля он сам продолжит.
UO.DeleteJournal()
REPEAT
WAIT(3000)
UO.Print("!!!СКРИПТ НА ПАУЗЕ!!!!")
UNTIL UO.InJournal('GO') or UO.InJournal('Body of Earth Elemental')
UO.Print("!!!СКРИПТ ПРОДОЛЖЕН!!!!")
endif
end sub


Top
   
 Post subject:
PostPosted: 2009-09-17 19:39:18 
Offline

Joined: 2009-06-11 14:06:40
Posts: 30
скрипт скалы обкапует?


Top
   
 Post subject:
PostPosted: 2009-09-17 19:42:11 
Offline
User avatar

Joined: 2006-09-08 04:46:12
Posts: 62
не по теме децл молча ок?


Top
   
 Post subject:
PostPosted: 2009-09-17 19:42:57 
Offline

Joined: 2009-06-11 14:06:40
Posts: 30
О_о проще выражайся и люди к тебе подтянуться ;) :arrow:


Top
   
 Post subject:
PostPosted: 2009-09-17 19:44:12 
Offline
User avatar

Joined: 2006-09-08 04:46:12
Posts: 62
проще некуда читай название топика все ясно написано что и зачем.


Top
   
 Post subject:
PostPosted: 2009-09-17 22:05:16 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Я такой скрипт даже прочитать не могу. Наверно склеили от старого ламбера в далеком 2003 году. Жесть.

Чтоб решить проблему - скрипт надо выложить полностью все что там есть.

имхо убрать проверку елемов и убивать их 2м чаром.

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2009-09-17 22:11:16 
Offline
User avatar

Joined: 2006-09-08 04:46:12
Posts: 62
пашет он отлично ((


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 2 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:  
Powered by phpBB® Forum Software © phpBB Limited