The thing with these kind of addons are that usually you have to also code some function so that the replies are dynamic and not just static -but as long "!shop" does not change you can actually make a very simple addon yourself!
I'll show an example using a example addon name: DjinnrbMod
1. Make a folder called "DjinnrbMod" then go inside that folder
2. Create a file called "DjinnrbMod.toc" then...
3. Put this in the .toc file:
Code:
## Interface: 40000
## Title: My first addon!
AutoReply.lua
4. Create a file called "AutoReply.lua" then...
5. Put this in the AutoReply.lua file:
Code:
local timelock, messages = {}, {}
-- used by the addon below, on line 23
messages["shop"] = [[Hello!
This is a test message.
- Bye!
]]
local frame = CreateFrame("Frame")
frame:RegisterEvent("CHAT_MSG_WHISPER")
frame:SetScript("OnEvent", function(self, event, msg, author, ...)
-- handle whispers we receive
if event == "CHAT_MSG_WHISPER" then
-- check if the message is a specific keyword
if msg:lower():find("^!shop") then -- this means "!shop junktext" will also trigger
-- make sure we avoid spam and reply to one message each second (if user spams "!shop" it will not spam back)
if GetTime() - (timelock[author] or 0) > 1 then
-- we reply with our static message (take note of the ":replace(...)" part, because if the message contains new lines the game only sends the first line. this will make messages with new lines simply show on one line)
SendChatMessage(messages["shop"]:replace("\n", " "), "WHISPER", nil, author)
-- this will keep track of when we last got a message from him
timelock[author] = GetTime()
end
end
end
end)
This is just a example, when you put that folder in the Interface\Addons folder of the game, when you startup and look in "Addons" you should see it showing. When you then receive "!shop" commands you will reply with a default message.
Note that new lines are converted to space instead, can't send new lines trough the chat.