Trade Secretary: Ad Repeater

As of May 20, 2009: This addon is unsupported for the time being. AddOn authoring was only a hobby of mine. Mike-N-Go is not currently playing WoW, thus not creating or maintaining mods for WoW. If someone wishes to submit a patch for one of my mods to WoWInterface, you may within the bounds of the license bundled with the mod.

Recent Changes and Important Information: Version 30400-0.1.03 and might not be fully compatible with WoW 3.1. Please use my other mod, SayAgain, as an alternative if you have any problems with Ad Repeater.
Version: 30100-0.1.03
Last update: 04-26-09
This mod is only recently developed. The code is the author's main focus and development; the documentation might be slightly incorrect or misleading for this version; the first version. The next version is planed to focus on
Requesting user feedback, and suggestions; do check if your suggestion is under "Future expansion, additions, planed features, etc " before you type it out, because it might already be in the works, unless you wish to expand on something listed there.
If you find a bug, please make sure it is not listed under "Caveats, Known Bugs, etc." before submitting a report
If anyone has any suggestions on how to make the code or documentation better, please contact me, email preferred.
Additional and more extensive instructions are provided in the documentation ors the included ReadMe.
Updates: Point your browser to http://www.wowinterface.com under "Trade Secretary: Ad Repeater"
Recommended: Swatter! to catch and fix errorsNote: Due to the setup and intuition required to make this mod work, read all the included documentation before using this mod or asking for help. Also, you need to declare the advertisements; IT CANNOT ADVERTISE WITHOUT BEING TOLD WHAT TO SAY!
Donate with PayPal at [email protected]

Brief Description:
Ever get board of pressing your spam-to-trade macros? Desire to go beyond space-hogging macros to spam more eloquent, unique, and non-repetitive? Look no further! Trade Secretary: Ad Repeater is a mod that allows you to define a rotation of your advertisements, and autonomously send them to the trade channel or a button press. Trade Secretary: Ad Repeater can announce your ads to trade chat as frequently or infrequently as you desire. Basically, this AddOn is an attempt to fix the trade channel into a more interesting, useful message board that has unique, interesting advertisements.

About the Name:
Why is this called "Trade Secretary: Ad Repeater," you ask? Well, this version of "Trade Secretary" is made to repeat ads to the trade channel, and would be the second installment of a future suite that gives one a secretary for their trading, and other secretary-like activities whenever I happen to make them.

Feedback requested, but not limited to:
• Timing of ads
• Ease of use
• Any questions about string or table construction
• Any problems loading with AddOn Loader installed?
• What do you think of the rate that ads are sent to the channel? A minimum delayed is set as to not annoy trade of your constant messages

Installation:
After you decompress the file, copy the TradeSecretaryAd folder into your Interface/AddOns folder under your World of Warcraft Installation Directory.

Upgrading:
When updating TradeSecretaryAd, please make sure to have a copy of MyAds.lua saved! You will need to drag your old MyAds.lua, and only MyAds.lua, to the new folder unless otherwise stated; a future version is planed to allow you to enter your ads through the saved variables. Make sure to check on the update for any other update instructions.

Miscellaneous information:
Most of the code for the trade and craft skill scanning and storing hyperlinks was copied from CraftyGnome by Rabbit. As this is in the early stages, please submit feedback other then what is outlined bellow. TradeSecretaryAd takes use of AddonLoader, found at http://www.wowace.com/wiki/AddonLoader, if it is present. AddonLoader does not load addons until conditions beckon them loaded, generally yielding an increase of performance, faster initial load times, and less resources used until needed; I recommend you try AddonLoader.

In Settings.lua, you can set AdModMinimum in seconds, I highly recommend not setting it lower then 30 seconds as Blizzard vaguely defines spam as messages sent more frequently then 30 seconds. In fact, you might want to set it to minutes; at least 5 minutes, if not more. Spamming nonsense is not the intent of this mod. It might seem to you that sending ads rapidly, like every 30 seconds to a minute, would help, but this is not the case; welcome to ignore if you do not understand this concept.

A note to my fellow authors:
If anyone wishes to use more then a few lines of my code, I request you credit me by saying, "This product includes software developed by MikeNGo and Rabbit" somewhere as a comment, or in your documentation. I also hope that anyone who would take the time to read my code, would take the time to send me an e-mail of what you think, or what can otherwise be improved.

About the Version Numbers:
Version: xxxxx-x.x.xx ([interface number]-[major version].[sub version].[current release])
Interface number: Version of the interface the addon was most recently updated for, this number and the version number have no linear relationship with the latter clauses.
Major version: When the mod evolves to a state that is vastly different from the first distribution of the prior major version, this will be updated.
Sub version: Whenever the mod has new features added, this number might advance.
Current release: The current reversion of the sub version, changed every time a new version of the mod is submitted to WoWInterface.com

About the Author:
Macintosh operator[email protected]
If you would like to talk to me, I hang out at irc.freenode.net. In #norganna and #wowi-lounge, User Mike-N-Go.

Version: 30100-0.1.03
Date: 04-26-09
• Fixed a problem introduced with 3.1 in ChatFrame_AddMessageEventFilter(), version 30400-01.02 and before are incompatible with WoW 3.1

out of curiosity for any new versions I checked this page only to see that you'd stopped developing it. I decided to try fixing Trade Secretary: Ad Repeater and soon realized that the add-on actually worked. Don't ask me what was wrong when patch 3.1 went live - I can't tell. Important thing is, the add-on works. At least until a patch breaks it, you can safely tag it as being compatible with 3.1.

All the best

Very well, I'll tag it compatible with 3.1, yet I have not checked it myself.

__________________
Currently contemplating coming back to Authorship.. been away for years. Please let me know you care, by commenting on what addon(s) of mine you want to see updated.

out of curiosity for any new versions I checked this page only to see that you'd stopped developing it. I decided to try fixing Trade Secretary: Ad Repeater and soon realized that the add-on actually worked. Don't ask me what was wrong when patch 3.1 went live - I can't tell. Important thing is, the add-on works. At least until a patch breaks it, you can safely tag it as being compatible with 3.1.

I've tested the latest version and something's not quite right. Whispering someone a tradeskill link doesn't provoke the error it used to provoke with the previous version, so that's excellent. However, apparently the add-on doesn't send any ads whatsoever.

I started off with the regular MyAds.lua file. Well, with updated tradeskill links (patch 3.1 has changed the character IDs) but otherwise identical to the pre-patch file. Manually sending out an ad with the appropriate key didn't do anything. Enabling automatic ads didn't do anything either. So I figured there'd be an incompatibility with another add-on. I've disabled all but Trade Secretary: Ad Repeater and I've gradually shortened MyAds.lua until there was nothing left but a "1" - No links at all. I've also set the debug print level to 1 for the add-on to show everything that's going on. Still nothing. It didn't send the "1" and it didn't print any debug output.

Apparently the add-on doesn't send out error messages anymore, but it doesn't send out ads either. Yet. Am I doing it wrong? Could you look into the issue?

Greetings,

Contiki

In recent times, I have not been playing WoW for no more then 3 hours a week. And, I have not needed to advertise via the trade channel recently. So, this mod has been on the back-burner for quite some time. The mod was being designed before you could link a whole profession to the trade channel; the staple function of this mod was to send item links.

I am yet to test Ad Repeater compatibility with 3.1, all I have done is fix the error that hid whispers.

It may be some time until I will diagnose and fix Ad Repeater.

In the mean time, I recommend you use SayAgain, another mod that I have made, it is like Ad Repeater, but for any channel without automaticity.

__________________
Currently contemplating coming back to Authorship.. been away for years. Please let me know you care, by commenting on what addon(s) of mine you want to see updated.

I've tested the latest version and something's not quite right. Whispering someone a tradeskill link doesn't provoke the error it used to provoke with the previous version, so that's excellent. However, apparently the add-on doesn't send any ads whatsoever.

I started off with the regular MyAds.lua file. Well, with updated tradeskill links (patch 3.1 has changed the character IDs) but otherwise identical to the pre-patch file. Manually sending out an ad with the appropriate key didn't do anything. Enabling automatic ads didn't do anything either. So I figured there'd be an incompatibility with another add-on. I've disabled all but Trade Secretary: Ad Repeater and I've gradually shortened MyAds.lua until there was nothing left but a "1" - No links at all. I've also set the debug print level to 1 for the add-on to show everything that's going on. Still nothing. It didn't send the "1" and it didn't print any debug output.

Apparently the add-on doesn't send out error messages anymore, but it doesn't send out ads either. Yet. Am I doing it wrong? Could you look into the issue?

up until patch 3.1 Trade Secretary: Ad Repeater worked flawlessly and I've come to like it. Since the patch the add-on has apparently become incompatible with the game itself. When I whisper someone the whisper seems to go through but my chat frame doesn't show it. Instead, this is the error it throws:

It appears to be an issue with Trade Secretary: Ad Repeater. If it is, could you fix it? Pretty please? ;-)

Greetings and all the best,

Contiki

I have not been playing WoW too much recently, but I believe the problem, if it is what I think it is (with 'local cmd = select(3, msg:find("^!(%S+)"))'), would take the lesser part of an hour. Look for an update in a few days.

Edit1: The problem is ChatFrame_AddMessageEventFilter. It was changed in 3.1, so I will have to update the mod to the new format.

__________________
Currently contemplating coming back to Authorship.. been away for years. Please let me know you care, by commenting on what addon(s) of mine you want to see updated.

up until patch 3.1 Trade Secretary: Ad Repeater worked flawlessly and I've come to like it. Since the patch the add-on has apparently become incompatible with the game itself. When I whisper someone the whisper seems to go through but my chat frame doesn't show it. Instead, this is the error it throws:

Originally posted by ThunderNimbus It might be useful to have an option to put the output to a custom channel for testing your Ads. For people not quite as comfortable with programming and lua, this would give us the option to cycle through all of our ads quickly and make sure they display properly.

Even a static test channel like "TradeSecretaryTest".

One thing I have had on the todo for this mod was for it to print to the chat frame for debug. However, I have not had much use for advertising in the trade channel of late, so I have not worked on this addon recently.

Thanks for your suggestion.

__________________
Currently contemplating coming back to Authorship.. been away for years. Please let me know you care, by commenting on what addon(s) of mine you want to see updated.

It might be useful to have an option to put the output to a custom channel for testing your Ads. For people not quite as comfortable with programming and lua, this would give us the option to cycle through all of our ads quickly and make sure they display properly.

Originally posted by Mike-N-Go Try GetRealZoneText(), lets see if that would work? Also, you might want to check out SayAgain, another of my mods. It might fit you better, as you use so few ads. Let me know how it goes.

Originally posted by Dainton I really only use it to send 2 ads at the same time. I changed the 35-40 second delay that you put on the && to 0 so that I could do this.

I tried using GetZoneText() in one of my ads (Opening lockboxes in Orgrimmar blah blah), but when I change cities it stays on the first city unless i reload the ui. Is there any way to get this to update otherwise?

Could you copy a snippet of the line where you are trying to do this please?

__________________
Currently contemplating coming back to Authorship.. been away for years. Please let me know you care, by commenting on what addon(s) of mine you want to see updated.

I really only use it to send 2 ads at the same time. I changed the 35-40 second delay that you put on the && to 0 so that I could do this.

I tried using GetZoneText() in one of my ads (Opening lockboxes in Orgrimmar blah blah), but when I change cities it stays on the first city unless i reload the ui. Is there any way to get this to update otherwise?

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.