Page 1 of 1
Фильтр для AutoLoota
Posted: 2012-02-18 14:20:33
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
Re: Фильтр для AutoLoota
Posted: 2012-02-18 17:15:24
by rezident
и еще 1 вопрос) можно как-то дописать чтоб оно лутало в контейнер X, а не в общую сумку.
Re: Фильтр для AutoLoota
Posted: 2012-02-18 17:28:25
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
Re: Фильтр для AutoLoota
Posted: 2012-02-18 20:01:21
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[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: Фильтр для AutoLoota
Posted: 2012-02-18 22:12:09
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
Ты можешь добавить или убавить строки.
Re: Фильтр для AutoLoota
Posted: 2012-02-18 23:01:08
by rezident
это я понял) я так для теста 4 оставил)
и сюда
for i = 0 to 3 ; Общее кол-во элементов в массиве минус один
(х-1) вставить как я понял
Re: Фильтр для AutoLoota
Posted: 2012-02-19 13:51:23
by rezident
вообщем не работает) так как он доходит до заигнориной шмотки и перестает лутать все остальное.
Re: Фильтр для AutoLoota
Posted: 2012-02-19 14:17:03
by Mirage
Re: Фильтр для AutoLoota
Posted: 2012-02-19 15:02:46
by ZeroDX
rezident wrote:вообщем не работает) так как он доходит до заигнориной шмотки и перестает лутать все остальное.
исправил
Re: Фильтр для AutoLoota
Posted: 2012-02-19 20:20:30
by Mirage
n=uo.getserial('finditem')
Строка не нужна. Масло масленое.
Re: Фильтр для AutoLoota
Posted: 2012-02-20 15:18:38
by rezident
ZeroDX wrote:rezident wrote:вообщем не работает) так как он доходит до заигнориной шмотки и перестает лутать все остальное.
исправил
спс
отлично работает)
Re: Фильтр для AutoLoota
Posted: 2012-02-20 15:19:51
by rezident
в твоем скрипте очень много того что мне не нужно) а так как я пока слаб в правлении скриптов) мне сложно будет изменить твой скрипт под себя
Re: Фильтр для AutoLoota
Posted: 2012-02-20 16:33:08
by ZeroDX
Re: Фильтр для AutoLoota
Posted: 2012-02-20 18:41:40
by Mirage
ну вот а я там так расписывал
