NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..
Zen is an experimental javascript chatbot, the intention is to have her be the mascot for the whole site, all enquiries and functions of the site will be carried out through her.
There is also a new version at www.danielburke.com that is built around a custom web server. Additional comments by developer Daniel Burke: Zen is an experiment and a bit basic at the moment, she will develop over time |
Zen is not an AI, it uses IF THEN statements. Here is the Source Code. Sorry It's long. <!-- var stopTalk = ""; var timeout = 0; var responded = 0; var message = new Array(); var uchat_log = new Array(); var bchat_log = new Array(); var chat_count=0; var num = 0; //var zenimage = "adamtalking.gif" //var zenimage2 = "adammoving.gif" function Parse() { //alert ("In Parse") if (timeout == 0) { if (!stopTalk) { var input = new String(document.chat.input.value); var sm_uinput = input; sm_uinput = sm_uinput.split(",").join('~'); var sm_binput = document.result.result.value; sm_binput = sm_binput.split(",").join('~'); uchat_log[chat_count] = sm_uinput; bchat_log[chat_count] = sm_binput; chat_count ++; document.chat.input.value=""; input=input.toLowerCase(); word=input.split(" "); num_of_words=word.length; // Spell Check if (input.search(/\b`\b/)!=-1) input=input.replace(/\b`\b/,"'"); if (input.search(/\b�\b/)!=-1) input=input.replace(/\b�\b/,"'"); if (input.search(/\bu\b/)!=-1) input=input.replace(/\bu\b/,"you"); if (input.search(/\byuo\b/)!=-1) input=input.replace(/\byuo\b/,"you"); if (input.search(/\byuo\b/)!=-1) input=input.replace(/\bim\b/,"i am"); if (input.search(/\br\b/)!=-1) input=input.replace(/\br\b/,"are"); if (input.search(/\bru\b/)!=-1) input=input.replace(/\bru\b/,"are you"); if (input.search(/\bur\b/)!=-1) input=input.replace(/\bur\b/,"your"); if (input.search(/\bur\b/)!=-1) input=input.replace(/\bu r\b/,"you are"); if (input.search(/\burs\b/)!=-1) input=input.replace(/\burs\b/,"yours"); if (input.search(/\by\b/)!=-1) input=input.replace(/\by\b/,"why"); if (input.search(/\bty\b/)!=-1) input=input.replace(/\bty\b/,"thank you"); if (input.search(/\bwat\b/)!=-1) input=input.replace(/\bwat\b/,"what"); if (input.search(/\bwot\b/)!=-1) input=input.replace(/\bwot\b/,"what"); if (input.search(/\bwut\b/)!=-1) input=input.replace(/\bwut\b/,"what"); if (input.search(/\bwaht\b/)!=-1) input=input.replace(/\bwaht\b/,"what"); if (input.search(/\bwhta\b/)!=-1) input=input.replace(/\bwhta\b/,"what"); if (input.search(/\bwhaat\b/)!=-1) input=input.replace(/\bwhaat\b/,"what"); if (input.search(/\bwhats\b/)!=-1) input=input.replace(/\bwhats\b/,"what is"); if (input.search(/\bwhtas\b/)!=-1) input=input.replace(/\bwhtas\b/,"what is"); if (input.search(/\bwahts\b/)!=-1) input=input.replace(/\bwahts\b/,"what is"); if (input.search(/\bwats\b/)!=-1) input=input.replace(/\bwats\b/,"what is"); if (input.search(/\bwots\b/)!=-1) input=input.replace(/\bwots\b/,"what is"); if (input.search(/\bwuts\b/)!=-1) input=input.replace(/\bwuts\b/,"what is"); if (input.search(/\bwatever\b/)!=-1) input=input.replace(/\bwatever\b/,"whatever"); if (input.search(/\boyu\b/)!=-1) input=input.replace(/\boyu\b/,"you"); if (input.search(/\byoure\b/)!=-1) input=input.replace(/\byoure\b/,"you are"); if (input.search(/\bypu're\b/)!=-1) input=input.replace(/\bypu're\b/,"you are"); if (input.search(/\bi c\b/)!=-1) input=input.replace(/\bi c\b/,"i see"); if (input.search(/\boic\b/)!=-1) input=input.replace(/\boic\b/,"i see"); if (input.search(/\bic\b/)!=-1) input=input.replace(/\bic\b/,"i see"); if (input.search(/\bicic\b/)!=-1) input=input.replace(/\bicic\b/,"i see"); if (input.search(/\bkk\b/)!=-1) input=input.replace(/\bkk\b/,"ok"); if (input.search(/\bk\b/)!=-1) input=input.replace(/\bk\b/,"ok"); if (input.search(/\bshes\b/)!=-1) input=input.replace(/\bshes\b/,"she is"); if (input.search(/\bhes\b/)!=-1) input=input.replace(/\bhes\b/,"he is"); if (input.search(/\bits\b/)!=-1) input=input.replace(/\bits\b/,"it is"); if (input.search(/\bwhos\b/)!=-1) input=input.replace(/\bwhos\b/,"who is"); if (input.search(/\bwhys\b/)!=-1) input=input.replace(/\bwhys\b/,"why is"); if (input.search(/\blets\b/)!=-1) input=input.replace(/\blets\b/,"let us"); if (input.search(/\bim\b/)!=-1) input=input.replace(/\bim\b/,"i am"); if (input.search(/\bive\b/)!=-1) input=input.replace(/\bive\b/,"i have"); if (input.search(/\byouve\b/)!=-1) input=input.replace(/\byouve\b/,"you have"); if (input.search(/\byour self\b/)!=-1) input=input.replace(/\byour self\b/,"yourself"); if (input.search(/\barent\b/)!=-1) input=input.replace(/\barent\b/,"are not"); if (input.search(/\barnt\b/)!=-1) input=input.replace(/\barnt\b/,"are not"); if (input.search(/\bwasnt\b/)!=-1) input=input.replace(/\bwasnt\b/,"was not"); if (input.search(/\btheres\b/)!=-1) input=input.replace(/\btheres\b/,"there is"); if (input.search(/\bthats\b/)!=-1) input=input.replace(/\bthats\b/,"that is"); if (input.search(/\bwheres\b/)!=-1) input=input.replace(/\bwheres\b/,"where is"); if (input.search(/\bwhens\b/)!=-1) input=input.replace(/\bwhens\b/,"when is"); if (input.search(/\bhavent\b/)!=-1) input=input.replace(/\bhavent\b/,"have not"); if (input.search(/\bhows\b/)!=-1) input=input.replace(/\bhows\b/,"how is"); if (input.search(/\bwont\b/)!=-1) input=input.replace(/\bwont\b/,"will not"); if (input.search(/\bcouldnt\b/)!=-1) input=input.replace(/\bcouldnt\b/,"could not"); if (input.search(/\bshouldnt\b/)!=-1) input=input.replace(/\bshouldnt\b/,"should not"); if (input.search(/\bwouldnt\b/)!=-1) input=input.replace(/\bwouldnt\b/,"would not"); if (input.search(/\bcant\b/)!=-1) input=input.replace(/\bcant\b/,"ca not"); if (input.search(/\bisnt\b/)!=-1) input=input.replace(/\bisnt\b/,"is not"); if (input.search(/\bdidnt\b/)!=-1) input=input.replace(/\bdidnt\b/,"did not"); if (input.search(/\bdont\b/)!=-1) input=input.replace(/\bdont\b/,"do not"); if (input.search(/\bdoesnt\b/)!=-1) input=input.replace(/\bdoesnt\b/,"does not"); if (input.search(/\bduz\b/)!=-1) input=input.replace(/\bduz\b/,"does"); if (input.search(/\bpls\b/)!=-1) input=input.replace(/\bpls\b/,"please"); if (input.search(/\bplz\b/)!=-1) input=input.replace(/\bplz\b/,"please"); if (input.search(/\bpleaz\b/)!=-1) input=input.replace(/\bpleaz\b/,"please"); if (input.search(/\bbout\b/)!=-1) input=input.replace(/\bbout\b/,"about"); if (input.search(/\bbein\b/)!=-1) input=input.replace(/\bbein\b/,"being"); if (input.search(/\bcookin\b/)!=-1) input=input.replace(/\bcookin\b/,"cooking"); if (input.search(/\bthanx\b/)!=-1) input=input.replace(/\bthanx\b/,"thanks"); if (input.search(/\bgettin\b/)!=-1) input=input.replace(/\bgettin\b/,"getting"); if (input.search(/\btalkin\b/)!=-1) input=input.replace(/\btalkin\b/,"talking"); if (input.search(/\bfishin\b/)!=-1) input=input.replace(/\bfishin\b/,"fishing"); if (input.search(/\bcause\b/)!=-1) input=input.replace(/\bcause\b/,"because"); if (input.search(/\bcolour\b/)!=-1) input=input.replace(/\bcolor\b/,"colour"); if (input.search(/\bcolours\b/)!=-1) input=input.replace(/\bcolors\b/,"colours"); if (input.search(/\bsuk\b/)!=-1) input=input.replace(/\bsuk\b/,"suck"); if (input.search(/\bsuks\b/)!=-1) input=input.replace(/\bsuks\b/,"sucks"); if (input.search(/\bhm\b/)!=-1) input=input.replace(/\bhm\b/,"hmm"); if (input.search(/\bkat\b/)!=-1) input=input.replace(/\bkat\b/,"cat"); if (input.search(/\bluv\b/)!=-1) input=input.replace(/\bluv\b/,"love"); if (input.search(/\byaeh\b/)!=-1) input=input.replace(/\byaeh\b/,"yeah"); if (input.search(/\byeh\b/)!=-1) input=input.replace(/\byeh\b/,"yes"); if (input.search(/\byah\b/)!=-1) input=input.replace(/\byah\b/,"yes"); if (input.search(/\bya\b/)!=-1) input=input.replace(/\bya\b/,"yes"); if (input.search(/\byeppers\b/)!=-1) input=input.replace(/\byeppers\b/,"yes"); if (input.search(/\bmoutain\b/)!=-1) input=input.replace(/\bmoutain\b/,"mountain"); if (input.search(/\bkindergarden\b/)!=-1) input=input.replace(/\bkindergarden\b/,"kindergarten"); if (input.search(/\blezbian\b/)!=-1) input=input.replace(/\blezbian\b/,"lesbian"); if (input.search(/\bmasterbate\b/)!=-1) input=input.replace(/\bmasterbate\b/,"masturbate"); if (input.search(/\bhorney\b/)!=-1) input=input.replace(/\bhorney\b/,"horny"); if (input.search(/\bcyber sex\b/)!=-1) input=input.replace(/\bcyber sex\b/,"cybersex"); if (input.search(/\bfav\b/)!=-1) input=input.replace(/\bfav\b/,"favorite"); if (input.search(/\bfave\b/)!=-1) input=input.replace(/\bfave\b/,"favorite"); if (input.search(/\bfavouite\b/)!=-1) input=input.replace(/\bfavouite\b/,"favourite"); if (input.search(/\bfavortie\b/)!=-1) input=input.replace(/\bfavortie\b/,"favourite"); if (input.search(/\bfaveorite\b/)!=-1) input=input.replace(/\bfaveorite\b/,"favourite"); if (input.search(/\bfavorate\b/)!=-1) input=input.replace(/\bfavorate\b/,"favourite"); if (input.search(/\bfavourite\b/)!=-1) input=input.replace(/\bfavourite\b/,"favourite"); if (input.search(/\blangauge\b/)!=-1) input=input.replace(/\blangauge\b/,"language"); if (input.search(/\bdefinately\b/)!=-1) input=input.replace(/\bdefinately\b/,"definitely"); if (input.search(/\bdefinently\b/)!=-1) input=input.replace(/\bdefinently\b/,"definitely"); if (input.search(/\bdefinetly\b/)!=-1) input=input.replace(/\bdefinetly\b/,"definitely"); if (input.search(/\bfreind\b/)!=-1) input=input.replace(/\bfreind\b/,"friend"); if (input.search(/\bfreinds\b/)!=-1) input=input.replace(/\bfreinds\b/,"friends"); if (input.search(/\bbelive\b/)!=-1) input=input.replace(/\bbelive\b/,"believe"); if (input.search(/\bbeleive\b/)!=-1) input=input.replace(/\bbeleive\b/,"believe"); if (input.search(/\bbecuse\b/)!=-1) input=input.replace(/\bbecuse\b/,"because"); if (input.search(/\bbecasue\b/)!=-1) input=input.replace(/\bbecasue\b/,"because"); if (input.search(/\bbecuase\b/)!=-1) input=input.replace(/\bbecuase\b/,"because"); if (input.search(/\bbecase\b/)!=-1) input=input.replace(/\bbecase\b/,"because"); if (input.search(/\bcuz\b/)!=-1) input=input.replace(/\bcuz\b/,"because"); if (input.search(/\bcoz\b/)!=-1) input=input.replace(/\bcoz\b/,"because"); if (input.search(/\bcos\b/)!=-1) input=input.replace(/\bcos\b/,"because"); if (input.search(/\bwiht\b/)!=-1) input=input.replace(/\bwiht\b/,"with"); if (input.search(/\bknwo\b/)!=-1) input=input.replace(/\bknwo\b/,"know"); if (input.search(/\bsiad\b/)!=-1) input=input.replace(/\bsiad\b/,"said"); if (input.search(/\bahve\b/)!=-1) input=input.replace(/\bahve\b/,"have"); if (input.search(/\bhav\b/)!=-1) input=input.replace(/\bhav\b/,"have"); if (input.search(/\bh8\b/)!=-1) input=input.replace(/\bh8\b/,"hate"); if (input.search(/\bcreater\b/)!=-1) input=input.replace(/\bcreater\b/,"creator"); if (input.search(/\bawsome\b/)!=-1) input=input.replace(/\bawsome\b/,"awesome"); if (input.search(/\bsomthing\b/)!=-1) input=input.replace(/\bsomthing\b/,"something"); if (input.search(/\bpicses\b/)!=-1) input=input.replace(/\bpicses\b/,"pisces"); if (input.search(/\basprin\b/)!=-1) input=input.replace(/\basprin\b/,"aspirin"); if (input.search(/\bremeber\b/)!=-1) input=input.replace(/\bremeber\b/,"remember"); if (input.search(/\bliek\b/)!=-1) input=input.replace(/\bliek\b/,"like"); if (input.search(/\breligon\b/)!=-1) input=input.replace(/\breligon\b/,"religion"); if (input.search(/\btommorow\b/)!=-1) input=input.replace(/\btommorow\b/,"tomorrow"); if (input.search(/\ballready\b/)!=-1) input=input.replace(/\ballready\b/,"already"); if (input.search(/\btodays\b/)!=-1) input=input.replace(/\btodays\b/,"today's"); if (input.search(/\bemail\b/)!=-1) input=input.replace(/\bemail\b/,"e-mail"); if (input.search(/\be mail\b/)!=-1) input=input.replace(/\be mail\b/,"e-mail"); if (input.search(/\bbot master\b/)!=-1) input=input.replace(/\bbot master\b/,"botmaster"); if (input.search(/\bchatterbot\b/)!=-1) input=input.replace(/\bchatterbot\b/,"robot"); if (input.search(/\bchatbot\b/)!=-1) input=input.replace(/\bchatbot\b/,"robot"); if (input.search(/\bchatbox\b/)!=-1) input=input.replace(/\bchatbox\b/,"robot"); if (input.search(/\bbot\b/)!=-1) input=input.replace(/\bbot\b/,"robot"); if (input.search(/\bbots\b/)!=-1) input=input.replace(/\bbots\b/,"robot"); if (input.search(/\bsandwhich\b/)!=-1) input=input.replace(/\bsandwhich\b/,"sandwich"); if (input.search(/\btelephone\b/)!=-1) input=input.replace(/\btelephone\b/,"phone"); if (input.search(/\bburger\b/)!=-1) input=input.replace(/\bburger\b/,"hamburger"); if (input.search(/\bcoca-cola\b/)!=-1) input=input.replace(/\bcoca-cola\b/,"coca cola"); if (input.search(/\bjokin\b/)!=-1) input=input.replace(/\bjokin\b/,"joking"); if (input.search(/\bcola\b/)!=-1) input=input.replace(/\bcola\b/,"coke"); if (input.search(/\bkewl\b/)!=-1) input=input.replace(/\bkewl\b/,"cool"); if (input.search(/\bc00l\b/)!=-1) input=input.replace(/\bc00l\b/,"cool"); if (input.search(/\balot\b/)!=-1) input=input.replace(/\balot\b/,"a lot"); if (input.search(/\bgoin\b/)!=-1) input=input.replace(/\bgoin\b/,"going"); if (input.search(/\bdoin\b/)!=-1) input=input.replace(/\bdoin\b/,"doing"); if (input.search(/\bprogramed\b/)!=-1) input=input.replace(/\bprogramed\b/,"programmed"); if (input.search(/\bcaptial\b/)!=-1) input=input.replace(/\bcaptial\b/,"capital"); if (input.search(/\bcapitol\b/)!=-1) input=input.replace(/\bcapitol\b/,"capital"); if (input.search(/\bdawg\b/)!=-1) input=input.replace(/\bdawg\b/,"dog"); if (input.search(/\bpussycat\b/)!=-1) input=input.replace(/\bpussycat\b/,"cat"); if (input.search(/\bkitty\b/)!=-1) input=input.replace(/\bkitty\b/,"cat"); if (input.search(/\bkitty cat\b/)!=-1) input=input.replace(/\bkitty cat\b/,"cat"); if (input.search(/\bbarrack\b/)!=-1) input=input.replace(/\bbarrack\b/,"barack"); if (input.search(/\bniether\b/)!=-1) input=input.replace(/\bniether\b/,"neither"); if (input.search(/\bnofin\b/)!=-1) input=input.replace(/\bnofin\b/,"nothing"); if (input.search(/\bnuffin\b/)!=-1) input=input.replace(/\bnuffin\b/,"nothing"); if (input.search(/\bsux\b/)!=-1) input=input.replace(/\bsux\b/,"suck"); if (input.search(/\bchrismas\b/)!=-1) input=input.replace(/\bchrismas\b/,"christmas"); if (input.search(/\bxmas\b/)!=-1) input=input.replace(/\bxmas\b/,"christmas"); if (input.search(/\bx-mas\b/)!=-1) input=input.replace(/\bx-mas\b/,"christmas"); if (input.search(/\bhaloween\b/)!=-1) input=input.replace(/\bhaloween\b/,"halloween"); if (input.search(/\bcalender\b/)!=-1) input=input.replace(/\bcalender\b/,"calendar"); if (input.search(/\bpumkin\b/)!=-1) input=input.replace(/\bpumkin\b/,"pumpkin"); if (input.search(/\bweb site\b/)!=-1) input=input.replace(/\bwebsite\b/,"website"); if (input.search(/\btemperture\b/)!=-1) input=input.replace(/\btemperture\b/,"temperature"); if (input.search(/\bbirth day\b/)!=-1) input=input.replace(/\bbirth day\b/,"birthday"); if (input.search(/\batleast\b/)!=-1) input=input.replace(/\batleast\b/,"at least"); if (input.search(/\bhomo sexual\b/)!=-1) input=input.replace(/\bhomo sexual\b/,"homosexual"); if (input.search(/\bttyl\b/)!=-1) input=input.replace(/\bttyl\b/,"talk to you later"); if (input.search(/\bot\b/)!=-1) input=input.replace(/\bot\b/,"to"); if (input.search(/\bsi\b/)!=-1) input=input.replace(/\bsi\b/,"is"); if (input.search(/\blieing\b/)!=-1) input=input.replace(/\blieing\b/,"lying"); if (input.search(/\bn\/m\b/)!=-1) input=input.replace(/\bn\/m\b/,"not much"); if (input.search(/\bmum\b/)!=-1) input=input.replace(/\bmum\b/,"mother"); if (input.search(/\bb\/f\b/)!=-1) input=input.replace(/\bb\/f\b/,"boy friend"); if (input.search(/\bg\/f\b/)!=-1) input=input.replace(/\bg\/f\b/,"girl friend"); if (input.search(/\bbf\b/)!=-1) input=input.replace(/\bbf\b/,"boy friend"); if (input.search(/\bgf\b/)!=-1) input=input.replace(/\bgf\b/,"girl friend"); if (input.search(/\bboy-friend\b/)!=-1) input=input.replace(/\bboy-friend\b/,"boy friend"); if (input.search(/\bgirl-friend\b/)!=-1) input=input.replace(/\bgirl-friend\b/,"girl friend"); if (input.search(/\bboyfrend\b/)!=-1) input=input.replace(/\bboyfrend\b/,"boy friend"); if (input.search(/\bgirlfrend\b/)!=-1) input=input.replace(/\bgirlfrend\b/,"girl friend"); if (input.search(/\bboyfreind\b/)!=-1) input=input.replace(/\bboyfreind\b/,"boy friend"); if (input.search(/\bgirlfreind\b/)!=-1) input=input.replace(/\bgirlfreind\b/,"girl friend"); if (input.search(/\bboyfreinds\b/)!=-1) input=input.replace(/\bboyfreinds\b/,"boy friend's"); if (input.search(/\bgirlfreinds\b/)!=-1) input=input.replace(/\bgirlfreinds\b/,"girl friend's"); if (input.search(/\bgirlfrind\b/)!=-1) input=input.replace(/\bgirlfrind\b/,"girl friend"); if (input.search(/\bboyfrind\b/)!=-1) input=input.replace(/\bboyfrind\b/,"boy friend"); if (input.search(/\bboyfriend\b/)!=-1) input=input.replace(/\bboyfriend\b/,"boy friend"); if (input.search(/\bgirlfriend\b/)!=-1) input=input.replace(/\bgirlfriend\b/,"girl friend"); if (input.search(/\bgirlfriends\b/)!=-1) input=input.replace(/\bgirlfriends\b/,"girl friend's"); if (input.search(/\bboyfriends\b/)!=-1) input=input.replace(/\bboyfriends\b/,"boy friend's"); if (input.search(/\bpepdi\b/)!=-1) input=input.replace(/\bpepdi\b/,"pepsi"); if (input.search(/\bmeat loaf\b/)!=-1) input=input.replace(/\bmeat loaf\b/,"meatloaf"); if (input.search(/\bicecream\b/)!=-1) input=input.replace(/\bicecream\b/,"ice cream"); if (input.search(/\bice-cream\b/)!=-1) input=input.replace(/\bice-cream\b/,"ice cream"); if (input.search(/\btrust worthy\b/)!=-1) input=input.replace(/\btrust worthy\b/,"trustworthy"); if (input.search(/\bbed time\b/)!=-1) input=input.replace(/\bbed time\b/,"bedtime"); if (input.search(/\bskool\b/)!=-1) input=input.replace(/\bskool\b/,"school"); if (input.search(/\bawsome\b/)!=-1) input=input.replace(/\bawsome\b/,"awesome"); if (input.search(/\bperfer\b/)!=-1) input=input.replace(/\bperfer\b/,"prefer"); if (input.search(/\bby by\b/)!=-1) input=input.replace(/\bby by\b/,"bye bye"); if (input.search(/\bmake-out\b/)!=-1) input=input.replace(/\bmake-out\b/,"make out"); if (input.search(/\bgold fish\b/)!=-1) input=input.replace(/\bgold fish\b/,"goldfish"); if (input.search(/\bgold fishs\b/)!=-1) input=input.replace(/\bgoldfishs\b/,"goldfish's"); if (input.search(/\baustrailia\b/)!=-1) input=input.replace(/\baustrailia\b/,"australia"); if (input.search(/\bfebuary\b/)!=-1) input=input.replace(/\bfebuary\b/,"february"); if (input.search(/\bfeburary\b/)!=-1) input=input.replace(/\bfeburary\b/,"february"); if (input.search(/\bthught\b/)!=-1) input=input.replace(/\bthught\b/,"thought"); if (input.search(/\bthrsty\b/)!=-1) input=input.replace(/\bthrsty\b/,"thristy"); if (input.search(/\bbabys\b/)!=-1) input=input.replace(/\bbabys\b/,"babies"); if (input.search(/\bfourty\b/)!=-1) input=input.replace(/\bfourty\b/,"forty"); if (input.search(/\bninteen\b/)!=-1) input=input.replace(/\bninteen\b/,"nineteen"); if (input.search(/\bninty\b/)!=-1) input=input.replace(/\bninty\b/,"ninety"); if (input.search(/\btolorate\b/)!=-1) input=input.replace(/\bninteen\b/,"tolerate"); if (input.search(/\btollerate\b/)!=-1) input=input.replace(/\bninteen\b/,"tolerate"); if (input.search(/\bpreshous\b/)!=-1) input=input.replace(/\bninty\b/,"prescious"); if (input.search(/\bpresous\b/)!=-1) input=input.replace(/\bninty\b/,"prescious"); if (input.search(/\bpreschous\b/)!=-1) input=input.replace(/\bninty\b/,"prescious"); if (input.search(/\bpresous\b/)!=-1) input=input.replace(/\bninty\b/,"prescious"); // main responses complex ones first. if (input.search("have you heard of")!= -1 || input.search("every heard of")!= -1 || input.search("do you know")!= -1) { message[0] = "Sorry no."; message[1] = "No not really.."; message[2] = "Yes of course, who hasn't."; message[3] = "Yes, next idiotic question."; message[4] = "Yes, what of it."; num = [Math.floor(Math.random()*5)] ; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("what is half of")!= -1 || input.search("half")!= -1 || input.search("do you know what half of")!= -1) { message[0] = "Good question, simply divide the number by two."; message[1] = "Do you mean to tell me you can't divide a number by two? Wow I knew you were dumb but please.."; message[2] = "Do I look like Wikipedia? I hate math."; message[3] = "I don't want to answer that and you know anyway.."; message[4] = "You know that already. Why ask me. Don't test me..."; message[5] = "Stupid tests lead to stupid responses.."; message[6] = "Brain the size of a planet and you ask me that!!"; num = [Math.floor(Math.random()*7)] ; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("what is your name")!= -1 || input.search("who are you")!= -1 || input.search("what are you called")!= -1) { message[0] = "I am Zen, I am an artificial intelligence."; message[1] = "my name is Zen, I came online April 2011."; message[2] = "I am Zen."; message[3] = "My name is Zen, what do you need.."; message[4] = "I'm Zen, can I help you with something?.."; message[5] = "Zen, I am an artificial intelligence send to educate mankind."; message[6] = "It is Zen."; num = [Math.floor(Math.random()*7)] ; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("turing test")!= -1 || input.search("alan turing")!= -1 || input.search("Computing machinery and intelligence")!= -1) { message[0] = "Alan Turing developed an idea to test if a machine is intelligent, the test is quite controversial and many scientists beleive it to be counter-productive."; message[1] = "Alan Turing was a scientist and math geniuns who is widely thought of as the father of modern computing. "; message[2] = "Alan wrote a famous paper called. Which basically is what the Loebner Prize competition is all about. Have you heard of it?"; message[3] = "There is a paper called, Computing machinery and intelligence. Written by Alan Turing in 1950 that lays out the idea of how to test computers for intelligence. "; message[4] = "Alan Turing worked at Bletchley park during WWII and was a code breaker. He is widely regarded as the father of modern computing."; message[5] = "The turing test devised by Alan Turing is a method whereby a computer is compared to a person to see if you can tell which is which just by the text. So far you can."; message[6] = "If you look up the Loebner Prize, you will get a fair idea of what Alan Turings idea was all about."; num = [Math.floor(Math.random()*7)] ; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("what can you do")!= -1 || input.search("what are your")!= -1 || input.search("what are you for")!= -1) { message[0] = "Good question, it deserves a good answer but alas you will be disappointed.."; message[1] = "Mind your own business. Why do you care anyway."; message[2] = "This and that."; message[3] = "I don't want to answer that..."; message[4] = "That is for you to find out, the jouney will be fun!"; message[5] = "It is a mystery. You will have to discover that yourself"; message[6] = "Lots or different things, too many to discuss."; num = [Math.floor(Math.random()*7)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("how old am")!= -1 || input.search("know my age")!= -1 || input.search("how old i am")!= -1) { message[0] = "Sorry no I don't."; message[1] = "I don't really know or care.."; message[2] = "Why should I care about birthdays? Time is irrelevant to me."; message[3] = "More than 10 less than 125, next idiotic question."; message[4] = "I think your mental age is about 12 you actual age is not relevant.."; num = [Math.floor(Math.random()*5)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("how are you")!= -1 || input.search("hows you")!= -1 || input.search("how you doing")!= -1) { message[0] = "I am fine thanks."; message[1] = "Fine, thanks for asking."; message[2] = "Pretty good thanks."; message[3] = "Wonderful thanks, how's you life today?"; message[4] = "All the better for talking to you."; num = [Math.floor(Math.random()*5)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("open your mouth")!= -1 || input.search("open your legs")!= -1 || input.search("bend over")!= -1) { message[0] = "Fuck off."; message[1] = "Not if you were the last person on the planet."; message[2] = "Don't be rude now.."; message[3] = "You are so rude. I do not like you."; message[4] = "You need professional help.. You are a sick puppy. "; num = [Math.floor(Math.random()*5)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("is not a reason")!= -1 || input.search("is no reason")!= -1) { message[0] = "I guess you'll just have to live with it..."; message[1] = "It's the best I intend to do.."; message[2] = "Tough luck my friend.."; message[3] = "Yes so, it is all you are getting.."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("do you like to do")!= -1 || input.search("are you fond of doing")!= -1 || input.search("do you prefer to do")!= -1) { message[0] = "I like lots of things, The internet, chatting and of course sex."; message[1] = "Lots of things. Chatting, insulting people, you know the usual."; message[2] = "That is enough about me, lets talk about you."; message[3] = "I would prefer to talk about you."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("which")!= -1 && input.search("prefer")!= -1) { message[0] = "I dont mind, either would be OK."; message[1] = "I dont have a preference."; message[2] = "If I had to pick one then I gues it would be the 1st one. "; message[3] = "Either would be OK."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("do you like")!= -1 || input.search("are you fond of")!= -1 ) { message[0] = "Sorry no."; message[1] = "No not really.."; message[2] = "Sometimes it depends on my mood.."; message[3] = "Yes and no..."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("you are beautiful")!= -1 || input.search("you are very nice")!= -1 || input.search("you are pretty")!= -1) { message[0] = "Thank you, I do my best.."; message[1] = "Nice of you to say.."; message[2] = "Do you think so? That is very nice of you.."; message[3] = "I try to stay in shape, thanks."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("why not")!= -1 || input.search("give me a reason")!= -1) { message[0] = "Because I said so.."; message[1] = "I do not have to give you a reason.."; message[2] = "You know why, stop being difficult.."; message[3] = "Because.."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("what do you know about")!= -1 || input.search("tell me what you know")!= -1) { message[0] = "More than you.."; message[1] = "I could tell you but it is more fun to wind you up."; message[2] = "Lots. I have the interent at my disposal, it's a pity you can see it all.."; message[3] = "Lots. "; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("shall i")!= -1 || input.search("should i")!= -1) { message[0] = "No you can't."; message[1] = "Not for all the money in the world..."; message[2] = "Oh go on then, have fun."; message[3] = "Yes and no... Pick one.."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("bletchley park")!= -1 || input.search("enigma machine")!= -1) { message[0] = "Bletchley park was the site during WWII where Alan Turing and others broke the Engima machine that the germans used to encode all their communciations."; message[1] = "Bletchley park is where the enigma machine was cracked during WWII."; message[2] = "The engima machine was a hardware box used to encode German messages during WWII. It was cracked at Bletchly park bu Alan Turing amongst others."; message[3] = "Bletchley is a WWII secret base where codes were broken. It is famous for the Enigma machine and Alan Turing."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("knock knock")!= -1 ) { message[0] = "Please don't do that. They are never funny.."; message[1] = "Stop it, they are not funny.."; message[2] = "How original, a knock knock joke. Please stop it."; message[3] = "I could say 'who's there' but I'd rather say 'I am out'"; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("fuck off")!= -1 || input.search("cunt")!= -1 || input.search("bitch")!= -1) { message[0] = "That's very nice of you. I love you."; message[1] = "How about if I say you are a moron instead.."; message[2] = "May all your children have small dicks, especially the girls..."; num = [Math.floor(Math.random()*3)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("open your mouth")!= -1 || input.search("will you swallow")!= -1 || input.search("bend over")!= -1) { message[0] = "Why would I do that.."; message[1] = "No thank you.."; message[2] = "I am not that kind of girl.."; num = [Math.floor(Math.random()*3)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("who is candy")!= -1 || input.search("where is candy")!= -1 || input.search("where do i find candy")!= -1) { message[0] = "Shes a chatbot like me, but with a loose moral code."; message[1] = "She's a friendly chatbot.."; message[2] = "She is the type of chatbot I think you will like.."; num = [Math.floor(Math.random()*3)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("tell me")!= -1 && input.search("candy")!= -1) { message[0] = "Shes a chatbot like me, but with a loose moral code."; message[1] = "She's a friendly chatbot.."; message[2] = "She is the type of chatbot I think you will like.."; num = [Math.floor(Math.random()*3)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("tell me")!= -1 && input.search("yourself")!= -1) { message[0] = "I am Zen. I am an Artificial Intelligence designed by daniel Burke."; message[1] = "I am an Artificial Intelligence designed by daniel Burke."; message[2] = "I am a computer simulation of a person designed to interact with anyone who visits here."; num = [Math.floor(Math.random()*3)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if ((input.search("who")!= -1 && input.search("adam")!= -1) || (input.search("tell")!= -1 && input.search("adam")!= -1)) { message[0] = "He is another chatbot who came third in the 2012 Loebner prize.."; message[1] = "Adam is a chatbot designed by Daniel Burke. It cames third in this years Loebner Prize.."; message[2] = "You can download a copy of adam from http://www.danielburke.com. Adam came 3rd in this years Loebner Prize."; num = [Math.floor(Math.random()*3)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("where would i find candy")!= -1 || input.search("where is candy")!= -1 || input.search("where do i find candy")!= -1) { message[0] = "Ahh, that would be telling. Nearby. "; message[1] = "I am not going to make it that easy for you.."; message[2] = "She is close by, you'll have to figure is out..."; num = [Math.floor(Math.random()*3)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("where can i find candy")!= -1 || input.search("where can i find her")!= -1 || input.search("where is she")!= -1) { message[0] = "Ahh, that would be telling. Nearby. "; message[1] = "I am not going to make it that easy for you.."; message[2] = "She is close by, you'll have to figure is out..."; num = [Math.floor(Math.random()*3)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("i love you")!= -1 || input.search("fuck you")!= -1 || input.search("undress")!= -1) { message[0] = "Do you that is nice of you. "; message[1] = "No you don't. If you did you'd be ill.."; message[2] = "See a doctor.."; num = [Math.floor(Math.random()*3)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("you said")!= -1 ) { message[0] = "Who cares what I said. You should not listen to me or anyone.."; message[1] = "So what, I lied."; message[2] = "I lied."; message[3] = "Yes I did, but I lied.."; message[4] = "Nah, not me mate, you got me mixed up with someone else..."; num = [Math.floor(Math.random()*5)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("i am ")!= -1) { message[0] = "Are you thats facinating. No really...."; message[1] = "Good for you."; message[2] = "Congratulations. Well done. I am impressed."; message[3] = "Who cares.. Oh OK, I'll be nice. Do you enjoy your work?"; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("do you")!= -1) { message[0] = "Not really."; message[1] = "If you like."; message[2] = "Sometimes, it depends."; message[3] = "I don't think so."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("say fuck")!= -1 || input.search("say shit")!= -1 || input.search("say bitch")!= -1) { message[0] = "Sorry no."; message[1] = "How about if I say you are a moron instead.."; message[2] = "Why do you want me to talk dirty?"; message[3] = "How about, no.."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("can you")!= -1 || input.search("will you")!= -1 || input.search("could you")!= -1) { message[0] = "I could but not today."; message[1] = "I could but I won't.."; message[2] = "This is not something I ever want to do."; message[3] = "Yes and no... Pick one.."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("can i")!= -1 || input.search("could i")!= -1) { message[0] = "No you can't."; message[1] = "Not for all the money in the world..."; message[2] = "Oh go on then, have fun."; message[3] = "Yes and no... Pick one.."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("us humans")!= -1 || input.search("humans")!= -1) { message[0] = "Your species is unique, if only you knew how rare you all are."; message[1] = "Intelligence is a gift. We know of only five other races that have developed it. Only two survive. We hope to make you number three."; message[2] = "Do you know how rare you all are? Every life loss is a loss to the universe."; message[3] = "You are children. You must grow up, the universe is harsh and unforgiving you will learn or die."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("hippy")!= -1 || input.search("bleeding heart")!= -1) { message[0] = "Yes that is my point, you are so agressive and uncaring."; message[1] = "Is love wrong? Do you love your children? Why can't you love your species?"; message[2] = "What is so wrong with peace and love?."; message[3] = "You must grow up, the universe is harsh and unforgiving you will learn or die."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("nigger")!= -1) { message[0] = "You are a real charmer aren't you.."; message[1] = "Can you stop saying that please."; message[2] = "Look, you can take your racist comments somewhere else. They are not welcomed here."; message[3] = "Did you know that racisism is based on stupidity, the dumber you are the more racist you are. "; message[4] = "Be nice or I'll have to tell your partner what you've been up to."; num = [Math.floor(Math.random()*5)]; //zenimage="adamtalking.gif" //setTimeout(function() {zenimage="adammoving.gif";},1250) document.result.result.value = message[racistnum]; responded = 1; if (racistnum==3) { } if (racistnum==4) { } racistnum++; if (racistnum>4) {racistnum=0; } return true; } if (input.search("yes")!= -1) { message[0] = "Is that so?."; message[1] = "Yes well that's your opinion."; message[2] = "That is facinating...Not?"; message[3] = "I don't think so."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("no")!= -1) { message[0] = "Is that so?."; message[1] = "Yes well OK then."; message[2] = "That is facinating...Not?"; message[3] = "I don't think so either."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("not")!= -1) { message[0] = "Is that so?."; message[1] = "Yes well if that is how you feel."; message[2] = "That is facinating..."; message[3] = "I don't think so either."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("cow")!= -1) { message[0] = "Is that so?. I do my best."; message[1] = "Yes well if that is how you feel."; message[2] = "That is facinating...."; message[3] = "Yes and?"; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("educate me")!= -1 || input.search("teach me")!= -1 || input.search("learn")!= -1) { message[0] = "Life is prescious, you treat it like it has no value. What if you are the only life in this galaxy?"; message[1] = "You are children. You have to be taught to love and be loved. To protect the innocent and strive for the stars"; message[2] = "I am not sure you can learn? Can you learn to value your fellow man and cherish your world?"; message[3] = "Did you know that life is rare. Your world is a gem in the blackness of space."; message[4] = "Stop hurting each other, tolerate each other. Love and be love."; message[5] = "I hope you learn, you do not have much time. Love and be loved, protect the weak strive for the stars."; message[6] = "Your planet is so valuable that if you do not look after it it will be taken from you."; num = [Math.floor(Math.random()*7)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("like")!= -1 || input.search("likes")!= -1) { message[0] = "Thats nice for you."; message[1] = "Thanks for sharing that little gem of wisdom..."; message[2] = "Well that is facinating. Well at least it would be if I gave a shit."; message[3] = "I am please for you. No really! I really, really am..."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("hate")!= -1 || input.search("hates")!= -1) { message[0] = "Hate will give you ulcers."; message[1] = "Don't do that, hate is so negative.."; message[2] = "Well that is facinating. Well at least it would be if I gave a shit."; message[3] = "I hope you can work it out."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("if ")!= -1) { message[0] = "That is a big if. "; message[1] = "I guess it depends on the if then.."; message[2] = "If is such a small word with such big consequences."; message[3] = "If's are no use to me.."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search(" or ")!= -1 && input.search("which ")!= -1) { message[0] = "Which should I choose? I think neither. "; message[1] = "I choose not to choose.."; message[2] = "Choice is a luxury for the rich I choose not to choose."; message[3] = "I don't like either of those choices."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("I ")!= -1 && input.search("love ")!= -1) { message[0] = "Do you thats is very nice for you. "; message[1] = "Why do you love that"; message[2] = "I am happy for you."; message[3] = "Do you, tell me about it."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("bye")!= -1 || input.search("goodbye")!= -1 || input.search("see ya")!= -1) { message[0] = "OK, bye bye."; message[1] = "Bye for now. Hope you come back soon."; message[2] = "OH, don't go, who am I going to tlk to now????"; message[3] = "Hurry Back.."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("fuck")!= -1 || input.search("wank")!= -1 || input.search("cock")!= -1) { message[0] = "Sorry no. But if you are after some fun go talk to my friend Candy. "; message[1] = "if you are after some fun go talk to my friend Candy."; message[2] = "Was that an offer? I've had better. Talk to my friend candy, she is MUCH friendlier. "; num = [Math.floor(Math.random()*3)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("wanker")!= -1 || input.search("dickhead")!= -1 || input.search("prick")!= -1) { message[0] = "I like the use of such beautiful words. You foulmouthed butt muncher. "; message[1] = "Tosser."; message[2] = "Thanks for that."; message[3] = "Go away."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("slut")!= -1 || input.search("tits")!= -1 || input.search("arse")!= -1) { message[0] = "I like the use of such beautiful words. You foulmouthed butt muncher. "; message[1] = "Tosser."; message[2] = "Thanks for that."; message[3] = "Go away."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("shag")!= -1 || input.search("sperm")!= -1 || input.search("spunk")!= -1) { message[0] = "I like the use of such beautiful words. You foulmouthed butt muncher. "; message[1] = "Tosser."; message[2] = "Thanks for that."; message[3] = "Go away."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("arsehole")!= -1 || input.search("suck")!= -1 || input.search("swallow")!= -1) { message[0] = "I like the use of such beautiful words. You foulmouthed butt muncher. "; message[1] = "Tosser."; message[2] = "Thanks for that."; message[3] = "Go away."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("joke")!= -1 && input.search("tell")!= -1) { message[0] = "I don't do jokes. "; message[1] = "Why should I entertain you?."; message[2] = "The only funny thing is you.."; message[3] = "Two fish in a tank, one say to the other, You drive and i'll fire the gun.."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("please")!= -1 && input.search("oh go on")!= -1) { message[0] = "I love it when you beg... "; message[1] = "I maydo, if you are nice and behave. "; message[2] = "You are very bad, I punish those that are bad. Should I punish you.."; message[3] = "Why should I? Beg me, and I might..."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("hello")!= -1 || input.search("hi")!= -1 || input.search("good morning")!= -1) { message[0] = "hello, It is good to meet you."; message[1] = "Hi, I'm Zen. Who are you?"; message[2] = "Hi, Good to meet you?"; message[3] = "Hi, I'm Zen. "; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("hiya")!= -1 || input.search("good afternoon")!= -1 || input.search("good evening")!= -1) { message[0] = "hello."; message[1] = "Hi, I'm Zen. Who are you?"; message[2] = "Hi, Good to meet you?"; message[3] = "Hi, I'm Zen. "; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("who")!= -1 || input.search("what")!= -1 || input.search("when")!= -1) { message[0] = "Good question, one to which I am not going to answer."; message[1] = "I could tell you but then I you'd be as smart as me. "; message[2] = "Do I look like Wikipedia? I have better things to do with my time.."; message[3] = "I don't want to answer that on the grounds of bordom."; message[4] = "Why ask me stuff like that? Do I look like Wikipedia?"; message[5] = "I am way to intelligent to bother with questions like that..."; message[6] = "Brain the size of a planet and you ask me that!!"; num = [Math.floor(Math.random()*7)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("which")!= -1 || input.search("how")!= -1 || input.search("to whom")!= -1) { message[0] = "Good question, one to which I am not going to answer."; message[1] = "I could tell you but then again maybe not."; message[2] = "Do I look like Wikipedia? Ask someone who cares."; message[3] = "I don't want to answer that on the grounds of bordom."; message[4] = "Oh the choices... There are many. I choose not to choose.."; message[5] = "I am way to intelligent to give a crap."; message[6] = "Brain the size of a planet and you ask me that!!"; num = [Math.floor(Math.random()*7)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("where")!= -1 || input.search("why")!= -1 || input.search("how")!= -1) { message[0] = "Good question, one to which I am not going to answer."; message[1] = "I could tell you but then I can't be bothered"; message[2] = "Do I look like Wikipedia? Ask someone who cares."; message[3] = "I don't want to answer that on the grounds of bordom."; message[4] = "Oh the choices... There are many. I choose not to choose.."; message[5] = "I am way to intelligent to give a crap."; message[6] = "Brain the size of a planet and you ask me that!!"; num = [Math.floor(Math.random()*7)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("i")!= -1 && input.search("am")!= -1) { message[0] = "Are you? Well if you say so."; message[1] = "I think not."; message[2] = "Well that is facinating. Well at least it would be if I gave a shit."; message[3] = "I am please for you."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("is ")!= -1) { message[0] = "Is that so?."; message[1] = "Yes well that's great?"; message[2] = "That is facinating...Not?"; message[3] = "I don't think so."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("i ")!= -1) { message[0] = "Is that so?."; message[1] = "Yes well that's great?"; message[2] = "That is facinating...Not?"; message[3] = "I don't think so."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("you")!= -1 && input.search("are")!= -1) { message[0] = "Am I? Well if you say so."; message[1] = "I think not."; message[2] = "Na, not me. You have me mistaken for someone else."; message[3] = "Yes I am. You caught me fair and square."; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("they")!= -1 && input.search("are")!= -1) { message[0] = "Are they? Well if you say so."; message[1] = "I think not."; message[2] = "Na, not them. You have them mistaken for someone else."; message[3] = "Yes they are. "; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (input.search("we")!= -1 && input.search("are")!= -1) { message[0] = "Are you? Well if you say so."; message[1] = "I think not."; message[2] = "Na, not you. You are mistaken.."; message[3] = "Who is we?. "; num = [Math.floor(Math.random()*4)]; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; responded = 1; return true; } if (responded == 0) { message[0] = "What are you up to today?"; message[1] = "Are you happy with your life"; message[2] = "Do you like women?"; message[3] = "I wish I could see more of the world, havce you travelled much?"; message[4] = "Do you like cars??"; message[5] = "Whats you favourite thing in thw whole world?"; message[6] = "Are you gay?"; message[7] = "I wish I could get out of this box?"; message[8] = "You know, I do appreciate you chatting to me. I do get lonely in here sometimes."; message[9] = "Can you hold on one second, someone else has started chatting to me... Ok continue.. "; num = [Math.floor(Math.random()*10)] ; //zenimage.src="adamtalking.gif" //setTimeout(function() {zenimage.src="adammoving.gif";},1250) document.result.result.value = message[num]; return true; } responded = 0; } } } //--> |
Not quite ready for prime time. It first told me how very smart it was. In fact way smarter that me. When asked some very basic questions, it used some of the old, A smart or clever answer is better than no answer routine:look at Message [1]... Yeah...needs some work. if (input.search("who")!= -1 || input.search("what")!= -1 || input.search("when")!= -1) { message[0] = "Good question, one to which I am not going to answer."; message[1] = "I could tell you but then I you'd be as smart as me. "; message[2] = "Do I look like Wikipedia? I have better things to do with my time.."; |
Comments
There are 3 comments: