Yoko

All sides of Injection
It is currently 2025-11-02 21:42:59

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: differing 2 items
PostPosted: 2005-08-12 18:04:43 
Offline

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


Top
   
 Post subject:
PostPosted: 2005-08-12 18:12:25 
Offline
Expert!
User avatar

Joined: 2005-01-15 19:15:05
Posts: 791
Location: Dragon World
You can do it by using message in journal which appears when you click on necessary item.
For exemple:
Code:
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


Top
   
 Post subject:
PostPosted: 2005-08-12 18:56:00 
Offline

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


Top
   
 Post subject:
PostPosted: 2005-08-12 19:00:20 
Offline
Expert!
User avatar

Joined: 2005-01-15 19:15:05
Posts: 791
Location: Dragon World
I don't know any more ways to differ two items with the same colors and types.


Top
   
 Post subject:
PostPosted: 2005-08-13 02:25:28 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Well, you could use something like this:

Code:
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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited