Скрипт на лут

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
aleksandr
Posts: 3
Joined: 2012-04-05 22:49:10

Скрипт на лут

Post 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
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

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

Post 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
aleksandr
Posts: 3
Joined: 2012-04-05 22:49:10

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

Post 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
Last edited by aleksandr on 2012-04-07 16:56:56, edited 1 time in total.
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

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

Post by ZeroDX »

Code: Select all

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

Code: Select all

uo.Grab(-1,"finditem")
aleksandr
Posts: 3
Joined: 2012-04-05 22:49:10

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

Post by aleksandr »

Спасибо все заработало,
конечно хотелось чтобы брал все без прописки вещей, а то бывает так два меча а берет только один?
Post Reply