What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Bot?

Pages: (3): « First « 1 [ 2 ] 3 » Last »
[Request] Bot?
Author: Message:
mathieumg
Full Member
***


Posts: 181
Reputation: 2
34 / Male / Flag
Joined: May 2004
RE: [Request] Bot?
According to that line "if(strUser != Messenger.MyName)", it should, but I did not test it.
Official MessengerPlus! Live French Translator
Official StuffPlug 3 French Translator

:)
06-26-2006 12:16 PM
Profile E-Mail PM Web Find Quote Report
Yomeh
New Member
*


Posts: 5
Joined: Jun 2006
RE: [Request] Bot?
Yeah it does work but can someone help me just wondering about the case select, because Case doesn't seem to work
06-26-2006 12:18 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: [Request] Bot?
I made a small script, you can edit the OnEvent_ChatWndReceiveMessage() function and replace the texts with whatever you want. But keep in mind: I converted the Message to lower case first so HeLLo and heLlO will both be parsed. :)

Enjoy! :D

.plsc File Attachment: Bot.plsc (1.82 KB)
This file has been downloaded 178 time(s).

This post was edited on 06-26-2006 at 01:59 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
06-26-2006 12:52 PM
Profile E-Mail PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: [Request] Bot?
Yes, I'm sorry for not explaining how to get it working.
  1. Open a conversation with the person you want to be the bot from.
  2. Type and send the command /startbot to start the bot feature.
  3. 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!". :)
  4. This also works with "How are you?" and "Wazzup?", you will reply with the message "I'm fine! :) And how are you?"
  5. 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... :$
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
06-26-2006 01:49 PM
Profile E-Mail PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: [Request] Bot?
It seems like I forgot to place "= -1" behind some expression. :-/
Try to download the new file, it now contains a menu in the chat window! ;)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
06-26-2006 02:02 PM
Profile E-Mail PM Web Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
RE: [Request] Bot?
quote:
Originally posted by Mattike
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 + "! ;)");
}

thats got to be the worst code Ive ever seen , even segosa wouldnt do that :--o.

code:
if(msg.match(/thanks|thnx|thank u/)){
ChatWnd.SendMessage("No problem, " + User + "! ;)");
}

[Image: dt2.0v2.png]      Happy Birthday, WDZ
06-26-2006 02:22 PM
Profile PM Web Find Quote Report
segosa
Community's Choice
*****


Posts: 1407
Reputation: 92
Joined: Feb 2003
RE: RE: [Request] Bot?
quote:
Originally posted by -dt-
quote:
Originally posted by Mattike
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 + "! ;)");
}

thats got to be the worst code Ive ever seen , even segosa wouldnt do that :--o.


* segosa slaps -dt-.

Anyway, I would even suggesdt making a txt file or something in the format

word1:word2:word3:wordN|reply

and parsing that, seeing if any of the words are in the msg and then replying with reply. (In fact that's the format I used for an autoresponder in mIRC script.)
The previous sentence is false. The following sentence is true.
06-26-2006 02:35 PM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: [Request] Bot?
Hmm... never thought about that. Thnx -dt- and segosa! :D
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
06-26-2006 02:37 PM
Profile E-Mail PM Web Find Quote Report
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
RE: [Request] Bot?
Instead of doing the msg.match thing like in here..
code:
if(msg.match(/thanks|thnx|thank u/)){
ChatWnd.SendMessage("No problem, " + User + "! ");
}

isn't there a way like:  msg.contains    or something like that?

because if we use msg.match,  me message recieved has to be exactly like that,  instead is it contains certain words we can gues what he's talkiing about and return something close...

any ideas?
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
06-26-2006 04:35 PM
Profile PM Web Find Quote Report
Plik
Veteran Member
*****

Avatar

Posts: 1489
Reputation: 46
34 / Male / –
Joined: Jun 2004
RE: [Request] Bot?
quote:
Originally posted by novolo
Instead of doing the msg.match thing like in here..
code:
if(msg.match(/thanks|thnx|thank u/)){
ChatWnd.SendMessage("No problem, " + User + "! ");
}

isn't there a way like:  msg.contains    or something like that?

because if we use msg.match,  me message recieved has to be exactly like that,  instead is it contains certain words we can gues what he's talkiing about and return something close...

any ideas?
Erm match does test if the message contains the words.
match is is a regexp function
06-26-2006 05:09 PM
Profile PM Find Quote Report
Pages: (3): « First « 1 [ 2 ] 3 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On