Is posible to make a macro to react automatically on chat?
Is posible to make a macro to react automatically on chat?
Hello.
I was wondering if it's posible to make a macro to say "me" when one of your guildies link a card in the guild chat.
(in my guild, if you get a card you don't want, usually you have to link it, and the first one who says "me" gets it.)
I'm not sure it its posible, and I have no idea how to make it.
Thank you, and sorry about my english.
I was wondering if it's posible to make a macro to say "me" when one of your guildies link a card in the guild chat.
(in my guild, if you get a card you don't want, usually you have to link it, and the first one who says "me" gets it.)
I'm not sure it its posible, and I have no idea how to make it.
Thank you, and sorry about my english.
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Is posible to make a macro to react automatically on cha
That should be done in an addon.
Re: Is posible to make a macro to react automatically on cha
OK, but now I need to learn how to make an addon.
Do you know any guide or can you give me any hints to start making it?
Edited:
I was searching for addons who "search" the chat and find this one:
Chat Monitor http://rom.curse.com/downloads/rom-addo ... nitor.aspx
"ChatMonitor is an Addon that looks for userdefined keywords in the chat and plays an acoustic signal."
Is posble to modify this addon to say "Me" instead of playing a sound when it finds the keyword?
Thanks
Do you know any guide or can you give me any hints to start making it?
Edited:
I was searching for addons who "search" the chat and find this one:
Chat Monitor http://rom.curse.com/downloads/rom-addo ... nitor.aspx
"ChatMonitor is an Addon that looks for userdefined keywords in the chat and plays an acoustic signal."
Is posble to modify this addon to say "Me" instead of playing a sound when it finds the keyword?
Thanks
Re: Is posible to make a macro to react automatically on cha
The rom wiki has a tutorial that covers just about every thing you need.
http://www.theromwiki.com/Addon_Tutorial
Read all the way down to the 'events' section. You'll need that too, to monitor chat events.
http://www.theromwiki.com/Addon_Tutorial
Read all the way down to the 'events' section. You'll need that too, to monitor chat events.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Is posible to make a macro to react automatically on cha
Your going to a lot of effort just to be the first to post me in guild, So your saying you want the card regardless of if you have it already?
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Is posible to make a macro to react automatically on cha
Hello.lisa wrote:Your going to a lot of effort just to be the first to post me in guild, So your saying you want the card regardless of if you have it already?
About your question, yes, I have some alters and they usually don't have the cards posted on guild.
Now, without any addon to it, I try to say me before check if I have the card or not. And I'm sure other guild members do the same.
I'm trying to change other addons to make it, but for the moment, it doesn't work.
Edit:
Hello again.
I make some progress modifiying the ChatMonitor addon.
Now, instead of playing a sound when find the keyword, the addon says what I want in the DEFAULT_CHAT_FRAME
Code: Select all
DEFAULT_CHAT_FRAME:AddMessage("Hello World!");
Thank you.
Re: Is posible to make a macro to react automatically on cha
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Is posible to make a macro to react automatically on cha
If you manage to finish this script. I'll be willing to translate it from english to dutch if you like.
Keep up the good work
Keep up the good work
Its not about cheating. Its about being smarter than the game...
- Questionmark
- Posts: 31
- Joined: Mon Apr 11, 2011 3:06 am
Re: Is posible to make a macro to react automatically on cha
Could you post the code please? I'm interested in autoresponse. I want to make a script that greets my guildies when they log on and I would like to use your script as reference.OneofMany wrote:If you manage to finish this script. I'll be willing to translate it from english to dutch if you like.
Keep up the good work
Re: Is posible to make a macro to react automatically on cha
Hello, and thank you Rock5 for the API.
The script is based on the ChatMonitor Addon (99%) I just changed the lines where it "calls" to play a sound, and changed it to a fixed word in a fixed chat.
I couldn't talk to the addon creator, so if he/she is bother whith my changes, please contact me and I'll remove it.
Original Addon could be found here:
http://rom.curse.com/downloads/rom-addo ... nitor.aspx
It's Localized to English and Deutsch.
My changes are made in a small part of the lua code, the one who check's the chat. Lines 416 to 464, specifically in line 458.
I just changed the code for the "keyword5" (at least by the moment).
For my purpose it's enough.
I would like to make some other changes, like insert more boxes to select what to say, and the chanel to say it. (boxes like the ones to select the keywords), but I don't know how to make it, and this seems to be very difficult to me.
I hope someone could find this intesesting.
Thank you.
The script is based on the ChatMonitor Addon (99%) I just changed the lines where it "calls" to play a sound, and changed it to a fixed word in a fixed chat.
I couldn't talk to the addon creator, so if he/she is bother whith my changes, please contact me and I'll remove it.
Original Addon could be found here:
http://rom.curse.com/downloads/rom-addo ... nitor.aspx
It's Localized to English and Deutsch.
My changes are made in a small part of the lua code, the one who check's the chat. Lines 416 to 464, specifically in line 458.
Code: Select all
-----------Check Chat ------------------
function ChatMonitor.Chat(event,this)
if(ChatMonitor.isChatMonitorInitialized) then
local docheck = false;
if(event == "CHAT_MSG_SAY" and ChatMonitor_Settings[ChatMonitor.playerName]["SayChatCheck"]) then
docheck = true;
elseif(event == "CHAT_MSG_ZONE" and ChatMonitor_Settings[ChatMonitor.playerName]["ZoneChatCheck"]) then
docheck = true;
elseif(event == "CHAT_MSG_GUILD" and ChatMonitor_Settings[ChatMonitor.playerName]["GuildChatCheck"]) then
docheck = true;
elseif(event == "CHAT_MSG_YELL" and ChatMonitor_Settings[ChatMonitor.playerName]["YellChatCheck"]) then
docheck = true;
end
if (docheck) then
local var = string.lower(arg1);
if(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWordCheck1"] and (ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord1"] ~= nil or ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord1"] ~= "")) then
if(string.find(var,string.lower(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord1"])) ~= nil) then
PlaySoundByPath("Interface/AddOns/ChatMonitor/Sound/"..ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord1Sound"]..".mp3");
ChatMonitor.WarningText(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord1"]);
end
end
if(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWordCheck2"] and (ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord2"] ~= nil or ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord2"] ~= "")) then
if(string.find(var,string.lower(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord2"])) ~= nil) then
PlaySoundByPath("Interface/AddOns/ChatMonitor/Sound/"..ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord1Sound"]..".mp3");
ChatMonitor.WarningText(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord2"]);
end
end
if(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWordCheck3"] and (ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord3"] ~= nil or ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord3"] ~= "")) then
if(string.find(var,string.lower(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord3"])) ~= nil) then
SendChatMessage("Addon funcionando 3", "ZONE");
ChatMonitor.WarningText(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord3"]);
end
end
if(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWordCheck4"] and (ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord4"] ~= nil or ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord4"] ~= "")) then
if(string.find(var,string.lower(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord4"])) ~= nil) then
SendChatMessage("Addon funcionando 4", "SAY");
ChatMonitor.WarningText(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord4"]);
end
end
if(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWordCheck5"] and (ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord5"] ~= nil or ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord5"] ~= "")) then
if(string.find(var,string.lower(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord5"])) ~= nil) then
SendChatMessage("yo", "GUILD");
ChatMonitor.WarningText(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord5"]);
end
end
end
end
end
For my purpose it's enough.
I would like to make some other changes, like insert more boxes to select what to say, and the chanel to say it. (boxes like the ones to select the keywords), but I don't know how to make it, and this seems to be very difficult to me.
I hope someone could find this intesesting.
Thank you.
Re: Is posible to make a macro to react automatically on cha
Doublepost because code has a big improvement.
Hello, I've changing a bit this code, and now it's a little bit usefull.
The changes were made in the Check Chat section (the rest still like the original one).
Now, you can "say" in the channel set in "keyword 3" the content writen in "keyword 4", when the "keyword5" is find in the chat who is being monitorized by the addon.
¿Quite confusing ? It's so simple. This picture sould help.
The "play sound" part is disables for keyword3, 4 and 5.
Now, I need to modify the GUI, but this part is too difficult for me, i don't know what's the first thing to do...
If someone want to do it, feel free to do.
Hello, I've changing a bit this code, and now it's a little bit usefull.
The changes were made in the Check Chat section (the rest still like the original one).
Now, you can "say" in the channel set in "keyword 3" the content writen in "keyword 4", when the "keyword5" is find in the chat who is being monitorized by the addon.
¿Quite confusing ? It's so simple. This picture sould help.
The "play sound" part is disables for keyword3, 4 and 5.
Code: Select all
-----------Check Chat ------------------
function ChatMonitor.Chat(event,this)
if(ChatMonitor.isChatMonitorInitialized) then
local docheck = false;
if(event == "CHAT_MSG_SAY" and ChatMonitor_Settings[ChatMonitor.playerName]["SayChatCheck"]) then
docheck = true;
elseif(event == "CHAT_MSG_ZONE" and ChatMonitor_Settings[ChatMonitor.playerName]["ZoneChatCheck"]) then
docheck = true;
elseif(event == "CHAT_MSG_GUILD" and ChatMonitor_Settings[ChatMonitor.playerName]["GuildChatCheck"]) then
docheck = true;
elseif(event == "CHAT_MSG_YELL" and ChatMonitor_Settings[ChatMonitor.playerName]["YellChatCheck"]) then
docheck = true;
end
if (docheck) then
local var = string.lower(arg1);
if(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWordCheck1"] and (ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord1"] ~= nil or ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord1"] ~= "")) then
if(string.find(var,string.lower(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord1"])) ~= nil) then
PlaySoundByPath("Interface/AddOns/ChatMonitor/Sound/"..ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord1Sound"]..".mp3");
ChatMonitor.WarningText(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord1"]);
end
end
if(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWordCheck2"] and (ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord2"] ~= nil or ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord2"] ~= "")) then
if(string.find(var,string.lower(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord2"])) ~= nil) then
PlaySoundByPath("Interface/AddOns/ChatMonitor/Sound/"..ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord2Sound"]..".mp3");
ChatMonitor.WarningText(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord2"]);
end
end
if(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWordCheck3"] and (ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord3"] ~= nil or ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord3"] ~= "")) then
if(string.find(var,string.lower(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord3"])) ~= nil) then
PlaySoundByPath("Interface/AddOns/ChatMonitor/Sound/"..ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord3Sound"]..".mp3");
ChatMonitor.WarningText(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord3"]);
end
end
if(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWordCheck4"] and (ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord4"] ~= nil or ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord4"] ~= "")) then
if(string.find(var,string.lower(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord4"])) ~= nil) then
PlaySoundByPath("Interface/AddOns/ChatMonitor/Sound/"..ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord4Sound"]..".mp3");
ChatMonitor.WarningText(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord4"]);
end
end
if(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWordCheck5"] and (ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord5"] ~= nil or ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord5"] ~= "")) then
if(string.find(var,string.lower(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord5"])) ~= nil) then
SendChatMessage(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord4"], ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord3"]);
ChatMonitor.WarningText(ChatMonitor_Settings[ChatMonitor.playerName]["KeyWord5"]);
end
end
end
end
end
If someone want to do it, feel free to do.
Re: Is posible to make a macro to react automatically on cha
I can appreciate the amount of time and effort you've put in so far but if you don't mind a little critism I think you might be doing this the hard way.
If it was me I would look at either adding in another check (tick option) or just alter the one that says show keyword on screen which basically just flashes the keyword in the middle of your screen which is kinda useless in my opinion.
I would be looking at something like this myself.
in the language file in locales folder alter, this is english version
in chatmonitor.lua add this at the start of the ---check chat---- line 416
you can also delete the sections with
-----------show WarningText-----------
and
-----------fade WarningText-----------
which will basically make you sai "Hi there". anytime you see "is online" in guild chat. aslong as that tick for the now named Guild Greeting is ticked. Obviously this can be altered to be a more personal greeting by including the characters name but hopefully this gives you a start point for an easy solution to what you want.
I attached the altered file that I mentioned to give you an idea.
Edit-- I forgot what your original idea was and got stuck on the autoreply for entering guild, my bad. I attached new files with the 5th spot having user input for replying. It is set to only reply post in guild but you get the idea.
Totally up to you now to do the rest, I just got you started =)
If it was me I would look at either adding in another check (tick option) or just alter the one that says show keyword on screen which basically just flashes the keyword in the middle of your screen which is kinda useless in my opinion.
I would be looking at something like this myself.
in the language file in locales folder alter, this is english version
Code: Select all
["SHOWTEXTCHECK"] = "Guild Greeting",
Code: Select all
if(ChatMonitor_Settings[ChatMonitor.playerName]["ShowTextCheck"]) then
local var = string.lower(arg1);
if event == "CHAT_MSG_GUILD" then
if(string.find(var,string.lower("is online")) ~= nil) then
SendChatMessage("Hi there", "GUILD")
end
end
end
-----------show WarningText-----------
and
-----------fade WarningText-----------
which will basically make you sai "Hi there". anytime you see "is online" in guild chat. aslong as that tick for the now named Guild Greeting is ticked. Obviously this can be altered to be a more personal greeting by including the characters name but hopefully this gives you a start point for an easy solution to what you want.
I attached the altered file that I mentioned to give you an idea.
Edit-- I forgot what your original idea was and got stuck on the autoreply for entering guild, my bad. I attached new files with the 5th spot having user input for replying. It is set to only reply post in guild but you get the idea.
Totally up to you now to do the rest, I just got you started =)
- Attachments
-
- chatmonitor.zip
- all files in the zip, I had issues trying to add the xml for some reason =(
- (7.16 KiB) Downloaded 124 times
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Who is online
Users browsing this forum: No registered users and 1 guest