|
| Author |
Message |
ctechguy Newbie

Joined: 10 Aug 2005 Posts: 11
         
|
Posted: Thu Aug 11, 2005 2:37 pm Post subject: Help maya bot commands |
|
|
| I have mayabot 4 and would like a command when some one on msn clicks on him when the window opens to say a message like welcome to my bot type !menu for menu or something like that. I also want it to say i don't understand when the person type something not in the replies. |
|
| Back to top |
|
 |
Cer Upgraded Agent

Joined: 03 Feb 2004 Posts: 3776 Location: Michigan
  votes: 4
|
Posted: Thu Aug 11, 2005 5:41 pm Post subject: Re: Help maya bot commands |
|
|
| ctechguy wrote: | | I have mayabot 4 and would like a command when some one on msn clicks on him when the window opens to say a message like welcome to my bot type !menu for menu or something like that. I also want it to say i don't understand when the person type something not in the replies. |
Both of those things can be found on this forum. Stop being lazy and search around for once. _________________ Current Site (2008) http://www.cuvou.com/ |
|
| Back to top |
|
 |
ctechguy Newbie

Joined: 10 Aug 2005 Posts: 11
         
|
Posted: Thu Aug 11, 2005 7:09 pm Post subject: |
|
|
| sorry |
|
| Back to top |
|
 |
draget Not Yet a God

Joined: 29 Dec 2004 Posts: 367 Location: Australia
   
|
Posted: Fri Aug 12, 2005 10:20 am Post subject: |
|
|
| you dont need a command for a welcome message, use a typing sub. |
|
| Back to top |
|
 |
X-Worm Newbie

Joined: 12 May 2005 Posts: 36
    
|
Posted: Sat Sep 10, 2005 10:17 am Post subject: Re: Help maya bot commands |
|
|
| Code: |
sub RoomOpened {
my $self = shift;
print "<Conversation> Room opened.\n";
&send($self, "Welcome?", $username);
}
|
That might work. |
|
| Back to top |
|
 |
Cer Upgraded Agent

Joined: 03 Feb 2004 Posts: 3776 Location: Michigan
  votes: 4
|
Posted: Sat Sep 10, 2005 4:52 pm Post subject: Re: Help maya bot commands |
|
|
| X-Worm wrote: | | Code: |
sub RoomOpened {
my $self = shift;
print "<Conversation> Room opened.\n";
&send($self, "Welcome?", $username);
}
|
That might work. |
If that's the Answer handler, there's a problem: MSN 7 as well as many unofficial clients open sockets with your contacts to download their display pics - this triggers the Answer handler - causing your bot to randomly send welcome messages to people not even talking to it.
Use the Typing handler instead. I'm not exactly sure how MayaBot named its subroutine but basically it goes like this:
| Code: | sub Typing {
my ($self,$user,$name) = @_;
# Only send the welcome message once per convo.
if (!exists $self->{_sent_welcome}) {
$self->{_sent_welcome} = 1;
&send ($self, "Welcome", $user);
}
} |
_________________ Current Site (2008) http://www.cuvou.com/ |
|
| Back to top |
|
 |
|