I have a perl bot for AIM, i managed to get it werking and stuff, and i have used the /addreply command to make it so *lazy* can add ther own replies for my bot, i know i can also edit this information in my data.txt (in my bots main folder ) this is a bit of text i have!
Code:
<br />What you doin][Nothing much|Nothing really|Chatting :-D|Im doin nout really;
now im wundering if i put
Code:
<br />What you doin|what are you doing|what you doin?][Nothing much|Nothing really|Chatting :-D|Im doin nout really;<br />
it would still work? i dont think it does as i tried it, so does this mean that i have to type each user-input as a new "thing" ? thanx.....
two more things now:-
1: do i have to have my bot in the "bin" folder? (i probably got that wrong newayz lol ) can i use a different folder (keeping the sub folders intact)
2 when i am putting in my q's and replies,.... my bot thinks there is a difference between "what?" and "what" , so do i need to make it filter punctuation??? if so wer would i put the filter
Alright, first of all the pipes in the user's input side of your file should work. And another thing, 1. You don't have to put your bot in the bin folder, in fact I'd strongly not recommend it (makes it easier when you know which files are yours and which aren't), and 2. Here's how to filter puncuation (I know there's another better way but I'm not exactly sure how to do it)
i dont know which topic to post this bit in but, i just realised now, if i send ANYTHING that it doesnt understand, it quits,,,,, i dont think i have edited the thought.pl wer it sends the none understanding message .... :-S And cheers For that, im gonna try that now ill post results
Edit I am like, 1 day new to all this, and i don't understand alot of the stuff, but i get the gist of perl i think.../hope but could you tell me wat shift means? (eg my $victim = shift;) does it make it for only that sub file or sumthin? :blink:
lets say i want to call a sub name error which will check a string and see if it contains an string i classify as shouldnt be there.. you could call it like this
Code:
$error = error("our string");
then in the error sub it would be shaped like this
Code:
sub error {<br />my $string = shift; #this gets the string we passed from the last part<br />#do some stuff and test<br />return "our final string that will be held in $error from the last part of the example";<br />}