Pandoras Talking Bot

Platform:  mIRC
Published  Jun 15, 2009
Updated  Feb 16, 2013

This is a pandoras bot script similar to the tcl version, with a few more selections/controls.

To turn on the bot, right click the channel window you want it to talk in, Click "Select bot for #Chan", select one of the bots from the list, click ON and click accept.

Once the script is turned on the bot is activated by calling it's NickName(Irc Name).
Saying the bots nickname will place the bots focus on you. It will always be talking to the last person who said it's name.

To make the bot stop talking, any Op or the person who said the bots name last, can just type shutup. All one word (shutup)!
Also. Anyone can type the bots name followed by shutup and it will turn off.

To deactivate the bot just right click the channel window and select Off.

You can use different bots in different channels.
I scripted this for multi-channel/multi-network use, so you have separate controls for every channel.

**Added a menu selection to enter your bot from the botid**
Just Right the channel, select "enter bot from botid", enter the bots name and the bots id and it will be assigned to that channel.
**Added focus change from nicklist**
Now You can right click on a nickname and place the bots focus on that person.
You must first activate a bot for the channel.
**Added a PM function to change the focus of the bot**
This will allow you to change the bots focus through PM.
The syntax is .focus #channel nickname
Error checking is as follows;

  • Channel and Nickname must be given in that order.
  • The channel must exist and the nickname must be on the channel.
  • A bot must already be activated for the given channel.
  • The person requesting the focus change must be an Op on the selected channel.

Full syntax will be /msg botnickname .focus #channelname nickname ;Pandora's talking Bot Script by Ford_Lawnmower -- irc.GeekShed.net #Script-Help
On *:Text:*:#: {
if ($hget(Pandora,$+($network,$chan))) {
var %text $regsubex($strip($1-),/(^[!\d]*\d$)/i,$null)
if ($me isin %text) { hadd Pandora $+($network,$chan) $puttok($hget(Pandora,$+($network,$chan)),$wildsite,6,32) }
if (shutup isin %text) && ($nick isop $chan || $gettok($hget(Pandora,$+($network,$chan)),6,32) == $wildsite) {
.msg $chan I will not be silenced forever :P
hadd Pandora $+($network,$chan) $puttok($hget(Pandora,$+($network,$chan)),0,6,32)
return
}
if ($gettok($hget(Pandora,$+($network,$chan)),6,32) == $wildsite) {
var %sockname $+(pandora,$nick,$ticks,$r(1,1000))
sockopen %sockname $gettok($hget(Pandora,$+($network,$chan)),1,32) 80
sockmark %sockname $+($chan,,04<,07,$nick,04>) $fixurl($wildsite) $fixurl($replace(%text,$me,$gettok($hget(Pandora,$+($network,$chan)),5,32))) $hget(Pandora,$+($network,$chan))
}
}
}
On *:Action:$(* $+ $me $+ *):#: {
if ($nick !isreg $chan) {
var %sockname $+(pandora,$nick,$ticks,$r(1,1000))
sockopen %sockname $gettok($hget(Pandora,$+($network,$chan)),1,32) 80
sockmark %sockname $+($chan,,04<,07,$nick,04>) $fixurl($wildsite) $fixurl($replace($strip($1-),$me,$gettok($hget(Pandora,$+($network,$chan)),5,32))) $hget(Pandora,$+($network,$chan))
}
}
On *:Sockopen:Pandora*: {
if (!$sockerr) {
tokenize 32 $sock($sockname).mark
var %post $+(&custid=,$2,&input=,$3)
.sockwrite -n $sockname POST $5 HTTP/1.1
.sockwrite -n $sockname User-Agent: Opera 9.6
.sockwrite -n $sockname Host: $4
.sockwrite -n $sockname Content-Type: application/x-www-form-urlencoded
.sockwrite -n $sockname Content-Length: $calc($len(%post) + 1)
.sockwrite -n $sockname $crlf %post
}
}
On *:Sockread:Pandora*: {
if ($sockerr) { echo -at >sockerror Pandora< }
else {
sockread -f &pandora | var %pandora $bvar(&pandora,1-).text
if ($between(%pandora,$gettok($sock($sockname).mark,6,32),$gettok($sock($sockname).mark,7,32),1)) {
var %ifmatch $regsubex($replace($replace($ifmatch,&quot;,",&lt;,<,&gt;,>),<em>,$chr(2),</em>,$chr(2),robot,woman),/(<[^<]*>)/g,$null)
if (%ifmatch != I will pass it along to my botmaster. && Your IP address !isin %ifmatch) {
.timer $+ $+(PD,$network,$gettok($sock($sockname).mark,1,32)) 1 4 .msg $replace($gettok($sock($sockname).mark,1,32),,$chr(32)) $httpstrip($remove(%ifmatch,www dot pandorabots dot com pandora talk botid,$&
I will pass it along to my botmaster.,demo vhost pandorabots dot com pandora talk botid))
sockclose $sockname
}
}
}
}
On *:Sockwrite:Pandora*: {
if ($sockerr) {
echo -at Pandoras Site is Currently overloaded - $sockerr
return
}
}
On *:Start: {
hmake Pandora
if ($exists(Pandora.hsh)) { hload Pandora Pandora.hsh }
}
On *:Exit: {
if ($hget(Pandora)) {
hsave Pandora Pandora.hsh
hfree Pandora
}
}
menu nicklist {
$iif(!$hget(Pandora,$+($network,$chan)),$style(2)) Pandora
.Set the focus of $gettok($hget(Pandora,$+($network,$chan)),5,32) on $$1: {
if (!$address($$1,2)) { who $$1 }
hadd Pandora $+($network,$chan) $puttok($hget(Pandora,$+($network,$chan)),$address($$1,2),6,32)
echo -a Focus switched to $$1
}
}
;Testing focus on join
on *:join:#: {
if ($hget(Pandora,$+($network,$chan)) && $nick != $me) {
hadd Pandora $+($network,$chan) $puttok($hget(Pandora,$+($network,$chan)),$address($nick,2),6,32)
}
}
menu channel {
$iif($hget(Pandora,$+($network,$chan)),$style(1)) Pandora
.$iif($hget(Pandora,$+($network,$chan)),$style(1)) Select Bot for $chan:DialogOpen $+(botselect,$network,$chan) botselect
.$iif(!$hget(Pandora,$+($network,$chan)),$style(2)) Bot Off for $chan:hdel Pandora $+($network,$chan) | echo -at Pandora is deactivated for $chan
.Use bot from botid: {
var %botname $$?"Enter Your Bots Name"
if (%botname) { var %botid $$?"Enter Your Bots ID" }
if (%botname) && (%botid) {
hadd -m Pandora $+($network,$chan) www.pandorabots.com $+(/pandora/talk-xml?botid=,%botid) <that> </that> $replace(%botname,$chr(32),_) 0
echo -a The Bot %botname %botid has been started on $chan
}
}
}
dialog -l BotSelect {
title "Pandoras Bot Selection"
size -1 -1 96 108
option dbu
text "Network:", 1, 7 8 25 8, right
text "Channel:", 2, 7 18 25 8, right
text "", 3, 35 8 57 8
text "", 4, 35 18 57 8
combo 5, 8 30 82 50, sort size vsbar
radio "On", 6, 24 81 18 10, left
radio "Off", 7, 48 81 18 10
button "Close", 8, 61 92 29 12, cancel
button "Accept", 9, 8 92 29 12
}
On *:dialog:BotSelect*:Sclick:9: {
if ($did($dname,6).state) {
hadd -m Pandora $+($did($dname,3).text,$did($dname,4).text) $botinfo($did($dname,5).seltext)
echo -at $did($dname,5).seltext has been activated for $did($dname,4).text
if ($dialog($dname)) { dialog -x $dname }
}
else { echo -at Bot is turned off for $+($did($dname,4).text,!) If you want to activate pandora, click On. }
}
On *:dialog:BotSelect*:init:*: {
did -a $dname 3 $network
did -a $dname 4 $active
didtok $dname 5 14 LilithObaid(Portuguese)Sara(Spainish)Mathilde(French)Dr DuckHector van DaemonGabi(German-Adault)Eliza(German)Grandma ElaineIncognita
didtok $dname 5 14 Smoshinator(Rude)Spambot(Rude)AFRObot(Rude)DawnstarWraithRoninChabba(German)LaurieGodAliceFake KirkZoeFake SpockMike
did -c $dname $iif($hget(Pandora,$+($network,$active)),6,7)
did -fc $dname 5 $iif($gettok($hget(Pandora,$+($network,$active)),7,32),$didwm($dname,5,$replace($gettok($hget(Pandora,$+($network,$active)),7,32),_,$chr(32))),2)
}
On *:Text:.focus *:?: {
if ($2 !ischan) || ($3 !ison $2) { .msg $nick Proper syntax is .focus #channel nickname. The channel must exist & the nickname must be on the channel! | return }
if (!$hget(Pandora,$+($network,$2))) { .msg $nick No bot is turned on for that channel! Please add a bot before changing focus! | return }
if ($nick !isop $2) { .msg $nick You must be an operator on $2 to change the focus of the bot! | return }
if ($3 == $me) { .msg $nick You cannot place the focus on me!! I am the bot silly :P | return }
focus $network $2-
.msg $nick Focus for $network channel $2 has been changed to $3 at the address $address($3,2)
}
alias focus {
if ($hget(Pandora,$+($1,$2))) {
hadd Pandora $+($1,$2) $puttok($hget(Pandora,$+($1,$2)),$address($3,2),6,32)
}
}
alias -l DialogOpen { dialog $iif($dialog($1),-v,-m) $1- }
alias -l fixurl return $regsubex($1-,/([^a-z0-9])/ig,% $+ $base($asc(\t),10,16,2))
alias -l httpstrip {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove($replace($remove(%x,&nbsp;),&lt;,<,&gt;,>),<br>)
return %x
}
;alias by Gummo
alias -l between {
noop $regex($1,/\Q $+ $2 $+ \E(.*?)\Q $+ $3 $+ \E/gi)
return $regml($4)
}
alias -l botinfo {
if ($1- == Alice) { var %return sheepridge.pandorabots.com /pandora/talk-xml?botid=b69b8d517e345aba <that> </that> Alice 0 }
elseif ($1- == God) { var %return www.pandorabots.com /pandora/talk-xml?botid=b21f0d757e36f385 <that> </that> God 0 }
elseif ($1- == Laurie) { var %return www.pandorabots.com /pandora/talk-xml?botid=b800da72be34d5d9 <that> </that> Laurie 0 }
elseif ($1- == Chabba(German)) { var %return www.pandorabots.com /pandora/talk-xml?botid=9e129a956e3548fd <that> </that> Chabba 0 }
elseif ($1- == Ronin) { var %return www.pandorabots.com /pandora/talk-xml?botid=d3012a1f2e377a96 <that> </that> Ronin 0 }
elseif ($1- == Wraith) { var %return www.pandorabots.com /pandora/talk-xml?botid=e2ee8c6c9e377a87 <that> </that> Wraith 0 }
elseif ($1- == Dawnstar) { var %return www.pandorabots.com /pandora/talk-xml?botid=c1776ae8ce354d1f <that> </that> Dawnstar 0 }
elseif ($1- == AFRObot(Rude)) { var %return www.pandorabots.com /pandora/talk-xml?botid=9d3dc63c7e34956d <that> </that> AFRObot 0 }
elseif ($1- == Spambot(Rude)) { var %return www.pandorabots.com /pandora/talk-xml?botid=d3b8db41ee36d42d <that> </that> Spambot 0 }
elseif ($1- == Smoshinator(Rude)) { var %return www.pandorabots.com /pandora/talk-xml?botid=b4db4c279e3420eb <that> </that> Smoshinator 0 }
elseif ($1- == Incognita) { var %return www.pandorabots.com /pandora/talk-xml?botid=f7634aec7e3652ed <that> </that> Incognita 0 }
elseif ($1- == Grandma Elaine) { var %return www.pandorabots.com /pandora/talk-xml?botid=8f02c14a0e34bbe4 <that> </that> Grandma_Elaine 0 }
elseif ($1- == Eliza(German)) { var %return www.pandorabots.com /pandora/talk-xml?botid=e4fc10b06e3632ef <that> </that> Eliza 0 }
elseif ($1- == Gabi(German-Adault)) { var %return www.pandorabots.com /pandora/talk-xml?botid=bd81f97c0e354f35 <that> </that> Gabi 0 }
elseif ($1- == Hector van Daemon) { var %return www.pandorabots.com /pandora/talk-xml?botid=be43a1422e36ad7b <that> </that> Hector_van_Daemon 0 }
elseif ($1- == Dr Duck) { var %return www.pandorabots.com /pandora/talk-xml?botid=f3b9b50cbe344c44 <that> </that> Dr_Duck 0 }
elseif ($1- == Mathilde(French)) { var %return www.pandorabots.com /pandora/talk-xml?botid=eff729829e36e89c <that> </that> Mathilde 0 }
elseif ($1- == Sara(Spainish)) { var %return www.pandorabots.com /pandora/talk-xml?botid=e71c0d43fe35093a <that> </that> Sara 0 }
elseif ($1- == Obaid(Portuguese)) { var %return www.pandorabots.com /pandora/talk-xml?botid=a29a250aee36f3b3 <that> </that> Obaid 0 }
elseif ($1- == Lilith) { var %return www.pandorabots.com /pandora/talk-xml?botid=b9b96b247e34f4f2 <that> </that> Lilith 0 }
elseif ($1- == Fake Kirk) { var %return sheepridge.pandorabots.com /pandora/talk-xml?botid=fef38cb4de345ab1 <that> </that> Fake_Kirk 0 }
elseif ($1- == Zoe) { var %return sheepridge.pandorabots.com /pandora/talk-xml?botid=83e198ed1e345ab2 <that> </that> Zoe 0 }
elseif ($1- == Fake Spock) { var %return sheepridge.pandorabots.com /pandora/talk-xml?botid=f261d8418e345aa1 <that> </that> Fake_Spock 0 }
elseif ($1- == Mike) { var %return bandore.pandorabots.com /pandora/talk-xml?botid=ad1eeebfae345abc <that> </that> Mike 0 }
return %return $replace($1-,$chr(32),_)
}

Comments

Sign in to comment.
Menteroth   -  10 days ago
Does this script still work?
Can't seem to get it to respond anymore. I tried with Alice, Dr. Duck and God. Just random choices.
It worked fine when I got it in October. I also tried to update the script if there were any changes, but didn't work.
 Respond  
tiefuts   -  Feb 11, 2014
"[9:28am] ««Ë®®öR»» Unknown command: NOOP" I don't quite know what that means but it does it at least four times after i type any word to it?
FordLawnmower  -  Feb 11, 2014
@tiefuts This means your mIRC version is very old.
The noop command was added in mIRC 6.17 . The mIRC you are using is at least 10 years old.
I would suggest upgrading to at least 6.35 . You can find old versions of mIRC here : http://www.oldapps.com/mirc.php
To upgrade you just need to replace the mIRC.exe
If you need help upgrading, contact me on irc. irc.geekshed.net #Script-Help
Sign in to comment

Norluck   -  Dec 29, 2013
Alright, finally got it working... But now the bot doesn't connect. It just says "Alice (or whatever) is active on [channelname]" and if i try messaging them nothing happens.
 Respond  
PackardBell   -  Oct 24, 2013
@FordLawnmower : do you think this will work with this one: http://www.alexkigerl.com/troll/index.php ?
cptpan  -  Oct 24, 2013
I'd also like to see some more response scripts incorporated as the bot gets boring very quickly.
Sign in to comment

Menteroth   -  Oct 11, 2013
what do I need to change/add to make the bot responses all in lowercase?
 Respond  
Norluck   -  Jun 18, 2013
I'm new to mIRC, so I'm not entirely sure what to do with this script. If I paste it into scripts, right click on chat and press "Select bot for ___" it gives "L Unknown command". What am I supposed to be doing with this script?

EDIT: Now it says "PANDORA Unkown command"
Yawhatnever  -  Jun 18, 2013
Scripts usually go in the remote section of the script editor (like this script). It sounds like you may have pasted it into the alias tab instead.
Norluck  -  Jun 19, 2013
Now it says it's been activated on a channel, but nothing happens when I say it's name.
Sign in to comment

PackardBell   -  Jun 09, 2013
Hey. The bot works. But some of the "people" aren't there anymore.
Can someone update the script? [ remove the old ones and add the new ones ]

inb4 = awesome script! @FordLawnmower
PackardBell  -  Jun 12, 2013
ps: how to set a bot on load? [how to make it automaticly load for eg. Alice on start?]
PackardBell  -  Jun 22, 2013
@FordLawnmower can u check on the names+links please? :)
thx
FordLawnmower  -  Jun 22, 2013
If you want me to make some changes here @PackardBell , Take some time and go through the bots and leave a thorough post so I know which bots work and which bots don't work. You may also include any new bots you may find and I can add them as well.
Sign in to comment

ovelayer   -  Apr 13, 2013
looks like the site and bots are working again =)
 Respond  
ovelayer   -  Feb 16, 2013
love this script but it seems with newest mirc update it stopped working..any chance the script can be updated?
thanks!
FordLawnmower  -  Feb 16, 2013
@ovelayer I don't think this has anything to do with mIRC. The site is having some problems and the community server is shut down. http://www.pandorabots.com/

Edit: I updated the code with two working bots. Zoe & Fake Kirk are both working because they are not on the free servers.
If anyone finds other working bots. Post the links here and I'll add them.

Updated: Added Alice, Fake Spock and Mike to the working bots list.
ovelayer  -  Feb 16, 2013
awsome fast response thank you!! ill update the script with your new one!
Sign in to comment

tttwebsite   -  Sep 08, 2012
Is there any way to put in a sort of teach mode I!train on) where the bot logs in with your credentials on PandoraBots and navigates to the bots page and then goes onto the train page. After that you could pm your bot it would respond and you could tell it yes or no... after (!train off) it saves the AIML file as Training.
That may seem just as a dream but i was asking if that is possible and if you could make it if it was.
 Respond  
toclafane1   -  Sep 03, 2012
Choose a bot from the list in the dialog, and click OK'. Also you would need to put it on, and it would need to be on another client, not your own!
 Respond  
g0ku   -  Sep 03, 2012
lol how do i add the bot to the channel script is there but no bot!
 Respond  
FordLawnmower   -  Aug 18, 2012
Your welcome :)
 Respond  
mruno   -  Aug 18, 2012
awesome. thx
 Respond  
FordLawnmower   -  Aug 18, 2012
I see the problem @mruno . This subdomain has it's own api so the botid does not exist in the standard api.
This edit will add the bot to the list: http://pastebin.com/V5u75wDm
Your edit was correct , you just needed to add the bots name to the botselect dialog.
I addition to adding the bots info to the botinfo alias, I just changed line 114 from:
Code
 

To:
Code
 

 Respond  
mruno   -  Aug 18, 2012
thanks for the reply, but i get "failed to find bot" from the server.
I added "if (failed to find bot isin %pandora) echo -sate Unable to find Pandora bot with that ID." to the on sockread event.
 Respond  
FordLawnmower   -  Aug 16, 2012
@mruno You can just use the menu option to Use bot from ID.
First right click the channel you want to add your bot to and select "Use bot from ID"

Next enter your Pandora's bot Name. This will be the name your bot is known as on the Pandora's site.

Finally add your bots Pandora's botid which can usually be found in your browsers address bar when you are on the your bots Pandoras page. It will be the alpha-numeric string after -- botid=
 Respond  
mruno   -  Aug 14, 2012
how can I add this bot to the script? http://sheepridge.pandorabots.com/pandora/talk?botid=fef38cb4de345ab1

i added the following to botinfo:
elseif ($1- == Kirk) { var %return sheepridge.pandorabots.com /pandora/talk?botid=fef38cb4de345ab1 <that> </that> Kirk 0 }
but it does not output anything
 Respond  
chachin   -  Jul 30, 2012
any updates for 2012.. i wanna know if anything cool is going to happend for pandorabot 2012 :D
 Respond  
skyy_net   -  May 26, 2012
hey fordlawnmower is there a way to make it so that every channel the bot goes to the script is already on.instead of me turning it on :)
 Respond  
m40295   -  May 20, 2012
is there a way i can remove the color code?
 Respond  
McBeast   -  May 20, 2012
Would it be possible to make it so that the bot will call the person its talking to by its IRC name instead of the <get name="x"/> ? I find it annoying that it says stuff like "See you later, (blank space if it doesn't know the name)."
seeing as I can't make my bot remember people from time to time, I don't know what else to do than to make it call the person by it's IRC name.
 Respond  
1=1--   -  Mar 23, 2012
Incredible... Works perfectly. I like having the ability to add bots by id. I haven't been a member for long enough to 'like' yet, but I'll remember to come back :) Thanks again.

EDIT: I guess I can like it, so I did. Thanks.
 Respond  
turbuiance   -  Mar 22, 2012
thanks manic.. I understand all of that.. Appreciate you trying to help tho.. My main issue is "I have tried with no success .. How would i make it so i don't have to turn the bot on? So it would be turned on in any room.. Im using one of my pandorabots and added it to the list that you made.. I would basically just want the script to be auto on in every room I join and have my pandorabot be the one selected.. If thats possible.. or even a On/off trigger someone could use in the channel incase im not infront of the computer to turn on myself... Thanks! " Like a !boton or !botoff command for it.. I have fiddled with the one in the above comments but that doesnt seem to work..
 Respond  
ManicWaldo   -  Mar 17, 2012
The bot is designed to respond to anyone that uses it nick one time. After that .. the bot will "focus" on just that individual and respond to anything that person says. The nick only needs to be used once. Then by saying .. shutup .. the bot stops responding to anyone until someone once again uses the bot's nick.

The bot is configured to work with only one bot at a time. So if you have it set to your personal bot .. then you can train it like normal and it will give the responses you have made for it. I've done a fair bit of work on my bot .. making it appear as human as possible. But there are still times when it will pop up something in reference to it being a bot.
 Respond  
turbuiance   -  Feb 11, 2012
Thanks ford.. great snippet.. Question.. I have tried with no success .. How would i make it so i don't have to turn the bot on? So it would be turned on in any room.. Im using one of my pandorabots and added it to the list that you made.. I would basically just want the script to be auto on in every room I join and have my pandorabot be the one selected.. If thats possible.. or even a On/off trigger someone could use in the channel incase im not infront of the computer to turn on myself... Thanks!
Oh one other thing.. When the question is sent to pandorabot.com does it include the bots name? I'm training a bot just wondering if when someone asks "bot how are you?" if "bot how are you?" is sent for a response or "how are you?" is sent? If bot name is sent too, is there a way to remove it when the question is sent.. Reason i ask is because sometimes i get weird responses back from pandorabots and i believe its because the bots name is included in the question.. I have it set so it loses focus of someone after 3 seconds so people have to keep sayng bot name to carry a convo with it. THanks again ford! Great jon on all your snippets
 Respond  
smartino   -  Feb 11, 2012
Nice code, I'll like to contact you in private FordLawnmower but I don't know how..., I think I have some update for it
 Respond  
Maximanden   -  Jan 09, 2012
@ FordLawnmower

Just want to say, Thank you for your hard work, very nice coding. Found this last night, and have already had hours of fun.

Kind Regards
Maximanden
 Respond  
Spoof   -  Dec 30, 2011
my plain 6.35 mirc is running under the mirc link ssl download and through a secure port not the default 6667.
I have no problems with read or write from the server to my directory, so there shouldn't be any problems with a socket script running. I haven't gotten any firewall popups asking for permission or anything like that. Nor have I received any error messages on my mirc status window.
I have no clue as to why it's not responding. I used your lag bar on the plain mirc and im averaging around 1.7s and lower on lag. \(o_0)/ IDK.
Guess it will be a script I wont be able to use.
 Respond  
FordLawnmower   -  Dec 30, 2011
@Spoof the response looks fine.
So... Questions.
Are you running this on a second client?
Is there anything different about the network you are on. Like no $network identifier?

@turbuiance , yea I see now that I didn't use the focus alias in the on text event.
So.
Change line 5 from:
Code
 

To:
Code
 

And just change the focus alias back to this:
Code
 

Sorry , it was my mistake.
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.