Фильтр для AutoLoota

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
rezident
Posts: 7
Joined: 2012-02-18 14:11:32

Фильтр для AutoLoota

Post by rezident »

Вообщем юзаю этот отличный пылесос

возник вопрос можно ли заблокировать какие-то итемы в поиске?

нашел только скрипты которые лутают определенный шмот, но это не подходит.
Nmy wrote:

Code: Select all

sub Lootall()
	var n, corpse	
	if (uo.getserial('backpack') <> uo.getserial('lastcontainer')) then
		uo.ignorereset()
		corpse=uo.getserial('lastcontainer')
		uo.findtype(-1,-1,corpse)
		while uo.findcount()
			n=uo.getserial('finditem')
			uo.moveitem('finditem',0,'backpack')
			uo.print(' item '+str(uo.findcount()))
			checklag()
			wait(600)
			uo.findtype(-1,-1,corpse)
			if uo.findcount() then
				if n==uo.getserial('finditem') then
					uo.ignore('finditem')
					uo.findtype(-1,-1,corpse)
				endif
			endif
		wend
	endif
	uo.print(' -= Done =- ')
endsub
rezident
Posts: 7
Joined: 2012-02-18 14:11:32

Re: Фильтр для AutoLoota

Post by rezident »

и еще 1 вопрос) можно как-то дописать чтоб оно лутало в контейнер X, а не в общую сумку.
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Фильтр для AutoLoota

Post by ZeroDX »

Code: Select all

sub Lootall()
    var n = 0, ok, corpse, i, container = '0x12345678'    ; Контейнер-приемник
    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
Last edited by ZeroDX on 2012-02-19 15:02:33, edited 2 times in total.
rezident
Posts: 7
Joined: 2012-02-18 14:11:32

Re: Фильтр для AutoLoota

Post by rezident »

Line 16: Variable undefined - I

Вот как изменил

sub Lootall()
var n = 0, ok = 1, corpse, container = '0x401247C9' ; Контейнер-приемник
dim ignore[4] ; Общее кол-во элементов в массиве
ignore[0] = '0x144F' ; bone armor
ignore[1] = '0x1452' ; bone legs
ignore[2] = '0x1451' ; bone helmet
ignore[3] = '0x144E' ; bone arms
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
for i = 0 to 3 ; Общее кол-во элементов в массиве минус один
if uo.getgraphic('finditem') == ignore 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
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Фильтр для AutoLoota

Post by ZeroDX »

обновил пост со скриптом. изменение только во 2-ой строке

Code: Select all

var n = 0, ok = 1, corpse, i, container = '0x12345678'    ; Контейнер-приемник

Code: Select all

dim ignore[4] ; Общее кол-во элементов в массиве
 ignore[0] = '0x144F' ; bone armor
 ignore[1] = '0x1452' ; bone legs
 ignore[2] = '0x1451' ; bone helmet
 ignore[3] = '0x144E' ; bone arms
Ты можешь добавить или убавить строки.
rezident
Posts: 7
Joined: 2012-02-18 14:11:32

Re: Фильтр для AutoLoota

Post by rezident »

это я понял) я так для теста 4 оставил)
и сюда
for i = 0 to 3 ; Общее кол-во элементов в массиве минус один
(х-1) вставить как я понял
rezident
Posts: 7
Joined: 2012-02-18 14:11:32

Re: Фильтр для AutoLoota

Post by rezident »

вообщем не работает) так как он доходит до заигнориной шмотки и перестает лутать все остальное.
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Фильтр для AutoLoota

Post by ZeroDX »

rezident wrote:вообщем не работает) так как он доходит до заигнориной шмотки и перестает лутать все остальное.
исправил
Mirage
Posts: 2802
Joined: 2009-05-28 09:58:28
Location: Иваново
Contact:

Re: Фильтр для AutoLoota

Post by Mirage »

n=uo.getserial('finditem')
Строка не нужна. Масло масленое.
rezident
Posts: 7
Joined: 2012-02-18 14:11:32

Re: Фильтр для AutoLoota

Post by rezident »

ZeroDX wrote:
rezident wrote:вообщем не работает) так как он доходит до заигнориной шмотки и перестает лутать все остальное.
исправил
спс
отлично работает)
rezident
Posts: 7
Joined: 2012-02-18 14:11:32

Re: Фильтр для AutoLoota

Post by rezident »

в твоем скрипте очень много того что мне не нужно) а так как я пока слаб в правлении скриптов) мне сложно будет изменить твой скрипт под себя
Last edited by rezident on 2012-02-20 18:05:25, edited 1 time in total.
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Фильтр для AutoLoota

Post by ZeroDX »

Mirage
Posts: 2802
Joined: 2009-05-28 09:58:28
Location: Иваново
Contact:

Re: Фильтр для AutoLoota

Post by Mirage »

ну вот а я там так расписывал :|
Post Reply