Yoko

All sides of Injection
It is currently 2024-04-18 23:09:41

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Скрипт на лут
PostPosted: 2012-04-05 23:01:45 
Offline

Joined: 2012-04-05 22:49:10
Posts: 3
Нужен скрипт на лут простой чтобы при открытии трупа все оттуда забирал сам,
этот вроде должен работать, но при запуске ничего не происходит, запуск с открытым трупом ошибку выдает "checklag" и берет по одной вещи

Code:
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


Top
   
PostPosted: 2012-04-06 03:05:56 
Offline
Expert!
User avatar

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

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
PostPosted: 2012-04-06 16:39:14 
Offline

Joined: 2012-04-05 22:49:10
Posts: 3
не реагирует :cry:

Вот другой но берет все только по одной штучки (если 100 гп - брет 1 гп, если 8 Dead Wood - берет 1Dead Wood ) и с травой, бутылками также, как сделать чтобы брал все что есть без исключения?
Code:
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.

Top
   
PostPosted: 2012-04-06 21:48:46 
Offline
User avatar

Joined: 2006-12-08 10:51:50
Posts: 718
Location: Москва
Code:
uo.Grab(1,"finditem")
=>
Code:
uo.Grab(-1,"finditem")


Top
   
PostPosted: 2012-04-07 16:55:49 
Offline

Joined: 2012-04-05 22:49:10
Posts: 3
Спасибо все заработало,
конечно хотелось чтобы брал все без прописки вещей, а то бывает так два меча а берет только один?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: Google [Bot] and 9 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited