|
| Author |
Message |
Drayshak Young One

Joined: 06 Jan 2004 Posts: 93 Location: Nottinghamshire, UK
      votes: 4
|
Posted: Wed Jan 21, 2004 7:27 pm Post subject: |
|
|
| how would *lazy* get it to ask yes or no and when *lazy* answer it will take *lazy* there or not?? i dont know where the callbacks are :'( so i cant really do it properly till i can do the callback thingymbob, any help?? |
|
| Back to top |
|
 |
WinterBot Member

Joined: 17 Jan 2004 Posts: 108
   
|
Posted: Wed Jan 21, 2004 7:34 pm Post subject: |
|
|
what? i think you might want to edit that post, or maybe im the only one that doesnt understand it?  |
|
| Back to top |
|
 |
Drayshak Young One

Joined: 06 Jan 2004 Posts: 93 Location: Nottinghamshire, UK
      votes: 4
|
Posted: Wed Jan 21, 2004 8:07 pm Post subject: |
|
|
| right, when *lazy* type chat i want it to say do you agree to rules yes or no, and then when *lazy* type yes it takes *lazy* in and no means its shuts off the callback which is checking for the answer |
|
| Back to top |
|
 |
WinterBot Member

Joined: 17 Jan 2004 Posts: 108
   
|
Posted: Wed Jan 21, 2004 8:15 pm Post subject: |
|
|
| oohhhh like what DC and bot2k3 do? sorry i dont know that command |
|
| Back to top |
|
 |
Drayshak Young One

Joined: 06 Jan 2004 Posts: 93 Location: Nottinghamshire, UK
      votes: 4
|
Posted: Wed Jan 21, 2004 8:17 pm Post subject: |
|
|
| damn, eric, *lazy* know anything about it?? lol i know it has summat to do with callbacks like calc does |
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Wed Jan 21, 2004 8:53 pm Post subject: |
|
|
Peice-o-cake (darwin now uses this if you wanna try it out)
| Code: | | <br />sub chat<br />{ <br /> my ($bot, $self, $user, $msg) = @_;<br /><br /> my $user_settings = $bot->{users}->{$user};<br /> my $msn = $bot->{msn};<br /> my $settings = $bot->{settings};<br /><br /> # command body here.<br /> if ($msg eq '')<br /> {<br /> $user_settings->{callback} = "chat";<br /> return "Type 'yes' to agree to these rules.\n\n 1.) Be Nice\n 2.) Have Fun";<br /> } <br /> elsif ($msg eq 'yes')<br /> { <br /> $user_settings->{callback} = "";<br /> if (!exists $bot->{chatroom} or !exists $bot->{msn}->{Socks}->{$bot->{chatroom}->{fn}} ) {<br /> $bot->{chatroom} = $self;<br /> $self->{settings}->{Silent} = 1;<br /> return "This is now the chat room. " . $bot->{chatroom}->{fn};<br /> }<br /> elsif ($self eq $bot->{chatroom})<br /> {<br /> return "Your in the chat room.";<br /> }<br /> else<br /> {<br /> $bot->{chatroom}->invite($user);<br /> return "Inviting you to the chat room now!" . $bot->{chatroom}->{fn};<br /> }<br /> }<br /> else<br /> {<br /> $user_settings->{callback} = "";<br /> return "Sorry you can't aggree to these rules!";<br /> }<br /> <br />} <br /><br />{<br /> Category => 'Conversations', <br /> Description => 'start a chat room', <br />};<br /> |
_________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
Drayshak Young One

Joined: 06 Jan 2004 Posts: 93 Location: Nottinghamshire, UK
      votes: 4
|
Posted: Wed Jan 21, 2004 8:54 pm Post subject: |
|
|
kewl thnx  |
|
| Back to top |
|
 |
|