Your post is really hard to read. Even (or perhaps especially!) if English is not your first language, making some effort to capitalize sentences, not type your whole post as one sentence, and splitting up the different ideas into different paragraphs would help a lot.
1. You want an addon/macro that will whisper the same message to all players in your guild.
I'm not sure this is possible due to Blizzard restrictions on the number of messages you can send in a short period of time. These restrictions are meant to prevent spamming. You can try this, but I'm not sure it will work:
Lua Code:
local message
-- Create a slash command for sending the message:
SLASH_GUILDWHISPER1 = "/gw"
SlashCmdList.GUILDWHISPER = function(text)
if not text or text:len() < 1 then
-- No text was entered with the slash command.
-- Stop here.
return
end
-- Update the message variable so the addon knows
-- to send a message.
message = text
-- Ask the server for updated information about
-- your guild, such as who is online.
-- An event will fire when the server responds,
-- and we will send the message then.
GuildRoster()
end
-- Create a frame to listen for the event telling us
-- that the server has responded with information about
-- your guild:
local frame = CreateFrame("Frame")
frame:RegisterEvent("GUILD_ROSTER_UPDATE")
frame:SetScript("OnEvent", function()
if not message then
-- We did not cause this event, and have
-- no message to send. Stop here.
return
end
-- Loop through each guild member:
for i = 1, GetNumGuildMembers() do
local name, _, rank, level, _, _, _, _, online, class = GetGuildRosterInfo(i)
-- If they are online, send them the message:
if online then
SendChatMessage(message, "WHISPER", nil, name)
end
end
-- Clear the message since we are done sending it:
message = nil
end)
2. You want the "/rts" command to send a pre-defined message to the last person who whispered you.
Lua Code:
local messages = {
["default"] = "This is the default message.",
["nothanks"] = "No thanks. I'm not interested.",
}
SLASH_RTS1 = "/rts"
SlashCmdList.RTS = function(which)
-- Get the name of the last person who whispered you:
local name = ChatEdit_GetLastTellTarget()
if not name then
-- Nobody has whispered you yet.
return
end
-- Look up which message to send:
local message = messages[which]
-- If you typed a wrong message name, use the default one:
if not message then
message = messages["default"]
end
-- Send the message:
SendChatMessage(message, "WHISPER", nil, name)
end
You can type "/rts nothanks" to send the "No thanks. I'm not interested." message, or just "/rts" to send the default message. You can add new messages if you want, or delete the "nothanks" one. You can edit the text of the default message, but do not delete it.
If either of these do not work, please post the error message(s) they give you.