(70 Kb)
Updated: 07-02-13 06:55 PM
Updated:07-02-13 06:55 PM
Created:07-02-13 06:55 PM


Version: 2.12_20130619
by: Gemminie [More]

Want to notify others in your group when you sheep a mob, but say nothing if you're not in a group? Want to tell your raid who you're summoning? Want an addon that says nothing if you have nothing targeted, so you don't look like a dork? Want an addon to fill in information about your location, target, or current pet? Want to add witty random sayings to any of this? GemSay may be your solution. GemSay gives you these commands:

/gs: Send a message to your raid, party, guild, etc. -- can also /say the message, /emote it, and more.

/gsw: Send the message as a /whisper.

/gsr: Opens a window that lets you define random message categories, each containing a list of messages that GemSay can choose one from at random. They can then be used in /gs in any combination.

/gst: Opens a window that lets you assign /gs and /gsw messages that will trigger automatically when certain events occur. You can adjust the chance that the message will trigger.


/gs irp Now sheeping %tt. You hit %to, you tank %to.

The "irp" means that GemSay will send the indicated message to your instance group (battleground/LFR/LFG/scenario) if you're in one, your local raid if you're not in an instance group, or to your local party if you're not in a raid. If you're soloing, it says nothing. If you have nothing targeted, it also says nothing. The "%tt" is filled in with the name of the targeted unit, and the "%to" is filled in with "him"/"her"/"it", as appropriate. You could bind this to a macro yourself, or you could use /gst and set it to trigger in response to your casting Polymorph without bothering with macros at all.

Read the ReadMe.txt file for lots more information, plus specific examples.

*** 1.12 ***
2013 Jun 13:
* Battlegrounds chat has been removed, replaced with the more
general "instance chat", so I simply replaced one with the other.
The code is "i" rather than "b". Rather than checking
GetNumPlayersOnScoreboard or whatever, to determine whether the
player is in a battleground, I can now just check
IsInGroup(LE_PARTY_CATEGORY_INSTANCE) to see whether the player is
in an instance-specific group. If so, SendChatMessage(msg,
* The GetNumRaidMembers and GetNumPartyMembers functions have been
removed, but all I really need to do is see whether you're in a
raid/party or not, so I replaced them with a check of
UnitInRaid(player) for raids and IsInGroup(LE_PARTY_CATEGORY_HOME)
for parties. The IsInGroup check will return positive if the
player is in a raid, too (if the player is in a raid, the player
is in one of the raid's groups), but that was true before the API
change too. Sending a message to "p" while in a raid will send it
to the player's raid subgroup, just as the /p command does.
* UIPanelButtonTemplate2 no longer exists as a button template, so
I replaced it with OptionsButtonTemplate, and it seems to work.

*** 1.11 ***
2011 Sep 09:
* Happy birthday to me!
* I'm noticing that there's no longer a way to catch the event
that happens when I summon somebody with a meeting stone or
warlock portal. Something must have changed. I'm not sure
there's anything to be done about this. As far as I know, no
event is generated when you click on a chair to sit on it or click
on a portal to assist in summoning a mage table. Perhaps they
made the warlock portal and meeting stone this type of object.
* "Capture Next Cast" now captures the next cast even if it
fails (for example, if it's in cooldown or the target is invalid).
* COMBAT_LOG_EVENT(_UNFILTERED)'s parameters have changed again.
They keep adding more! Realigned to compensate.

*** 1.10 ***
2010 Nov 03:
* Added a /gemsay alias for /gs. Made mention of it in the
in-game help.

*** 1.9 ***
2010 Nov 02:
* By hooking ChatFrame_OnHyperlinkShow, I have made it possible to
get links from the chat frame. This means that, although I'm so
far unable to directly get links from, for example, the
achievement frame or the talent frame, you can still link them
into chat, then shift-click the chat link while editing your
GemSay text.
* Something I'm noticing is that although you can enter a longer
string into the GemSay string edit frame, if there's a hyperlink
in it, WoW will cut it short when printing the string in chat. I
don't think there's anything I can do about that -- it's probably
related to the fact that you can't do more than about 3 hyperlinks
in the same line of text in chat. You should probably test your
strings before using them, if they contain hyperlinks.

2010 Oct 28:
* I discovered that hooking HandleModifiedItemClick() has a
problem: if you shift-click on a stack of items, you will get a
link, but you will also get the popup box to create a stack.
However, this problem also occurs with hooksecurefunc(); I just
hadn't noticed it until now. I had to go with insecure pre-hooks
for items to prevent this. Unfortunately that means I have to go
back to using separate functions for items in bags, bank, paper
doll, merchants and mail.
* I added the same functionality to the message box in the event
trigger window.

2010 Oct 27:
* I think I need to be realistic here. Some things may just not
have hookable OnClick events.
* Hooking HandleModifiedItemClick() might be a better option than
all these <item button type>_OnModifiedClick() hooks, because it
seems to grab all the links that are possible to grab, and it only
requires one hook for all types of item links.
* Things that will likely work:
- Items in:
. Bags/Inventory (works now)
. Bank (works now)
. Paper doll slots (works now)
. Containers (may work)
. Merchant panels (works now)
. Mail (may work)
. Auction House (may work)
. Quest panels (may work)
- Spells in:
. Spellbook (works now)
- Quests in:
. Quest log (may work)
* I think it's possible to insert links from your chat frame by
shift-clicking them; I just have to figure out how.
* I need to actually test these rather than getting distracted by
playing WoW. :)

2010 Oct 26:
* Made sure I was researching based on the newest Blizzard UI code.
* Things I want to be able to link:
- Items in:
. Bags/Inventory (works)
. Bank (works)
. Bag bar
. Paper doll slots (works)
. Containers
. Loot panels
. Trade panels
. Tradeskill panels
. Merchant panels
. Mail
. Auction House
. Quest panels
. Links in chat frame
. Action bars
- Spells in:
. Spellbook (works)
. Links in chat frame
. Action bars
- Achievements in:
. Achievement panel
. Links in chat frame
- Talents in:
. Talent panel
. Links in chat frame
- Glyphs in:
. Glyph panel
. Links in chat frame
- Tradeskill links in:
. Tradeskill panels
. Links in chat frame
- Quests in:
. Quest log panel (works?)
. Links in chat frame

2010 Oct 25:
* Quest log linking might work.
* Linking achievements, talents and glyphs are being a huge pain.
The hook functions just don't seem to exist according to WoW, even
though they're in the Blizzard FrameXML files.
* Still working on item links for various other things, such as
bag slot icons, the backpack icon, item icons in mail, item icons
on merchants, item icons in the Auction House, and item icons in
quest panels and loot panels.
* No idea how to link from chat frame links.

2010 Oct 24:
* Started work on inserting item/spell/etc. links into edit
frames. The only buttons that I know work with this are: item
buttons (in your bag bar, in your inventory, in the bank, on the
paper doll window, in containers, in merchant dialogs, in your
mailbox) and spell buttons. Each of this must be handled
separately with a hook function. Currently this only works in the
editbox that lets you edit strings in the category editor. Once I
get that working, I'll move it over to GemSay_Event.lua and put it
into the box that lets you edit event trigger messages. Right now
I have it working, but only for items and spells. (Getting spells
working was a major pain.)
* Things that don't work yet that I'd like to have work: linking
achievements, talents and quests. And maybe even glyphs from the
glyph panel. Maybe even other links from the chat panel.

*** 1.8 ***
2010 Oct 22:
* The arg1/arg2/etc. arguments in a frame's <OnEvent> handler were
apparently also deprecated long ago and have finally been removed
in WoW 4.0. This prevented GemSay from responding to events! I
have switched to the new vararg syntax. args = {...} is your
* "OnClick" handlers aren't given a global "self" anymore; they're
given arguments (self, arg1, arg2, checked).
* Again, still version 1.8, because there are no new features.
This is just still me attempting to bring GemSay in line with WoW

2010 Oct 16:
* Apparently the keyword "this" was deprecated two years ago and
nobody told me. It was finally dropped in WoW 4.0, so anything
still using it finally broke. Guess what? GemSay was still using
it. Well, I replaced it with "self" in all the .xml files. Now
it works fine.
* Updated GemSay.toc for version 4.0.
* It's still version 1.8, though, because I didn't make any
changes other than to make it work for WoW 4.0.

2009 Nov 1:
* Modified the emote change just slightly: if there is an emote in
the message and if there is an argument after it (any argument at
all), then GemSay will tell WoW to pay attention to whether you
have a target selected when issuing the emote. If there's no
argument, GemSay will tell WoW to ignore whatever target you may
have selected and issue the emote as if you have no target
selected. In other words, "/gs y /laugh xyz" will do "You laugh
at <target name>." if you have a target selected and "You laugh."
if you have no target; "/gs y /laugh" will always do "You laugh."
whether you have a target selected or not. You can't customize
the text that appears when the emote happens; that's a limitation
imposed by WoW (but on the other hand, the fact that the text is
standard means that opposite-faction players can read it too).
* I have merged Yltseirp of Cairne's suggestion and Renvan's first
suggestion into one unified system. Now when the outgoing message
begins with a /, GemSay will first see if it's a chat command and
act accordingly, then see if it's an emote command and act
accordingly, in both cases going through Blizzard's global
variables so there's no need for me to keep huge lists of all the
emotes or all the abbreviations for chat commands. This means
that the destination-overriding possibilities from v1.7 are still
there but slightly improved (every abbreviation allowed by WoW is
allowed by GemSay too, like /g, /gc and /gu for /guild), *plus*
you can have your character do any of the standard emotes as the
outgoing message. A side effect is that anything after an emote
is ignored, and of course you can't broadcast an emote to any chat
mode other than EMOTE, so "/gs y /laugh bob" works the same as
"/laugh" with no target selected: "You laugh." (Note that the
destination code "y" is completely ignored because of the emote,
as is the "bob" that comes after it.) You will do the animation
and sound, however, and the emote will be readable by the opposing
* Still frustrated about what event (if any) is generated if you
sit on a chair/bench, right-click on a feast, right-click on a
portal to participate in a ritual (like a meeting stone or warlock
summon, a mage table summoning spell, a warlock soulwell, etc.).
This is annoying me because I'd like to say something when I do
this, but so far I'm coming up empty. It seems to me as if no
event whatsoever goes out when you do these things. You can,
however, set a trigger for when you *start* a summon using a
meeting stone or warlock summoning portal, just not when you
assist in creating the warlock summoning portal or in summoning
somebody with it.

2009 Oct 31:
* Sending a message to destination "o" (guild officer chat) can
now check to see whether you have permission to do that. This
means that destination paths like "ogrps" would work (try guild
officer chat first, then guild chat, etc.).

2009 Oct 24:
* Added triggers for other types of spell/ability misses besides
PARRY, and REFLECT. This is Renvan's second suggestion.
* Fixed a bug when you hit Cancel while creating a trigger, then
hit New Trigger -- it used to retain data from your canceled
trigger. Now it doesn't.
* Widened the trigger name box so you can see the whole event and
spell it triggers on.

2009 Oct 23:
* Added UNIT_SPELLCAST_CHANNEL_START to the capture -- apparently
things like summoning portals trigger this without triggering SENT
* Changed event handling code to still trigger on a CHANNEL_START
that arrives without a SENT.
* Still can't find what event, if any, fires when you sit on a
chair or right-click on a feast. Might it be PLAYER_CAMPING?
(Answer: No.)

2009 Oct 22:
* Fixed a bug when printing certain error messages -- they
attempted to call the message() function improperly, leading to
Lua errors.
* Fixed a bug: the button onto which to drag spells or items when
creating a trigger no longer toggles its border bright or dark
when clicked.
* Added the "Capture Next Cast" button in the spell panes of the
trigger editor window. A new way to enter spells that can also
capture a right-click on a world object! This can only trigger on
"Cast Button Pressed" (a.k.a. UNIT_SPELLCAST_SENT) events, though.
Unfortunately it only works so far on objects that actually show a
cast bar, like opening chests. I have not figured out how to make
this work for instant-cast channeled objects like the portals that
appear when mages cast Ritual of Refreshment or warlocks cast
Ritual of Summoning/Souls/Doom, or the portals that appear when
somebody uses a meeting stone or warlock summoning portal.

*** 1.7 ***
2009 Oct 21:
* Fixed a bug in all the scrollbars that arose because of a
Blizzard API change way back in 3.0.something.
* Fixed a bug making the %p* codes (referring to you the player)
not work if you didn't have a target. This would also have made
the %e* (pet) codes and %f* (focus) codes not work if you didn't
have a target. This check is much more coherent now; the %t*
codes provoke a check for a target, the %e* codes provoke a check
for a pet, and the %f* codes provoke a check for a focus. The %p*
codes don't provoke a check at all; it's assumed there's a player
if the addon is running. ;)
* Added an expansion of a suggestion by Yltseirp of Cairne: if the
message itself begins with /e, /p, /ra, etc., it will override the
* Updated the ReadMe.txt file, adding the destination override
feature as well as fixing several inaccuracies.

*** 1.6 ***
2008 Dec 10:
* "Aliased" Polymorph(Pig) so that whenever it appears, its name
is actually Polymorph(Pig) -- that is, it's treated as a separate
spell from Polymorph. Polymorph(Turtle), Polymorph(Black Cat),
etc. would be treated as separate spells too. If you've got Glyph
of the Penguin, I can't help you -- the spell name doesn't change.
* I believe that I actually have the %st code working.

*** 1.5 ***
2008 Oct 24:
* Added a "?" button to the trigger editor window that brings up a
help box with some reference info.
* Changed the raid warning destination code to 'a' instead of 'w'.
* Added the ability to whisper a player with 'w(name)' to the /gs
command, making the /gsw command unnecessary.
* Removed the /gsw command and removed the '/gs'/'/gsw' pulldown
menu from the trigger editor window.
* Added the 'd' destination code; it just prints a message to the
chat window that doesn't get sent anywhere. Good for debugging.
* Changed documentation to reflect these changes.
* Fixed several incompatibility issues with WoW 3.0.2.

*** 1.4 ***
* Changed the %= prefix to %p and %+ to %e (for information about
yourself and your pet)
* Changed documentation to reflect this change.

*** 1.3 ***
2007 Feb 8:
* Fixed a bug that lowercased all your messages before filling in
the blanks.

2007 Feb 7:
* Feature freeze! Time to get ready for a release.
* Found and fixed a few bugs
* Wrote more documentation

2007 Feb 6:
* Occasional problems were occurring when trying to edit event
triggers during combat. This seems to be fixed.
* Added %^ and %_ prefix to force results to be all upper or lower
case (for all but %g, because category names can have _ in them)
* Added %1 through %9 functionality for putting the event
arguments into the message (this remains undocumented, because
it's not very useful most of the time, but perhaps there will be
uses for it eventually)
* Added %= prefix, to look up info on yourself
* Added %+ prefix, to look up info on current pet

2007 Feb 5:
* Rearranged the XML templates and Lua functions to make things
more modular: templates used in multiple places are in GemSay.xml,
and each editor window has its own initialize function
* Made the %c class code smarter: you get "NPC" for an NPC
* Added the %f code, for faction (Alliance/Horde/unaffiliated)

2007 Feb 3-4:
* Added the trigger editor window and put lots of work into making
it work
* Added code to listen to triggers

*** 1.2 ***

2007 Jan 26:
* Tightened the rewritten GemSay_catsub and removed debug prints,
preparing for a test and release of v1.2 to the one person I know
of who is using it other than myself (hi Niralica!)
* OK, I rewrote Gemsay_catsub (the %g function) again, this time
making it recursive, which takes care of the restrictiveness of
the algorithm that I complained about in the ReadMe. Now infinite
loops are prevented but no other restrictions are placed on %g's
inside of other %g's.
* Also checked over and tightened up GemSay_random_string.
* Added the ability to put _ in your category names.
* We now check to make sure you don't enter a category name that
you won't be able to use (letters, numbers, and _ only).
* GemSay_error now makes a sound.
* The %l code is smarter: enemies that are ?? to you now show up
as ??, instead of as -1. Also, elites get a +, while world bosses
get a ++, and rare mobs and elites get "62+ Rare" for example.
* Made unit data lookups more efficient.

2007 Jan 25:
* Discovered a bug in GemSay_catsub, the function that fills in
the %g codes -- if you put a target-related %g code in one of your
messages, you could bypass the idiot check
* Then discovered that GemSay_catsub didn't work at all due to the
fact that I'd broken it fixing the previous bug
* Fixed that, then found out that it wasn't filling in % codes in
random messages at all
* Rewrote GemSay_catsub because of all of this -- a Lua tip: if
you're iterating on a string.gmatch, don't change the string
during the loop

2007 Jan 24:
* Started keeping a change log. :)
* Tweaked the editor box; it's much nicer looking now:
- Made the radio buttons side-by-side and moved them to the top
- Moved the message editing buttons to the right side
- Centered the Close button
- Added byline text
- Shrunk the frame size vertically
- Darkened the title bar's background color
- Made several FontStrings dependent on a basic template
* Made %r smarter: If UnitRace comes back nil, GemSay_targetsub
now tries UnitCreatureFamily and UnitCreatureType before falling
back on "unknown"

2007 Jan 23 (yes, I wrote this in retrospect):
* Fixed a bug: If you put a target-related % code in a random
string, then used that random string's category when you had no
target, the idiocy preventer wouldn't help you! All %g codes are
now fully expanded before checking for target-related codes.
Post A Reply Comment Options
Unread 07-25-13, 02:53 AM  
A Kobold Labourer

Forum posts: 1
File comments: 20
Uploads: 0
This looks absolutely awesome. I'm going to mess around with it a bit, and get back to you with any questions I end up encountering.
Report comment to moderator  
Reply With Quote
Post A Reply

Category Jump: