Artificial intelligence bot written by Chessnut on another forum. I thought it should be shared here, it is a fun little script. Looks like he is a member here, but hasn't posted in a few years, so if you don't want this posted please let me know.
You can change $chan to $nick if you want it to PM that person, instead of the channel.
Also, I set the timer to 7 seconds as a personal preference, you can remove it if you want.
Just talk and it will respond to you. Will also keep your place in the conversation if you get disconnected or stop talking for a while.
Have fun!
Link to original script, posted in 2006.
http://forum.swiftirc.net/viewtopic.php?f=34&t=11545&hilit=artificial+intelligence
on *:text:*:*:{
var %t $ticks
sockopen alice. $+ %t www.pandorabots.com 80
sockmark alice. $+ %t $mid($md5($address($chan,2)),16) $chan $regsubex($1-,/([^\w])/Sg,$+(%,$base($asc(\1),10,16,2)))
}
on *:sockopen:alice.*:{
tokenize 32 $sock($sockname).mark
var %u $+(&botcust2=,$1&input=,$3)
sockwrite -n $sockname POST /pandora/talk?botid=f5d922d97e345aa1&skin=custom_input HTTP/1.1
sockwrite -n $sockname Host: www.pandorabots.com
sockwrite -n $sockname Content-Type: application/x-www-form-urlencoded
sockwrite -n $sockname Content-Length: $len(%u .)
sockwrite -n $sockname $crlf %u
}
on *:sockread:alice.*:{
if (!$sockerr) {
var %s
$event %s
if $regex(%s,^.*<em>(.*?)<\/em><\/b>$) {
timer 1 7 msg $gettok($sock($sockname).mark,2,32) $regml(1)
sockclose $sockname
}
}
}
ROFL here we go again, ppl apparently can not read. (well i cant spell so, we all have our flaws)
I'd keep quiet about the fact this isn't yours. For some ridiculous reason, it's not allowed here.
God i hope that was sarcasm If not you clearly miss the point and It should be fairly obvious by now, on that note maybe hawkee should add a ''YOU Aught TO KNOW'' section and just allow ppl to post super cool leet code and full scripts they WANT to post here but can't cause its rippin'ETC. That way no one has to worry about rating and flames and shíít.
PATX said:
reason: do not really get it... are you supposed to just talk to the bot and it will
The bot auto-responds to whatever you say in the channel, since it's a varied text event (hence the on :text::*:{).
In which case, if you have a relatively active channel, the bot will lag, which is not good.
jonest44: as slacker said:
"Your snippet will be deleted if you break any of the following rules:
Snippet needs to be tested and functional.
Introduction must describe what the snippet does and how it is used.
At least 25% of the code must be written by you.
If you used somebody else's snippet you must include a URL to the original.
You may not post an updated snippet separately, you need to edit your first post."
so yeah it is. he he included a url to the original post.
Cool uneek :) I have a script like this that also uses pandorabots.com. Good job getting it to work. It took me weeks, way back when, to get mine to work.
Oh yea Lawnmower? Did you post it on swiftirc or here? I tried to edit it to get it to worth with the Irene ai bot, because she seemed a bit more vulgar :P But I couldn't figure it out, as I am still very novice when it comes to sockets and getting the right html information copied over.
Also, I put the original link in, as I see it is part of the rules.
Your snippet will be deleted if you break any of the following rules:
Snippet needs to be tested and functional.
Introduction must describe what the snippet does and how it is used.
At least 25% of the code must be written by you.
If you used somebody else's snippet you must include a URL to the original.
You may not post an updated snippet separately, you need to edit your first post.
TYPEO^