mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
What I'm looking for is a code that will run on my bot, and upon a specific command ask the person some questions in pm. The responses to the questions can be accepted from anywhere, but the bot should recognize who is responding to what question no matter where they put the response.

I also want the bot to ask the questions one at a time, waiting for the person to give a response before going to the next question.

The responses are to be stored in a hash table that I've already got called Profiles and need to be stored on a by nick (or better yet, address) basis

For example:
<bot> What is your description?
<RusselB> 5'8", 115 lbs, brown hair, hazel eyes
hadd -m Profile $+(Desc,$address) 5'8", 115 lbs, brown hair, hazel eyes
<bot> What is your location?
<RusselB> Ontario, Canada
hadd -m Profile $+(Loc,$address) Ontario, Canada

I hope that's clear.

P.S.: If possible, I'd also like to include a timer of some kind so that if the person doesn't want to answer the question, all they have to do is wait for (say a minute) and then the bot will go to the next question automatically, but I don't want the bot to go to the next question if (for some reason) it takes more than a minute for the person to enter their response

Last edited by RusselB; 09/04/05 03:08 AM.
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
P.S.: If possible, I'd also like to include a timer of some kind so that if the person doesn't want to answer the question, all they have to do is wait for (say a minute) and then the bot will go to the next question automatically, but I don't want the bot to go to the next question if (for some reason) it takes more than a minute for the person to enter their response


And just by what means is this bot ment to know if the person has chosen not to answr or is currently writting something? Were not using AIM you know!

PS: I suggest you use $+(Desc.,$address) in place of just Desc, this well allow easy disecting of the string later

Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I didn't have a clue if there was some way of doing that or not, which is why I said "if possible"... and Yes, I do realize this isn't AIM....if it can't be done, then I'll simply include a message to the user telling them that they have one minute to completely answer the question...just thought it would be nice to have the other option, but I realized when I put it up, that it might not be possible.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
One thing you may want to look at as well is to specify what kind of $address you want. Example, $address($nick,2). This lets you choose the format to use rather than the default. It will probably help you out later to pick one format that you feel is most appropriate for your needs.


Invision Support
#Invision on irc.irchighway.net
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
For particular reasons I need to use the same format that $address uses...I've found that I can obtain that same format by using $gettok($address($2,5),2,33)

Although I don't understand how or why this is relevant to my original question...if it helps resolve the query, then there's the information


Link Copied to Clipboard