скрипт игнорит color

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
teror
Posts: 79
Joined: 2005-09-11 00:53:44

скрипт игнорит color

Post by teror »

подскажите почему, скрипт игнорирует цвет вещей
вот кусочек отвечающий за лут...

Code: Select all

Item[1] = ('0x1B7A, 0x0613') 
Item[2] = ('0x1B7B, 0x0613')
Item[3] = ('0x13BF, 0x0613')
 
uo.findtype(Item[l],"-1","lastcorpse")
if uo.FindCount()>0 and uo.GetDistance("lastcorpse")<=3 then
uo.Grab(1,"finditem")
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all

Item[1] = ('0x1B7A, 0x0613') 

uo.FIndType(Item[i],'-1','backpack')


Думаю потому что он подставляет в параметр "тип" твои значения не разделяя их на "тип" и "цвет".

Решение вопроса.
1. Убери цвет из массива и оставь там только типы, и ищи все цвета оставив в параметре поиска по цвету '-1'
2. Создай второй массив цветов и в случае нахождения по типу запускай проверку по цвету
teror
Posts: 79
Joined: 2005-09-11 00:53:44

Post by teror »

будем пробовать.
teror
Posts: 79
Joined: 2005-09-11 00:53:44

Post by teror »

что-то у меня не получается связать цвет и тайп...
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

Code: Select all

Item[1] = '0x1B7A 0x0613' 
Item[2] = '0x1B7B 0x0613'
Item[3] = '0x13BF 0x0613'
 
uo.exec( "findtype "+ Item[l] + " lastcorpse")
if uo.FindCount()>0 and uo.GetDistance("lastcorpse")<=3 then
uo.Grab(1,"finditem")


Ну как вариант..
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
Post Reply