Advertisement
ipsBruno

(PHP) Chat Bot para mcxNow

Mar 6th, 2014
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.83 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. /*
  5. *
  6. * Chat Bot para mcxNow
  7. * Por Bruno da Silva
  8. *
  9. */
  10.  
  11. error_reporting(E_ALL);
  12. set_time_limit(0);
  13.  
  14. #Carregar biblioteca (baixe este arquivo aqui: http://pastebin.com/qq5Rb9f8)
  15. include 'btcinc.php';
  16.  
  17. # Altera as configurações aqui do mcxNow
  18.  
  19. $login = 'LOGIN';
  20. $senha = 'SENHA';
  21.  
  22. # Código, não mexe aqui
  23. $cliente = new mcxnow($login, $senha);
  24.  
  25. $cliente->login();
  26.  
  27. if(!$cliente->test_connection()) die("Erro na conexão!");
  28.  
  29. # Mensagens para enviar altere para enviar várias mensagens e evitar de ser banido
  30.  
  31. $mensagens = array(
  32.  
  33.     "mensagem1", "mensagem2"
  34. );
  35.  
  36.  
  37. # Código que enviará as mensagens
  38.  
  39. $i = 0;
  40.  
  41. while($i < 400) {
  42.  
  43.     if(!$cliente->send_chat_message("",$mensagens[rand(1, count($mensagens))])) die("Erro ao enviar mensagem");
  44.  
  45.     $i++;
  46.  
  47.     Sleep(60); 
  48. }
  49.  
  50.  
  51. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement