|
| Author |
Message |
Micky G Member

Joined: 30 Dec 2003 Posts: 144
   
|
Posted: Wed Dec 31, 2003 1:32 pm Post subject: |
|
|
I have the wired bot template. It now can connect and it responds to all messages with 'i dont know how to reply to that.' But! I think im thick here, but where do you put the commands? There are 3 files where i could put them - 1. - bot.pl 2. - docrypt.pl In The folder named COMMANDS 3. - In the file called commands.pl
Which one of these works with commands? |
|
| Back to top |
|
 |
Cheatsfp Member

Joined: 30 Dec 2003 Posts: 109
   
|
|
| Back to top |
|
 |
Vorx Senior Member

Joined: 21 Dec 2003 Posts: 152
   
|
Posted: Wed Dec 31, 2003 2:01 pm Post subject: |
|
|
Hi,
To make commands do this:
Start the command with the name you'll call it with so if it's an invite command you do this:
| Code: | | <br />sub invite {<br /><br />#code goes here<br /><br />}<br />1;<br /> |
Then save it in your commands folder as "invite.pl".
That's it! 
EDIT
And btw, docrypt.pl is a command so you can type docrypt [something] in the msn window and it does basic encryption.
EDIT
Open your commands.pl file in the extras folder and find this line (line 32):
| Code: | | <br />if ($msg =~ /^\:$file/i) {<br /> |
Replace the : before $file with a character of your choice, the usual is ! # . etc
this is your command prefix so you would type for mine :invite blah because I use a colon : as my prefix.
Hope this helps. |
|
| Back to top |
|
 |
Micky G Member

Joined: 30 Dec 2003 Posts: 144
   
|
Posted: Wed Dec 31, 2003 2:28 pm Post subject: |
|
|
| Code: | | <br />sub invite {<br />if ($msg =~ /^\!invite (.*)$/) {<br />&send($$self,"Inviting $1.. please wait", "$username");<br />$$self->send('CAL', "$1");<br />&send($$self,"Try typing something..", "$username");<br />return;<br />}<br />1;<br /> |
This doesnt work though. I followed what it was ment to be like tho. |
|
| Back to top |
|
 |
Vorx Senior Member

Joined: 21 Dec 2003 Posts: 152
   
|
Posted: Wed Dec 31, 2003 2:31 pm Post subject: |
|
|
Hi, yeah that won't work because it's for the other bot template.
I'm not too good at converting these things but i'll give it a go for you but don't blame me if I get it wrong too 
This is yours so far:
| Code: | | <br />sub invite {<br />if ($msg =~ /^\!invite (.*)$/) {<br />&send($$self,"Inviting $1.. please wait", "$username");<br />$$self->send('CAL', "$1");<br />&send($$self,"Try typing something..", "$username");<br />return;<br />}<br />1;<br /> |
Try changing it to this:
| Code: | | <br />sub invite {<br />&send($self,"Inviting $1.. please wait", "$username");<br />$self->send('CAL', "$1");<br />&send($self,"Try typing something..", "$username");<br />return;<br />}<br />1;<br /> |
I took away the 3rd line and made the $$ just $. Have a go and tell me what happens. |
|
| Back to top |
|
 |
Micky G Member

Joined: 30 Dec 2003 Posts: 144
   
|
Posted: Wed Dec 31, 2003 2:43 pm Post subject: |
|
|
| I it crashed as soon as i type /invite email |
|
| Back to top |
|
 |
Vorx Senior Member

Joined: 21 Dec 2003 Posts: 152
   
|
Posted: Wed Dec 31, 2003 2:44 pm Post subject: |
|
|
| If it gave any error messages on the DOS window then please post them, as it's the best way to fix it. |
|
| Back to top |
|
 |
Micky G Member

Joined: 30 Dec 2003 Posts: 144
   
|
Posted: Wed Dec 31, 2003 2:46 pm Post subject: |
|
|
| No error messages just went bang. And closed. |
|
| Back to top |
|
 |
Vorx Senior Member

Joined: 21 Dec 2003 Posts: 152
   
|
Posted: Wed Dec 31, 2003 2:49 pm Post subject: |
|
|
Ok, here's a good way to read any errors if there are any.
Open up notepad, and type:
| Code: | | <br />@echo off<br />cd \<br />cd perl<br />cd bin<br />perl bot.pl<br />pause<br /> |
Then do save as, and type (with "") "bot.bat"
Then save it on the desktop for speed.
This means that if you get an error, it'll wait for you to press a key before it closes.
Tip: If your bot file isn't called bot.pl then rename it in the batch file.
Also, i'm assuming you've installed perl as C:\Perl |
|
| Back to top |
|
 |
Micky G Member

Joined: 30 Dec 2003 Posts: 144
   
|
Posted: Wed Dec 31, 2003 2:58 pm Post subject: |
|
|
| Code: | | Useless use of hash element in void context at C:/Perl/lib/MSN.pm line 387.<br />Useless use of a constant in void context at C:/Perl/lib/MSN.pm line 387.<br />"my" variable $challenge masks earlier declaration in same scope at C:/Perl/lib/<br />MSN.pm line 911.<br />Name "MSN::OUT" used only once: possible typo at file line 389.<br /><br /><br />Use of uninitialized value in string ne at bot.pl line 46.<br />You seem to be missing the required directories: handlers, commands, logs, and e<br />xtras. They should have come in the zip you downloadedPress any key to continue<br />. . . |
But with this the bot didnt even start up. I have the bot running and i do the command and it crashes. |
|
| Back to top |
|
 |
Vorx Senior Member

Joined: 21 Dec 2003 Posts: 152
   
|
Posted: Wed Dec 31, 2003 3:04 pm Post subject: |
|
|
Well you haven't installed the bot template correctly by the look of the error message.
Make sure that you've read the readme properly. In the wiredbots folder you downloaded, make sure you copy the Event folder and MSN.pm to the Lib folder in perl.
If you need any more help then add me to MSN (vorx@vorx.co.uk) |
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Wed Dec 31, 2003 3:25 pm Post subject: |
|
|
That batch file might not be working if your bot is not located at c:\perl\bin
Another way to test without a batch file is to goto start->run-> and type "command"
then goto the directory your bot is in. (e.d. cd MSN-bot for me cause my bot is at c:\MSN-bot\bot.pl) Then run the bot with "perl bot.pl"
Also you are either using the wrong version of MSN.pm or not showing all your out put. Grab the newest MSN.pm from the downloads/protocols forum. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
Micky G Member

Joined: 30 Dec 2003 Posts: 144
   
|
Posted: Wed Dec 31, 2003 3:32 pm Post subject: |
|
|
| The newest doesnt work, with the wired bot. |
|
| Back to top |
|
 |
Cheatsfp Member

Joined: 30 Dec 2003 Posts: 109
   
|
Posted: Wed Dec 31, 2003 4:18 pm Post subject: |
|
|
QUOTE(Vorx @ Dec 31 2003, 06:31 AM) Hi, yeah that won't work because it's for the other bot template. I'm not too good at converting these things but i'll give it a go for you but don't blame me if I get it wrong too  This is yours so far: | Code: | | <br />sub invite {<br />if ($msg =~ /^\!invite (.*)$/) {<br />&send($$self,"Inviting $1.. please wait", "$username");<br />$$self->send('CAL', "$1");<br />&send($$self,"Try typing something..", "$username");<br />return;<br />}<br />1;<br /> |
Try changing it to this:
| Code: | | <br />sub invite {<br />&send($self,"Inviting $1.. please wait", "$username");<br />$self->send('CAL', "$1");<br />&send($self,"Try typing something..", "$username");<br />return;<br />}<br />1;<br /> |
I took away the 3rd line and made the $$ just $. Have a go and tell me what happens. | I tried that '/invite' thing, and it didn't work. It just cut my bot offline. This is the error it gave me...
| Code: | | <br />Use of uninitialized value in concatenation (.) or string at commands/invite.pl.<br />txt line 2, <GEN2> line 9.<br />Use of uninitialized value in string at commands/invite.pl.txt line 2, <GEN2> li<br />ne 9.<br />Undefined subroutine &main::send called at commands/invite.pl.txt line 2, <GEN2><br /> line 9.<br /><br />C:\Perl\bin><br /> |
?
 |