Advertisement
Guest User

BondBot Public Version Latest

a guest
Nov 13th, 2017
1,142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 60.26 KB | None | 0 0
  1. // ==UserScript==
  2. // @name BondBot
  3. // @namespace http://tampermonkey.net/
  4. // @version public
  5. // @description try to take over the world!
  6. // @author CitronSustain / oh / Anon64
  7. // @match http://www.multiplayerpiano.com/*
  8. // @grant none
  9. // ==/UserScript==
  10. //Hello, PasteBin user! You are looking at BondBot! A user focused bot for multiplayerpiano.com. Below are some descriptions of functions you can run using /js!
  11. ///js showClock24Hr() Shows a 24 Hr clock on your name
  12. ///js retardSpam() Copies any messages and repeats them using the tumblr() function
  13. ///js copySpam() Copies any messages and repeats them normally
  14. ///js leetSpam() Self Explanatory
  15. ///js showClockLocale() Shows your local time on your name
  16. ///js tumblr('texthere') Tumblr makes your text LoOk LiKe ThIs
  17. ///js L337('Texthere') makes your text l00k l1k3 th15
  18. ///js sendChat('text here') sends what ever is in the parentheses in chat!
  19. //To start the bot, paste this script into your browser console or Tampermonkey.
  20. //To undo any chatspam functions you have run, please restart the bot by refreshing your page and re pasting it into console.
  21. //If you abuse chatspam functions Bondbot (Shaun Murphy) or Anon64 can turn off the bot.
  22.  
  23. // ==UserScript==
  24. // @name OHS
  25. // @namespace http://tampermonkey.net/
  26. // @version 1.7
  27. // @description to take over the world!
  28. // @author You
  29. // @match http://www.multiplayerpiano.com/*
  30. // @grant none
  31. // ==/UserScript==
  32.  
  33. //Number of lines on 11/12/17: 2311
  34. //Lines goal: 2500
  35. //Overall progress: 92.44%
  36.  
  37. OHS = MPP;
  38.  
  39. prefix = '.';
  40.  
  41. thingy = 1; //pls dont remove, will probably be in use later
  42.  
  43. magic_number = Math.floor(Math.random() * 100 + 1);
  44.  
  45. botname = 'Bondbot';
  46.  
  47. stalemates = 0;
  48.  
  49. lost = 0;
  50.  
  51. won = 0;
  52.  
  53. games = 0;
  54.  
  55. //chat buffer from electrashave
  56. //-electrashave
  57. var chat_buffer = [];
  58. function sendChat(msg) {
  59. msg.match(/.{0,511}/g).forEach(function(x, i) {
  60. if (x === '') return;
  61. if (i !== 0) x = '...' + x;
  62. chat_buffer.push(x);
  63. });
  64. }
  65.  
  66. var chatInt = setInterval(function() {
  67. var msg = chat_buffer.shift();
  68. if (msg) OHS.client.sendArray([{ m: 'a', message: msg }]);
  69. }, 1900);
  70.  
  71. function cockBot() {
  72. sendChat(
  73. 'CockBot has been enabled. To revert changes, please reload the bot.'
  74. );
  75. botname = 'CockBot [' + prefix + 'about]';
  76. prefix = '\u034f';
  77. }
  78. Array.prototype.random = function(q) {
  79. if (q === undefined) {
  80. return this.length > 0
  81. ? this[Math.floor(this.length * Math.random())]
  82. : undefined;
  83. } else {
  84. let amount = q >>> 0;
  85. let result = this.slice(0, amount);
  86. for (let i = amount; i < this.length; i++) {
  87. let j = Math.floor(Math.random() * i);
  88. if (j < amount) {
  89. result[j] = this[i];
  90. }
  91. }
  92. return result;
  93. }
  94. };
  95.  
  96. setTimeout(function() {
  97. sendChat('Starting Bondbot..');
  98. console.log('Starting Bondbot..');
  99. console.log('This loading sequence totally isnt fake...');
  100. }, 1200);
  101. setTimeout(function() {
  102. sendChat(medicalrandom[loadingmedicalrandom]);
  103. console.log(medicalrandom[loadingmedicalrandom]);
  104. }, 1550);
  105. setTimeout(function() {
  106. sendChat(simsloading[loadingsimsrandom]);
  107. console.log(simsloading[loadingsimsrandom]);
  108. sendChat('Loading done! Use .about for commands');
  109. console.log('Sequence completed.');
  110. }, 1790);
  111.  
  112. setInterval(
  113. function() {
  114. console.log('Google history has been saved.');
  115. JSON.stringify(searchHistory);
  116. },
  117. 300000 // every 5 minutes
  118. );
  119.  
  120. setInterval(function() {
  121. console.log('Google history has been loaded.');
  122. JSON.parse(localStorage.history);
  123. }, 300001);
  124.  
  125. setInterval(function() {
  126. sendChat('Guess the magic number for a gift!');
  127. }, 300000);
  128.  
  129. setInterval(function() {
  130. sendChat('discord.gg/5wtubrg - Join the official 160System server!');
  131. }, 300000);
  132.  
  133. botupdate = 0;
  134.  
  135. function autoBotName() {
  136. setInterval(function() {
  137. if (botupdate == 1) {
  138. OHS.client.sendArray([
  139. { m: 'userset', set: { name: botname + ' [' + prefix + 'help]' } },
  140. ]);
  141. }
  142. }, 10);
  143.  
  144. setInterval(function() {
  145. if (botupdate == 1) {
  146. OHS.client.sendArray([
  147. { m: 'userset', set: { name: botname + ' [' + prefix + 'about]' } },
  148. ]);
  149. }
  150. }, 20);
  151. }
  152.  
  153. //chatlog from Anon64
  154. //-Anon64
  155. OHS.client.on('a', function(boi) {
  156. console.log(
  157. `%c${boi.p.name} (${boi.p._id}): ${boi.a}`,
  158. `color: ${boi.p.color}`
  159. );
  160. });
  161.  
  162. var simsloading = [
  163. 'Adding Hidden Agendas',
  164. 'Adjusting Bell Curves',
  165. 'Aesthesizing Industrial Areas',
  166. 'Aligning Covariance Matrices',
  167. 'Applying Feng Shui Shaders',
  168. 'Applying Theatre Soda Layer',
  169. 'Asserting Packed Exemplars',
  170. 'Attempting to Lock Back-Buffer',
  171. 'Binding Sapling Root System',
  172. 'Breeding Fauna',
  173. ];
  174.  
  175. var loadingsimsrandom = Math.floor(Math.random() * simsloading.length);
  176.  
  177. var medicalrandom = [
  178. 'Making REBOAS...',
  179. 'Adding shunts..',
  180. 'Making incisions..',
  181. 'Avoid cutting your jugular!',
  182. 'Measuring echocardiograms..',
  183. 'My MRI scans for my patients are very important!',
  184. ];
  185.  
  186. var loadingmedicalrandom = Math.floor(Math.random() * medicalrandom.length);
  187.  
  188. OHS.client.on('a', function(msg) {
  189. var b = msg.a;
  190. var msgArr = msg.a.split(' ');
  191. var input = msg.a.substring(msgArr[0].length).trim();
  192. if (
  193. msgArr[0] == prefix + 'pickle' &&
  194. msg.p._id == OHS.client.getOwnParticipant()._id
  195. ) {
  196. console.log('lol');
  197. }
  198.  
  199. var giftArray = [
  200. 'a cute kitten!',
  201. 'a cute puppy!',
  202. 'a potato!',
  203. 'a pikachu!',
  204. 'a brand new Xbox One!',
  205. 'a brand new PS4!',
  206. '1 million cows!',
  207. 'a slice of bacon!',
  208. 'a boating license!',
  209. 'a bunch of money!',
  210. 'some cake!',
  211. 'a box inside of a... BOX!',
  212. 'a new phone!',
  213. 'a new piano!',
  214. 'some chicken nuggets!',
  215. 'a brand new Wii U!',
  216. 'an evil gerbil!',
  217. 'a captains ship!',
  218. 'some sfoof! (Semolina Turmeric Cake)',
  219. 'some pizza!',
  220. 'a new laptop!',
  221. 'a piece of cotton',
  222. 'a spoon',
  223. 'a dribbling cat',
  224. ];
  225. var giftrandom = Math.floor(Math.random() * giftArray.length);
  226.  
  227. if (b == prefix + 'time_24hr') {
  228. sendChat(
  229. new Date().getHours() +
  230. ':' +
  231. new Date().getMinutes() +
  232. ':' +
  233. new Date().getSeconds()
  234. );
  235. }
  236. news1 =
  237. 'Find info about your user! _id, color, etc. Use ' + prefix + 'aboutme!';
  238. news2 =
  239. 'New Shakespearean insult generator! Use ' + prefix + 'shakespeareinsult!';
  240. if (b == prefix + 'about') {
  241. sendChat(
  242. 'Bondbot is a bot written by oh including many fun console commands and chat commands. '
  243. );
  244. sendChat(
  245. 'Command list: ' +
  246. prefix +
  247. 'about, ' +
  248. prefix +
  249. 'version, ' +
  250. prefix +
  251. '8ball, ' +
  252. prefix +
  253. 'time_24hr, ' +
  254. prefix +
  255. 'rps, ' +
  256. prefix +
  257. 'google, ' +
  258. prefix +
  259. 'unbox, ' +
  260. prefix +
  261. 'fuck, ' +
  262. prefix +
  263. 'hug, ' +
  264. prefix +
  265. 'kiss, ' +
  266. prefix +
  267. 'lick, ' +
  268. prefix +
  269. 'kill, ' +
  270. prefix +
  271. 'me, ' +
  272. prefix +
  273. 'say, ' +
  274. prefix +
  275. 'afk, ' +
  276. prefix +
  277. 'shakespeareinsult, ' +
  278. prefix +
  279. 'aboutme'
  280. ); //FIXME: add an MPC variable without an autoregen
  281. sendChat(news1);
  282. sendChat(news2);
  283. }
  284.  
  285. if (b == prefix + 'help') {
  286. sendChat(
  287. 'Bondbot is a bot written by oh including many fun console commands and chat commands. '
  288. );
  289. sendChat(
  290. 'Command list: ' +
  291. prefix +
  292. 'about, (help) ' +
  293. prefix +
  294. 'version, ' +
  295. prefix +
  296. '8ball, ' +
  297. prefix +
  298. 'time_24hr, ' +
  299. prefix +
  300. 'rps, ' +
  301. prefix +
  302. 'google, ' +
  303. prefix +
  304. 'unbox, ' +
  305. prefix +
  306. 'fuck, ' +
  307. prefix +
  308. 'hug, ' +
  309. prefix +
  310. 'kiss, ' +
  311. prefix +
  312. 'lick, ' +
  313. prefix +
  314. 'kill, ' +
  315. prefix +
  316. 'me, ' +
  317. prefix +
  318. 'say, ' +
  319. prefix +
  320. 'afk, ' +
  321. prefix +
  322. 'shakespeareinsult, ' +
  323. prefix +
  324. 'aboutme'
  325. ); //FIXME: add an MPC variable without an autoregen
  326. sendChat(news1);
  327. sendChat(news2);
  328. }
  329. //RPS START (there is a lot easier way to do this but I couldn't figure it out cause I'm retarded)
  330.  
  331. var rockwords = [
  332. 'You Lose! Computer chose paper.',
  333. 'You win! Computer chose scissors.',
  334. 'Tie! You both chose rock.',
  335. ];
  336. var rockrandom = Math.floor(Math.random() * rockwords.length);
  337.  
  338. var paperwords = [
  339. 'You Lose! Computer chose scisssors.',
  340. 'You win! Computer chose rock.',
  341. 'Tie! You both chose paper.',
  342. ];
  343. var paperrandom = Math.floor(Math.random() * paperwords.length);
  344.  
  345. var scissorswords = [
  346. 'You Lose! Computer chose rock.',
  347. 'You win! Computer chose paper.',
  348. 'Tie! You both chose scissors.',
  349. ];
  350. var scissorsrandom = Math.floor(Math.random() * scissorswords.length); //FIXME: add some difficulty settings or something cause RPS is stupidly hard
  351. if (b == prefix + 'rps' || b == prefix + 'rockpaperscissors') {
  352. sendChat('Welcome to RPS: do .rps <rock, paper, scissors> to play!');
  353. }
  354.  
  355. if (b == prefix + 'mouseinthewall') {
  356. sendChat(
  357. msg.p.name +
  358. ' found the easter egg, and the mouse in the wall says Hello!'
  359. );
  360. }
  361.  
  362. if (
  363. b == prefix + 'rps r' ||
  364. b == prefix + 'rockpaperscissors rock' ||
  365. b == prefix + 'rps rock' ||
  366. b == prefix + 'rockpaperscissors r'
  367. ) {
  368. sendChat('RPS: ' + rockwords[rockrandom]);
  369. }
  370.  
  371. if (
  372. b == prefix + 'rps s' ||
  373. b == prefix + 'rockpaperscissors s' ||
  374. b == prefix + 'rps scissors' ||
  375. b == prefix + 'rockpaperscissors scissors'
  376. ) {
  377. sendChat('RPS: ' + scissorswords[scissorsrandom]);
  378. }
  379.  
  380. if (
  381. b == prefix + 'rps p' ||
  382. b == prefix + 'rockpaperscissors paper' ||
  383. b == prefix + 'rps paper' ||
  384. b == prefix + 'rockpaperscissors p'
  385. ) {
  386. sendChat('RPS: ' + paperwords[paperrandom]);
  387. }
  388. //RPS debug shits nothing
  389. if (msg.p._id == OHS.client.getOwnParticipant()._id) {
  390. if (msg.a.toLowerCase().includes('RPS: You win!')) {
  391. won++;
  392. games++;
  393. console.log('Games won: ' + won);
  394. console.log('Games total: ' + games);
  395. console.log('Games lost: ' + lost);
  396. console.log('Stalemates: ' + stalemates);
  397. }
  398. }
  399.  
  400. if (msg.p._id == OHS.client.getOwnParticipant()._id) {
  401. if (msg.a.toLowerCase().includes('RPS: You lose!')) {
  402. lost++;
  403. games++;
  404. console.log('Games won: ' + won);
  405. console.log('Games total: ' + games);
  406. console.log('Games lost: ' + lost);
  407. console.log('Stalemates: ' + stalemates);
  408. }
  409. }
  410.  
  411. if (msg.p._id == OHS.client.getOwnParticipant()._id) {
  412. if (msg.a.toLowerCase().includes('RPS: Tie!')) {
  413. stalemates++;
  414. games++;
  415. console.log('Games won: ' + won);
  416. console.log('Games total: ' + games);
  417. console.log('Games lost: ' + lost);
  418. console.log('Stalemates: ' + stalemates);
  419. }
  420. } //FIXME: idk what the fuck is wrong with this
  421.  
  422. //magic number stuff
  423.  
  424. /*if (b == magic_number) {
  425. sendChat(msg.p.name + ' guessed the magic number correctly! They win air!');
  426. magic_number = Math.floor(Math.random() * 100 + 1);
  427. }*/
  428.  
  429. if (msg.a.toLowerCase().includes(magic_number)) {
  430. if (msg.a.length > 5) return;
  431. sendChat(
  432. msg.p.name +
  433. ' guessed the magic number correctly, ' +
  434. '(' +
  435. magic_number +
  436. ')' +
  437. ' and won ' +
  438. giftArray[giftrandom]
  439. );
  440. magic_number = Math.floor(Math.random() * 100 + 1); //FIXME: maybe turn into a math problem solving thing
  441. }
  442.  
  443. if (
  444. b == prefix + 'unbox csweaponscase1' ||
  445. b == prefix + 'unbox Weapons Case 1' ||
  446. b == prefix + 'unbox 1'
  447. ) {
  448. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  449. } else {
  450. sendChat(
  451. 'CS:GO: You unboxed a ' + csweaponscase1[case1random] + wear[wearrandom]
  452. );
  453. }
  454. }
  455.  
  456. if (
  457. b == prefix + 'unbox Gamma' ||
  458. b == prefix + 'unbox gamma' ||
  459. b == prefix + 'unbox 2'
  460. ) {
  461. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  462. } else {
  463. sendChat('CS:GO: You unboxed a ' + gamma[gammarandom] + wear[wearrandom]);
  464. }
  465. }
  466. });
  467.  
  468. //CS:GO Unbox Sim START
  469.  
  470. var wear = [
  471. 'Battle-Scarred (BS)',
  472. 'Field-Tested (FT)',
  473. 'Well-Worn (WW)',
  474. 'Minimal Wear (MW)',
  475. 'Factory New (FN)',
  476. ];
  477.  
  478. var csweaponscase1 = [
  479. 'MP7 | Skulls | Mil-spec ',
  480. 'SG 553 | Ultraviolet | Mil-spec ',
  481. 'AUG | Wings | Mil-spec ',
  482. 'M4A1-S | Dark Water | Restricted ',
  483. 'USP-S | Dark Water | Restricted ',
  484. 'Glock-18 | Dragon Tattoo | Restricted ',
  485. 'Desert Eagle | Hypnotic | Classified ',
  486. 'AK-47 | Case Hardened | Classified ',
  487. 'AWP | Lightning Strike | Covert ',
  488. '★ Karambit | Exceedingly Rare ',
  489. ];
  490.  
  491. var gamma = [
  492. 'Five-SeveN | Violent Daimyo | Mil-Spec',
  493. 'MAC-10 | Carnivore | Mil-Spec',
  494. 'Nova | Exo | Mil-Spec',
  495. 'P250 | Iron Clad | Mil-Spec',
  496. 'PP-Bizon | Harvester | Mil-Spec',
  497. 'SG 553 | Aerial | Mil-Spec',
  498. 'Tec-9 | Ice Cap | Mil-Spec',
  499. 'AUG | Aristocrat | Restricted',
  500. 'AWP | Phobos | Restricted',
  501. 'P90 | Chopper | Restricted',
  502. 'R8 Revolver | Reboot | Restricted',
  503. 'Sawed-Off | Limelight | Restricted',
  504. 'M4A4 | Desolate Space | Classified',
  505. 'P2000 | Imperial Dragon | Classified',
  506. 'SCAR-20 | Bloodsport | Classified',
  507. 'Glock-18 | Wasteland Rebel | Covert',
  508. 'M4A1-S | Mecha Industries | Covert',
  509. 'M9 Bayonet | Crimson Web',
  510. ];
  511. var case1random = Math.floor(Math.random() * csweaponscase1.length);
  512. var wearrandom = Math.floor(Math.random() * wear.length);
  513. var gammarandom = Math.floor(Math.random() * gamma.length);
  514. /*var chromarandom = Math.floor(Math.random() * chroma.length);
  515. var chroma2random = Math.floor(Math.random() * chroma2.length);*/
  516.  
  517. OHS.client.on('a', function(msg) {
  518. var cmd = msg.a.split(' ')[0].toLowerCase();
  519. var input = msg.a.substring(cmd.length).trim();
  520. if (msg.a.toLowerCase == prefix + 'unbox') {
  521. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  522. } else {
  523. sendChat(
  524. 'Welcome to CS:GO unboxing simulator on OHS! To unbox a case, do .unbox <case name or id>. Current cases available: Weapons Case 1 (csweaponscase1, 1), Gamma (gamma, 2)'
  525. );
  526. }
  527. }
  528. });
  529.  
  530. /* if (
  531. b == prefix + 'unbox csweaponscase1' ||
  532. b == prefix + 'unbox Weapons Case 1' ||
  533. b == prefix + 'unbox 1'
  534. ) {
  535. sendChat(
  536. 'CS:GO: You unboxed a ' + csweaponscase1[case1random] + wear[wearrandom]
  537. );
  538. }*/
  539.  
  540. /*if (
  541. b == prefix + 'unbox Gamma' ||
  542. b == prefix + 'unbox gamma' ||
  543. b == prefix + 'unbox 2'
  544. ) {
  545. sendChat('CS:GO: You unboxed a ' + gamma[gammarandom] + wear[wearrandom]);
  546. }*/
  547. /*if (
  548. b == prefix + 'unbox Chroma' ||
  549. b == prefix + 'unbox cschroma' ||
  550. b == prefix + 'unbox 3'
  551. ) {
  552. }*/
  553.  
  554. OHS.client.on('a', function(msg) {
  555. var cmd = msg.a.split(' ')[0].toLowerCase();
  556. var input = msg.a.substring(cmd.length).trim();
  557. if (cmd == prefix + 'anon64') {
  558. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  559. } else {
  560. sendChat(
  561. 'According to according according to the according records of according, Anon64 is a bot and the proof is that he displays codes. codes that are in the programming language that was invented by a human called javascript. it was widely used in the internet. the internet is a place where people communicate. it is also a good place to watch some u know what. -- A guy named Natas(SATAN)'
  562. );
  563. }
  564. }
  565. });
  566. /*if (b == prefix + 'anon64') {
  567. sendChat(
  568. 'According to according according to the according records of according, Anon64 is a bot and the proof is that he displays codes. codes that are in the programming language that was invented by a human called javascript. it was widely used in the internet. the internet is a place where people communicate. it is also a good place to watch some u know what. -- A guy named Natas(SATAN)'
  569. );
  570. }*/
  571. /*if (
  572. (b == 'Bondbot, shutdown' && msg.p._id == 'd55bf273f64f37c5691f3bbb') ||
  573. (b == 'Bondbot, shutdown' && msg.p._id == '63ce4e6b86780ae23e04a5b8') ||
  574. (b == 'Bondbot, shutdown' && msg.p._id == 'a2db90c04712080af5d797a1')
  575. ) {
  576. sendChat('Shutting down -- Reason: Requested by Admin');
  577. location.reload();
  578. }*/
  579. OHS.client.on('a', function(msg) {
  580. var cmd = msg.a.split(' ')[0].toLowerCase();
  581. var input = msg.a.substring(cmd.length).trim();
  582. if (
  583. //FIXME: improve cmd above by using cmd below somehow
  584. msg.p._id == 'd55bf273f64f37c5691f3bbb' ||
  585. msg.p._id == '63ce4e6b86780ae23e04a5b8' ||
  586. msg.p._id == 'a2db90c04712080af5d797a1'
  587. ) {
  588. if (msg.a.toLowerCase().includes('shut down' && 'bondbot shutdown')) {
  589. sendChat('Shutting down -- Requested by Admin.');
  590. location.reload();
  591. }
  592. }
  593.  
  594. if (msg.a.toLowerCase().includes('what')) {
  595. if (msg.a.toLowerCase().includes('time')) {
  596. sendChat(
  597. new Date().getHours() +
  598. ':' +
  599. new Date().getMinutes() +
  600. ':' +
  601. new Date().getSeconds()
  602. );
  603. }
  604. }
  605.  
  606. Clockpower = 0;
  607.  
  608. if (
  609. msg.p._id == 'd55bf273f64f37c5691f3bbb' ||
  610. msg.p._id == '63ce4e6b86780ae23e04a5b8' ||
  611. msg.p._id == 'a2db90c04712080af5d797a1'
  612. ) {
  613. if (msg.a.toLowerCase().includes('activate clock')) {
  614. if (msg.a.toLowerCase().includes('clock')) {
  615. if (Clockpower == 1 == true) {
  616. sendChat('Turning on 24Hr Clock');
  617. showClock24Hr();
  618. }
  619. }
  620. }
  621. }
  622.  
  623. if (
  624. msg.p._id == 'd55bf273f64f37c5691f3bbb' ||
  625. msg.p._id == '63ce4e6b86780ae23e04a5b8' ||
  626. msg.p._id == 'a2db90c04712080af5d797a1'
  627. ) {
  628. if (msg.a.toLowerCase().includes('be doctor' && 'shaun murphy')) {
  629. sendChat('Making REBOAS...');
  630. botname = 'Dr. Shaun Murphy [.about]';
  631. }
  632. }
  633.  
  634. if (msg.a.toLowerCase().includes('AMIGHTYWIND'.toLowerCase())) {
  635. sendChat('FUCK OFF!');
  636. }
  637.  
  638. if (
  639. msg.a
  640. .toLowerCase()
  641. .includes('yeet'.toLowerCase() && 'y e e t'.toLowerCase())
  642. ) {
  643. sendChat('YEET');
  644. }
  645. });
  646.  
  647. blNames = ['Anonymous'];
  648. blIds = [
  649. 'ffa07b701a54f9d408fc76b1', //A5R13L B0t
  650. '3a5270724d14b475e743ccb8', //SS Nazi
  651. '4cc022a2f4d68c57973d0892', //SS Nazi
  652. '512b456c97ffc5c491350a24', //zyphen4866
  653. ];
  654.  
  655. function info(name) {
  656. //epicos shit
  657. var array = [];
  658. for (var pl in OHS.client.ppl) {
  659. if (OHS.client.ppl[pl].name.toLowerCase().includes(name.toLowerCase())) {
  660. array.push(OHS.client.ppl[pl]);
  661. }
  662. }
  663. return array[Math.floor(Math.random() * array.length)];
  664. }
  665.  
  666. //also epicos shit wow im superlazy
  667. afkusersnames = [];
  668. afkusersids = [];
  669.  
  670. OHS.client.on('a', function(msg) {
  671. if (
  672. msg.a.toLowerCase() == prefix + 'afk' ||
  673. msg.a.toLowerCase() == 'brb' ||
  674. msg.a.toLowerCase() == 'afk'
  675. ) {
  676. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  677. } else {
  678. sendChat(
  679. '**' +
  680. msg.p.name +
  681. ' is now marked as AFK. Send any message to be unmarked.'
  682. );
  683. setTimeout(function() {
  684. afkusersnames.push(msg.p.name);
  685. afkusersids.push(msg.p._id);
  686. }, 2000);
  687. }
  688. } else {
  689. }
  690. });
  691.  
  692. MPP.client.on('a', function(msg) {
  693. var cmd = msg.a.split(' ')[0].toLowerCase();
  694. var input = msg.a.substring(cmd.length).trim();
  695. if (cmd == prefix + 'bunny')
  696. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  697. } else {
  698. sendChat('..( /)');
  699. sendChat('..(•.•)');
  700. sendChat('c(")(")');
  701. }
  702. });
  703.  
  704. OHS.client.on('a', function(msg) {
  705. if (afkusersids.includes(msg.p._id)) {
  706. if (
  707. msg.a.toLowerCase() == 'afk' ||
  708. msg.a.toLowerCase() == 'brb' ||
  709. msg.a.toLowerCase() == prefix + 'afk'
  710. ) {
  711. sendChat('You are marked as AFK already ' + msg.p.name + '!');
  712. } else {
  713. sendChat('**' + msg.p.name + ' is no longer AFK.');
  714. afkusersids.splice(msg.p._id);
  715. afkusersnames.splice(msg.p.name);
  716. }
  717. }
  718. });
  719.  
  720. OHS.client.on('a', function(msg) {
  721. var cmd = msg.a.split(' ')[0].toLowerCase();
  722. var input = msg.a.substring(cmd.length).trim();
  723. if (cmd == prefix + 'say') {
  724. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  725. } else {
  726. sendChat('\u034f' + msg.a.substring(cmd.length).trim());
  727. }
  728. }
  729. });
  730.  
  731. OHS.client.on('a', function(msg) {
  732. var cmd = msg.a.split(' ')[0].toLowerCase();
  733. var input = msg.a.substring(cmd.length).trim();
  734. if (cmd == prefix + 'me') {
  735. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  736. } else {
  737. sendChat('**' + msg.p.name + ' ' + msg.a.substring(cmd.length).trim());
  738. }
  739. }
  740. });
  741.  
  742. OHS.client.on('a', function(msg) {
  743. var cmd = msg.a.split(' ')[0].toLowerCase();
  744. var input = msg.a.substring(cmd.length).trim();
  745. if (cmd == prefix + 'version') {
  746. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  747. } else {
  748. sendChat('Version: v1.4');
  749. }
  750. }
  751. });
  752.  
  753. OHS.client.on('a', function(msg) {
  754. var cmd = msg.a.split(' ')[0].toLowerCase();
  755. var input = msg.a.substring(cmd.length).trim();
  756. var eightballwords = [
  757. 'It is certain',
  758. 'It is decidedly so',
  759. 'Without a doubt',
  760. 'Yes, definitely.',
  761. 'You may rely on it',
  762. 'As I see it yes',
  763. 'Most likely',
  764. 'Outlook good',
  765. 'Yes',
  766. 'Signs point to yes',
  767. 'Reply hazy, try again.',
  768. 'Ask again later',
  769. 'Better not tell you now',
  770. 'Cannot predict now',
  771. 'Concentrate and ask again',
  772. 'Dont count on it',
  773. 'My reply is no',
  774. 'My sources say no',
  775. 'Outlook not so good',
  776. 'Very doubtful',
  777. 'No',
  778. ];
  779. eightballrandom = Math.floor(Math.random() * eightballwords.length);
  780. if (cmd == prefix + '8ball') {
  781. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  782. } else {
  783. if (input == '') {
  784. sendChat(
  785. '8ball: ' +
  786. msg.p.name +
  787. ", Ask me a question to answer, don't just stand there!"
  788. );
  789. } else {
  790. sendChat(
  791. '8ball: ' + msg.p.name + ', ' + eightballwords[eightballrandom]
  792. );
  793. }
  794. }
  795. }
  796. });
  797.  
  798. OHS.client.on('a', function(msg) {
  799. var cmd = msg.a.split(' ')[0].toLowerCase();
  800. var input = msg.a.substring(cmd.length).trim();
  801. if (cmd == prefix + 'fuck') {
  802. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  803. } else {
  804. if (input == '') {
  805. sendChat(msg.p.name + ' is so lonely they fuck air.');
  806. } else {
  807. if (input == msg.p.name) {
  808. //make infoinput.selfname function
  809. sendChat(msg.p.name + ' fucks themselves.');
  810. } else {
  811. sendChat(
  812. msg.p.name +
  813. ' fucks ' +
  814. info(input).name +
  815. ' so FUCKING HARD that they die from too much sex.'
  816. );
  817. }
  818. }
  819. }
  820. }
  821. });
  822.  
  823. OHS.client.on('a', function(msg) {
  824. var cmd = msg.a.split(' ')[0].toLowerCase();
  825. var input = msg.a.substring(cmd.length).trim();
  826. if (cmd == prefix + 'hug') {
  827. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  828. } else {
  829. if (input == '') {
  830. sendChat(msg.p.name + ' hugs no one. :(');
  831. } else {
  832. if (input == msg.p.name) {
  833. sendChat(msg.p.name + ' hugs themselves because they are lonely. :(');
  834. } else {
  835. sendChat(
  836. msg.p.name + ' gives ' + info(input).name + ' a big warm hug.'
  837. );
  838. }
  839. }
  840. }
  841. }
  842. });
  843.  
  844. OHS.client.on('a', function(msg) {
  845. var cmd = msg.a.split(' ')[0].toLowerCase();
  846. var input = msg.a.substring(cmd.length).trim();
  847. if (cmd == prefix + 'kiss') {
  848. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  849. } else {
  850. if (input == '') {
  851. sendChat(msg.p.name + ' kisses the air.');
  852. } else {
  853. if (input == msg.p.name) {
  854. sendChat(msg.p.name + ' is so lonely, they kiss their elbow.');
  855. } else {
  856. sendChat(msg.p.name + ' kisses ' + info(input).name + '.');
  857. }
  858. }
  859. }
  860. }
  861. });
  862.  
  863. OHS.client.on('a', function(msg) {
  864. var cmd = msg.a.split(' ')[0].toLowerCase();
  865. var input = msg.a.substring(cmd.length).trim();
  866. if (cmd == prefix + 'eat') {
  867. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  868. } else {
  869. if (input == '') {
  870. sendChat(msg.p.name + ' eats nothing. They then die of starvation.');
  871. } else {
  872. sendChat(
  873. msg.p.name +
  874. ' eats a ' +
  875. msg.a.substring(cmd.length).trim() +
  876. '. It was delicious!'
  877. );
  878. }
  879. }
  880. }
  881. });
  882.  
  883. OHS.client.on('a', function(msg) {
  884. var cmd = msg.a.split(' ')[0].toLowerCase();
  885. var input = msg.a.substring(cmd.length).trim();
  886. if (cmd == prefix + 'drink') {
  887. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  888. } else {
  889. if (input == '') {
  890. sendChat(
  891. msg.p.name +
  892. ' attempts to pour water into a cup. They start to drink, but nothing comes out. Upon closer inspection, the cup was empty.'
  893. );
  894. } else {
  895. sendChat(
  896. msg.p.name +
  897. ' drinks a ' +
  898. msg.a.substring(cmd.length).trim() +
  899. '. It was refreshing.'
  900. );
  901. }
  902. }
  903. }
  904. });
  905.  
  906. OHS.client.on('a', function(msg) {
  907. var cmd = msg.a.split(' ')[0].toLowerCase();
  908. var input = msg.a.substring(cmd.length).trim();
  909. if (cmd == prefix + 'lick') {
  910. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  911. } else {
  912. if (input == '') {
  913. sendChat(
  914. msg.p.name +
  915. " couldn't find anything to lick, so they licked the wall."
  916. );
  917. } else {
  918. if (input == msg.p.name) {
  919. sendChat(
  920. msg.p.name + " licks themselves. I don't want to know where."
  921. );
  922. } else {
  923. sendChat(msg.p.name + ' licks ' + info(input).name + '.');
  924. sendChat(info(input).name + ' revolts in disgust.');
  925. }
  926. }
  927. }
  928. }
  929. });
  930.  
  931. OHS.client.on('a', function(msg) {
  932. var cmd = msg.a.split(' ')[0].toLowerCase();
  933. var input = msg.a.substring(cmd.length).trim();
  934. if (cmd == prefix + 'kill') {
  935. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  936. } else {
  937. if (input == '') {
  938. sendChat(
  939. msg.p.name +
  940. ' attempts to stab the air, somehow misses and the knife landed on their foot. ' +
  941. msg.p.name +
  942. ' screams in pain.'
  943. );
  944. } else {
  945. if (input == msg.p.name) {
  946. sendChat(msg.p.name + ' commits suicide! :(');
  947. } else {
  948. sendChat(
  949. msg.p.name +
  950. ' kills ' +
  951. info(input).name +
  952. ' with scissors. ' +
  953. info(input).name +
  954. ' screams in pain.'
  955. );
  956. }
  957. }
  958. }
  959. }
  960. });
  961.  
  962. function announceJoin() {
  963. OHS.client.on('participant added', function(msg) {
  964. console.log('User joined: ' + msg.name + ' | ' + msg._id + ' | ');
  965. });
  966. }
  967.  
  968. function announceAdmin() {
  969. OHS.client.on('participant added', function(msg) {
  970. if (adminIds.includes(msg._id)) {
  971. console.log('Admin has joined: ' + msg.name + ' | ' + msg._id);
  972. sendChat('Admin joined: ' + msg.name + ' | ' + msg._id + ' | ');
  973. }
  974. });
  975. }
  976.  
  977. thotIds = [];
  978.  
  979.  
  980. function announceThot() {
  981. OHS.client.on('participant added', function(msg) {
  982. if (thotIds.includes(msg._id)) {
  983. sendChat('WARNING! THERE IS A THOT IN THE SERVER! ' + msg.name + ' | ' + msg._id + ' | ');
  984. }
  985. });
  986. }
  987.  
  988. $('.relative').append(
  989. '<div id="toggle-btn" class="ugly-button toggle-btn" style="position: fixed;bottom: 500px;right:100px;width: 100px;color: yellow ">Load All Settings</div>'
  990. );
  991. $('#toggle-btn').click(function() {
  992. showClock24Hr();
  993. botname = 'Bondbot [' + prefix + 'about]';
  994. prefix = '.';
  995. $.getScript('http://skyfoll.tk/Sounds.js');
  996. sendChat('Settings loaded!');
  997. });
  998.  
  999. //ADMINS start
  1000. admincode = Math.random();
  1001. setInterval(function() {
  1002. admincode = Math.random();
  1003. console.log('New admin verification code generated.');
  1004. }, 200000);
  1005.  
  1006. adminIds = [
  1007. 'a2db90c04712080af5d797a1', //citronsustain
  1008. '63ce4e6b86780ae23e04a5b8', //citronsustain
  1009. 'd55bf273f64f37c5691f3bbb', //Anon64
  1010. '051ee1ec34cf0218653af6a8', //JPDLD
  1011. '0eab0774ba77d8744c9bf2a4', //Infinity~
  1012. '5b414d782edd2d3f517a5080', //dude/error
  1013. 'eda8c37f125a3641fe041799', //Japanese
  1014. '6918006370d05f4802047186', //ATLAS A.I.
  1015. '38abff0e409d31ee9e1b5781', //Jacob
  1016. '5a75bfc94fb4cc2bcc3cc9b1' //Name
  1017. ];
  1018.  
  1019. OHS.client.on('a', function(msg) {
  1020. var cmd = msg.a.split(' ')[0].toLowerCase();
  1021. if (cmd == prefix + 'aboutme') {
  1022. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  1023. } else {
  1024. sendChat(
  1025. 'Information about the user ' +
  1026. msg.p.name +
  1027. ': ' +
  1028. ' _id: ' +
  1029. msg.p._id +
  1030. ' color: ' +
  1031. msg.p.color +
  1032. ' color name: ' +
  1033. new Color(msg.p.color).getName().toLowerCase()
  1034. );
  1035. if (adminIds.includes(msg.p._id)) {
  1036. sendChat('User is admin.');
  1037. } else {
  1038. sendChat('User is not admin.');
  1039. }
  1040. }
  1041. }
  1042. });
  1043.  
  1044. OHS.client.on('a', function(ver) {
  1045. var cmd = ver.a.split(' ')[0].toLowerCase();
  1046. var input = ver.a.substring(cmd.length).trim();
  1047. if (cmd == prefix + 'verify' + admincode) {
  1048. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  1049. } else {
  1050. sendChat(
  1051. 'Verification code correct. Adding to admins.' + '(' + ver.p.name + ')'
  1052. );
  1053. console.log(
  1054. ver.p.name + ver.p._id + ' was added to admins. This will not save.'
  1055. );
  1056. adminIds.push(ver.p._id);
  1057. }
  1058. }
  1059. });
  1060.  
  1061. OHS.client.on('a', function(msg) {
  1062. var cmd = msg.a.split(' ')[0].toLowerCase();
  1063. var input = msg.a.substring(cmd.length).trim();
  1064. if (cmd == prefix + 'botname') {
  1065. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  1066. } else {
  1067. if (adminIds.includes(msg.p_id)) {
  1068. if (input == '') {
  1069. OHS.chat.send('Botname cannot be empty.');
  1070. } else {
  1071. OHS.chat.send(
  1072. 'Botname has been set to: ' +
  1073. msg.a.substring(cmd.length).trim() +
  1074. '.'
  1075. );
  1076. botname = input;
  1077. }
  1078. }
  1079. }
  1080. }
  1081. });
  1082.  
  1083. OHS.client.on('a', function(msg) {
  1084. var cmd = msg.a.split(' ')[0].toLowerCase();
  1085. var input = msg.a.substring(cmd.length).trim();
  1086. if (cmd == prefix + 'prefix') {
  1087. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  1088. } else {
  1089. if (adminIds.includes(msg.p._id)) {
  1090. if (input == '') {
  1091. sendChat('Prefix cannot be empty!');
  1092. } else {
  1093. sendChat('The prefix has now been set to "' + input + '.');
  1094. prefix = input;
  1095. }
  1096. }
  1097. }
  1098. }
  1099. });
  1100.  
  1101. OHS.client.on('a', function(msg) {
  1102. if (msg.a.toLowerCase() == prefix + 'adminstatus')
  1103. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  1104. } else {
  1105. sendChat('Checking _ID...'); //Does their ID match any id's in adminIds?
  1106. if (adminIds.includes(msg.p._id)) {
  1107. sendChat('You are admin'); //Yes
  1108. } else {
  1109. sendChat('You are not admin.'); //No
  1110. }
  1111. }
  1112. });
  1113. //ADMINS end
  1114.  
  1115. OHS.client.on('a', function(msg) {
  1116. var cmd = msg.a.split(' ')[0].toLowerCase();
  1117. var input = msg.a.substring(cmd.length).trim();
  1118. if (cmd == '>js') {
  1119. if (adminIds.includes(msg.p._id)) {
  1120. try {
  1121. OHS.chat.send(
  1122. '> ' + JSON.stringify(eval(msg.a.substring(cmd.length).trim()))
  1123. );
  1124. } catch (error) {
  1125. OHS.chat.send('> ' + error);
  1126. }
  1127. }
  1128. }
  1129. });
  1130.  
  1131. //To op a user, type >js adminIds.push('their _id here')
  1132. //To deop a user, type >js adminIds.splice('their _id here')
  1133. //To ban a user, type >js blNames.push('their name here') or blIds.push('their _id here')
  1134. //To unban a user type >js blNames.splice('their name here') or blIds.splice('their _id here')
  1135. //Please do not abuse admin commands!
  1136.  
  1137. function tumblr(stringystring) {
  1138. if (typeof stringystring !== 'string') {
  1139. throw 'SyntaxError: tumblr() may only be used with strings.';
  1140. } else {
  1141. var results = [];
  1142. var csto = stringystring.toLowerCase();
  1143. var csm = csto.split(' ');
  1144. for (var i = 0; i < csm.length; i++) {
  1145. var res2 = [];
  1146. wordc = csm[i].split('');
  1147. for (var x = 0; x < wordc.length; x++) {
  1148. if (x % 2 === 0) {
  1149. res2.push(wordc[x].toUpperCase());
  1150. } else {
  1151. res2.push(wordc[x]);
  1152. }
  1153. }
  1154. results.push(res2.join(''));
  1155. }
  1156. fnl = results.join(' ');
  1157. return fnl;
  1158. }
  1159. }
  1160.  
  1161. setInterval(function() {
  1162. console.log(
  1163. tumblr('i need access to this cowbot channel for legal purposes')
  1164. );
  1165. }, 300000);
  1166.  
  1167. function showClockLocale() {
  1168. updateName = function(name) {
  1169. OHS.client.sendArray([{ m: 'userset', set: { name: name } }]);
  1170. };
  1171. Date.prototype.time = function() {
  1172. return this.toLocaleTimeString();
  1173. };
  1174. wut = setInterval(function() {
  1175. updateName(botname + '- ' + new Date().time());
  1176. }, 2100);
  1177. }
  1178.  
  1179. function retardSpam() {
  1180. OHS.client.on('a', msg => {
  1181. if (msg.p._id !== OHS.client.getOwnParticipant()._id)
  1182. OHS.chat.send(tumblr(msg.a));
  1183. });
  1184. }
  1185.  
  1186. function copySpam() {
  1187. OHS.client.on('a', msg => {
  1188. if (msg.p._id !== OHS.client.getOwnParticipant()._id) OHS.chat.send(msg.a);
  1189. });
  1190. }
  1191.  
  1192. function leetSpam() {
  1193. OHS.client.on('a', msg => {
  1194. if (msg.p._id !== OHS.client.getOwnParticipant()._id)
  1195. OHS.chat.send(L337(msg.a));
  1196. });
  1197. }
  1198.  
  1199. function showClock24Hr() {
  1200. updateName = function(name) {
  1201. OHS.client.sendArray([{ m: 'userset', set: { name: name } }]);
  1202. };
  1203. setInterval(function() {
  1204. var time = new Date();
  1205. var hr = time.getHours();
  1206. var min = time.getMinutes();
  1207. var sec = time.getSeconds();
  1208. if (hr < 10) {
  1209. hr = ' ' + hr;
  1210. }
  1211. if (min < 10) {
  1212. min = '0' + min;
  1213. }
  1214. if (sec < 10) {
  1215. sec = '0' + sec;
  1216. }
  1217. updateName(botname + ' - ' + hr + ':' + min + ':' + sec);
  1218. }, 2100);
  1219. }
  1220.  
  1221. function L337(str) {
  1222. return str.replace(/[a-z]/g, function f(a) {
  1223. return (
  1224. '4BCD3F6H1JKLMN0PQR57'[parseInt(a, 36) - 10] || a.replace(/[a-t]/gi, f) //my cousin made this it is weird
  1225. );
  1226. });
  1227. }
  1228.  
  1229. googleavailable = true; //google stuff
  1230. googleCooldown = 6000; //google command usage cooldown in milliseconds
  1231. googleCommand = true; //this determines whether or not the google command is enabled or disabled
  1232. searchHistory = [];
  1233. localStorage.history = JSON.stringify(searchHistory); //SAVE searchHistory = JSON.parse(localStorage.history); //LOAD
  1234. //Thanks Infinity~
  1235.  
  1236. var googleCommandDelay = 3;
  1237.  
  1238. var div = document.createElement('div');
  1239. div.id = 'Div1';
  1240. div.style.display = 'none';
  1241. document.body.appendChild(div);
  1242.  
  1243. (function() {
  1244. var cx = '010021570394457971158:qajzusztxwo';
  1245. var gcse = document.createElement('script');
  1246. gcse.type = 'text/javascript';
  1247. gcse.async = true;
  1248. gcse.src =
  1249. (document.location.protocol == 'https:' ? 'https:' : 'http:') +
  1250. '//www.google.com/cse/cse.js?cx=' +
  1251. cx;
  1252. var s = document.getElementsByTagName('script')[0];
  1253. s.parentNode.insertBefore(gcse, s);
  1254. })();
  1255.  
  1256. function gcseCallback(query) {
  1257. if (document.readyState != 'complete')
  1258. return google.setOnLoadCallback(gcseCallback, true);
  1259. google.search.cse.element.render({
  1260. gname: 'gsearch',
  1261. div: 'Div1',
  1262. tag: 'searchresults-only',
  1263. attributes: { webSearchResultSize: 1 },
  1264. });
  1265. var element = google.search.cse.element.getElement('gsearch');
  1266. element.execute(query);
  1267. returnResults();
  1268. setTimeout(function() {
  1269. googleavailabe = true;
  1270. }, googleCooldown);
  1271. }
  1272. function getTitle(index) {
  1273. var title = document.getElementsByClassName('gsc-thumbnail-inside')[index]
  1274. .textContent;
  1275. return title;
  1276. }
  1277.  
  1278. function getLink(index) {
  1279. if (
  1280. typeof document
  1281. .getElementsByClassName('gsc-webResult gsc-result')[0]
  1282. .getElementsByClassName('gs-spelling gs-result')[0] != 'undefined'
  1283. )
  1284. index++;
  1285. if (
  1286. typeof document
  1287. .getElementsByClassName('gsc-webResult gsc-result')[0]
  1288. .getElementsByClassName('gs-spelling')[0] != 'undefined'
  1289. )
  1290. index++;
  1291. if (
  1292. typeof document
  1293. .getElementsByClassName('gsc-webResult gsc-result')[0]
  1294. .getElementsByClassName('gs-spelling gs-spelling-original')[0] !=
  1295. 'undefined'
  1296. )
  1297. index++;
  1298. var title = document.getElementsByClassName('gsc-webResult gsc-result')[
  1299. index
  1300. ];
  1301. var firstdiv = title.getElementsByClassName('gsc-thumbnail-inside')[0];
  1302. var firstatag = firstdiv.getElementsByTagName('a')[0];
  1303. var link = firstatag.getAttribute('data-ctorig');
  1304. return link;
  1305. }
  1306.  
  1307. function getText(index) {
  1308. var txt = document.getElementsByClassName('gs-bidi-start-align gs-snippet')[
  1309. index
  1310. ].textContent;
  1311. return txt;
  1312. }
  1313.  
  1314. function checkLoaded(index) {
  1315. if (
  1316. typeof document.getElementsByClassName('gs-bidi-start-align gs-snippet')[
  1317. index
  1318. ] != 'undefined' &&
  1319. typeof document.getElementsByClassName('gsc-thumbnail-inside')[index] !=
  1320. 'undefined' &&
  1321. typeof document.getElementsByClassName('gsc-webResult gsc-result')[index] !=
  1322. 'undefined'
  1323. ) {
  1324. return true;
  1325. } else {
  1326. return false;
  1327. }
  1328. }
  1329.  
  1330. function checkNoResult() {
  1331. if (
  1332. typeof document.getElementsByClassName(
  1333. 'gs-webResult gs-result gs-no-results-result'
  1334. )[0] != 'undefined'
  1335. ) {
  1336. return true;
  1337. } else {
  1338. return false;
  1339. }
  1340. }
  1341. function returnResults() {
  1342. var intervalId = setInterval(function() {
  1343. if (checkNoResult() == true) {
  1344. div.innerHTML = '';
  1345. OHS.chat.send(
  1346. error +
  1347. 'Your search - ' +
  1348. lastsearch +
  1349. ' - did not match any documents. | Make sure that all words are spelled correctly. | Try different keywords. | Try more general keywords. |'
  1350. );
  1351. clearInterval(intervalId);
  1352. }
  1353. if (
  1354. checkLoaded(0) == true &&
  1355. checkLoaded(1) == true &&
  1356. checkLoaded(2) == true
  1357. ) {
  1358. OHS.chat.send(
  1359. 'First result || ' +
  1360. getTitle(0) +
  1361. ': (' +
  1362. getLink(0) +
  1363. ') => ' +
  1364. getText(0)
  1365. );
  1366. OHS.chat.send(
  1367. 'Second result || ' +
  1368. getTitle(1) +
  1369. ': (' +
  1370. getLink(1) +
  1371. ') => ' +
  1372. getText(1)
  1373. );
  1374. OHS.chat.send(
  1375. 'Third result || ' +
  1376. getTitle(2) +
  1377. ': (' +
  1378. getLink(2) +
  1379. ') => ' +
  1380. getText(2)
  1381. );
  1382. div.innerHTML = '';
  1383. clearInterval(intervalId);
  1384. }
  1385. }, 25);
  1386. }
  1387.  
  1388. OHS.client.on('a', function(msg) {
  1389. var cmd = msg.a.split(' ')[0].toLowerCase();
  1390. var input = msg.a.substring(cmd.length).trim();
  1391. if (cmd == prefix + 'google') {
  1392. if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
  1393. } else {
  1394. if (googleCommand == true) {
  1395. if (!googleavailable) {
  1396. sendChat(
  1397. 'This command has a ' +
  1398. googleCooldown +
  1399. ' millisecond cooldown to prevent spam. Please wait and then try again later. Thanks!'
  1400. );
  1401. } else {
  1402. if (input == '') {
  1403. sendChat(
  1404. '\u034f' +
  1405. msg.p.name +
  1406. "\u034f didn't google anything, how useless."
  1407. );
  1408. console.log(msg.p.name + ' used google command.');
  1409. } else {
  1410. sendChat('Searching... Commands disabled during search.');
  1411. console.log(msg.p.name + ' used google command.');
  1412. lastsearch = input;
  1413. Power = 'off';
  1414. searchHistory.push(lastsearch);
  1415. setTimeout(function() {
  1416. gcseCallback(input);
  1417. Power = 'on';
  1418. }, 4000);
  1419. }
  1420. }
  1421. }
  1422. }
  1423. }
  1424. });
  1425.  
  1426. //notification thing from coolguymanguy
  1427. /* Better MPP V 0.5*/
  1428.  
  1429. checkNotification();
  1430.  
  1431. window.OHS.client.on('a', function(msg) {
  1432. var message = msg.a;
  1433. var name = window.OHS.client.getOwnParticipant().name;
  1434.  
  1435. /*if(message.substring(0, name.length + 1).toLowerCase() == name.toLowerCase()){
  1436. var notification = new Notification(name + " is talking to you!");
  1437. }
  1438. */
  1439. if (msg.p.name != name) {
  1440. if (message.toLowerCase().indexOf(name.toLowerCase()) != -1) {
  1441. var ding = new Audio(
  1442. 'https://www.freesound.org/data/previews/66/66136_606715-lq.mp3'
  1443. ); //notification sound
  1444. ding.play();
  1445.  
  1446. var notification = new Notification(msg.p.name + ' said: ' + message); // Notification
  1447.  
  1448. var list = $('#chat li ');
  1449. list[list.length - 1].remove(); //removing double chat entry
  1450.  
  1451. var li = $('<li><span class="name"/><span class="message"/>');
  1452. li.find('.name').text(msg.p.name + ':');
  1453. li.find('.message').text(msg.a);
  1454. li.css('color', 'Black');
  1455. li.css('background-color', 'rgba(255,0,0,0.4)'); //style of name
  1456.  
  1457. $('#chat ul').append(li); // idk but it works
  1458. }
  1459. }
  1460. });
  1461.  
  1462. function checkNotification() {
  1463. //checking if notifications is allowed
  1464.  
  1465. if (!('Notification' in window)) {
  1466. alert('This browser does not support desktop notification');
  1467. } else if (Notification.permission === 'granted') {
  1468. } else if (Notification.permission !== 'denied') {
  1469. Notification.requestPermission(function(permission) {
  1470. if (!('permission' in Notification)) {
  1471. Notification.permission = permission;
  1472. }
  1473. });
  1474. }
  1475. }
  1476.  
  1477. //embed link thing
  1478. document.styleSheets[0].addRule('a', 'text-decoration: none;', 0);
  1479. document.styleSheets[0].addRule('.blur-el', 'filter: blur(5px);', 0);
  1480. document.styleSheets[0].addRule(
  1481. '.yt',
  1482. 'display:inline-block;position:relative;',
  1483. 0
  1484. );
  1485. document.styleSheets[0].addRule(
  1486. '.yt span',
  1487. 'display: -webkit-box;position: absolute;bottom: 3px;left: 2px;-webkit-box-orient: vertical;-webkit-line-clamp: 2;font-family: Arial, Helvetica, sans-serif;background-color: rgba(0,0,0,.4);white-space: normal;overflow: hidden;',
  1488. 0
  1489. );
  1490.  
  1491. style = document.createElement('link');
  1492. style.rel = 'stylesheet';
  1493. style.href = 'https://cdnjs.cloudflare.com/ajax/libs/lity/1.6.6/lity.css';
  1494. document.getElementsByTagName('head')[0].appendChild(style);
  1495.  
  1496. $.getScript('https://cdnjs.cloudflare.com/ajax/libs/lity/1.6.6/lity.js');
  1497.  
  1498. var blurLinks = [];
  1499.  
  1500. $(document).on('contextmenu', '[data-lity]', null, function(e) {
  1501. if (e.ctrlKey) {
  1502. e.preventDefault();
  1503. if (e.target.className === 'blur-el') {
  1504. $('img[src=' + CSS.escape(e.target.src) + ']').each(
  1505. (n, e) => (e.className = '')
  1506. );
  1507. if (blurLinks.indexOf(e.target.src) != -1) {
  1508. blurLinks.splice(blurLinks.indexOf(e.target.src), 1);
  1509. }
  1510. } else {
  1511. $('img[src=' + CSS.escape(e.target.src) + ']').each(
  1512. (n, e) => (e.className = 'blur-el')
  1513. );
  1514. if (blurLinks.indexOf(e.target.src) === -1) {
  1515. blurLinks.push(e.target.src);
  1516. }
  1517. }
  1518. }
  1519. });
  1520.  
  1521. function parseYouTubeId(url) {
  1522. var regex = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;
  1523. return url.match(regex) ? RegExp.$2 : null;
  1524. }
  1525.  
  1526. function parseVimeoId(url) {
  1527. var regex = /^.*(vimeo.com\/|video\/)(\d+).*/;
  1528. return url.match(regex) ? RegExp.$2 : null;
  1529. }
  1530.  
  1531. function isValidUrl(url) {
  1532. return /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(
  1533. url
  1534. );
  1535. }
  1536.  
  1537. function parseLink(url, el_id) {
  1538. var pAudio, pImage;
  1539. pAudio = new Audio();
  1540. pImage = new Image();
  1541. pAudio.src = pImage.src = url;
  1542. pAudio.isError = pImage.isError = false;
  1543.  
  1544. pAudio.onloadeddata = function(e) {
  1545. pAudio.controls = true;
  1546. $(el_id)
  1547. .html('')
  1548. .append(pAudio)
  1549. .append(`<a href="${url}" target="_blank">🌍</a>`);
  1550. };
  1551. pAudio.onerror = function(e) {
  1552. pAudio.isError = true;
  1553. if (pImage.isError)
  1554. $(el_id).html(`<a href="${url}" target="_blank">${url}</a>`);
  1555. };
  1556. pImage.onload = function(e) {
  1557. var x1 = 150;
  1558. var y1 = 150;
  1559. document.body.appendChild(this);
  1560. var w = this.offsetWidth;
  1561. var h = this.offsetHeight;
  1562. document.body.removeChild(this);
  1563. if (w >= h && w > y1) {
  1564. pImage.height = Math.round(h / (w / x1));
  1565. pImage.width = x1;
  1566. } else if (w <= h && h > x1) {
  1567. pImage.width = Math.round(w / (h / y1));
  1568. pImage.height = y1;
  1569. }
  1570. if (blurLinks.indexOf(url) != -1) pImage.className = 'blur-el';
  1571. $(el_id).html(`<a href="${url}" data-lity></a>`).find('a').append(pImage);
  1572. };
  1573. pImage.onerror = function(e) {
  1574. pImage.isError = true;
  1575. var ytId = parseYouTubeId(url);
  1576. var vmId = parseVimeoId(url);
  1577. if (ytId != null) {
  1578. pImage.isError = false;
  1579.  
  1580. $.getJSON(
  1581. 'https://www.googleapis.com/youtube/v3/videos?id=' +
  1582. ytId +
  1583. '&key=AIzaSyDL_iFb5QIUQf8fiG2Gx9-JEEkvfeU5H-Q&fields=items(id,snippet(channelId,title,categoryId),statistics)&part=snippet,statistics'
  1584. ).done(i => {
  1585. var imgLink = 'http://img.youtube.com/vi/' + ytId + '/mqdefault.jpg';
  1586. var blurClass = blurLinks.indexOf(imgLink) != -1 ? 'blur-el' : '';
  1587. $(el_id).html(`
  1588. <div class="yt">
  1589. <a title="${i.items[0].snippet.title}" href="${url}" data-lity>
  1590. <img style="height:120px" class="${blurClass}" src="${imgLink}">
  1591. </a>
  1592. <span id="${ytId}">
  1593. ${i.items[0].snippet.title}
  1594. </span>
  1595. </div>
  1596. `);
  1597. });
  1598. } else if (vmId != null) {
  1599. pImage.isError = false;
  1600.  
  1601. $.getJSON('http://vimeo.com/api/v2/video/' + vmId + '.json').done(i => {
  1602. var imgLink = i[0].thumbnail_large;
  1603. var blurClass = blurLinks.indexOf(imgLink) != -1 ? 'blur-el' : '';
  1604. console.log(i, imgLink);
  1605. $(el_id).html(`
  1606. <div class="yt">
  1607. <a title="${i[0].title}" href="${url}" data-lity>
  1608. <img style="height:120px" class="${blurClass}" src="${imgLink}">
  1609. </a>
  1610. <span id="${vmId}">
  1611. ${i[0].title}
  1612. </span>
  1613. </div>`);
  1614. });
  1615. } else if (pAudio.isError)
  1616. $(el_id).html(`<a href="${url}" target="_blank">${url}</a>`);
  1617. };
  1618. }
  1619.  
  1620. OHS.client.on('a', msg => {
  1621. var el = $('#chat li:last');
  1622. if (el.find('.message').text() != msg.a) return;
  1623. var li = $('<li><span class="name"/><span class="message"/>');
  1624. var content = msg.a
  1625. .replace(/</g, '&lt;')
  1626. .replace(
  1627. /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,
  1628. function(url) {
  1629. if (!isValidUrl(url)) return url;
  1630. var nice = url;
  1631. var el_id = Math.random().toString(36).slice(2);
  1632. if (url.match('^https?://')) nice = nice.replace(/^https?:\/\//i, '');
  1633. else url = 'http://' + url;
  1634. parseLink(url, '#' + el_id);
  1635. return '<span id="' + el_id + '">' + url + '</span>';
  1636. }
  1637. );
  1638. li.find('.name').text(msg.p.name);
  1639. li.find('.message').html(content);
  1640. li.css({ color: msg.p.color || 'white', opacity: 1 });
  1641. el.remove();
  1642. $('#chat ul').append(li);
  1643. });
  1644.  
  1645. OHS.client.on('a', function(msg) {
  1646. var cmd = msg.a.split(' ')[0].toLowerCase();
  1647. insultword3 = [
  1648. 'artless',
  1649. 'base-court',
  1650. 'apple-john',
  1651. 'bawdy',
  1652. 'bat-fowling',
  1653. 'baggage',
  1654. 'beslubbering',
  1655. 'beef-witted',
  1656. 'barnacle',
  1657. 'bootless',
  1658. 'beetle-headed',
  1659. 'bladder',
  1660. 'churlish',
  1661. 'boil-brained',
  1662. 'boar-pig',
  1663. 'cockered',
  1664. 'clapper-clawed',
  1665. 'bugbear',
  1666. 'clouted',
  1667. 'clay-brained',
  1668. 'bum-bailey',
  1669. 'craven',
  1670. 'common-kissing',
  1671. 'canker-blossom',
  1672. 'currish',
  1673. 'crook-pated',
  1674. 'clack-dish',
  1675. 'dankish',
  1676. 'dismal-dreaming',
  1677. 'clotpole',
  1678. 'dissembling',
  1679. 'dizzy-eyed',
  1680. 'doghearted',
  1681. 'codpiece',
  1682. 'errant',
  1683. 'dread-bolted',
  1684. 'death-token',
  1685. 'fawning',
  1686. 'earth-vexing',
  1687. 'dewberry',
  1688. 'fobbing',
  1689. 'elf-skinned',
  1690. 'flap-dragon',
  1691. 'froward',
  1692. 'fat-kidneyed',
  1693. 'flax-wench',
  1694. 'frothy',
  1695. 'fen-sucked',
  1696. 'flirt-gill',
  1697. 'gleeking',
  1698. 'flap-mouthed',
  1699. 'foot-licker',
  1700. 'goatish',
  1701. 'fly-bitten',
  1702. 'fustilarian',
  1703. 'gorbellied',
  1704. 'folly-fallen',
  1705. 'giglet',
  1706. 'impertinent',
  1707. 'fool-born',
  1708. 'gudgeon',
  1709. 'infectious',
  1710. 'full-gorged',
  1711. 'haggard',
  1712. 'jarring',
  1713. 'guts-griping',
  1714. 'harpy',
  1715. 'loggerheaded',
  1716. 'half-faced',
  1717. 'hedge-pig',
  1718. 'lumpish',
  1719. 'hasty-witted',
  1720. 'horn-beast',
  1721. 'mammering',
  1722. 'hedge-born',
  1723. 'hugger-mugger',
  1724. 'mangled',
  1725. 'hell-hated',
  1726. 'joithead',
  1727. 'mewling',
  1728. 'idle-headed',
  1729. 'lewdster',
  1730. 'paunchy',
  1731. 'ill-breeding',
  1732. 'lout',
  1733. 'pribbling',
  1734. 'ill-nurtured',
  1735. 'maggot-pie',
  1736. 'puking',
  1737. 'knotty-pated',
  1738. 'malt-worm',
  1739. 'puny',
  1740. 'milk-livered',
  1741. 'mammet',
  1742. 'qualling',
  1743. 'motley-minded',
  1744. 'measle',
  1745. 'rank',
  1746. 'onion-eyed',
  1747. 'minnow',
  1748. 'reeky',
  1749. 'plume-plucked',
  1750. 'miscreant',
  1751. 'roguish',
  1752. 'pottle-deep',
  1753. 'moldwarp',
  1754. 'ruttish',
  1755. 'pox-marked',
  1756. 'mumble-news',
  1757. 'saucy',
  1758. 'reeling-ripe',
  1759. 'nut-hook',
  1760. 'spleeny',
  1761. 'rough-hewn',
  1762. 'pigeon-egg',
  1763. 'spongy',
  1764. 'rude-growing',
  1765. 'pignut',
  1766. 'surly',
  1767. 'rump-fed',
  1768. 'puttock',
  1769. 'tottering',
  1770. 'shard-borne',
  1771. 'pumpion',
  1772. 'unmuzzled',
  1773. 'sheep-biting',
  1774. 'ratsbane',
  1775. 'vain',
  1776. 'spur-galled',
  1777. 'scut',
  1778. 'venomed',
  1779. 'swag-bellied',
  1780. 'skainsmate',
  1781. 'villainous',
  1782. 'tardy-gaited',
  1783. 'strumpet',
  1784. 'warped',
  1785. 'tickle-brained',
  1786. 'varlot',
  1787. 'wayward',
  1788. 'toad-spotted',
  1789. 'vassal',
  1790. 'weedy',
  1791. 'nchin-snouted',
  1792. 'whey-face',
  1793. 'yeasty',
  1794. 'weather-bitten',
  1795. 'wagtail',
  1796. ];
  1797. insultword2 = [
  1798. 'artless',
  1799. 'base-court',
  1800. 'apple-john',
  1801. 'bawdy',
  1802. 'bat-fowling',
  1803. 'baggage',
  1804. 'beslubbering',
  1805. 'beef-witted',
  1806. 'barnacle',
  1807. 'bootless',
  1808. 'beetle-headed',
  1809. 'bladder',
  1810. 'churlish',
  1811. 'boil-brained',
  1812. 'boar-pig',
  1813. 'cockered',
  1814. 'clapper-clawed',
  1815. 'bugbear',
  1816. 'clouted',
  1817. 'clay-brained',
  1818. 'bum-bailey',
  1819. 'craven',
  1820. 'common-kissing',
  1821. 'canker-blossom',
  1822. 'currish',
  1823. 'crook-pated',
  1824. 'clack-dish',
  1825. 'dankish',
  1826. 'dismal-dreaming',
  1827. 'clotpole',
  1828. 'dissembling',
  1829. 'dizzy-eyed',
  1830. 'doghearted',
  1831. 'codpiece',
  1832. 'errant',
  1833. 'dread-bolted',
  1834. 'death-token',
  1835. 'fawning',
  1836. 'earth-vexing',
  1837. 'dewberry',
  1838. 'fobbing',
  1839. 'elf-skinned',
  1840. 'flap-dragon',
  1841. 'froward',
  1842. 'fat-kidneyed',
  1843. 'flax-wench',
  1844. 'frothy',
  1845. 'fen-sucked',
  1846. 'flirt-gill',
  1847. 'gleeking',
  1848. 'flap-mouthed',
  1849. 'foot-licker',
  1850. 'goatish',
  1851. 'fly-bitten',
  1852. 'fustilarian',
  1853. 'gorbellied',
  1854. 'folly-fallen',
  1855. 'giglet',
  1856. 'impertinent',
  1857. 'fool-born',
  1858. 'gudgeon',
  1859. 'infectious',
  1860. 'full-gorged',
  1861. 'haggard',
  1862. 'jarring',
  1863. 'guts-griping',
  1864. 'harpy',
  1865. 'loggerheaded',
  1866. 'half-faced',
  1867. 'hedge-pig',
  1868. 'lumpish',
  1869. 'hasty-witted',
  1870. 'horn-beast',
  1871. 'mammering',
  1872. 'hedge-born',
  1873. 'hugger-mugger',
  1874. 'mangled',
  1875. 'hell-hated',
  1876. 'joithead',
  1877. 'mewling',
  1878. 'idle-headed',
  1879. 'lewdster',
  1880. 'paunchy',
  1881. 'ill-breeding',
  1882. 'lout',
  1883. 'pribbling',
  1884. 'ill-nurtured',
  1885. 'maggot-pie',
  1886. 'puking',
  1887. 'knotty-pated',
  1888. 'malt-worm',
  1889. 'puny',
  1890. 'milk-livered',
  1891. 'mammet',
  1892. 'qualling',
  1893. 'motley-minded',
  1894. 'measle',
  1895. 'rank',
  1896. 'onion-eyed',
  1897. 'minnow',
  1898. 'reeky',
  1899. 'plume-plucked',
  1900. 'miscreant',
  1901. 'roguish',
  1902. 'pottle-deep',
  1903. 'moldwarp',
  1904. 'ruttish',
  1905. 'pox-marked',
  1906. 'mumble-news',
  1907. 'saucy',
  1908. 'reeling-ripe',
  1909. 'nut-hook',
  1910. 'spleeny',
  1911. 'rough-hewn',
  1912. 'pigeon-egg',
  1913. 'spongy',
  1914. 'rude-growing',
  1915. 'pignut',
  1916. 'surly',
  1917. 'rump-fed',
  1918. 'puttock',
  1919. 'tottering',
  1920. 'shard-borne',
  1921. 'pumpion',
  1922. 'unmuzzled',
  1923. 'sheep-biting',
  1924. 'ratsbane',
  1925. 'vain',
  1926. 'spur-galled',
  1927. 'scut',
  1928. 'venomed',
  1929. 'swag-bellied',
  1930. 'skainsmate',
  1931. 'villainous',
  1932. 'tardy-gaited',
  1933. 'strumpet',
  1934. 'warped',
  1935. 'tickle-brained',
  1936. 'varlot',
  1937. 'wayward',
  1938. 'toad-spotted',
  1939. 'vassal',
  1940. 'weedy',
  1941. 'nchin-snouted',
  1942. 'whey-face',
  1943. 'yeasty',
  1944. 'weather-bitten',
  1945. 'wagtail',
  1946. ];
  1947. insultword = [
  1948. 'artless',
  1949. 'base-court',
  1950. 'apple-john',
  1951. 'bawdy',
  1952. 'bat-fowling',
  1953. 'baggage',
  1954. 'beslubbering',
  1955. 'beef-witted',
  1956. 'barnacle',
  1957. 'bootless',
  1958. 'beetle-headed',
  1959. 'bladder',
  1960. 'churlish',
  1961. 'boil-brained',
  1962. 'boar-pig',
  1963. 'cockered',
  1964. 'clapper-clawed',
  1965. 'bugbear',
  1966. 'clouted',
  1967. 'clay-brained',
  1968. 'bum-bailey',
  1969. 'craven',
  1970. 'common-kissing',
  1971. 'canker-blossom',
  1972. 'currish',
  1973. 'crook-pated',
  1974. 'clack-dish',
  1975. 'dankish',
  1976. 'dismal-dreaming',
  1977. 'clotpole',
  1978. 'dissembling',
  1979. 'dizzy-eyed',
  1980. 'doghearted',
  1981. 'codpiece',
  1982. 'errant',
  1983. 'dread-bolted',
  1984. 'death-token',
  1985. 'fawning',
  1986. 'earth-vexing',
  1987. 'dewberry',
  1988. 'fobbing',
  1989. 'elf-skinned',
  1990. 'flap-dragon',
  1991. 'froward',
  1992. 'fat-kidneyed',
  1993. 'flax-wench',
  1994. 'frothy',
  1995. 'fen-sucked',
  1996. 'flirt-gill',
  1997. 'gleeking',
  1998. 'flap-mouthed',
  1999. 'foot-licker',
  2000. 'goatish',
  2001. 'fly-bitten',
  2002. 'fustilarian',
  2003. 'gorbellied',
  2004. 'folly-fallen',
  2005. 'giglet',
  2006. 'impertinent',
  2007. 'fool-born',
  2008. 'gudgeon',
  2009. 'infectious',
  2010. 'full-gorged',
  2011. 'haggard',
  2012. 'jarring',
  2013. 'guts-griping',
  2014. 'harpy',
  2015. 'loggerheaded',
  2016. 'half-faced',
  2017. 'hedge-pig',
  2018. 'lumpish',
  2019. 'hasty-witted',
  2020. 'horn-beast',
  2021. 'mammering',
  2022. 'hedge-born',
  2023. 'hugger-mugger',
  2024. 'mangled',
  2025. 'hell-hated',
  2026. 'joithead',
  2027. 'mewling',
  2028. 'idle-headed',
  2029. 'lewdster',
  2030. 'paunchy',
  2031. 'ill-breeding',
  2032. 'lout',
  2033. 'pribbling',
  2034. 'ill-nurtured',
  2035. 'maggot-pie',
  2036. 'puking',
  2037. 'knotty-pated',
  2038. 'malt-worm',
  2039. 'puny',
  2040. 'milk-livered',
  2041. 'mammet',
  2042. 'qualling',
  2043. 'motley-minded',
  2044. 'measle',
  2045. 'rank',
  2046. 'onion-eyed',
  2047. 'minnow',
  2048. 'reeky',
  2049. 'plume-plucked',
  2050. 'miscreant',
  2051. 'roguish',
  2052. 'pottle-deep',
  2053. 'moldwarp',
  2054. 'ruttish',
  2055. 'pox-marked',
  2056. 'mumble-news',
  2057. 'saucy',
  2058. 'reeling-ripe',
  2059. 'nut-hook',
  2060. 'spleeny',
  2061. 'rough-hewn',
  2062. 'pigeon-egg',
  2063. 'spongy',
  2064. 'rude-growing',
  2065. 'pignut',
  2066. 'surly',
  2067. 'rump-fed',
  2068. 'puttock',
  2069. 'tottering',
  2070. 'shard-borne',
  2071. 'pumpion',
  2072. 'unmuzzled',
  2073. 'sheep-biting',
  2074. 'ratsbane',
  2075. 'vain',
  2076. 'spur-galled',
  2077. 'scut',
  2078. 'venomed',
  2079. 'swag-bellied',
  2080. 'skainsmate',
  2081. 'villainous',
  2082. 'tardy-gaited',
  2083. 'strumpet',
  2084. 'warped',
  2085. 'tickle-brained',
  2086. 'varlot',
  2087. 'wayward',
  2088. 'toad-spotted',
  2089. 'vassal',
  2090. 'weedy',
  2091. 'nchin-snouted',
  2092. 'whey-face',
  2093. 'yeasty',
  2094. 'weather-bitten',
  2095. 'wagtail',
  2096. ];
  2097. insultrandom = Math.floor(Math.random() * insultword.length);
  2098. insultrandom2 = Math.floor(Math.random() * insultword2.length);
  2099. insultrandom3 = Math.floor(Math.random() * insultword3.length);
  2100. if (cmd == prefix + 'shakespeareinsult') {
  2101. if (blIds.includes(msg.p.id) || blNames.includes(msg.p.name)) {
  2102. } else {
  2103. sendChat(
  2104. 'Thou ' +
  2105. insultword[insultrandom] +
  2106. ' ' +
  2107. insultword2[insultrandom2] +
  2108. ' ' +
  2109. insultword3[insultrandom3]
  2110. );
  2111. }
  2112. }
  2113. });
  2114.  
  2115. //Circle Around Last Chatter
  2116. var lastChatter = undefined;
  2117. var i = 0;
  2118. var rotation = 3; //default = 1 rotation/speed
  2119. var radius = 8; //default = 8
  2120. var degree = 180; //default = 180
  2121. setInterval(function() {
  2122. for (var id in MPP.client.ppl) {
  2123. if (!MPP.client.ppl.hasOwnProperty(id)) continue;
  2124. var part = MPP.client.ppl[id];
  2125. if (lastChatter == undefined) {
  2126. return;
  2127. }
  2128. if (part.id == lastChatter) {
  2129. var angle = i * (Math.PI / degree);
  2130. MPP.client.sendArray([
  2131. {
  2132. m: 'm',
  2133. x: part.x + Math.sin(angle) * radius,
  2134. y: part.y + Math.cos(angle) * radius,
  2135. },
  2136. ]);
  2137. i += rotation;
  2138. }
  2139. }
  2140. }, 0);
  2141. MPP.client.on('a', function(msg) {
  2142. if (msg.p.id == MPP.client.participantId) {
  2143. return;
  2144. }
  2145. lastChatter = msg.p.id;
  2146. });
  2147.  
  2148. function randomString(length, chars) {
  2149. var result = '';
  2150. for (var i = length; i > 0; --i)
  2151. result += chars[Math.round(Math.random() * (chars.length - 1))];
  2152. return result;
  2153. }
  2154. console.log(
  2155. randomString(
  2156. 32,
  2157. '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
  2158. )
  2159. );
  2160.  
  2161. spying = false;
  2162.  
  2163. OHS.client.on('a', function(msg) {
  2164. if (spying) {
  2165. messages++;
  2166. spymessages.push(msg.p.name + ': ' + msg.a);
  2167. }
  2168. });
  2169.  
  2170. function spy(room) {
  2171. homebase = OHS.client.channel._id;
  2172. messages = 0;
  2173. spymessages = [];
  2174. OHS.client.setChannel(room);
  2175. spying = true;
  2176. botupdate = 0;
  2177. OHS.client.sendArray([
  2178. {
  2179. m: 'userset',
  2180. set: {
  2181. name: randomString(
  2182. 12,
  2183. '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
  2184. ),
  2185. },
  2186. },
  2187. ]);
  2188. setTimeout(function() {
  2189. OHS.client.setChannel(homebase);
  2190. spying = false;
  2191. users = OHS.client.channel.count;
  2192. botupdate = 1;
  2193. }, 17000);
  2194. setTimeout(function() {
  2195. botupdate = 1;
  2196. autoBotName();
  2197. sendChat(
  2198. 'Sucessfully infiltrated ' +
  2199. room +
  2200. '. Users in room: ' +
  2201. users +
  2202. ' Messages: ' +
  2203. messages
  2204. );
  2205. sendChat('To view the messages that were sent, view the log in console.');
  2206. }, 21000);
  2207. }
  2208.  
  2209. OHS.client.on('a', function(msg) {
  2210. var cmd = msg.a.split(' ')[0].toLowerCase
  2211. var input = msg.a.substring(cmd.length).trim();
  2212. if (cmd == prefix + 'spy') {
  2213. if (adminIds.includes(msg.p._id)) {
  2214. spy(input)
  2215. } else {
  2216. sendChat('You do not have access to this command.')
  2217. }
  2218. }
  2219. });
  2220.  
  2221. //this is from EpicOS
  2222. messagesplitter =
  2223. '6574au39Oa0012323xXFf99F7454THJS743h48u6432567894365278935trw';
  2224. //to access logs, use localStorage.messages.split(messagesplitter)
  2225. OHS.client.on('a', function(msg) {
  2226. localStorage.messages =
  2227. localStorage.messages +
  2228. ' ' +
  2229. messagesplitter +
  2230. ' ' +
  2231. msg.p.name +
  2232. ':' +
  2233. msg.a +
  2234. '';
  2235. });
  2236.  
  2237. /* //fixme: regret why i did this
  2238.  
  2239. __________ ___ __ ____
  2240. `MMMMMMMMM `MM 69MM 6MMMMb\ 68b
  2241. MM \ MM 6M' ` 6M' ` Y89 /
  2242. MM ___ __ ____MM _____ _MM__ MM ____ ___ __ ___ __ ____ /M
  2243. MM , `MM 6MMb 6MMMMMM 6MMMMMb MMMMM YM. 6MMMMb.`MM 6MM `MM `M6MMMMb /MMMMM
  2244. MMMMMMM MMM9 `Mb 6M' `MM 6M' `Mb MM YMMMMb 6M' Mb MM69 " MM MM' `Mb MM
  2245. MM ` MM' MM MM MM MM MM MM `Mb MM `' MM' MM MM MM MM
  2246. MM MM MM MM MM MM MM MM MM MM MM MM MM MM MM
  2247. MM MM MM MM MM MM MM MM MM MM MM MM MM MM MM
  2248. MM / MM MM YM. ,MM YM. ,M9 MM L ,M9 YM. d9 MM MM MM. ,M9 YM. ,
  2249. _MMMMMMMMM _MM_ _MM_ YMMMMMM_ YMMMMM9 _MM_ MYMMMM9 YMMMM9 _MM_ _MM_ MMYMMM9 YMMM9
  2250. MM
  2251. MM
  2252. _MM_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement