Item stats

Have a macro idea but not sure where to start? Ask here.

Moderator: MacroQuest Developers

anon_coward
a lesser mummy
a lesser mummy
Posts: 40
Joined: Wed Mar 24, 2004 11:11 pm

Item stats

Post by anon_coward » Fri Jul 13, 2007 1:57 pm

I would like to write a macro to help me search for upgrades in the bazaar. However I'm having trouble finding the item stats.

Are item stats available in "item" objects? I don't see any way to get this directly. Would it work to bring up an item window for an item and then extract the text from the window?

Also, are "item" objects even available from "bazaaritem" (from the MQ2Bzsrch plugin)? I haven't dug into the code yet to see if bazaaritem inherits from item. But from the documentation it looks like you only get "int ItemID". I don't want to have to moveto and open the individual traders to access the "item" object since I want to compare dozens of items quickly.

Thanks for any pointers on how to access item stats in my macro.

deadchicken
a hill giant
a hill giant
Posts: 161
Joined: Thu Sep 28, 2006 1:00 pm

Post by deadchicken » Fri Jul 13, 2007 5:26 pm

DisplayItem is what you want, it's the info on the currently open Item window (you'll have to open it yourself) and the wiki is incomplete on this, so look at the Item struct for actual values.

Some of what you are looking for:

${DisplayItem.AC}
${DisplayItem.HP}
${DisplayItem.Mana}
.
.
etc

anon_coward
a lesser mummy
a lesser mummy
Posts: 40
Joined: Wed Mar 24, 2004 11:11 pm

Post by anon_coward » Fri Jul 13, 2007 6:29 pm

Great! Thanks for pointing me in the right direction. I guess the only thing left to figure out is how to open the DisplayItem for the bazaar search results. It looks like there are slots called bazaar1-80, which hopefully use the same index as the Bazaar.Item[n] list.

jacensolo
a snow griffon
a snow griffon
Posts: 427
Joined: Wed Feb 14, 2007 8:51 am
Location: Right behind you

Post by jacensolo » Sat Jul 14, 2007 8:35 am

Bazaar1-80 are the slots for itemnotify in the bazaar trader window. Heres how to find how to interact with a UI object:

Online way:
1. Look on the post titled "ScreenID Reference" in the Macro Help forums. It's a sticky. Look under whatever the window you want is called, and it should show the piece you want.
2. Use that info with /notify to do the action that you need.

Ingame way:
1. Open the window.
2. Use "/windows" and look in the list for the actual name for the window you want (can be skipped if you know it)
3. Use "/windows YourWindowName". That will give you the objects inside YourWindowName. One of them should be what you were looking for.
4. You can test it with /notify to make sure it works.

I don't know if it might be trickier with the bazaar window list, because rightclicking the name gives you an item window, and right clicking the trader gives you a find path, but you can experiment. Heres a sample (just guessing) of what the correct command might look like:

Code: Select all

// Note: ${x} must correspond to the number your item is on the list.
/notify BazaarWnd BW_Item_List listselect ${x}
/notify BazaarWnd BW_Item_List rightmouseup
Also, I can't get online right now to check, but isn't there a button in the bazaar window to display item info? If so, and if you cant get it to work right by right clicking the item list, you could just /notify that button.