differing 2 items

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
verY
Posts: 8
Joined: 2005-07-14 20:04:18

differing 2 items

Post 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
Leo
Expert!
Posts: 791
Joined: 2005-01-15 19:15:05
Location: Dragon World
Contact:

Post 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
verY
Posts: 8
Joined: 2005-07-14 20:04:18

Post 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
Leo
Expert!
Posts: 791
Joined: 2005-01-15 19:15:05
Location: Dragon World
Contact:

Post by Leo »

I don't know any more ways to differ two items with the same colors and types.
flake
Expert!
Posts: 746
Joined: 2004-08-11 23:56:17
Location: The Citadel
Contact:

Post 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
Post Reply