Yoko

All sides of Injection
It is currently 2025-12-04 08:46:20

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2005-09-11 15:12:13 
Offline

Joined: 2005-02-25 20:42:05
Posts: 30
Собственно сабж.Желательно, чтобы он их в сундук складывал)


Top
   
 Post subject:
PostPosted: 2005-09-11 15:15:44 
Offline
Expert!
User avatar

Joined: 2005-01-15 19:15:05
Posts: 791
Location: Dragon World
Code:
var idSourceCont = '0x40135151'   ;контейнер в котором лежат логи и еда 
var idResiveCont = '0x40135151'   ;контейнер в который будут складываться торчи (можно складывать туда же откуда беруться логи)
var tTools = '0x0F51'            ;тип ножа
var сTools = '0x0000'               ;цвет ножа
var tEat = '0x097B'               ;тип еды
var cEat = '0x0000'               ;цвет еды
var qTree = 250                  ;кол-во логов которое берётся за раз
VAR SpiritTime = UO.Timer()

sub main()
var i
Dim cTree[18]
  cTree[0]='0x047C'
  cTree[1]='0x0279'
  cTree[2]='0x096B'
  cTree[3]='0x0237'
  cTree[4]='0x0482'
  cTree[5]='0x010F'
  cTree[6]='0x0014'
  cTree[7]='0x03C1'
  cTree[8]='0x0085'
  cTree[9]='0x04C2'
  cTree[10]='0x0033'
  cTree[11]='0x002B'
  cTree[12]='0x0071'
  cTree[13]='0x09A4'
  cTree[14]='0x0B82'
  cTree[15]='0x00BE'
  cTree[16]='0x0035'
  cTree[17]='0x0BB6'
Dim mTree[17]
  mTree[0]='Oak'
  mTree[1]='Red Tree'
  mTree[2]='Dark Tree'
  mTree[3]='Swamp'
  mTree[4]='Silver Leaf'
  mTree[5]='Keranit'
  mTree[6]='Perit'
  mTree[7]='Petrified'
  mTree[8]='Dragon Tree'
  mTree[9]='Vampire Tree'
  mTree[10]='Eridan'
  mTree[11]='Hellios'
  mTree[12]='Illusions Tree'
  mTree[13]='Crystal'
  mTree[14]='Dead Tree'
  mTree[15]='Paradise Tree'
  mTree[16]='Titan Tree'
  mTree[17]='Avalon'
      If ( UO.Timer() - SpiritTime ) / 600 > 5 Then
         ; Прошло 5 минут с момента последней прокачки Spirit Speak
         SpSpeak()
         SpiritTime = UO.Timer()
      Endif
   UO.UseObject(idSourceCont)
   UO.DisArm()
   CheckLag()
   Open('backpack')
   if UO.Count(tTools) > 0 then
      UO.FindType(tTools,сTools,'backpack')
      UO.AddObject('objTools','finditem')
   else
      return
   end if
   Open(idSourceCont)
   Open(idResiveCont)
   for i = 0 to 17   
       CraftTorch(mTree[i],cTree[i])
   next
end sub

sub CraftTorch(mTree,cTree)
   UO.FindType('0x1BDD',cTree,idSourceCont)
   if UO.FindCount() < 1 then
      return
   end if
   UO.CancelMenu()
   UO.AutoMenu('What do you',mTree)
   UO.AutoMenu(mTree,'torch')
   while GrabContainer('0x1BDD',cTree,qTree)==0
      UO.DeleteJournal()
      UO.WaitTargetType('0x1BDD')
      UO.UseObject('objTools')   
      repeat
         wait(100)
      until UO.InJournal('You put the torch') or UO.InJournal('fail') or UO.InJournal('failed')   
   wend
end sub

sub GrabContainer(tType, cType, Quanty)
   if UO.Count(tType,cType)<1 then
      UO.FindType('0x0F64','-1','backpack')
      if UO.FindCount() > 0 then
         UO.MoveItem('finditem','-1',idResiveCont)
         CheckLag()
      end if
      ToEat()
      UO.FindType(tType,cType,idSourceCont)
      If UO.FindCount() > 0 then
         UO.MoveItem('finditem',str(Quanty),'backpack')
         Wait(1000)
         CheckLag()
      else
         return 1
      End if             
   End If
   return 0
end sub

sub ToEat()   
   UO.FindType(tEat, cEat, idSourceCont)
   if UO.GetQuantity('finditem') > 0 then
      UO.MoveItem('finditem','20','backpack')
   else
      return
   end if
   repeat     
      CheckLag()
      uo.UseType(tEat,cEat)
      while not uo.InJournal("can't") and not uo.InJournal('full') and not uo.InJournal('stuffed') and not uo.InJournal('hungry') and not uo.InJournal('satiated') and not UO.Dead()
         wait(100)
      wend
   until uo.InJournal('too full') or UO.Dead() or uo.InJournal("can't")
   CheckLag()
   UO.FindType(tEat, cEat,'backpack')
   if UO.GetQuantity('finditem') > 0 then
      UO.MoveItem('finditem','-1',idSourceCont)     
   end if     
   CheckLag()
   wait(1000)
end sub

sub Open(Container)
   UO.UseObject(Container)
   CheckLag()
   wait(500)
end sub

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

sub SpSpeak()
   VAR mod = UO.WarMode(), num
   VAR fizzle = 'You fail your attempt'
   VAR success = 'You establish a connection'
   UO.WarMode( 0 )
   UO.DeleteJournal( success )
   repeat
      UO.DeleteJournal( fizzle )
      UO.UseSkill( 'Spirit Speak' )
      num = 1
      repeat
         wait(100)
         num = num + 1
      until UO.InJournal( fizzle ) OR UO.InJournal( success ) OR num > 600
   until UO.InJournal( success )
   UO.WarMode( mod )
endsub


Top
   
 Post subject:
PostPosted: 2005-09-11 15:35:58 
Offline

Joined: 2005-02-25 20:42:05
Posts: 30
Он из любых логов делает?


Top
   
 Post subject:
PostPosted: 2005-09-11 15:40:49 
Offline
Expert!
User avatar

Joined: 2005-01-15 19:15:05
Posts: 791
Location: Dragon World
Oak
Red Tree
Dark Tree
Swamp
Silver Leaf
Keranit
Perit
Petrified
Dragon Tree
Vampire Tree
Eridan
Hellios
Illusions Tree
Crystal
Dead Tree
Paradise Tree
Titan Tree
Avalon


Top
   
 Post subject:
PostPosted: 2005-09-11 15:43:54 
Offline

Joined: 2005-02-25 20:42:05
Posts: 30
Leo wrote:
Oak
Red Tree
Dark Tree
Swamp
Silver Leaf
Keranit
Perit
Petrified
Dragon Tree
Vampire Tree
Eridan
Hellios
Illusions Tree
Crystal
Dead Tree
Paradise Tree
Titan Tree
Avalon

Тобишь я могу много их в сейф накидать разных и он сам выбирать будет?


Top
   
 Post subject:
PostPosted: 2005-09-11 15:44:45 
Offline
Expert!
User avatar

Joined: 2005-01-15 19:15:05
Posts: 791
Location: Dragon World
Угу.


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

All times are UTC+02:00


Who is online

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