This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Classic Theme
Thottbot Theme
Inserting a "CD" on macro
Post Reply
Return to board index
Post by
163415
This post was from a user who has deleted their account.
Post by
Toldu
A macro would not be able to do that, althogh an addon might. Writing an addon though is much more complicated than writing a macro. Sorry, don't even know what direction to point you besides the normal addon sites like curse.com
Post by
Wanderingfox
A macro would not be able to do that, althogh an addon might. Writing an addon though is much more complicated than writing a macro. Sorry, don't even know what direction to point you besides the normal addon sites like curse.com
Not true. You could try something like this:
/run if lastTime == nil then lastTime = 0 end if time() - lastTime > 120 then SendChatMessage("<<<YOUR ENCHANTING TRADESKILL LINK>>> 10g fee", "CHANNEL", nil, "2") lastTime = time() end
Note: You need to replace the "2" with the number your trade channel is on. Also, to adjust how much time between spams it will let you use, you adjust the number in the check between the lastTime and the current time (in the above macro this is 120 or 2 minutes).
You'll need to replace <<<YOUR ENCHANTING TRADESKILL LINK>>> with the string returned by GetTradeSkillLink() when your enchanting tab is open.
To do this, you'll need to run the following with your enchanting tab open and then shift click it into the macro:
/run print(GetTradeSkillListLink())
You'll still need to hit the macro seperately, however. Hooking it to the window opening will require an addon.
edit:
It's probably worth mentioning that the macro uses a global variable by the name of lastTime to work. You may need to get creative with that name if another addon is using it.
edit2:
Just logged in and checked. Code works fine.
edit3:
You may need to shorten the variable name so that your trade link actually fits within the 255 character limit...
Post by
minimeii
Uhm...
You could go with what Wanderingfox said, which im not even going to begin to comprehend.
Another solution, maybe not exactly what you are looking for, but extremely simple would be something like
/2 " 10g fee."
/in 30 /2 " 10g fee."
/in 60 /2 " 10g fee."
It would repeat every 30 (or whatever you set it to) seconds.
I prefer to use this in trade, and then at the end, put something like
/in 90 /whisper <name> <<Insert reminder here>>
This will remind you to press the original macro, and start the cycle over again, until you choose to stop.
By the way, I'm not 100% sure on if these commands work completely. Try testing it first with a simple /say chat.
Post by
Wanderingfox
The only issue with that is if he hits it more than once it will execute more than once. My macro simply will not send the message if the difference between the last time it was used and the current time is less than a specified amount :P
Post by
163415
This post was from a user who has deleted their account.
Post by
RedwoodElf
Here's one that will work with multiple craft skills, and will only let one through for each craft every 2 minutes.
/run local l=GetTradeSkillListLink()if l then if SpamTime == nil then SpamTime={} SpamTime=0 end if time() - SpamTime > 120 then SendChatMessage(l.." Your Mats, for tips.","CHANNEL",nil,"2") SpamTime = time() end end
Post by
Wanderingfox
... see my post on the macro list... you don't need a table if you're using epoch time.
Post by
RedwoodElf
I don't see how yours keeps track of each tradeskill's cooldown separately. You need a table with a unique index for each cooldown to keep them separate.
Post by
163415
This post was from a user who has deleted their account.
Post by
Wanderingfox
I don't see how yours keeps track of each tradeskill's cooldown separately. You need a table with a unique index for each cooldown to keep them separate.
Completely missed that... I was taking your macro in the context of the OP's request, where he simply doesn't need to track more than one cooldown. Not enough caffeine for me lately :/
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.