LF Gold trade announcer
Looking for a addon that announces how much gold i receive / lose to a certain person.
So it will pop up in /say chat /say Trade with X(Character's name) was completed. Received X (Amount of gold) /say Trade with X(Character's name) was completed. Lost X (Amount of gold) I do not know if a addon exist or if it would be easy to make. Let me know. Thank you anyways :) |
I don't know of such an AddOn, but I can *ahem* say that printing the message to /say or any other channel will get annoying very quickly for everybody around you. It would be much better as a message to yourself.
Tradeskillmaster is extreme overkill for only this feature, but it does track gold trades in its Ledger tab, along with sales and auctions. TSM does a whole host of other things, but if you only want that one thing, maybe some other commenters can think of a specialized AddOn. |
I would agree with myrroddin that it would get annoying quickly. This does not announce to a channel, but does track your money.
https://wowinterface.com/downloads/i...ntClassic.html There are others similar to this, but this was the first one that came to mind. |
If none of the suggested addons suit you and you can't find any others then maybe you can use this project as your first leap into addon writing.
A code example similar to what you are asking is at https://wow.gamepedia.com/User:Egingell/PLAYER_MONEY which could be a good help to your first project. |
Quote:
|
You could look into the following to incoporate that feature
https://wow.gamepedia.com/TRADE_ACCEPT_UPDATE https://wow.gamepedia.com/TRADE_SHOW https://wow.gamepedia.com/API_GetUnitName Of course if the other trade person targetted you first then it may not return a true value unless you make a point of targetting them yourself before completing the trade. However, this event may help you identify when someone has requested trade with you with arg1 being the result of the string format ERR_TRADE_REQUEST_S where the first word is the other player's name. The same event with arg1 being the result of the string format ERR_INITIATE_TRADE_S with the last value the players name will handle you trading with them. https://wow.gamepedia.com/CHAT_MSG_SYSTEM https://www.townlong-yak.com/framexm...balStrings.lua It all depends on what is the important element to the functionality. And may take a little play about with those functions to find the best combination of code to make it work. |
I use UnitName("npc") to get the name of the trading target for my addon.
Lua Code:
I got this from http://wowprogramming.com/docs/api_types#unitID before it was deleted. Edit: It's been quite a while since I found/used that, so I had a look in Blizzard's TradeFrame.lua, they use it to set the other player's name in the window: Lua Code:
UnitName is defined in the C portion of WoW's code, but GetUnitName is in UnitFrame.lua: Lua Code:
|
Quote:
|
Oh, that is handy to know as I would have thought that a player trade would require "target" rather than "npc" as a player would not be an npc. But I suppose Blizzard just made the code work functionally the same regardless of where the trader is an npc or player.
|
All times are GMT -6. The time now is 12:44 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI