Page 1 of 1

Скрипт на лут

Posted: 2012-04-05 23:01:45
by aleksandr
Нужен скрипт на лут простой чтобы при открытии трупа все оттуда забирал сам,
этот вроде должен работать, но при запуске ничего не происходит, запуск с открытым трупом ошибку выдает "checklag" и берет по одной вещи

Code: Select all

sub Lootall()
    var n = 0, ok, corpse, i, container = '0x40363C7A'    ; Контейнер-приемник
    dim ignore[4]                                          ;  Общее кол-во элементов в массиве
    ignore[0] = '0x1234'
    ignore[1] = '0x1234'
    ignore[2] = '0x1234'
    ignore[3] = '0x1234'     
    if uo.getserial(container) <> uo.getserial('lastcontainer') and uo.getserial('backpack') <> uo.getserial('lastcontainer') then
        uo.ignorereset()
        corpse=uo.getserial('lastcontainer')
        uo.findtype(-1,-1,corpse)
        repeat
            uo.findtype(-1,-1,corpse)
            if uo.findcount() then
                ok = 1
                for i = 0 to 3                                ; Общее кол-во элементов в массиве минус один
                    if uo.getgraphic('finditem') == ignore[i] then
                        ok = 0
                    endif
                next
                if n==uo.getserial('finditem') or not ok then
                    uo.ignore('finditem')
                else
                    n=uo.getserial('finditem')
                    uo.moveitem('finditem',0,container)
                    uo.print(' item '+str(uo.findcount()))
                    checklag()
                    wait(600)
                endif
            endif
        until not uo.findcount()
    endif
    uo.print(' -= Done =- ')
endsub

Re: Скрипт на лут

Posted: 2012-04-06 03:05:56
by Nmy

Code: Select all

sub checklag() 
   repeat
      UO.DeleteJournal()
      UO.Click('backpack')
   until backpack()==1
endsub
sub backpack()
   var n
   for n=0 to 200
      if uo.injournal('a backpack') then
         return 1
      endif
      wait(200)
   next
endsub

Re: Скрипт на лут

Posted: 2012-04-06 16:39:14
by aleksandr
не реагирует :cry:

Вот другой но берет все только по одной штучки (если 100 гп - брет 1 гп, если 8 Dead Wood - берет 1Dead Wood ) и с травой, бутылками также, как сделать чтобы брал все что есть без исключения?

Code: Select all

sub Looting() 
var t,l
t=1200
uo.UseObject('lastcorpse')
wait(t)
dim LootingItem[10]
uo.Print('Начинаем Лутать...')
LootingItem[1] = 0x0EED ## - Gold Coins
LootingItem[2] = 0x1BDD ## - logs
LootingItem[3] = 0x0F3F ## - arrows стрелы
LootingItem[5] = 0x0F90 ## - Dead Wood
uo.Print('Лут Закончен.')
for l=1 to 15
uo.FindType(LootingItem[l],"-1","lastcorpse")
if uo.FindCount()>0 and uo.GetDistance("lastcorpse")<=then
uo.Grab(-1,"finditem")
uo.Print('Найден предмет: '+str(uo.findcount()))
wait(t)
end if
next
end sub

Re: Скрипт на лут

Posted: 2012-04-06 21:48:46
by ZeroDX

Code: Select all

uo.Grab(1,"finditem")
=>

Code: Select all

uo.Grab(-1,"finditem")

Re: Скрипт на лут

Posted: 2012-04-07 16:55:49
by aleksandr
Спасибо все заработало,
конечно хотелось чтобы брал все без прописки вещей, а то бывает так два меча а берет только один?