Quantcast
GoldFish Addon Idea! - WoWInterface
Thread Tools Display Modes
09-28-11, 04:33 AM   #1
Grim077
A Deviate Faerie Dragon
 
Grim077's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 15
Post GoldFish Addon Idea!

I cannot make this addon Myself so i'm asking if anyone would be willing to make it.

GoldFish
Click image for larger version

Name:	GoldFish-Preview.png
Views:	209
Size:	282.9 KB
ID:	6527
Is an addon that Selects a Quest item that is worth the most Gold,
The other thing this addon does is,
it also shows the Items you may be able to use, Judging by your Class,
Click image for larger version

Name:	Maybe Useful.png
Views:	146
Size:	172.6 KB
ID:	6528 Maybe Useful to you,
Click image for larger version

Name:	GoldFish.png
Views:	139
Size:	50.1 KB
ID:	6529 Is worth the most gold,

Such as an Item that might be better then what you have Equipped,
So that you don't over look the item and wish that you knew where i lived so you
Could find me and Kill me because of it, so anyway this is a pretty Nifty addon
Idea If i do say so my self
__________________
I see you, But you can't see me!

Last edited by Grim077 : 09-29-11 at 02:47 AM.
  Reply With Quote
09-28-11, 04:57 AM   #2
humfras
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 131
OneChoice by Kaelten features something like this.

http://wow.curse.com/downloads/wow-a...onechoice.aspx
__________________
Author of VuhDo CursorCastBar OptiTaunt Poisoner RaidMobMarker
  Reply With Quote
09-28-11, 06:14 AM   #3
Grim077
A Deviate Faerie Dragon
 
Grim077's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 15
yeah but i'm not looking for stats i'm looking for one to tell you what one give you the most Gold.
__________________
I see you, But you can't see me!
  Reply With Quote
09-28-11, 06:53 AM   #4
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 361
Have you looked at VendorBait?
  Reply With Quote
09-28-11, 07:16 AM   #5
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 792
The only issue I see is that the default frame has a limit of like, 4 or 6 quest rewards -so having a quest that rewards let's say, 5 items, then you only got room for 1 more button on it without having to alter and add more frames, and basically having to do a lot of more work to make it show properly.

On the topic of "is this better for you" is a big project, I've so far used askmrrobot stats weight for (was some work, haven't had time to do the other classes) and pretty much managed to get some sort of score number that returns a positive integer if the gear is a upgrade or negative if not, the better the higher score, i.e. 0-50 minor and must be consulted with player, while anything over 50 is a define upgrade (or something like this).

Oh I am talking nonsense now! Well in any case, are there any known libraries to help check for what item is better for you (comparing two items)? So far I think not, I tried to find but found none... If not I could release a libstub that people could use in their addons to find out what item is better for players spec.
  Reply With Quote
09-28-11, 08:48 AM   #6
humfras
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 131
Originally Posted by Grim077 View Post
yeah but i'm not looking for stats i'm looking for one to tell you what one give you the most Gold.
Well, that's what the golden "MV" symbol is displaying...
__________________
Author of VuhDo CursorCastBar OptiTaunt Poisoner RaidMobMarker
  Reply With Quote
09-28-11, 11:21 AM   #7
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,934
This is code that I wrote for this exact purpose. I changed it from actually selecting the item to showing the highest vendor price with a colored border. This was because I've continually made the mistake of getting into the habit of clicking "Continue" before changing the selection to an item I actually needed.

lua Code:
  1. local highlight=QuestInfoItemHighlight:GetRegions();
  2. local selectbutton=QuestInfoItem_OnClick;
  3. hooksecurefunc("QuestInfoItem_OnClick",function(self) highlight:SetVertexColor(1,1,1); end);
  4. QuestFrame:HookScript("OnEvent",function(self,event,...)
  5.     if event=="QUEST_COMPLETE" or event=="QUEST_ITEM_UPDATE" then
  6.         local numchoices=GetNumQuestChoices();
  7.         local maxid,maxval=0,-1;
  8.         for i=1,numchoices do
  9.             local link=GetQuestItemLink("choice",i);
  10.             if not link then return; end
  11.  
  12.             local price=select(11,GetItemInfo(link))*select(3,GetQuestItemInfo("choice",i));
  13.             if price>maxval then
  14.                 maxid,maxval=i,price;
  15.             end
  16.         end
  17.         if maxid>0 then
  18.             selectbutton(_G["QuestInfoItem"..maxid]);
  19.             highlight:SetVertexColor(0,1,0);
  20.             QuestInfoFrame.itemChoice=0;--  Hack to deselect choice
  21.         end
  22.     end
  23. end);
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 09-28-11 at 01:20 PM.
  Reply With Quote
09-28-11, 12:24 PM   #8
fixitman333
A Fallenroot Satyr
Join Date: Jan 2009
Posts: 27
OneChoice or VendorBait, with RatingBuster already do what you're trying to do. They do it simply, with as little overhead as possible. No point reinventing the wheel (frame), when it serves the purpose just fine as-is.
  Reply With Quote
09-28-11, 01:28 PM   #9
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,934
Originally Posted by fixitman333 View Post
They do it simply, with as little overhead as possible. No point reinventing the wheel (frame), when it serves the purpose just fine as-is.
Actually, there is a point. Some people might not the additional features of OneChoice and I could write even more efficient code than what's in VendorBait. Evolution in technology often involves improving an existing design.

For example of ways to make an addon even lighter.
  • Least amount of UI objects created. (They take up memory too and cannot be garbage collected)
  • Whenever possible, use what already exists in the environment you're working with.
  • Less code (conditional checks, function calls, calculations, etc.) means less CPU time.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
09-28-11, 02:29 PM   #10
humfras
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 131
Originally Posted by SDPhantom View Post
Actually, there is a point. Some people might not the additional features of OneChoice and I could write even more efficient code than what's in VendorBait. Evolution in technology often involves improving an existing design.

For example of ways to make an addon even lighter.
  • Least amount of UI objects created. (They take up memory too and cannot be garbage collected)
  • Whenever possible, use what already exists in the environment you're working with.
  • Less code (conditional checks, function calls, calculations, etc.) means less CPU time.
"You take the lead!"

Grim077 should adapt your code to modify it to his needs.
(Isn't to hard to create a Texture with your Goldfish and place it to the correct quest reward.)

Give it a try, Grim077, and let use see your results
__________________
Author of VuhDo CursorCastBar OptiTaunt Poisoner RaidMobMarker
  Reply With Quote
09-28-11, 05:38 PM   #11
tinyu
A Molten Giant
 
tinyu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 838
http://www.wowinterface.com/download...QuestItem.html

this is what you want it can

a) you choose a item then complete the quest
b) you choose a item that you can use and click "complete and equip selected"
c) if you cant use or dont want anything it can auto choose highest valuce (as long as you havnt selected anything)
__________________
"There's no such thing as too many addons."
Lothaer
Titan Dev Team Member.
  Reply With Quote
09-29-11, 02:51 AM   #12
Grim077
A Deviate Faerie Dragon
 
Grim077's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 15
Originally Posted by humfras View Post
"You take the lead!"

Grim077 should adapt your code to modify it to his needs.
(Isn't to hard to create a Texture with your Goldfish and place it to the correct quest reward.)

Give it a try, Grim077, and let use see your results
^.^ but like i said i can't make it, So that's why I'm asking if anyone could make it for me, I wish i could do it myself but i can't
__________________
I see you, But you can't see me!
  Reply With Quote
09-29-11, 02:54 AM   #13
Grim077
A Deviate Faerie Dragon
 
Grim077's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 15
Talking

Originally Posted by SDPhantom View Post
Actually, there is a point. Some people might not the additional features of OneChoice and I could write even more efficient code than what's in VendorBait. Evolution in technology often involves improving an existing design.

For example of ways to make an addon even lighter.
  • Least amount of UI objects created. (They take up memory too and cannot be garbage collected)
  • Whenever possible, use what already exists in the environment you're working with.
  • Less code (conditional checks, function calls, calculations, etc.) means less CPU time.


If you would be willing to do it, I would very much appreciate it.
__________________
I see you, But you can't see me!
  Reply With Quote
09-29-11, 05:24 AM   #14
fixitman333
A Fallenroot Satyr
Join Date: Jan 2009
Posts: 27
Originally Posted by SDPhantom View Post
Actually, there is a point. Some people might not the additional features of OneChoice and I could write even more efficient code than what's in VendorBait. Evolution in technology often involves improving an existing design.

For example of ways to make an addon even lighter.
  • Least amount of UI objects created. (They take up memory too and cannot be garbage collected)
  • Whenever possible, use what already exists in the environment you're working with.
  • Less code (conditional checks, function calls, calculations, etc.) means less CPU time.
The OP is looking for someone to write an addon with very specific needs in mind. All these needs are already taken care of with other addons. I simply made this point clear. No-one has actually taken the time to write a new addon, and the OP could already have what was asked for with a few clicks. I don't see where Grim077 requested more efficient code, do you?

C'mon, at least read the original post before replying.....
  Reply With Quote
09-29-11, 07:16 AM   #15
tinyu
A Molten Giant
 
tinyu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 838
Originally Posted by tinyu View Post
http://www.wowinterface.com/download...QuestItem.html

this is what you want it can

a) you choose a item then complete the quest
b) you choose a item that you can use and click "complete and equip selected"
c) if you cant use or dont want anything it can auto choose highest valuce (as long as you havnt selected anything)
this mod can do what he wants.
__________________
"There's no such thing as too many addons."
Lothaer
Titan Dev Team Member.
  Reply With Quote
09-29-11, 08:31 AM   #16
Grim077
A Deviate Faerie Dragon
 
Grim077's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 15
Originally Posted by SDPhantom View Post
This is code that I wrote for this exact purpose. I changed it from actually selecting the item to showing the highest vendor price with a colored border. This was because I've continually made the mistake of getting into the habit of clicking "Continue" before changing the selection to an item I actually needed.

lua Code:
  1. local highlight=QuestInfoItemHighlight:GetRegions();
  2. local selectbutton=QuestInfoItem_OnClick;
  3. hooksecurefunc("QuestInfoItem_OnClick",function(self) highlight:SetVertexColor(1,1,1); end);
  4. QuestFrame:HookScript("OnEvent",function(self,event,...)
  5.     if event=="QUEST_COMPLETE" or event=="QUEST_ITEM_UPDATE" then
  6.         local numchoices=GetNumQuestChoices();
  7.         local maxid,maxval=0,-1;
  8.         for i=1,numchoices do
  9.             local link=GetQuestItemLink("choice",i);
  10.             if not link then return; end
  11.  
  12.             local price=select(11,GetItemInfo(link))*select(3,GetQuestItemInfo("choice",i));
  13.             if price>maxval then
  14.                 maxid,maxval=i,price;
  15.             end
  16.         end
  17.         if maxid>0 then
  18.             selectbutton(_G["QuestInfoItem"..maxid]);
  19.             highlight:SetVertexColor(0,1,0);
  20.             QuestInfoFrame.itemChoice=0;--  Hack to deselect choice
  21.         end
  22.     end
  23. end);

This works perfectly for what i want thanks, but is there anyway you could make it also tell you theres an item that you may be able to use.
__________________
I see you, But you can't see me!
  Reply With Quote
09-29-11, 02:29 PM   #17
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,934
Originally Posted by Grim077 View Post
This works perfectly for what i want thanks, but is there anyway you could make it also tell you theres an item that you may be able to use.
I'm not sure if this is already done by the default UI or if it's Altoholic doing it, but the unusable items on my client are tinted red on the QuestFrame. I can look into a way of adapting my code to do this too while keeping the resource usage to the bare minimum.

Edit: The default UI is tinting the item icon for quest rewards. I tested it with all addons disabled.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 09-29-11 at 03:02 PM.
  Reply With Quote
09-29-11, 03:12 PM   #18
brotherhobbes
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 313
Originally Posted by SDPhantom View Post
Edit: The default UI is tinting the item icon for quest rewards. I tested it with all addons disabled.
The default UI tints items that you can not equip as red. If you play as a plate class, many times nothing will be tinted red.
  Reply With Quote
09-29-11, 03:22 PM   #19
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,934
You technically can use cloth/leather/mail items on a plate-wearer, you'll be laughed out of groups for it, but for example, it's still viable for a holy paladin to use non-plate healer gear in earlier levels, and that's where most of your questing is.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
09-29-11, 11:19 PM   #20
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,934
Here's some code I'm posting separately since it spans past the realm of just quest rewards. This will change the color of any item still usable, but differs from the preferred armor type of your character to a blue tint. This doesn't look at stats, just whether it's cloth/leather/mail/plate and compares it to what type you should be wearing for your class.

Combined with what the default UI already does, this means red-tinted items are unusable while blue-tinted items are still usable, but not the best type to do so. This affects mail attachments, vendors, quest info, and trade windows, the same areas the default UI handles.

lua Code:
  1. local UpdateItemButtonUsableColor; do
  2.     local ItemClassLookup={GetAuctionItemClasses()}; for i,j in ipairs(ItemClassLookup) do
  3.         local sub={[0]=i,GetAuctionItemSubClasses(i)};
  4.         ItemClassLookup[j]=sub;
  5.         for k,l in ipairs(sub) do sub[l]=k; end
  6.     end
  7.  
  8.     local EquipLocations={
  9.         INVTYPE_HEAD        =true;
  10.         INVTYPE_SHOULDER    =true;
  11.         INVTYPE_CHEST       =true;
  12.         INVTYPE_ROBE        =true;
  13.         INVTYPE_WAIST       =true;
  14.         INVTYPE_LEGS        =true;
  15.         INVTYPE_FEET        =true;
  16.         INVTYPE_WRIST       =true;
  17.         INVTYPE_HAND        =true;
  18.     }
  19.  
  20.     local ArmorPreferenceData={
  21.         CLOTH       ={2,2};
  22.         LEATHER     ={3,3};
  23.         LEATHER_MAIL    ={3,4};
  24.         MAIL_PLATE  ={4,5};
  25.         PLATE       ={5,5};
  26.     }
  27.     local ClassArmorPreference={
  28. --      Cloth
  29.         MAGE        =ArmorPreferenceData.CLOTH;
  30.         PRIEST      =ArmorPreferenceData.CLOTH;
  31.         WARLOCK     =ArmorPreferenceData.CLOTH;
  32.  
  33. --      Leather
  34.         DRUID       =ArmorPreferenceData.LEATHER;
  35.         ROGUE       =ArmorPreferenceData.LEATHER;
  36.  
  37. --      Leather/Mail
  38.         HUNTER      =ArmorPreferenceData.LEATHER_MAIL;
  39.         SHAMAN      =ArmorPreferenceData.LEATHER_MAIL;
  40.  
  41. --      Mail/Plate
  42.         WARRIOR     =ArmorPreferenceData.MAIL_PLATE;
  43.         PALADIN     =ArmorPreferenceData.MAIL_PLATE;
  44.  
  45. --      Plate
  46.         DEATHKNIGHT =ArmorPreferenceData.PLATE;
  47.     };
  48.  
  49.     local PlayerClass;
  50.     UpdateItemButtonUsableColor=function(btn,item,flag)
  51.         if not PlayerClass then PlayerClass=select(2,UnitClass("player")); end
  52.         if not item then return; end
  53.  
  54.         local lvlid=(UnitLevel("player")<40 and 1 or 2);
  55.         local class,sub,_,loc=select(6,GetItemInfo(item));
  56.         local classdata=ItemClassLookup[class];
  57.  
  58.         if  EquipLocations[loc]
  59.         and classdata[sub]>1 and classdata[sub]<6
  60.         and sub~=classdata[ClassArmorPreference[PlayerClass][lvlid]]
  61.         then
  62.             local int=1;
  63.             if bit.band(flag,16)>0 then int=0.5; end
  64.  
  65.             if bit.band(flag,1)>0 then SetItemButtonTextureVertexColor(btn,0,0,int); end
  66.             if bit.band(flag,2)>0 then SetItemButtonNameFrameVertexColor(btn,0,0,int); end
  67.             if bit.band(flag,4)>0 then SetItemButtonSlotVertexColor(btn,0,0,int); end
  68.             if bit.band(flag,8)>0 then SetItemButtonNormalTextureVertexColor(btn,0,0,int); end
  69.         end
  70.     end;
  71. end
  72.  
  73. hooksecurefunc("OpenMailFrame_UpdateButtonPositions",function()
  74.     for i=1,ATTACHMENTS_MAX_RECEIVE do
  75.         if select(5,GetInboxItem(InboxFrame.openMailID,i)) then
  76.             UpdateItemButtonUsableColor(_G["OpenMailAttachmentButton"..i],GetInboxItemLink(InboxFrame.openMailID,i),1);
  77.         end
  78.     end
  79. end);
  80.  
  81. hooksecurefunc("MerchantFrame_UpdateMerchantInfo",function()
  82.     local numitems=GetMerchantNumItems();
  83.     for i=1,MERCHANT_ITEMS_PER_PAGE do
  84.         local id=((MerchantFrame.page-1)*MERCHANT_ITEMS_PER_PAGE)+i;
  85.         if id>numitems then break; end
  86.  
  87.         local name,_,_,_,avail,usable=GetMerchantItemInfo(id);
  88.         if name and usable then--   usable may return true even when it's not an item
  89.             local mercbtn=_G["MerchantItem"..i];
  90.             local itembtn=_G["MerchantItem"..i.."ItemButton"];
  91.             local link=GetMerchantItemLink(id);
  92.  
  93.             if avail==0 then--  -1 is infinite
  94.                 UpdateItemButtonUsableColor(mercbtn,link,22);
  95.                 UpdateItemButtonUsableColor(itembtn,link,25);
  96.             else
  97.                 UpdateItemButtonUsableColor(mercbtn,link,6);
  98.                 UpdateItemButtonUsableColor(itembtn,link,9);
  99.             end
  100.         end
  101.     end
  102. end);
  103.  
  104. hooksecurefunc("QuestInfo_ShowRewards",function()
  105.     local isquestlog=QuestInfoFrame.questLog;
  106.     local numchoice=(isquestlog and GetNumQuestLogChoices() or GetNumQuestChoices());
  107.     local numreward=(isquestlog and GetNumQuestLogRewards() or GetNumQuestRewards());
  108.  
  109.     for i=1,numchoice do
  110.         if select(5,_G[isquestlog and "GetQuestLogChoiceInfo" or "GetQuestItemInfo"](isquestlog and i or "choice",i)) then
  111.             UpdateItemButtonUsableColor(
  112.                 _G["QuestInfoItem"..i]
  113.                 ,_G[isquestlog and "GetQuestLogItemLink" or "GetQuestItemLink"]("choice",i)
  114.                 ,3
  115.             );
  116.         end
  117.     end
  118.  
  119.     for i=1,numreward do
  120.         if select(5,_G[isquestlog and "GetQuestLogRewardInfo" or "GetQuestItemInfo"](isquestlog and i or "reward",i)) then
  121.             UpdateItemButtonUsableColor(
  122.                 _G["QuestInfoItem"..(numchoice+i)]
  123.                 ,_G[isquestlog and "GetQuestLogItemLink" or "GetQuestItemLink"]("reward",i)
  124.                 ,3
  125.             );
  126.         end
  127.     end
  128. end);
  129. QUEST_TEMPLATE_DETAIL2.elements[13]=QuestInfo_ShowRewards;
  130. QUEST_TEMPLATE_LOG.elements[28]=QuestInfo_ShowRewards;
  131. QUEST_TEMPLATE_REWARD.elements[7]=QuestInfo_ShowRewards;
  132. QUEST_TEMPLATE_MAP2.elements[1]=QuestInfo_ShowRewards;
  133.  
  134. hooksecurefunc("TradeFrame_UpdateTargetItem",function(id)
  135.     if select(5,GetTradeTargetItemInfo(id)) then
  136.         local link=GetTradeTargetItemLink(id);
  137.         UpdateItemButtonUsableColor(_G["TradeRecipientItem"..id.."ItemButton"],link,1);
  138.         UpdateItemButtonUsableColor(_G["TradeRecipientItem"..id],link,6);
  139.     end
  140. end);

Edit1: Fixed problems with random items like cloaks misreading as cloth armor. Now checks on equip location too before deciding whether to tint the item.
Edit2: Fixed an error with the QuestFrame sometimes not having the items ready when calling the QuestInfo_ShowRewards() function.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 09-30-11 at 02:28 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » GoldFish Addon Idea!

Thread Tools
Display Modes

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