Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #define CHAT_MAX 100//in milliseconds
- #include <a_samp>
- #include <a_npc>
- new string[80];
- new ChattedRecently;
- new spam[MAX_PLAYERS];
- new name[MAX_PLAYER_NAME];
- new botname[10] = "Anna";
- public OnPlayerConnect(playerid)
- {
- spam[playerid]=0;
- return 1;
- }
- forward chatted();
- public chatted()
- {
- SendClientMessageToAll(0xFFFFFF00, string);
- ChattedRecently = 0;
- return 1;
- }
- forward resetspam(playerid);
- public resetspam(playerid)
- {
- spam[playerid]=0;
- return 1;
- }
- ChatBot(playerid, sentenceid)
- {
- GetPlayerName(playerid, name, sizeof(name));
- if(sentenceid == 1 && ChattedRecently == 0)//stupid bot
- {
- format(string, sizeof(string), "%s:Hey %s! Don't say those dumb things! you know bots are cool.",botname, name);
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 2 && ChattedRecently == 0)//ONGEBRUIKT!
- {
- //IS ONGEBRUIKT!!!
- }
- if(sentenceid == 3 && ChattedRecently == 0)//love bot
- {
- format(string, sizeof(string), "%s:I love you too %s!",botname, name);
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 4 && ChattedRecently == 0)//ONGEBRUIKT!
- {
- //IS ONGEBRUIKT!!!
- }
- if(sentenceid == 5 && ChattedRecently == 0)//yes
- {
- format(string, sizeof(string), "%s:yes.",botname);
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 6 && ChattedRecently == 0)//no
- {
- format(string, sizeof(string), "%s:no.",botname);
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 7 && ChattedRecently == 0)//maybe
- {
- format(string, sizeof(string), "%s:maybe.",botname);
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 8 && ChattedRecently == 0)//never
- {
- format(string, sizeof(string), "%s:never!",botname);
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 9 && ChattedRecently == 0)//in the future
- {
- format(string, sizeof(string), "%s:in the future.",botname);
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 10 && ChattedRecently == 0)//fuck you bot
- {
- format(string, sizeof(string), "%s:Go fuck yourself, %s",botname , name);
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 11 && ChattedRecently == 0)//stupid server
- {
- format(string, sizeof(string), "%s:Hey %s! this server IS cool!",botname, name);
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 12 && ChattedRecently == 0)//ONGEBRUIKT
- {
- //ONGEBRUIKT!!!
- }
- if(sentenceid == 13 && ChattedRecently == 0)//love server
- {
- format(string, sizeof(string), "%s:I agree with you %s",botname , name);
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 14 && ChattedRecently == 0)//ONGEBRUIKT
- {
- //ONGEBRUIKT!!!
- }
- if(sentenceid == 15 && ChattedRecently == 0)//ONGEBRUIKT
- {
- //ONGEBRUIKT!!!
- }
- if(sentenceid == 16 && ChattedRecently == 0)//insult geso
- {
- format(string, sizeof(string), "%s:dont insult our admins will ya?",botname);
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 17 && ChattedRecently == 0)//like geso
- {
- format(string, sizeof(string), "%s:I totally Agree with you %s",botname , name);
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 18 && ChattedRecently == 0)//lol
- {
- new randomlol = random(5);
- switch(randomlol)
- {
- case 0:
- {
- format(string, sizeof(string), "%s:haha...",botname);
- }
- case 1:
- {
- format(string, sizeof(string), "%s:what you're laughing about?",botname);
- }
- case 2:
- {
- format(string, sizeof(string), "%s:LOLcano erupting! everyone into the roflcopters! *soisoisoisoi*",botname);
- }
- case 3:
- {
- format(string, sizeof(string), "%s:omgz0r that's a real fun!",botname);
- }
- case 4:
- {
- format(string, sizeof(string), "%s:fail!",botname);
- }
- }
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 19 && ChattedRecently == 0)//happy smiles
- {
- new randomhappy = random(5);
- switch(randomhappy)
- {
- case 0:
- {
- format(string, sizeof(string), "%s:happy %s is happy me!",botname, name);
- }
- case 1:
- {
- format(string, sizeof(string), "%s:what's so happy?",botname);
- }
- case 2:
- {
- format(string, sizeof(string), "%s:im happy! :D",botname);
- }
- case 3:
- {
- format(string, sizeof(string), "%s:you make me happy! :)",botname);
- }
- case 4:
- {
- format(string, sizeof(string), "%s:do your cheeks hurt from the smiling?",botname);
- }
- }
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- if(sentenceid == 20 && ChattedRecently == 0)//sad smiles
- {
- new randomsad = random(5);
- switch(randomsad)
- {
- case 0:
- {
- format(string, sizeof(string), "%s:sad %s is sad me!",botname, name);
- }
- case 1:
- {
- format(string, sizeof(string), "%s:what's so sad?",botname);
- }
- case 2:
- {
- format(string, sizeof(string), "%s:just be happy...",botname);
- }
- case 3:
- {
- format(string, sizeof(string), "%s:you make me sad. :(",botname);
- }
- case 4:
- {
- format(string, sizeof(string), "%s:don't cry...",botname);
- }
- }
- SetTimer("chatted",CHAT_MAX,false);
- ChattedRecently = 1;
- }
- }
- public OnPlayerText(playerid, text[])
- {
- if(spam[playerid] >= 3)
- {
- new kickmessage[50];
- format(kickmessage, sizeof(kickmessage), "%s has been kicked by %s for Spam!",name,botname);
- SendClientMessageToAll(0xff000000,kickmessage);
- Kick(playerid);
- }
- else
- {
- spam[playerid]++;
- SetTimerEx("resetspam", 4000, false, "i", playerid);
- }
- if (strfind(text, "bot") != -1)
- {
- if (strfind(text, "stupid") != -1)//id 1
- {
- ChatBot(playerid, 1);
- }
- if (strfind(text, "hate") != -1)//id 1
- {
- ChatBot(playerid, 1);
- }
- if (strfind(text, "love") != -1)//id 3
- {
- ChatBot(playerid, 3);
- }
- if (strfind(text, "like") != -1)//id 3
- {
- ChatBot(playerid, 3);
- }
- if (strfind(text, "fuck") != -1)//id 10
- {
- ChatBot(playerid, 10);
- }
- }
- if (strfind(text, "?") != -1)
- {
- if (strfind(text, "will")||strfind(text, "are") != -1)//id 11
- {
- new eightball = random(5);
- switch(eightball)
- {
- case 0:
- {
- ChatBot(playerid, 5);
- }
- case 1:
- {
- ChatBot(playerid, 6);
- }
- case 2:
- {
- ChatBot(playerid, 7);
- }
- case 3:
- {
- ChatBot(playerid, 8);
- }
- case 4:
- {
- ChatBot(playerid, 9);
- }
- }
- }
- }
- if (strfind(text, "server") != -1)
- {
- if (strfind(text, "stupid") != -1)//id 11
- {
- ChatBot(playerid, 11);
- }
- if (strfind(text, "hate") != -1)//id 12
- {
- ChatBot(playerid, 11);
- }
- if (strfind(text, "love") != -1)//id 13
- {
- ChatBot(playerid, 13);
- }
- if (strfind(text, "like") != -1)//id 14
- {
- ChatBot(playerid, 13);
- }
- if (strfind(text, "fuck") != -1)//id 15
- {
- ChatBot(playerid, 11);
- }
- }
- if (strfind(text, "geso") != -1)
- {
- if (strfind(text, "stupid") != -1)//id 16
- {
- ChatBot(playerid, 16);
- }
- if (strfind(text, "hate") != -1)//id 16
- {
- ChatBot(playerid, 16);
- }
- if (strfind(text, "fuck") != -1)//id 16
- {
- ChatBot(playerid, 16);
- }
- if (strfind(text, "great") != -1)//id 17
- {
- ChatBot(playerid, 17);
- }
- if (strfind(text, "super") != -1)//id 17
- {
- ChatBot(playerid, 17);
- }
- if (strfind(text, "like") != -1)//id 17
- {
- ChatBot(playerid, 17);
- }
- }
- if (strfind(text, "lol") != -1)//id 18
- {
- ChatBot(playerid, 18);
- }
- if (strfind(text, "hihi") != -1)//id 18
- {
- ChatBot(playerid, 18);
- }
- if (strfind(text, "haha") != -1)//id 18
- {
- ChatBot(playerid, 18);
- }
- if (strfind(text, ":)") != -1)//id 19
- {
- ChatBot(playerid, 19);
- }
- if (strfind(text, ":D") != -1)//id 19
- {
- ChatBot(playerid, 19);
- }
- if (strfind(text, ":-)") != -1)//id 19
- {
- ChatBot(playerid, 19);
- }
- if (strfind(text, "=)") != -1)//id 19
- {
- ChatBot(playerid, 19);
- }
- if (strfind(text, ";)") != -1)//id 19
- {
- ChatBot(playerid, 19);
- }
- if (strfind(text, ":(") != -1)//id 19
- {
- ChatBot(playerid, 20);
- }
- if (strfind(text, ":O") != -1)//id 19
- {
- ChatBot(playerid, 20);
- }
- if (strfind(text, ":-(") != -1)//id 19
- {
- ChatBot(playerid, 20);
- }
- if (strfind(text, "=(") != -1)//id 19
- {
- ChatBot(playerid, 20);
- }
- if (strfind(text, ";(") != -1)//id 19
- {
- ChatBot(playerid, 20);
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment