Advertisement
k0mZ

Untitled

Aug 10th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.80 KB | None | 0 0
  1.  
  2. <script> // JavaScript Document
  3.  
  4. $(document).ready(function() {
  5. $('#livechat').addClass('show');
  6. $('#livechatopen').css({
  7. display: 'none'
  8. });
  9. $('#livechatclose').css({
  10. display: 'block'
  11. });
  12. $('#livechat').animate({
  13. bottom: '0px'
  14. }, 250);
  15.  
  16. /**********************/
  17. /*** BOT USER NAMES ***/
  18. /**********************/
  19.  
  20. botusernames = ["Donna K", "Leonard J", "Brandon"];
  21. botusernames2 = ["Luke", "Timmy", "Berry"];
  22.  
  23. /**********************/
  24. /*** RESPONSE TIMES ***/
  25. /**********************/
  26.  
  27. maximumresponsetime = 1;
  28. minimumresponsetime = 1;
  29.  
  30. /***********************/
  31. /*** PRECONVERSATION ***/
  32. /***********************/
  33.  
  34. setTimeout(botconvo, 1000);
  35.  
  36. /*************************************/
  37. /*** PRECONVERSATION RESPOSNE TIME ***/
  38. /*************************************/
  39.  
  40. pre_conv_startup_time = 2;
  41. pre_conv_responsetime = 5;
  42.  
  43. /********************************/
  44. /*** PRECONVERSATION MESSAGES ***/
  45. /********************************/
  46.  
  47.  
  48.  
  49. botmessages = ["Es funktioniert?", "Ja, ich habe es einfach getan und ich erhielt unbegrenztes Gold sofort", "Unglaublich, ich habe es sofort getan. Was ist die Prüfung für?", "Ich habe die Überprüfung, nahm mich ein paar Sekunden, es ist einfach", "Es ist wirklich frei?", "Ja Jaaa, es funktioniert wie Charme. Diese Generatoren sind nicht zu finden :D", "Tun wir um Gold und Juwelen sofort?", "sofort nach dem Starten des Tools!", "Perfekt, werde ich es auf Facebook :)", "Ja, ich habe das Gleiche!", "Ich bin frei, nun, wie kann ich es tun?", "wählen Sie einfach eines der Angebote zu bekommen, einfach zu kompletten Es dauerte 20 Sekunden lol ;)"];
  50.  
  51. /************************/
  52. /*** RANDOM SHOUTOUTS ***/
  53. /************************/
  54.  
  55. maxshouttime = 20;
  56. minshouttime = 15;
  57. numbergenerated = ["999,999 ", "700,000", "800,000", "900,000 ", "999,999", "1,000,000"];
  58. listofresources = ["Gold", "Gems"];
  59.  
  60. /**************************/
  61. /**** LIVE CHAT OPACITY ***/
  62. /**************************/
  63.  
  64. $('#livechat').hover(function() {
  65. $('#livechat').animate({
  66. opacity: 1
  67. }, 0)
  68. }, function() {
  69. $('#livechat').animate({
  70. opacity: 0.9
  71. }, 0)
  72. });
  73.  
  74. /*****************/
  75. /*** RESPONSES ***/
  76. /*****************/
  77. welcomemessage = ["Willkommen im Chat... :)", "Willkommen im Chat... :D", "Here, new one! :p"];
  78.  
  79. greetingsresponse = ["Hello", "hello :D", "Hello :)", "hello.. :)", "Hello.. :D", "Greetings", "greetings.. :D", "greetings.. :)", "greetings :D", "Greetings :)"];
  80.  
  81. whatsupresponse = ["whats up", "whats up XD", "whats up :P", "whats up ?"];
  82.  
  83. howareyouresponse = ["how are you", "how are you :D", "how are you.. :)", "how are you.. :D", "how are you :)", "how are you.. XD", "everything is fine XD", "Yes, great", "yeah, great :)", "yeh, great :D", "Alright, great.. :)", "yeah, great.. :D", "Yeah, thanks", "Yeah, thanks :)", "Yeah, thanks :D", "Yeah, thanks.. :)", "Yeah, thanks.. :D"];
  84.  
  85. absentresponse = ["Yeah :)", "Yeah :D", "Yeah", "We are here :)", "we are here :D", "we are here :)", "? ?", "we are online", "we are online :)", "we are online :D"];
  86.  
  87. workingqresponse = ["Works for me :)", "works for me... :D", "works awesome", "it works awesome for me", "I just got what i wanted !", "It works perfectly", "It works, beyond awesomeness", "works like a charm", "i got what i wanted immediately"];
  88.  
  89. reallyresponse = ["Yes", "Yes :)", "Yeah :D", "Yeah.. :)", "Yeah.. :D"];
  90.  
  91. surveyresponse = ["Yes, it works all the time for me", "Nvm, it's really simple to complete", "Definetly worth it", "you get what you want, for free ! :D", "you get what you want right after verification, thanks :)"];
  92.  
  93. complimentresponse = ["Nothing", "Nothing :)", "Nothing :D", "Nothing.. :)", "Nothing.. :D", "No problems :)", "No problem :D", "No problem.. :)", "No problem.. :D", "No problem"];
  94.  
  95. byeresponse = ["goodbye", "see you guys :)", "going afk, see you guys :)", "enjoy it, cheers for now.. :)", "Bye guys.. :D"];
  96.  
  97. /**********************************/
  98. /*** DO NOT EDIT ANYTHING BELOW ***/
  99. /**********************************/
  100.  
  101. listofresourcesl = listofresources.length - 1;
  102. numbergeneratedl = numbergenerated.length - 1;
  103. welcomemessagel = welcomemessage.length - 1;
  104. botusernamesl = botusernames.length - 1;
  105. botusername = botusernames[Math.floor((Math.random() * botusernamesl))];
  106. greetings = ["bonjour à vous", "bonjour", "bonsoir", "bjr", "bjr à vous"];
  107. greetingsresponsel = greetingsresponse.length - 1;
  108. whatsup = ["quoi de neuf"];
  109. whatsupresponsel = whatsupresponse.length - 1;
  110. howareyou = ["vous allez bien", "comment allez-vous"];
  111. howareyouresponsel = howareyouresponse.length - 1;
  112. absent = ["Il y a quelqu'un", "vous allez bien", "Vous êtes là", "Vous etes la", "Vous êtes la"];
  113. absentresponsel = absentresponse.length - 1;
  114. workingq = ["Ca marche", "Ca fonctionne"];
  115. workingqresponsel = workingqresponse.length - 1;
  116. working = ["marche", "fonctionne"];
  117. really = ["vraiment"];
  118. reallyresponsel = reallyresponse.length - 1;
  119. survey = ["enquête", "enquete", "offre"];
  120. surveyresponsel = surveyresponse.length - 1;
  121. compliment = ["merci", "merci beaucoup"];
  122. complimentresponsel = complimentresponse.length - 1;
  123. bye = ["au revoir"];
  124. byeresponsel = byeresponse.length - 1;
  125. ok = ["okay", "ok"];
  126. count = -1;
  127. time = (pre_conv_startup_time * 1000) - (pre_conv_responsetime * 2000);
  128.  
  129. setInterval(function() {
  130. $('
  131. <li>').text( 'Anonymous'+ Math.floor(Math.random()*100) + ' just got ' + numbergenerated[Math.floor(Math.random() * numbergeneratedl)] + ' ' + listofresources[Math.floor(Math.random() * listofresourcesl)]).appendTo($('#messages')).addClass('botsent').addClass('italics');
  132. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  133. $('.botsent').removeClass('botsent');
  134. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  135. document.getElementById('audio').play()
  136. }, (Math.floor(Math.random() * maxshouttime) + minshouttime) * 1000);
  137.  
  138.  
  139. function botconvo() {
  140. for (i = 0; i < (botmessages.length / 2); i++) {
  141. time = time + (pre_conv_responsetime * 2000);
  142. setTimeout(function() {
  143. count++;
  144. $('<li>').text(botmessages[count]).appendTo($('#messages')).addClass('botsent');
  145. $('<span>').addClass('username').text(botusername2 + ': ').prependTo($('.botsent'));
  146. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  147. $('.botsent').removeClass('botsent');
  148. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  149. document.getElementById('audio').play()
  150. }, time);
  151. setTimeout(function() {
  152. count++;
  153. $('
  154. <li>').text('@' + botusername2 + ' ' + botmessages[count]).appendTo($('#messages')).addClass('botsent');
  155. $('<span>').addClass('username').text(botusernames[Math.floor((Math.random() * botusernamesl))] + ': ').prependTo($('.botsent'));
  156. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  157. $('.botsent').removeClass('botsent');
  158. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  159. document.getElementById('audio').play()
  160. }, time + (pre_conv_responsetime * 1000))
  161. }
  162. };
  163. botusernamesl = botusernames.length - 1;
  164. botusername = botusernames[Math.floor((Math.random() * botusernamesl))];
  165. botusernames2l = botusernames.length - 1;
  166. botusername2 = botusernames2[Math.floor((Math.random() * botusernames2l))];
  167. $('#livechat').click(function() {
  168. $('#livechatheader').removeClass('chatred').addClass('chatgreen')
  169. });
  170.  
  171. $('#chatbox').click(function() {
  172.  
  173.  
  174.  
  175. if ($('#pickausername').hasClass('hidden') == true) {
  176. $('#pickausername').css({
  177. display: 'block'
  178. });
  179. $('#pickausername').animate({
  180. opacity: 1
  181. }, 500)
  182. }
  183. });
  184.  
  185. $('#livechatheader').click(function() {
  186. if ($('#livechat').hasClass('show') == false) {
  187. $('#livechat').addClass('show');
  188. $('#livechatopen').css({
  189. display: 'none'
  190. });
  191. $('#livechatclose').css({
  192. display: 'block'
  193. });
  194. $('#livechat').animate({
  195. bottom: '-350px'
  196. }, 300, function() {
  197. $('#livechat').animate({
  198. bottom: '0px'
  199. }, 250)
  200. })
  201. } else {
  202. $('#livechat').removeClass('show');
  203. $('#livechatopen').css({
  204. display: 'block'
  205. });
  206. $('#livechatclose').css({
  207. display: 'none'
  208. });
  209. $('#livechat').animate({
  210. bottom: '-350px'
  211. }, 250, function() {
  212. $('#livechat').animate({
  213. bottom: '-300px'
  214. }, 300)
  215. })
  216. }
  217. });
  218. $('#startchatting').click(function() {
  219. if ($('#chatusername').val() != '') {
  220. chatusername = $('#chatusername').val();
  221. $('#pickausername').removeClass('hidden')
  222. } else {
  223. chatusername = 'Anonymous1';
  224. $('#pickausername').removeClass('hidden')
  225. };
  226. $('#pickausername').animate({
  227. opacity: 0
  228. }, 500, function() {
  229. $('#pickausername').css({
  230. display: 'none'
  231. });
  232. $('#connectingtochat').css({
  233. display: 'none'
  234. });
  235. $('#connectingtochat').animate({
  236. opacity: 1
  237. }, 500, function() {
  238. setTimeout(function() {
  239. $('#connectingtochat').animate({
  240. opacity: 0
  241. }, 500, function() {
  242. $('#connectingtochat').css({
  243. display: 'none'
  244. });
  245. $('#chat').addClass('show');
  246. $('#chat').css({
  247. display: 'block'
  248. });
  249. $('#chat').animate({
  250. opacity: 1
  251. }, 500);
  252.  
  253. $('
  254. <li>').text(chatusername + ', Welcome to the chat').css({
  255. color: 'red'
  256. }).appendTo($('#messages'));
  257. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  258. $('
  259. <li>').text(welcomemessage[Math.floor((Math.random() * welcomemessagel))]).appendTo($('#messages')).addClass('botsent');
  260. $('<span>').addClass('username').text(botusernames[Math.floor((Math.random() * botusernamesl))] + ': ').prependTo($('.botsent'));
  261. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  262. $('.botsent').removeClass('botsent');
  263. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  264. document.getElementById('audio').play()
  265. })
  266. }, 3500)
  267. })
  268. })
  269. });
  270. $("#chatbox").keydown(function(e) {
  271. if (e.keyCode == 13 && !e.shiftKey) {
  272. e.preventDefault()
  273. }
  274. });
  275. $('#chatbox').keyup(function(e) {
  276. $('#livechatheader').removeClass('chatred').addClass('chatgreen');
  277. var code = (e.keyCode ? e.keyCode : e.which);
  278. if (code == 13 && $('#chatbox').is(':focus') && $('#chatbox').val() != '') {
  279. var rs = (Math.floor((Math.random() * maximumresponsetime) + minimumresponsetime)) * 1000;
  280. message = $('#chatbox').val();
  281. setTimeout(function() {
  282. $('
  283. <li>').text(message).appendTo($('#messages')).addClass('lastsent');
  284. $('<span>').addClass('username').addClass('green').text(chatusername + ': ').prependTo($('.lastsent'));
  285. $('#chatbox').val('');
  286. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  287. $('.lastsent').removeClass('lastsent')
  288. }, 200);
  289. if (new RegExp(workingq.join("|")).test(message.toLowerCase())) {
  290. setTimeout(function() {
  291. $('
  292. <li>').text('@' + chatusername + ' ' + workingqresponse[Math.floor((Math.random() * workingqresponsel))]).appendTo($('#messages')).addClass('botsent');
  293. $('<span>').addClass('username').text(botusername + ': ').prependTo($('.botsent'));
  294. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  295. $('.botsent').removeClass('botsent');
  296. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  297. document.getElementById('audio').play()
  298. }, rs)
  299. } else if (new RegExp(working.join("|")).test(message.toLowerCase())) {
  300. setTimeout(function() {
  301. $('
  302. <li>').text('@' + chatusername + ' ' + workingqresponse[Math.floor((Math.random() * workingqresponsel))]).appendTo($('#messages')).addClass('botsent');
  303. $('<span>').addClass('username').text(botusername + ': ').prependTo($('.botsent'));
  304. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  305. $('.botsent').removeClass('botsent');
  306. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  307. document.getElementById('audio').play()
  308. }, rs)
  309. } else if (new RegExp(greetings.join("|")).test(message.toLowerCase())) {
  310. setTimeout(function() {
  311. $('
  312. <li>').text('@' + chatusername + ' ' + greetingsresponse[Math.floor((Math.random() * greetingsresponsel))]).appendTo($('#messages')).addClass('botsent');
  313. $('<span>').addClass('username').text(botusername + ': ').prependTo($('.botsent'));
  314. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  315. $('.botsent').removeClass('botsent');
  316. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  317. document.getElementById('audio').play()
  318. }, rs)
  319. } else if (new RegExp(whatsup.join("|")).test(message.toLowerCase())) {
  320. setTimeout(function() {
  321. $('
  322. <li>').text('@' + chatusername + ' ' + whatsupresponse[Math.floor((Math.random() * whatsupresponsel))]).appendTo($('#messages')).addClass('botsent');
  323. $('<span>').addClass('username').text(botusername + ': ').prependTo($('.botsent'));
  324. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  325. $('.botsent').removeClass('botsent');
  326. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  327. document.getElementById('audio').play()
  328. }, rs)
  329. } else if (new RegExp(howareyou.join("|")).test(message.toLowerCase())) {
  330. setTimeout(function() {
  331. $('
  332. <li>').text('@' + chatusername + ' ' + howareyouresponse[Math.floor((Math.random() * howareyouresponsel))]).appendTo($('#messages')).addClass('botsent');
  333. $('<span>').addClass('username').text(botusername + ': ').prependTo($('.botsent'));
  334. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  335. $('.botsent').removeClass('botsent');
  336. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  337. document.getElementById('audio').play()
  338. }, rs)
  339. } else if (new RegExp(absent.join("|")).test(message.toLowerCase())) {
  340. setTimeout(function() {
  341. $('
  342. <li>').text('@' + chatusername + ' ' + absentresponse[Math.floor((Math.random() * absentresponsel))]).appendTo($('#messages')).addClass('botsent');
  343. $('<span>').addClass('username').text(botusername + ': ').prependTo($('.botsent'));
  344. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  345. $('.botsent').removeClass('botsent');
  346. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  347. document.getElementById('audio').play()
  348. }, rs)
  349. } else if (new RegExp(really.join("|")).test(message.toLowerCase())) {
  350. setTimeout(function() {
  351. $('
  352. <li>').text('@' + chatusername + ' ' + reallyresponse[Math.floor((Math.random() * reallyresponsel))]).appendTo($('#messages')).addClass('botsent');
  353. $('<span>').addClass('username').text(botusername + ': ').prependTo($('.botsent'));
  354. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  355. $('.botsent').removeClass('botsent');
  356. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  357. document.getElementById('audio').play()
  358. }, rs)
  359. } else if (new RegExp(survey.join("|")).test(message.toLowerCase())) {
  360. setTimeout(function() {
  361. $('
  362. <li>').text('@' + chatusername + ' ' + surveyresponse[Math.floor((Math.random() * surveyresponsel))]).appendTo($('#messages')).addClass('botsent');
  363. $('<span>').addClass('username').text(botusername + ': ').prependTo($('.botsent'));
  364. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  365. $('.botsent').removeClass('botsent');
  366. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  367. document.getElementById('audio').play()
  368. }, rs)
  369. } else if (new RegExp(compliment.join("|")).test(message.toLowerCase())) {
  370. setTimeout(function() {
  371. $('
  372. <li>').text('@' + chatusername + ' ' + complimentresponse[Math.floor((Math.random() * complimentresponsel))]).appendTo($('#messages')).addClass('botsent');
  373. $('<span>').addClass('username').text(botusername + ': ').prependTo($('.botsent'));
  374. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  375. $('.botsent').removeClass('botsent');
  376. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  377. document.getElementById('audio').play()
  378. }, rs)
  379. } else if (new RegExp(bye.join("|")).test(message.toLowerCase())) {
  380. setTimeout(function() {
  381. $('
  382. <li>').text('@' + chatusername + ' ' + byeresponse[Math.floor((Math.random() * byeresponsel))]).appendTo($('#messages')).addClass('botsent');
  383. $('<span>').addClass('username').text(botusername + ': ').prependTo($('.botsent'));
  384. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  385. $('.botsent').removeClass('botsent');
  386. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  387. document.getElementById('audio').play()
  388. }, rs)
  389. } else if (new RegExp(ok.join("|")).test(message.toLowerCase())) {
  390. setTimeout(function() {
  391. $('
  392. <li>').text('@' + chatusername + ' ' + reallyresponse[Math.floor((Math.random() * reallyresponsel))]).appendTo($('#messages')).addClass('botsent');
  393. $('<span>').addClass('username').text(botusername + ': ').prependTo($('.botsent'));
  394. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  395. $('.botsent').removeClass('botsent');
  396. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  397. document.getElementById('audio').play()
  398. }, rs)
  399. } else if (message.toLowerCase().indexOf(botusername.toLowerCase()) != -1) {
  400. setTimeout(function() {
  401. $('
  402. <li>').text('Yeah?').appendTo($('#messages')).addClass('botsent');
  403. $('<span>').addClass('username').text(botusername + ': ').prependTo($('.botsent'));
  404. $('#messages').scrollTop($('#messages').prop('scrollHeight'));
  405. $('.botsent').removeClass('botsent');
  406. $('#livechatheader').removeClass('chatgreen').addClass('chatred');
  407. document.getElementById('audio').play()
  408. }, rs)
  409. } else {}
  410. }
  411. })
  412. });</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement