Yoko

All sides of Injection
It is currently 2025-10-16 21:28:23

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2009-08-06 08:30:28 
Offline

Joined: 2009-02-25 21:21:04
Posts: 11
Location: Саратов
Умные мира сего, перепробовал все что знал, ну не могу я зацыклить макрос...
Code:
var RuneBook = "0x404CB0E5" # Серийник рунбуки
var Marks = 9 # Количество марков в рунбуке ( первый марк не считается )
var WeightLimit = 850 # Предельный вес
var Container = "0x403A7629" # Сундук

# Дальше не трогать :-)
var MarkNo
var i
var TmpX
var TmpY
var CurX
var CurY
var CurZ
var TileX
var TileY

sub RecallTo( i )
   TmpX = UO.GetX("self")
   TmpY = UO.GetY("self")
   UO.Exec("recall "+RuneBook+" "+STR( i ))
   while TmpX == UO.GetX("self") and TmpY == UO.GetY("self")
      Wait(500)
   wend
end sub

sub GoHome()
   RecallTo( 1 )

   UO.Exec("setreceivingcontainer "+Container)   
   while not UO.Count("0x19b9") == 0
      UO.Exec("waittargettype 0x19b9")
      UO.Exec("grab 0")
      Wait(2000)
   wend
   UO.Exec("unsetreceivingcontainer")   

   RecallTo( MarkNo )
end sub

sub CheckAction()
   if UO.InJournal("You loosen") then
      return 1
   end if
   if UO.InJournal("You put") then
      return 1
   end if
   if UO.InJournal("no ore") then
      return 1
   end if
   if UO.InJournal("no line") then
      return 1
   end if
   if Uo.InJournal("overclick BUG") then
      return 1
   end if
   if UO.InJournal("too far") then
      return 1
   end if
   if UO.InJournal("You put the Proto") then
      return 1
   end if
   if UO.InJournal("Try mining in rock") then
      return 1
   end if
   if UO.InJournal("Your pickaxe is destroyed") then
      return 1
   end if
   return 0
   wait (1000)
end sub

sub main()
   if not UO.Count("0x0E85") then
      UO.Print("Take some shovel please...")
      return 0
   end if

   UO.DeleteJournal()

   for MarkNo = 2 to ( 1 + Marks )   
      RecallTo( MarkNo )
      Wait( 1000 )

      CurX = UO.GetX("self")
      CurY = UO.GetY("self")
      CurZ = UO.GetZ("self")
      
      
      
      for TileX = -4 to 4
         for TileY = -4 to 4
         
            
            Start:
            
            if NOT UO.Hidden() then
               UO.useskill("Hiding")
               Wait(8000)
               end if
            
            UO.Exec("waittargettile * "+STR( CurX + TileX )+" "+STR( CurY + TileY )+" "+STR( CurZ ))
            UO.Exec("usetype 0x0E85")

            while not CheckAction()
               Wait( 1500 )
            wend      

            if UO.InJournal("You put") then
               if UO.Weight > WeightLimit then
                  GoHome()
               end if
               UO.DeleteJournal()
               Wait( 1000 )
               goto Start
            else
               Wait(1000)
            end if

            UO.DeleteJournal()
         next
      next
   next
end sub


Если кто сможе респект тому человеку и уважуха! По всем особенностям шарда и рунбуки расскажу по номеру 177615099.
Предложения по зацикливанию типо
Code:
sub main()
while 1
min()
wend
end sub

не действуют..... Помогите чем можете...


Top
   
PostPosted: 2009-08-06 10:36:59 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Это пипец

Code:
var RuneBook = "0x404CB0E5" # Серийник рунбуки
var Marks = 9 # Количество марков в рунбуке ( первый марк не считается )
var WeightLimit = 850 # Предельный вес
var Container = "0x403A7629" # Сундук

# Дальше не трогать :-)
var MarkNo
var i, TmpX, TmpY, CurX, CurY, CurZ, TileX, TileY

sub RecallTo( i )
   TmpX = UO.GetX("self")
   TmpY = UO.GetY("self")
   UO.Exec("recall "+RuneBook+" "+STR( i ))
   while TmpX == UO.GetX("self") and TmpY == UO.GetY("self")
      Wait(500)
   wend
end sub

sub GoHome()
   RecallTo( 1 )

   UO.Exec("setreceivingcontainer "+Container)   
   while not UO.Count("0x19b9") == 0
      UO.Exec("waittargettype 0x19b9") ; <--- вот это тут накой?
      UO.Exec("grab 0")
      Wait(2000)
   wend
   UO.Exec("unsetreceivingcontainer")   

   RecallTo( MarkNo )
end sub

sub CheckAction()
   if UO.InJournal("You loosen|You put|no ore|no line|overclick BUG|too far|You put the Proto|Try mining in rock|Your pickaxe is destroyed") then
      return 1
   end if
   return 0
   wait (1000)
end sub

sub main()
   if not UO.Count("0x0E85") then
      UO.Print("Take some shovel please...")
      return 0
   end if

   UO.DeleteJournal()

   for MarkNo = 2 to ( 1 + Marks )   
      RecallTo( MarkNo )
      Wait( 1000 )

      CurX = UO.GetX("self")
      CurY = UO.GetY("self")
      CurZ = UO.GetZ("self")
            
      for TileX = -4 to 4
         for TileY = -4 to 4
                  
            Start:
            
            if NOT UO.Hidden() then
               UO.useskill("Hiding")
               Wait(8000)
               end if
            
            UO.Exec("waittargettile * "+STR( CurX + TileX )+" "+STR( CurY + TileY )+" "+STR( CurZ ))
            UO.Exec("usetype 0x0E85")

            while not CheckAction()
               Wait( 500 )
            wend      

            if UO.InJournal("You put") then
               if UO.Weight > WeightLimit then
                  GoHome()
               end if
               UO.DeleteJournal()
               Wait( 1000 )
               goto Start ; так нельзя
            else
               Wait(1000)
            end if

            UO.DeleteJournal()
         next
      next
   next
end sub


Предложения по зацикливанию типо
Code:
sub main()
while 1
min()
wend
end sub

[/quote] :shock:
предложение БУДЕТ работать если привести скрипт в порядок. А так существует множество скриптов на добычу по принципу:
Code:
sub
указывается тайл
цыкл
пауза пока не (сообщение любое + таймер + проверка на смерть)
пока не (сообщение о том что нет логов\руды + смерть + перегруз)
end.

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
 Post subject:
PostPosted: 2009-08-06 11:03:21 
Offline

Joined: 2009-02-25 21:21:04
Posts: 11
Location: Саратов
ну конечно может это и пипец но все же.... У меня нет привязки к тайлам он просто обкапывает вокруг себя все портуется домой при перевесе и опбатно... когда доходит до конца рунбуки (посути должен перейти на начало ... ан нет выбивает ошибку)...


Top
   
 Post subject:
PostPosted: 2009-08-06 13:46:51 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Привязка к тайлам есть. Просто есть привязка к определенным тайлам а есть к нулевому = все тайлы :)

когда ты запускаешь скрипт он обкапывает квадрат он же не ходит? Просто с 1 квадрата набирает вес или джет когда будет руда Так?
глюк в цикле получается потому что не обнуляется значение MarkNo.
Оно растет for MarkNo = 2 to ( 1 + Marks ) до предела но чтобы начать с начала оно должно быть минимальным Так?
Следовательно:

Code:

sub main()
repeat
MarkNo = 2

   if not UO.Count("0x0E85") then
      UO.Print("Take some shovel please...")
      return 0
   end if
   UO.DeleteJournal()
   for MarkNo = 2 to ( 1 + Marks )
.....................

   next
until uo.Dead()
end sub


хз. Попробуй вот так.

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


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 1 guest


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