SA-MP Forums Archive
irc multi bot! help for +rep - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: irc multi bot! help for +rep (/showthread.php?tid=511834)



irc multi bot! help for +rep - KillerStrike23 - 07.05.2014

hey guys I was searching all over how to create multi bots like this :
WindyBot:
CandyBot:
WindyBot:
CandyBot:
WindyBot:
CandyBot:
1 time 1st bot says and the next time the 2nd bot says more explain:
WindyBot: Killer Has Joined The Server
CandyBot: Strike Has Joined The Server
how can I do that ?


Re: irc multi bot! help for +rep - Smileys - 07.05.2014

uhm...

use a variable, increase it each time a bot has said something.

when the variable is 0; let WindyBot say something;
when the variable is 1; let CandyBot say something;

or perhaps when the number is like: 2, 4, 6, 8, 10 etc; it'll use WindyBot; if it's 1, 3, 5, 7 etc; it'll use CandyBot;
like:
pawn Код:
new botcount = 0; // ontop of script.
// in callback
new botname[ 9 ];
botname = ( ( botcount % 2 == 0 ) ? ( "WindyBot" ) : ( "CandyBot" ) );
botcount++;
or you could do it randomly;

random example for connecting:
pawn Код:
new
    rand = random( 2 ),
    str[ 64 ],
    name[ MAX_PLAYER_NAME ],
    botname[ 9 ]
;
GetPlayerName( playerid, name, sizeof( name ) );
botname = ( rand == 0 ? ( "WindyBot"  ) : ( "CandyBot" ) );
format( str, sizeof( str ), "%s: %s has connected to the server!", botname, name );
SendClientMessageToAll( 0xFFFFFFFFFF, str );



Re: irc multi bot! help for +rep - Vince - 07.05.2014

Add them to a group, then use IRC_GroupSay. See the example filterscript on how to do it.


Re: irc multi bot! help for +rep - Smileys - 07.05.2014

Quote:
Originally Posted by Vince
Посмотреть сообщение
Add them to a group, then use IRC_GroupSay. See the example filterscript on how to do it.
not sure if he meant IRC; didn't find anything in the post stating IRC; though I actually was wondering if he was talking about IRC;

ohwell.


Re: irc multi bot! help for +rep - KillerStrike23 - 08.05.2014

lol read the title , I was talking about how to make a multi bot candybot windybot candybot windybot what is the hard thing to understand it guys ?


Re: irc multi bot! help for +rep - KillerStrike23 - 08.05.2014

bump*


Re: irc multi bot! help for +rep - Vince - 08.05.2014

Read my post again. -.-


Re: irc multi bot! help for +rep - KillerStrike23 - 02.06.2014

am sorry, but can you explain more to me.