Yoko

All sides of Injection
It is currently 2025-10-14 22:36:34

All times are UTC+02:00




Post new topic  Reply to topic  [ 21 posts ]  Go to page Previous 1 2
Author Message
 Post subject: Re: инфо оре
PostPosted: 2011-03-31 23:05:27 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Тут несколько раз обсуждался скрипт в котором жуются одни и теже грамматические ошибки. То в массиве после 1 3 идет, то кавычки пропущены, то цвета не верные, то переменные какието. Надоело трындец как ;)


1) скидывает раздельно в 3 разных контейнера: железо, золото+камни, цветную руду.
Code:
sub Dropore()
   var tColor = uo.getcolor('finditem')
   VAR i,Exit, ConTainer
   
   var Chest = '0x40B3807A'
   var OreBox = '0x40DA6660'
   var HiOreBox = '0x40F0C0A3'

   DIM Ore[13]
   Ore[0]='0x19B7' ; 1 ore
   Ore[1]='0x19BA' ; 2 ore
   Ore[2]='0x19B8' ; 3 ore
   Ore[3]='0x19B9' ; >3 ore
   Ore[4]='0x0F11' ; saphires
   Ore[5]='0x0F16' ; amethysts
   Ore[6]='0x0F18' ; tourmalines
   Ore[7]='0x0F15' ; citrines
   Ore[8]='0x0F10' ; emeralds
   Ore[9]='0x0F0F' ; star sapphires
   Ore[10]='0x0F26' ; diamonds
   Ore[11]='0x1F4C' ; recall scrolls
   Ore[12]='0x0EED' ; gold

   UO.UseObject(Chest)
   wait(500)
   UO.UseObject(OreBox)
   wait(500)
   UO.UseObject(HiOreBox)

   For i=0 to 12
      Exit=0
      repeat
         UO.FindType(Ore[i], -1, 'my')
         if UO.GetQuantity('finditem')>0 then
            If UO.GetColor('finditem')=='0x0000' AND i<4 Then
               Container=UO.GetSerial(OreBox)
            Else
               if i>3 then
                  Container=UO.GetSerial(Chest)
               else
                  Container=UO.GetSerial(HiOreBox)
               Endif
            Endif
            UO.MoveItem('finditem',0,Container)
            wait(500)
         Else
            Exit=1
         endif
      until Exit==1
   Next
end sub


2) то же самое но с логированием набранной руды. Нужно правильно цвета прописать и больше ничего не трогать.
Code:
sub Dropore()
   VAR i,j,Exit,Container
   var Chest = '0x40B3807A'
   var OreBox = '0x40DA6660'
   var HiOreBox = '0x40F0C0A3'
   DIM Ore[13]
   Ore[0]='0x19B7' ; 1 ore
   Ore[1]='0x19BA' ; 2 ore
   Ore[2]='0x19B8' ; 3 ore
   Ore[3]='0x19B9' ; >3 ore
   Ore[4]='0x0F11' ; saphires
   Ore[5]='0x0F16' ; amethysts
   Ore[6]='0x0F18' ; tourmalines
   Ore[7]='0x0F15' ; citrines
   Ore[8]='0x0F10' ; emeralds
   Ore[9]='0x0F0F' ; star sapphires
   Ore[10]='0x0F26' ; diamonds
   Ore[11]='0x1F4C' ; recall scrolls
   Ore[12]='0x0EED' ; gold
   DIM Colors[16]
   Colors[0]='0x0000' ; Iron
   Colors[1]='0x09F0' ; Gorgan
   Colors[2]='0x09D3' ; Steel
   Colors[3]='0x0BA7' ; Eldar
   Colors[4]='0x08AF' ; Plut
   Colors[5]='0x0085' ; Dragon
   Colors[6]='0x0060' ; Aqua
   Colors[7]='0x09E6' ; Elvin
   Colors[8]='0x010F' ; Krinit
   Colors[9]='0x09DA' ; Vulkan
   Colors[10]='0x09EC' ; Blood Crest
   Colors[11]='0x0445' ; Sand Rock
   Colors[12]='0x0498' ; Acid
   Colors[13]='0x0485' ; Crystaline
   Colors[14]='0x0770' ; BlackRock
   Colors[15]='0x0498' ; Obsid
   DIM log[16]
   log[0]=0 ; Iron
   log[1]=0 ; Gorgan
   log[2]=0 ; Steel
   log[3]=0 ; Eldar
   log[4]=0 ; Plut
   log[5]=0 ; Dragon
   log[6]=0 ; Aqua
   log[7]=0 ; Elvin
   log[8]=0 ; Krinit
   log[9]=0 ; Vulkan
   log[0]=0 ; Blood Crest
   log[11]=0 ; Sand Rock
   log[12]=0 ; Acid
   log[13]=0 ; Crystaline
   log[14]=0 ; BlackRock
   log[15]=0 ; Obsid
   
   uo.textclear()
   uo.textopen()

   UO.UseObject(Chest)
   wait(500)
   UO.UseObject(HiOreBox)
   wait(500)
   UO.UseObject(OreBox)
   wait(500)

   For i=0 to 3
      for j=0 to 15
         uo.FindType(Ore[i], Colors[j], 'backpack')
         if UO.FindCount()>0 then
            log[j]=log[j]+UO.GetQuantity('finditem')
            uo.click('finditem')
            wait(500)
            UO.TextPrint('Руда: ' +uo.getname('finditem') +'. Количество = ' +str(log[j]) )
            If UO.GetColor('finditem')=='0x0000' Then
               UO.Moveitem('finditem', 0, OreBox)
               wait(900)
            else
               UO.MoveItem('finditem', 0, HiOreBox)
               wait(900)
            endif
         endif
      next
   Next
   For i=4 to 12
      uo.FindType(Ore[i], -1, 'backpack')
      if UO.FindCount()>0 then
         UO.MoveItem('finditem', 0, Chest)
         wait(900)
      endif
   Next
end sub


Без обид но опечатки левые совершенно. Хотя бы прочитайте мануалы и посмотрите примеры.

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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 21 posts ]  Go to page Previous 1 2

All times are UTC+02:00


Who is online

Users browsing this forum: Bing [Bot] and 6 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