• 0

    posted a message on Custom Chat Link possible?
    People who don't have the addon would never receive the message.

    It is only sent via whisper.

    Basically I want to be able to send player names from one player to another (both would have the addon). I want to be able to put brackets around a player name in a whisper to someone and have them be able to click on that players name.

    So I whisper to Fred: [Joe] has been asking for you to contact him.

    And Fred can left click on [Joe] and it opens a whisper to Joe.

    Right clicking [Joe] would do something else...
    Posted in: Lua Code Discussion
  • 0

    posted a message on Custom Chat Link possible?
    Quote from sylvanaar »

    You can't send custom links. The recieving end would need an addon to create the links from the text you sent them.

    Thank you for your replies so far.

    That is fine.... in my scenario both parties would have the same addon.

    Quote from Astaldo »

    I don't have an answer to the actual question but I do have a question for clarification :)

    To see if I understand what you're asking for.

    You're not speaking about item links if I understand correctly.

    You'd like to send for example a question and make left-click on a word reply "Yes", right-click reply "No"?

    Something along these lines?
    (just as an example I don't know the use case you have in mind).

    That is correct. The message would come through with part of it incased in brackets.
    Eample: Tom receives this message.
    Message from Bob: "[Sam]wants to talk to you."
    You could left click on [Sam] and it opens a whisper to [Sam]. You could also right click on [Sam] and it would do something else.

    If both Bob and Tom have the mod... is this possible?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Custom Chat Link possible?
    Hey all,
    Is it possible to have a mod output a clickable chat link and have it do one thing on left click and another on right click?

    The mod in question would be enabled on two players. The mod sends a whisper from player A to player B, included in that whisper I would like to have a clickable link that sets how that player B responds to the whisper.

    Wondering if that is possible and if so what am I looking for.

    Thanks in advance.
    Posted in: Lua Code Discussion
  • 0

    posted a message on My 1st Mod and making it modular. (Help requested.)
    Hello all,
    First off let me say that this is my first addon. I created using Ace2 Libs and really enjoyed the experience. Yes it was a simple addon but it does just what I want, which surprised the hell out of me. Now I am looking to make it part of a larger addon that does more but would like to keep it modular.

    Here is an example of what I would like to do:


    I hope that makes sense... what I want is my Group.lua to handle the triggers for if AddonA and/or AddonB run.

    Is that the way it's done? I just think I would have an easier time working on one addon.lua at a time and then having my group.lua call it when the addon is done.

    This is probably the most basic and simplistic question ever asked of you folks... if so I hope there is someone who can direct me in the proper direction for the information that I am looking for.

    Thanks in advance,

    Oh, here is the .lua from my first addon...
    local L = AceLibrary("AceLocale-2.2"):new("WhisperRelay")
    local options = { 
      args = {
    		main = {
    			type = 'text',
    			name = L["main"],
    			desc = L["The name of your lead character."],
    			get = "GetMain",
    			set = "SetMain",
    			usage = L["<Main's Name Here>"],
    WhisperRelay = AceLibrary("AceAddon-2.0"):new("AceConsole-2.0", "AceEvent-2.0", "AceDB-2.0")
    WhisperRelay:RegisterChatCommand(L["Slash-Commands"], options)
    WhisperRelay:RegisterDB("WhisperRelayDB", "WhisperRelayDBPC", "char")
    WhisperRelay:RegisterDefaults("char", {
    	main = L["Not Set"],
    } )
    function WhisperRelay:OnEnable()
      -- Called when the addon is enabled
    function WhisperRelay:CHAT_MSG_WHISPER()
    	if (self.db.char.main == UnitName("player")) then
    	if (self.db.char.main ~= UnitName("player")) then
    		if (self.db.char.main ~= arg2) then
    			UIErrorsFrame:AddMessage("Whisper Relay", 1.0, 1.0, 1.0, 5.0);
    			SendChatMessage(self.msg , "WHISPER", nil, self.db.char.main);
    		if (self.db.char.main == arg2) then
    			UIErrorsFrame:AddMessage("Whisper Relay", 1.0, 1.0, 1.0, 5.0);
    			SendChatMessage(self.msg , "WHISPER", nil, self.rply);
    function WhisperRelay:GetMain()
    	return self.db.char.main
    function WhisperRelay:SetMain(newValue)
    	self.db.char.main = newValue
    function WhisperRelay:SetReplyAddy(newValue)
    	self.rply = newValue
    function WhisperRelay:SetRelayMessage(text, from)
    	self.msg = "Message from "..from..": "..text
    function WhisperRelay:SetReplyMessage(newValue)
    	self.msg = newValue

    Simplistic as it is.... I jumped up and down when it was done and worked. ;)
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.