Page 1 of 1

differing 2 items

Posted: 2005-08-12 18:04:43
by verY
ok heres my problem:
i have 2 items that have the same <type> and also the same <color>, the only thing that differs them is their <name> so how would i differentiate between them?
if you have 2 items of the same <type> you can still differ them by using their <color>.
example: usetype <type of the item> <color of the item>

is there any command that involves name check?

thx for replies

Posted: 2005-08-12 18:12:25
by Leo
You can do it by using message in journal which appears when you click on necessary item.
For exemple:

Code: Select all

var katana = '0x13FF' 
var sunduk = '0x55F4CE8F' #container ID
sub findkatana()
UO.UseObject(sunduk)
UO.FindType(katana, '-1', sunduk)
while UO.GetQuantity('finditem') > 0
UO.Click('finditem')
Wait(100)
If UO.InJournal('magic') then
UO.MoveItem('finditem','-1', 'backpack')
UO.DeleteJournal()
endif
wend
endsub

Posted: 2005-08-12 18:56:00
by verY
yea thx for the quick reply, and i thank you for giving even a good example..
but i already thought about checking their name in journal, and it takes simply too much time. you wouldnt want to wait for the check when you push your heal potion macro and it first has to check journal to see which potion it should drink.

if theres no other possibility it seems like i have to simply add 2 objects and initiate them(from target).. but whenever you die or make the stack of the items bigger(yea the item is stackable) you would have to initiate the objects again.. that would kinda suck

Posted: 2005-08-12 19:00:20
by Leo
I don't know any more ways to differ two items with the same colors and types.

Posted: 2005-08-13 02:25:28
by flake
Well, you could use something like this:

Code: Select all

Sub test()
VAR a = 0
UO.FindType( type, color)
  While UO.FindCount() AND a == 0
    If UO.GetName( 'finditem' ) == 'needed_name' Then
      UO.UseObject( 'finditem' )
      a = 1
    Else
      UO.Ignore( 'finditem' )
      UO.FindType( type, color)
   EndIf
  Wait(50)
  Wend
endsub