Yes, I'm sorry for not explaining how to get it working.
- Open a conversation with the person you want to be the bot from.
- Type and send the command /startbot to start the bot feature.
- Now, if the person says e.g. "Hi there!", you automaticly reply with "Hey (user)!" where (user) is the person who send you "Hi there!".
- This also works with "How are you?" and "Wazzup?", you will reply with the message "I'm fine! And how are you?"
- To stop the bot for this person, just type /stopbot. This will disable the bot from sending messages to this person, but will still work on other persons.
To add more automatic replies, add the following code:
code:
var gotThanks = msg.indexOf("thanks");
var gotThnx = msg.indexOf("thnx");
var gotThankyou = msg.indexOf("thank u");
if(gotThanks != -1 || gotThnx != -1 || gotThankyou) {
ChatWnd.SendMessage("No problem, " + User + "! ;)");
}
or something likely at this location:
code:
if(gotWhatsUp != -1 || gotWazzup != -1 || gotHowAreYou != -1) {
ChatWnd.SendMessage("I'm fine! :)\nAnd how are you?");
}
//Here the new code :)
}
I also updated the attachment, I left a small bug behind...