|
| Author |
Message |
Sypher_old Newbie

Joined: 30 Dec 2003 Posts: 14
   
|
Posted: Tue Dec 30, 2003 2:13 pm Post subject: |
|
|
Hi,
Thanks for reading my topic 
I'm looking for a (working) Perl Template for an MSN Bot.
Which one is the best?
I wanted to download the files here but they all seem to be broken..
Thanks! |
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Tue Dec 30, 2003 2:20 pm Post subject: |
|
|
What part of them seems broken?
You would need MSN.pm, the SSL update, and then one of the bot templates (or just the basic one that comes in the MSN.pm documentation.)
There will be a newer MSN.pm soon with an HTML doc page, and a few minor updates.
There is also some talk of an upgraded bot template that allows commands, and mods, etc. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
Sypher_old Newbie

Joined: 30 Dec 2003 Posts: 14
   
|
Posted: Tue Dec 30, 2003 2:28 pm Post subject: |
|
|
Well the downloads at http://www.botwork.com/downloads.html are broken..
But I have 3 different templates:
- one by pigcheese (from the triviabot) - one by clcool - the new wiredbots
But no one works..
Pigcheeses give me this error:
| Quote: | C:\Bots\bot>sdba.pl blah
Including about.pl.. OK! Including away.pl.. OK! Including leave.pl..Missing right curly or square bracket at commands/leave.pl l ine 7, at end of line syntax error at commands/leave.pl line 7, at EOF Compilation failed in require at C:\Bots\bot\sdba.pl line 57. C:\Bots\bot>
|
another version of his bot gives:
| Quote: | C:\Bots\TriviaBot>sdba.pl blah
Can't locate loadable object for module Time::HiRes in @INC (@INC contains: F:/P erl/lib F:/Perl/site/lib .) at MSN.pm line 100 Compilation failed in require at MSN.pm line 100. BEGIN failed--compilation aborted at MSN.pm line 100. Compilation failed in require at bin/protocols/MSN.pl line 3. BEGIN failed--compilation aborted at bin/protocols/MSN.pl line 3. Compilation failed in require at C:\Bots\TriviaBot\sdba.pl line 47.
C:\Bots\TriviaBot> |
ClCool's gives:
| Quote: | C:\Bots\bt>bot.pl Can't locate MSN.pm in @INC (@INC contains: F:/Perl/lib F:/Perl/site/lib .) at C :\Bots\bt\bot.pl line 26. BEGIN failed--compilation aborted at C:\Bots\bt\bot.pl line 26.
C:\Bots\bt> |
and wired gives:
| Quote: | C:\Bots\wired>bot.pl
Including on_im.pl.. OK! Including docrypt.pl.. OK! Including commands.pl.. OK! Including log_im.pl.. OK! Including thought.pl.. OK! Defined Connect Defined Message Defined Answer Defined Join
MSN Module v. 1.2.1
Unknown error at lib/MSN.pm line 416.
C:\Bots\wired> |
I'm new on perl so I hope somebody can give me a hand..
Thanks!
Ow and eric, can you tell me more about:
| Quote: | | There is also some talk of an upgraded bot template that allows commands, and mods, etc |
|
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Tue Dec 30, 2003 3:15 pm Post subject: |
|
|
Goto the Downloads forum on this site and get the protocol from the protocol section and one of the bots from the bot section.
More on the new bot template in a bit. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
Sypher_old Newbie

Joined: 30 Dec 2003 Posts: 14
   
|
Posted: Tue Dec 30, 2003 3:42 pm Post subject: |
|
|
Hi Eric,
Thanks for the link but I already downloaded them..
I have WiredBots Updated MSN Bot and the ClCool's but still have the error in MSN.pm.. Any idea how to fix this? |
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Tue Dec 30, 2003 3:48 pm Post subject: |
|
|
Did you unzip the file into your c:\perl\site\lib directory or into your bots diretory? You could also try the bot.pl file included in one of the early MSN.pm posts. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
Sypher_old Newbie

Joined: 30 Dec 2003 Posts: 14
   
|
Posted: Tue Dec 30, 2003 3:54 pm Post subject: |
|
|
The strange thing is that he installed it on my F: partition (i don't know why) but i tried varous versions but they all have some kind of error.
But the 'wiredbots' source uses it's own MSN.pm |
|
| Back to top |
|
 |
Nate God Like

Joined: 12 Nov 2003 Posts: 553
    
|
Posted: Tue Dec 30, 2003 8:41 pm Post subject: |
|
|
The WiredBots source uses the MSN 1.2.1 module in a local library. To fix this, go into the bot.pl and comment out this line:
And then it will use whatever version of MSN.pm you have in your Perl/lib folder. It might help later if they update MSN.pm again. |
|
| Back to top |
|
 |
Sypher_old Newbie

Joined: 30 Dec 2003 Posts: 14
   
|
Posted: Tue Dec 30, 2003 8:53 pm Post subject: |
|
|
Well i HAVE it working 
But... not as good as i want, he crashes on almost every command i type.. |
|
| Back to top |
|
 |
Nate God Like

Joined: 12 Nov 2003 Posts: 553
    
|
Posted: Tue Dec 30, 2003 9:11 pm Post subject: |
|
|
If you run it using command prompt or a batch file, when it crashes it won't close the window right away, and you can copy and paste the code.
Since command.com is harder to use because you have to navigate all over the place to find your file, here's how to make a batch file.
In the same folder as your bot.pl file: 1. Make a file called "bot.txt" 2. Open "bot.txt" and write this:
| Code: | | @echo off<br />perl bot.pl<br />pause |
3. Save bot.txt 4. Rename "bot.txt" to "bot.bat" 5. Open "bot.bat"
What that batch file does: @echo off Turns off the command echo. perl bot.pl Runs bot.pl using the Perl interpreter pause Waits for user's confirmation ("Press any key to continue. . .")
The DOS echo repeats every command written. If you don't use @echo off it looks like this:
| Code: | | C:\msnbot\bot.bat> perl bot.pl<br /># this is where all your bot code prints its stuff<br /># and this is where it crashes<br />C:\msnbot\bot.bat> pause<br />Press any key to continue. . . |
It's no big deal, but it looks neater without echos:
| Code: | | # this is where your bot code prints its stuff<br /># and this is where it crashes<br />Press any key to continue. . . |
Well either way, this should let you see what errors you get.
| Code: | | Missing right square or curly bracket at file.pl line 5.<br />Press any key to continue. . . |
|
|
| Back to top |
|
 |
Vorx Senior Member

Joined: 21 Dec 2003 Posts: 152
   
|
Posted: Tue Dec 30, 2003 9:16 pm Post subject: |
|
|
Yeah I made a Batch file to run my bot and if you want it outside of the bot folder you could do this:
| Code: | | <br />@echo off<br />cd \<br />cd perl<br />cd bin<br />perl bot.pl<br />pause<br /> |
That's my bot.bat file I use and have it on my Desktop to make life easier lol |
|
| Back to top |
|
 |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Tue Dec 30, 2003 9:54 pm Post subject: |
|
|
just a comment, that pigcheese guys bot i dont see why he even released the code, he used duncan lambs bot template and took out the readme duncan lamb had left in in my early release of msn.pm (which meens both those templates use the old unstable one)
i suggest sticking around here to stay up to date  |
|
| Back to top |
|
 |
Sypher_old Newbie

Joined: 30 Dec 2003 Posts: 14
   
|
Posted: Tue Dec 30, 2003 10:20 pm Post subject: |
|
|
Right now i'm using the WiredBots code which works perfect...
Untill i changed it Not all the commands work ...
For example, i added !nick to the bot.pl file but it had a strange effect:
| Quote: | I said: !nick MyBot
MyBot says: I don't know how to reply to that
MyBot says: Nick changed into "MyBot"
I said: Neat!
MyBot says: I don't know how to reply to that
Neat! says: Nick changed into "Neat!" |
So every word I say is turned into a nickname 
How to fix the first? Also: How can I delete that lame response (no offence to the author) |
|
| Back to top |
|
 |
Nate God Like

Joined: 12 Nov 2003 Posts: 553
    
|
Posted: Tue Dec 30, 2003 10:32 pm Post subject: |
|
|
Ok, in the WiredBots on_im there's a variable called $isacommand. You can modify your bot to only call the thought() sub if $isacommand is non-zero. It would look kinda like this:
| Code: | | $reply = thought($victim,$msg) if !$isacommand; |
That way it will only respond with what the command should respond with, and not try to get a reply for it too. |
|
| Back to top |
|
 |
Sypher_old Newbie

Joined: 30 Dec 2003 Posts: 14
   
|
Posted: Tue Dec 30, 2003 11:08 pm Post subject: |
|
|
QUOTE(Nate @ Dec 30 2003, 02:32 PM) Ok, in the WiredBots on_im there's a variable called $isacommand. You can modify your bot to only call the thought() sub if $isacommand is non-zero. It would look kinda like this: | Code: | | $reply = thought($victim,$msg) if !$isacommand; |
That way it will only respond with what the command should respond with, and not try to get a reply for it too. | thanks, it works great!
Btw: do you know howto fix:
| Quote: | i said: !nick mybot
!nick mybot says: my name is !nick mybot |
|