Thread Tools Display Modes
06-21-11, 06:42 PM   #1
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
QuickQuestItem

I'm creating an addon that would automatically create/update a macro that could place a quest item into itself depending on the player target, or mouseover depending on if that unit is related to a quest with a quest item associated with it.

Currently what I have:

Pastebin: http://pastebin.com/Sjg5FbV9

So what I need to know basically at this point is how I would go about checking the unit for item associations.

I know that the tooltip shows quest information, and I can use GetContainerItemQuestInfo(bag,slot) for checking bags for quest items.

Any thoughts as to how I would go about fleshing this out?
  Reply With Quote
06-21-11, 09:15 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Have a look at IHML: http://www.wowinterface.com/download...eMacroLol.html

/edit: I'm not sure if what you want goes beyond what it does (I haven't used it in ages), but it's a starting point maybe.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
06-22-11, 12:16 AM   #3
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Seerah View Post
Have a look at IHML: http://www.wowinterface.com/download...eMacroLol.html

/edit: I'm not sure if what you want goes beyond what it does (I haven't used it in ages), but it's a starting point maybe.
I loved using this a while back for the Isle of Quel'Danas dailies, however it's almost completely hardcoded macros.

I'm not exactly sure how I can parse the tooltip for quest information. Is there some API to look at the tooltip for quests?
  Reply With Quote
06-22-11, 03:56 AM   #4
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Ouch, a nightmare. I don't think there is a 100% link between quests and the items you use in quests, not always. Some quests require you to use quest items that do not automatically appear on the quest watch frame and are not recognized as quest items at all.
  Reply With Quote
06-22-11, 10:28 AM   #5
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Vladinator View Post
Ouch, a nightmare. I don't think there is a 100% link between quests and the items you use in quests, not always. Some quests require you to use quest items that do not automatically appear on the quest watch frame and are not recognized as quest items at all.
I do understand that and I was planning to add a "learning" portion to the code.
  Reply With Quote
06-24-11, 09:24 AM   #6
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Bumping for any insight as to how I could go about looking at the tooltip!
  Reply With Quote
06-24-11, 10:26 AM   #7
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Just an idea, for example: http://www.wowhead.com/quest=24958

Many quests contain the item name in their text so even if not directly linked it may help to scan the quest text and check if any items match any quest phrases.
  Reply With Quote
06-24-11, 02:41 PM   #8
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
http://wowprogramming.com/docs/api/G...pecialItemInfo
  Reply With Quote
06-26-11, 12:26 PM   #9
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Thank you for those additional ideas, however I'm still not able to link the unit's names to the quest names without scanning their tooltips.

Can someone point me to an addon that scans the tooltip at some point?
  Reply With Quote
06-26-11, 01:01 PM   #10
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
When scanning the tooltip, you have to go through each line of the tooltip and compare its text to the text you want to find. Keep in mind that there are right and left sides. A unit's name is (unless an addon messes with it) the first line on the tooltip - this is the GameTooltipHeaderText line. When the tooltip is shown, check that line.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
06-26-11, 01:10 PM   #11
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Seerah View Post
When scanning the tooltip, you have to go through each line of the tooltip and compare its text to the text you want to find. Keep in mind that there are right and left sides. A unit's name is (unless an addon messes with it) the first line on the tooltip - this is the GameTooltipHeaderText line. When the tooltip is shown, check that line.
Would I just make a hook function to the OnShow?
  Reply With Quote
06-26-11, 01:45 PM   #12
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Yep. You can look at TipTop if you want.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
06-26-11, 06:28 PM   #13
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Seerah View Post
Yep. You can look at TipTop if you want.
I'll see what I can come up with and I'll post some progress!

Thank you all <3!
  Reply With Quote
06-27-11, 04:37 AM   #14
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Initial release!

http://www.wowinterface.com/download...o.php?id=20015

Please feel free to point out any changes I should make or some suggestions if any!

I have a small To Do list that I may need some help with eventually.

Not exactly sure if you can track the use of some items with no cooldown.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » QuickQuestItem


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off