Page 1 of 1

Лут

Posted: 2005-09-18 23:01:10
by letchik Potapov

Code: Select all

sub Loot()
   VAR WaitTime=500
   VAR Exit=0, i
   DIM Loot[19]
   

   Loot[0]=0x1415 ; Platemail armor
   Loot[1]=0x1413 ; gorget
   Loot[2]=0x1414 ; gloves
   Loot[3]=0x1412 ; Helmet1
   Loot[4]=0x1408 ; helmet2
   Loot[5]=0x140A ; helmet3
   Loot[6]=0x140C ; helmet4
   Loot[7]=0x140E ; NoSe helmet
   Loot[8]=0x1411 ; Leggins
   Loot[9]=0x1410 ; Arms
   Loot[10]=0x1B74 ; Shield
   Loot[11]=0x1B74 ; Viking Sword
   Loot[12]=0x0F87 ; Axe
   Loot[18]=0x0E34 ; Blanc Scroll
   
   
   
   
;   UO.SetReceivingContainer('0x4020B3F6') ; loot store bag

   For i=1 to 19
      UO.FindType(Loot[i],-1,"ground")
      if UO.GetQuantity('finditem') then
         UO.Grab(STR(0),'finditem')
         wait(WaitTime)
      endif

      
   next

;   UO.UnSetReceivingContainer()
end sub


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

Re: если кто заглянет,поможет,большое ему спасибо.

Posted: 2005-09-19 06:17:31
by Solaire
letchik Potapov wrote:нужно,чтобы чар просто брал всю эту чушь с земли,пока она там есть.

Заменяешь if на while. Вот так:

Code: Select all

   For i=1 to 19
      UO.FindType(Loot[i],-1,"ground")
      while UO.FindCount()
         UO.Grab(STR(0),'finditem')
         wait(WaitTime)
         UO.FindType(Loot[i],-1,"ground")
      wend   
   next

Posted: 2005-09-21 16:21:23
by letchik Potapov
UO.FindType(Loot[i],-1,"ground")
как и раньше на эту строку дает ошибку:(

Posted: 2005-09-21 16:29:25
by Leo

Code: Select all

For i=1 to 19 

замени на

Code: Select all

For i=0 to 18 

Posted: 2005-09-21 17:37:55
by letchik Potapov
ММДа...берет одну весч и все...та же ошибка,но направление наверное верно,если поможет,то выдает runtime error... :!:

Posted: 2005-09-21 17:46:27
by flake

Code: Select all

UO.FindType(Loot[i],'-1',"ground")

Posted: 2005-09-22 07:45:53
by letchik Potapov
мда,по-моему проще новый сделать...все=равно не хочет работать...ДОКТОРА!!!

Posted: 2005-09-22 13:41:27
by flake
вперед, делай. доктор.

Posted: 2005-09-26 21:44:52
by StaliX
letchik Potapov wrote:UO.FindType(Loot[i],-1,"ground")
как и раньше на эту строку дает ошибку:(

-1 кавычки поставь в кавычки : '-1'