Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. #!/usr/bin/php
  2. <?php
  3.  
  4.   require("cbot.php");
  5.  
  6.   if (empty($argv[1]))
  7.   {
  8.     die("Usage: bot2bot <start phrase>\n");
  9.   }
  10.  
  11.   $bots = array(new CBot(), new CBOt());
  12.  
  13.   /*$k = 1;
  14.   while($k < $argc){
  15.     $resp = $resp   $argv[$k];
  16.     $k  ;
  17.   }*/
  18.  
  19.   $resp = $argv[1];
  20.   $bots[1]->say($resp, false);
  21.  
  22.   $cbot = -1;
  23.   while (true)
  24.   {
  25.     $cbot  ;
  26.     if ($cbot == 2) $cbot = 0;
  27.    
  28.     echo "Bot ".($cbot   1).": $resp\n";
  29.     $resp = $bots[$cbot]->say($resp);
  30.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement