Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

Pandoras Talking Bot

Recommended Posts

  • Administrators

Pandoras Talking Bot

 

ta54s2.jpg

 

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.mindforge.org #USA-ChatOn *:Text:*:#: {  if ($hget(Pandora,$+($network,$chan))) {    var %text $strip($1-)    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) $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) $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,$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  }}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)   $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)LaurieGodAlice  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, ),<,),)  return %x};alias by Gummoalias -l between {   noop $regex($1,/\Q $+ $2 $+ \E(.*?)\Q $+ $3 $+ \E/gi)  return $regml($4) }alias -l botinfo {  if ($1- == Alice) { var %return www.pandorabots.com /pandora/talk-xml?botid=f5d922d97e345aa1   Alice 0 }  elseif ($1- == God) { var %return www.pandorabots.com /pandora/talk-xml?botid=b21f0d757e36f385   God 0 }  elseif ($1- == Laurie) { var %return www.pandorabots.com /pandora/talk-xml?botid=b800da72be34d5d9   Laurie 0 }  elseif ($1- == Chabba(German)) { var %return www.pandorabots.com /pandora/talk-xml?botid=9e129a956e3548fd   Chabba 0 }  elseif ($1- == Ronin) { var %return www.pandorabots.com /pandora/talk-xml?botid=d3012a1f2e377a96   Ronin 0 }  elseif ($1- == Wraith) { var %return www.pandorabots.com /pandora/talk-xml?botid=e2ee8c6c9e377a87   Wraith 0 }  elseif ($1- == Dawnstar) { var %return www.pandorabots.com /pandora/talk-xml?botid=c1776ae8ce354d1f   Dawnstar 0 }  elseif ($1- == AFRObot(Rude)) { var %return www.pandorabots.com /pandora/talk-xml?botid=9d3dc63c7e34956d   AFRObot 0 }  elseif ($1- == Spambot(Rude)) { var %return www.pandorabots.com /pandora/talk-xml?botid=d3b8db41ee36d42d   Spambot 0 }  elseif ($1- == Smoshinator(Rude)) { var %return www.pandorabots.com /pandora/talk-xml?botid=b4db4c279e3420eb   Smoshinator 0 }  elseif ($1- == Incognita) { var %return www.pandorabots.com /pandora/talk-xml?botid=f7634aec7e3652ed   Incognita 0 }  elseif ($1- == Grandma Elaine) { var %return www.pandorabots.com /pandora/talk-xml?botid=8f02c14a0e34bbe4   Grandma_Elaine 0 }  elseif ($1- == Eliza(German)) { var %return www.pandorabots.com /pandora/talk-xml?botid=e4fc10b06e3632ef   Eliza 0 }  elseif ($1- == Gabi(German-Adault)) { var %return www.pandorabots.com /pandora/talk-xml?botid=bd81f97c0e354f35   Gabi 0 }  elseif ($1- == Hector van Daemon) { var %return www.pandorabots.com /pandora/talk-xml?botid=be43a1422e36ad7b   Hector_van_Daemon 0 }  elseif ($1- == Dr Duck) { var %return www.pandorabots.com /pandora/talk-xml?botid=f3b9b50cbe344c44   Dr_Duck 0 }  elseif ($1- == Mathilde(French)) { var %return www.pandorabots.com /pandora/talk-xml?botid=eff729829e36e89c   Mathilde 0 }  elseif ($1- == Sara(Spainish)) { var %return www.pandorabots.com /pandora/talk-xml?botid=e71c0d43fe35093a   Sara 0 }  elseif ($1- == Obaid(Portuguese)) { var %return www.pandorabots.com /pandora/talk-xml?botid=a29a250aee36f3b3   Obaid 0 }  elseif ($1- == Lilith) { var %return www.pandorabots.com /pandora/talk-xml?botid=b9b96b247e34f4f2   Lilith 0 }  return %return $replace($1-,$chr(32),_)}

Link to comment
Share on other sites



×
×
  • Create New...