Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

hey everyone im really really new at this so you'll have to bear w/ me. i have made and aim bot from wiredbots and when he talks he just spits out random stuff. in the on_im.pl it has the line "$reply = thought ();" i dont know if that is what needs to be changed but how can i make his say what i want him to when he is talked to? any help is appreciated.

Replies are listed 'Best First'.
Re: (nrd) AIM bot
by newrisedesigns (Curate) on Oct 21, 2002 at 03:10 UTC

    More than likely, thought() is a subroutine/function that takes the user input, transmogrifies it somehow, and returns it. Look through the file for the thought subroutine and see what you can do with it.

    You should read the documentation on wiredbots.com. I'm not familiar with their robots, but they should have some sort of documentation or at least a quick FAQ on customization.

    John J Reiser
    newrisedesigns.com

Re: AIM bot
by justinNEE (Monk) on Oct 21, 2002 at 20:46 UTC
    You should use Net::OSCAR ...it will be just as fast to do what you're trying to do, be more flexible, and you'll probably learn something along the way.
Re: AIM bot
by BoyPlankton (Novice) on Oct 22, 2002 at 03:20 UTC
    I downloaded the source and looked through it, and I can't find any reference to a thought subroutine in the source code.

    If you are really interested in writing an AIMBot, you really should review the documentation and samples that are included in the Net::AIM module. Aryeh Goldsmith included a sample program with the module called aimtest that is actually a really good reference to study while trying to learn how to use the module. The module itself is simple enough to use. You just add references to subroutines to handle the messages that are recieved from the AIM server.

      I have the same thing. thought() is a subroutine that's made in thought.pl in the "extras" folder. There you can make you bot unique. The original source tries to make it grab a random saying from some lame text file. Mine is a little more complex than that. I'm slightly proud of it. If anyone ever wants to see it in action, it's on TriggerDunpoe, although it's not always online. Plus it has a bit of a dirty mouth, because some dirty people have talked to it... =\