Page 1 of 1

Подправьте скриптик

Posted: 2014-01-30 19:27:29
by LRaider
Уважаемые скриптеры, вот лутилка, которая лутит с последнего открывшегося пака и с земли. Проблема в том, что скрипт не всегда видит предметы на земле, а так же если в паке лежат 2 одинаковых итема- лутит только один. Помогите подправить.

Code: Select all

sub Loot()
   var t,n
   t = 500
   Dim Loot[30]
   
   Loot[1] = 0x0F7B  ## -
   Loot[2] = 0x0F8D  ## -
   Loot[3] = 0x0F8C  ## -
   Loot[4] = 0x0F88  ## -
   Loot[5] = 0x0F7A  ## -
   Loot[6] = 0x0F84  ## -
   Loot[7] = 0x0F86  ## -
   Loot[8] = 0x0F85  ## -
   Loot[9] = 0x1F14  ## -
   Loot[10] = 0x0F0C ## -
   Loot[11] = 0x0F0B ## -
   Loot[12] = 0x1F03 ## -
   Loot[13] = 0x1515 ## -
   Loot[14] = 0x1517 ## -
   Loot[15] = 0x171C ## -
   Loot[16] = 0x1539 ## -
   Loot[17] = 0x152E ## -
   Loot[18] = 0x0EED ## -
   Loot[19] = 0x0E76 ## -
   Loot[20] = 0x0E75 ## -
   Loot[21] = 0x0E21 ## -
   Loot[22] = 0x13B1 ## -
   Loot[23] = 0x0F4F ## -
   Loot[24] = 0x13FC ## -
   Loot[25] = 0x0F3F ## -
   Loot[26] = 0x1BFB ## -
   Loot[27] = 0x1BD1 ## -
   Loot[28] = 0x09F1 ## -
   Loot[29] = 0x14EB ## -
   Loot[30] = 0x1078 ## -   
   for n=1 to 30
      uo.findtype(Loot[n],-1,'ground')
      if uo.findcount() then
         uo.moveitem('finditem')
         wait(t)
      end if 
      uo.findtype(Loot[n],"-1","lastcontainer")
      if uo.findcount() > 0 then
         UO.grab(0, "finditem")
         Wait(t)
      end if
   next
end sub

Re: Подправьте скриптик

Posted: 2014-01-30 19:29:19
by Mirage

Code: Select all

      uo.findtype(Loot[n],-1,'ground')
      while uo.findcount()
         uo.moveitem('finditem')
         wait(t)
      wend
      uo.findtype(Loot[n],"-1","lastcontainer")
      while uo.findcount()
         UO.grab(0, "finditem")
         Wait(t)
      wend

Re: Подправьте скриптик

Posted: 2014-01-30 19:47:23
by Juicy Fruit

Code: Select all

      uo.findtype(Loot[n],-1,'ground')
      while uo.findcount()
         uo.moveitem('finditem')
         wait(t)
         uo.findtype(Loot[n],-1,'ground')
      wend
      uo.findtype(Loot[n],"-1","lastcontainer")
      while uo.findcount()
         UO.grab(0, "finditem")
         Wait(t)
         uo.findtype(Loot[n],"-1","lastcontainer")
      wend
Так вернее :Р

Re: Подправьте скриптик

Posted: 2014-01-30 20:36:12
by LRaider
Спасибо!