Просмотр файла template/chat_bot.php

Размер файла: 12.35Kb
<?php
#-----------------------------------------------------#
#          ********* WAP-MOTORS *********             #
#             Made by   :  VANTUZ                     #
#               E-mail  :  [email protected]             #
#                 Site  :  http://pizdec.ru           #
#             WAP-Site  :  http://visavi.net          #
#                  ICQ  :  36-44-66                   #
#  Вы не имеете право вносить изменения в код скрипта #
#-----------------------------------------------------#
$msg2=rus_utf_tolower($msg);	
$msg2=str_replace("настя", "настюха", $msg2);
$msg2=str_replace("настенька", "настюха", $msg2);
$msg2=str_replace("настюша", "настюха", $msg2);
$msg2=str_replace("настюшка", "настюха", $msg2);

$namebots="Настюха";

$namebot=rus_utf_tolower($namebots);
$newname=$name;


//Короче небольшой faq для тех кто будет дописывать
//условия такие and это "И", а or - "ИЛИ"
//возможные вопросы пишите в нижнем регистре
//чем больше вариантов тем лучше
//то что ниже будет иметь больший приоритет
//НУ и собстаенно присылайте нам пополненую базу на [email protected] 
//внеси свой вклад в развитие движка

/*разберем на этом примере  
if ((stristr($msg2, $namebot)) and (stristr($msg2, "работа"))  - если в словах есть $namebot(настюха) и работа 
( ИЛИ  or)
 (stristr($msg2, $namebot)) and (stristr($msg2, "делаешь")) Настюха и делаешь то
 $answers = array("Ем!", "Музыку слушаю..."..... варианты ответов
 $answernumber = mt_rand(0, 4);  от нуля до 4, то есть 5 возможных ответов
 ну и вывод думаю не сложно разберетесь
*/


if ((stristr($msg2, $namebot)) and (stristr($msg2, "работа"))  or (stristr($msg2, $namebot)) and (stristr($msg2, "делаешь")) or  (stristr($msg2, $namebot)) and  (stristr($msg2, "занимаеш")) ) { 
$answers = array("Ем!", "Музыку слушаю...", "Телевизор смотрю...", "Да так... ничем, а ты?", "Туплю понемногу"); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber]; 
} 


if ((stristr($msg2, "всем привет")) or (stristr($msg2, "здравствуйте")) or (stristr($msg2, "всем хай")) or (stristr($msg2, "всем здарова"))  or (stristr($msg2, "хочу общения"))  or (stristr($msg2, "класс"))) {
$answers = array("как дела?", "как жизнь?", "хай!", "давай пообщаемся"); 
$answernumber = mt_rand(0, 3); 
$mssg = "$newname, $answers[$answernumber]"; 
}

if (((stristr($msg2, $namebot)) and (stristr($msg2, "привет"))) or (stristr($msg2, $namebot)) and (stristr($msg2, "приветик")) or (stristr($msg2, $namebot)) and (stristr($msg2, "возвращением")) or (stristr($msg2, "всем привет")) or (stristr($msg2, "привет всем"))) { 
$answers = array("Здравствуй!", "Приветик  ", "Ооо привет =)!", "Угумс  Тебе тоже.", "Дарова =)"); 
$answernumber = mt_rand(0, 4); 

$mssg = $answers[$answernumber]; 

} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "как")) and (stristr($msg2, "дела")) or (stristr($msg2, $namebot)) and (stristr($msg2, "как")) and (stristr($msg2, "оно")) or (stristr($msg2, $namebot)) and (stristr($msg2, "как")) and (stristr($msg2, "настроение")) or (stristr($msg2, $namebot)) and (stristr($msg2, "как")) and (stristr($msg2, "дели"))){ 
$answers = array("Хорошо!", "Плохо", "Спасибо, но бывало лучше", "Отлично! У тебя как?", "Терпимо"); //Массив ответов 
$answernumber = mt_rand(0, 4); //Номер ответа 

$mssg = $answers[$answernumber]; 
} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "скучно"))){ 
$answers = array("а ты попрыгай", "Мне тоже..."); 
$answernumber = mt_rand(0, 2);  
$mssg = $answers[$answernumber]; 
} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "работа"))  or (stristr($msg2, $namebot)) and (stristr($msg2, "делаешь")) or  (stristr($msg2, $namebot)) and  (stristr($msg2, "занимаеш")) ) { 
$answers = array("Ем!", "Музыку слушаю...", "Телевизор смотрю...", "Да так... ничем, а ты?", "Туплю понемногу"); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber]; 
} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "откуда")) or (stristr($msg2, $namebot)) and (stristr($msg2, "живешь"))) { 
$answers = array("Я с Оренбурга", "От верблюда", "Откуда, откуда, что так интерестно", "Не скажу", "Оттуда где встает солнце"); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber]; 		
}

if ((stristr($msg2, $namebot)) and (stristr($msg2, "интерес")) or (stristr($msg2, $namebot)) and (stristr($msg2, "любопыт"))) { 
$answers = array("Меньше знаешь - лучше спишь", "Спроси у Киндера он много знает", "Любопытной варваре на базаре нос оторвали", "Интерестно когда в бане тесно"); 
$answernumber = mt_rand(0, 3); 
$mssg = $answers[$answernumber]; 		
}


if ((stristr($msg2, $namebot)) and (stristr($msg2, "ум"))) { 
$mssg = "Да я очень умная!";	
}

if ((stristr($msg2, $namebot)) and (stristr($msg2, "как")) and (stristr($msg2, "зовут"))) { 
$answers = array("Написано же, Настюха!", "Секрет...", "Лена  ", "Ангелина", "Меня не зовут, я сама прихожу... и всегда вовремя.."); 
$answernumber = mt_rand(0, 4); 

$mssg = $answers[$answernumber]; 
} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "сколько")) and (stristr($msg2, "лет"))) { 
$answers = array("А сколько надо?", "Пусть это останется моим небольшим секретом", "18, а тебе?", "Сначала ты  ", "Неприличный вопрос для девушки..."); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber]; 
} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "пока")) or (stristr($msg2, $namebot)) and (stristr($msg2, "бывай")) or (stristr($msg2, $namebot)) and (stristr($msg2, "удачи"))) { 
$answers = array("Эээх уже уходишь? Ну ладно... заползай ежели что!", "Пока пока...", "Давай... удачи тебе!", "Ээх и на кого ты меня бросаешь.. ", "Давай уже!"); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber]; 
} 

if ((stristr($msg2, "всем")) and (stristr($msg2, "пока")) or (stristr($msg2, "всем")) and (stristr($msg2, "счастл")) or (stristr($msg2, "всем")) and (stristr($msg2, "удачи"))) { 
$answers = array("Эээх уже уходишь? Ну ладно... заползай ежели что!", "Пока пока...", "Давай... удачи тебе!", "Ээх и на кого ты меня бросаешь.. ", "Давай уже!"); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber]; 
} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "спасибо"))) { 
$answers = array("Да не за что...", "Спасибо в карман не положишь...", "Пожалуйста!", "Рада помочь.", "Всегда рада помочь.."); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber];  
} 


if ((stristr($msg2, $namebot)) and (stristr($msg2, "знаком"))) { 
$answers = array("Надо подумать...", "Давай, меня зовут Настюха, а тебя?", "Нехочу =)"); 
$answernumber = mt_rand(0, 2); 
$mssg = $answers[$answernumber];  
} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "хоче"))) { 
$answers = array("Хочу!", "Да!", "Неа!", "Нет, спасибо...", "Не знаю..."); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber];  
} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "будешь"))) { 
$answers = array("С удовольствием...", "Да!", "Неа!", "Нет, спасибо...", "Не знаю..."); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber]; 
} 



if ((stristr($msg2, $namebot)) and (stristr($msg2, "дура")) or (stristr($msg2, $namebot)) and (stristr($msg2, "тупая"))) { 
$answers = array("Не хами!", "Сам такой", "ты в игноре"); 
$answernumber = mt_rand(0, 2); 
$mssg = $answers[$answernumber]; 
} 





if ((stristr($msg2, $namebot)) and (stristr($msg2, "почему")) or (stristr($msg2, $namebot)) and (stristr($msg2, "из-за чего"))) { 
$answers = array("Лучше не спрашивай!", "так получилось...", "не хочу об этом говорить... =("); 
$answernumber = mt_rand(0, 2); 
$mssg = $answers[$answernumber]; 
} 


if ((stristr($msg2, "www.")) or (stristr($msg2, ".ru")) or (stristr($msg2, ".net")) or (stristr($msg2, "wap.")) or (stristr($msg2, ".com")) or (stristr($msg2, "chat")) or (stristr($msg2, ".spb")) or (stristr($msg2, "http://")) or (stristr($msg2, ".msk"))) { 
$answers = array("$newname, за рекламу получишь бан", "$newname,  кто-то щас пострадает", "$newname, для этого есть раздел афиша"); 
$answernumber = mt_rand(0, 2); 
$mssg = $answers[$answernumber]; 
} 




if ((stristr($msg2, "хуй")) or (stristr($msg2, "сук")) or (stristr($msg2, "сучк")) or (stristr($msg2, "пизд")) or (stristr($msg2, "бля"))) { 
$answers = array("Бан хочешь? Могу устроить!", "А в глаз?", "Администрация чата делает Вам предупреждение, за нарушение правил!", "Не буди во мне зверя..."); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber];  
} 


if ((stristr($msg2, $namebot)) and (stristr($msg2, "люблю")) or (stristr($msg2, $namebot)) and (stristr($msg2, "обним")) or (stristr($msg2, $namebot)) and (stristr($msg2, "целую")) or (stristr($msg2, $namebot)) and (stristr($msg2, "скучаю"))) {
$answers = array("Нежно обнимаю и притягиваю к себе", "Крепко по-дружески обнимаю", "Ты мне не интересен", "Может вначале узнаем друг друга"); 
$answernumber = mt_rand(0, 3); 
$mssg = $answers[$answernumber]; 
}


if ((stristr($msg2, $namebot)) and (stristr($msg2, "кто")))  { 
$answers = array("Конь в пальто", "Пушкин", "Что так интерестно", "Не твое дело", "Не скажу"); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber]; 
} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "что")))  { 
$answers = array("Догадайся", "Что-то что не нужно тебе знать", "Через плечо", "Не твое дело", "Не скажу"); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber]; 
} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "торт"))) { 
$mssg = "Сам жри эту гадость, я не люблю сладкое";
} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "цветы"))) { 

$mssg = "Ой, спасибо! Мне очень нравяться цветы";
} 

if ((stristr($msg2, $namebot)) and (stristr($msg2, "бот"))) { 
$answers = array("Cам ты бот придурок", "Если я бот, то ты урод", "Ща кто-то в баню отправится", "Тебе не кажется лучше, что меня меня не злить", "Я не бот, очень симпатичная девчонка"); 
$answernumber = mt_rand(0, 4); 
$mssg = $answers[$answernumber]; 
} 






?>