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:
h-t
New Member
*

Avatar

Posts: 6
Joined: Jun 2006
O.P. [Request] Bot?
Is it possible to make a bot using the scripts? I've tried some things but it didn't work.. Maybe can someone help me if it is possible..
06-25-2006 08:26 PM
Profile E-Mail PM Find Quote Report
L. Coyote
Senior Member
****

Avatar
Captain Obvious

Posts: 981
Reputation: 49
39 / Male / Flag
Joined: Aug 2004
Status: Away
RE: [Request] Bot?
Sure, you can.

The event you should look for is OnEvent_ChatWndReceiveMessage (be aware that it will detect your own messages in this event).

You can then do anything based on what is sent to you.

You can download the complete Scripting Documentation here. :)

This post was edited on 06-25-2006 at 08:35 PM by L. Coyote.

Hack, hack, hack!
Finally became a Systems Analyst! :spam:

06-25-2006 08:34 PM
Profile PM Find Quote Report
h-t
New Member
*

Avatar

Posts: 6
Joined: Jun 2006
O.P. RE: [Request] Bot?
code:
[string] OnEvent_ChatWndReceiveMessage(
    [object] ChatWnd,
    [string] Origin,
    [string] Message,
    [enum] MessageKind
);

Its says but I don't understand this.. im new :P
06-25-2006 08:38 PM
Profile E-Mail PM Find Quote Report
-DRK-panoz
New Member
*


Posts: 1
Joined: Jun 2006
RE: [Request] Bot?
I too want to make a bot and am not aware of what I'm doing wrong
code:
function OnEvent_ChatWndReceiveMessage("","","!ver",1)
{
    ChatWnd.SendMessage("This is v1.0.0a");
}

And then in the Debug I get
code:
Error: Expected identifier.
       Line: 1. Code: -2146827278.

Please help. Thanks :)
06-25-2006 09:31 PM
Profile E-Mail PM Find Quote Report
L. Coyote
Senior Member
****

Avatar
Captain Obvious

Posts: 981
Reputation: 49
39 / Male / Flag
Joined: Aug 2004
Status: Away
RE: [Request] Bot?
quote:
Originally posted by -DRK-panoz
code:
function OnEvent_ChatWndReceiveMessage("","","!ver",1)
{
ChatWnd.SendMessage("This is v1.0.0a");
}

No, because the values are passed to the function when it's executed. Thus, it really should be like this:

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind) {
if(Message.substr(0, 4) == "!ver") {
ChatWnd.SendMessage("Version 1.0");
}
}

This post was edited on 06-25-2006 at 09:41 PM by L. Coyote.

Hack, hack, hack!
Finally became a Systems Analyst! :spam:

06-25-2006 09:38 PM
Profile PM Find Quote Report
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
32 / Male / Flag
Joined: Mar 2003
Status: Online
RE: RE: [Request] Bot?
quote:
Originally posted by -DRK-panoz
I too want to make a bot and am not aware of what I'm doing wrong
code:
function OnEvent_ChatWndReceiveMessage("","","!ver",1)
{
    ChatWnd.SendMessage("This is v1.0.0a");
}

And then in the Debug I get
code:
Error: Expected identifier.
       Line: 1. Code: -2146827278.

Please help. Thanks :)

Your code should be something like:

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, sOrigin, sMessage, MessageKind)
{
if sMessage == "!ver" {
ChatWnd.SendMessage("This is v1.0.0a");
}
}
(haven't tried this)
YouTube closed-captions ripper (also allows you to download videos!)
06-25-2006 09:41 PM
Profile E-Mail PM Web Find Quote Report
cooldude_i06
Full Member
***

Avatar
I'm so cool I worry myself.

Posts: 272
Reputation: 9
– / Male / –
Joined: Sep 2003
RE: RE: [Request] Bot?
quote:
Originally posted by -DRK-panoz
I too want to make a bot and am not aware of what I'm doing wrong
code:
function OnEvent_ChatWndReceiveMessage("","","!ver",1)
{
    ChatWnd.SendMessage("This is v1.0.0a");
}

And then in the Debug I get
code:
Error: Expected identifier.
       Line: 1. Code: -2146827278.

Please help. Thanks :)


function OnEvent_ChatWndReceiveMessage("","","!ver",1)
{
ChatWnd.SendMessage("This is v1.0.0a");
}

-------------------------------------------------------------------------------
when you create that function you cant pass arguements, instead you receive parameters, it should be something like

function OnEvent_ChatWndReceiveMessage(objChatWnd, strUser, strMessage, numMessageType)
{
objChatWnd.SendMessage("This is v1.0.0a");
}

objChatWnd is the ChatWnd object that generated the event
strUser is the name of the user who send the text
strMessage is the message
numMessageType is a number corresponding to the type of message

you can use these variables in the function in if statements or something to do what you want

if you want to report the version number when !ver is typed, it should look like

function OnEvent_ChatWndReceiveMessage(objChatWnd, strUser, strMessage, numMessageType)
{
     if(strMessage == "!ver"){
          objChatWnd.SendMessage("This is v1.0.0a");
     }
}

This post was edited on 06-25-2006 at 09:47 PM by cooldude_i06.
[Image: clb2.jpg]
06-25-2006 09:45 PM
Profile E-Mail PM Web Find Quote Report
h-t
New Member
*

Avatar

Posts: 6
Joined: Jun 2006
O.P. RE: [Request] Bot?
Thanx, it's working :)
06-26-2006 11:27 AM
Profile E-Mail PM Find Quote Report
Yomeh
New Member
*


Posts: 5
Joined: Jun 2006
RE: [Request] Bot?
Here's an idea with that little sample up there break down the code like

quote:
objChatWnd.SendMessage(strUser + " " + strMessage + " " + numMessageType);


Then it shouldnt really be hard just an idea really :$
06-26-2006 11:58 AM
Profile E-Mail PM Find Quote Report
Yomeh
New Member
*


Posts: 5
Joined: Jun 2006
RE: [Request] Bot?
This is what i've come with so far with breaking down the code

code:
function OnEvent_ChatWndReceiveMessage(objChatWnd, strUser, strMessage, numMessageType)
{
     if(strMessage == "Hi") {
     if(strUser != Messenger.MyName){
          objChatWnd.SendMessage("Hi [auto reply]");
     }
  }
}


It only replys to messages from your other contacts
can someone correct me if i'm wrong not really an expert lol!

This post was edited on 06-26-2006 at 12:06 PM by Yomeh.
06-26-2006 12:05 PM
Profile E-Mail 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