Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name BondBot
- // @namespace http://tampermonkey.net/
- // @version public
- // @description try to take over the world!
- // @author CitronSustain / oh / Anon64
- // @match http://www.multiplayerpiano.com/*
- // @grant none
- // ==/UserScript==
- //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!
- ///js showClock24Hr() Shows a 24 Hr clock on your name
- ///js retardSpam() Copies any messages and repeats them using the tumblr() function
- ///js copySpam() Copies any messages and repeats them normally
- ///js leetSpam() Self Explanatory
- ///js showClockLocale() Shows your local time on your name
- ///js tumblr('texthere') Tumblr makes your text LoOk LiKe ThIs
- ///js L337('Texthere') makes your text l00k l1k3 th15
- ///js sendChat('text here') sends what ever is in the parentheses in chat!
- //To start the bot, paste this script into your browser console or Tampermonkey.
- //To undo any chatspam functions you have run, please restart the bot by refreshing your page and re pasting it into console.
- //If you abuse chatspam functions Bondbot (Shaun Murphy) or Anon64 can turn off the bot.
- // ==UserScript==
- // @name OHS
- // @namespace http://tampermonkey.net/
- // @version 1.7
- // @description to take over the world!
- // @author You
- // @match http://www.multiplayerpiano.com/*
- // @grant none
- // ==/UserScript==
- //Number of lines on 11/12/17: 2311
- //Lines goal: 2500
- //Overall progress: 92.44%
- OHS = MPP;
- prefix = '.';
- thingy = 1; //pls dont remove, will probably be in use later
- magic_number = Math.floor(Math.random() * 100 + 1);
- botname = 'Bondbot';
- stalemates = 0;
- lost = 0;
- won = 0;
- games = 0;
- //chat buffer from electrashave
- //-electrashave
- var chat_buffer = [];
- function sendChat(msg) {
- msg.match(/.{0,511}/g).forEach(function(x, i) {
- if (x === '') return;
- if (i !== 0) x = '...' + x;
- chat_buffer.push(x);
- });
- }
- var chatInt = setInterval(function() {
- var msg = chat_buffer.shift();
- if (msg) OHS.client.sendArray([{ m: 'a', message: msg }]);
- }, 1900);
- function cockBot() {
- sendChat(
- 'CockBot has been enabled. To revert changes, please reload the bot.'
- );
- botname = 'CockBot [' + prefix + 'about]';
- prefix = '\u034f';
- }
- Array.prototype.random = function(q) {
- if (q === undefined) {
- return this.length > 0
- ? this[Math.floor(this.length * Math.random())]
- : undefined;
- } else {
- let amount = q >>> 0;
- let result = this.slice(0, amount);
- for (let i = amount; i < this.length; i++) {
- let j = Math.floor(Math.random() * i);
- if (j < amount) {
- result[j] = this[i];
- }
- }
- return result;
- }
- };
- setTimeout(function() {
- sendChat('Starting Bondbot..');
- console.log('Starting Bondbot..');
- console.log('This loading sequence totally isnt fake...');
- }, 1200);
- setTimeout(function() {
- sendChat(medicalrandom[loadingmedicalrandom]);
- console.log(medicalrandom[loadingmedicalrandom]);
- }, 1550);
- setTimeout(function() {
- sendChat(simsloading[loadingsimsrandom]);
- console.log(simsloading[loadingsimsrandom]);
- sendChat('Loading done! Use .about for commands');
- console.log('Sequence completed.');
- }, 1790);
- setInterval(
- function() {
- console.log('Google history has been saved.');
- JSON.stringify(searchHistory);
- },
- 300000 // every 5 minutes
- );
- setInterval(function() {
- console.log('Google history has been loaded.');
- JSON.parse(localStorage.history);
- }, 300001);
- setInterval(function() {
- sendChat('Guess the magic number for a gift!');
- }, 300000);
- setInterval(function() {
- sendChat('discord.gg/5wtubrg - Join the official 160System server!');
- }, 300000);
- botupdate = 0;
- function autoBotName() {
- setInterval(function() {
- if (botupdate == 1) {
- OHS.client.sendArray([
- { m: 'userset', set: { name: botname + ' [' + prefix + 'help]' } },
- ]);
- }
- }, 10);
- setInterval(function() {
- if (botupdate == 1) {
- OHS.client.sendArray([
- { m: 'userset', set: { name: botname + ' [' + prefix + 'about]' } },
- ]);
- }
- }, 20);
- }
- //chatlog from Anon64
- //-Anon64
- OHS.client.on('a', function(boi) {
- console.log(
- `%c${boi.p.name} (${boi.p._id}): ${boi.a}`,
- `color: ${boi.p.color}`
- );
- });
- var simsloading = [
- 'Adding Hidden Agendas',
- 'Adjusting Bell Curves',
- 'Aesthesizing Industrial Areas',
- 'Aligning Covariance Matrices',
- 'Applying Feng Shui Shaders',
- 'Applying Theatre Soda Layer',
- 'Asserting Packed Exemplars',
- 'Attempting to Lock Back-Buffer',
- 'Binding Sapling Root System',
- 'Breeding Fauna',
- ];
- var loadingsimsrandom = Math.floor(Math.random() * simsloading.length);
- var medicalrandom = [
- 'Making REBOAS...',
- 'Adding shunts..',
- 'Making incisions..',
- 'Avoid cutting your jugular!',
- 'Measuring echocardiograms..',
- 'My MRI scans for my patients are very important!',
- ];
- var loadingmedicalrandom = Math.floor(Math.random() * medicalrandom.length);
- OHS.client.on('a', function(msg) {
- var b = msg.a;
- var msgArr = msg.a.split(' ');
- var input = msg.a.substring(msgArr[0].length).trim();
- if (
- msgArr[0] == prefix + 'pickle' &&
- msg.p._id == OHS.client.getOwnParticipant()._id
- ) {
- console.log('lol');
- }
- var giftArray = [
- 'a cute kitten!',
- 'a cute puppy!',
- 'a potato!',
- 'a pikachu!',
- 'a brand new Xbox One!',
- 'a brand new PS4!',
- '1 million cows!',
- 'a slice of bacon!',
- 'a boating license!',
- 'a bunch of money!',
- 'some cake!',
- 'a box inside of a... BOX!',
- 'a new phone!',
- 'a new piano!',
- 'some chicken nuggets!',
- 'a brand new Wii U!',
- 'an evil gerbil!',
- 'a captains ship!',
- 'some sfoof! (Semolina Turmeric Cake)',
- 'some pizza!',
- 'a new laptop!',
- 'a piece of cotton',
- 'a spoon',
- 'a dribbling cat',
- ];
- var giftrandom = Math.floor(Math.random() * giftArray.length);
- if (b == prefix + 'time_24hr') {
- sendChat(
- new Date().getHours() +
- ':' +
- new Date().getMinutes() +
- ':' +
- new Date().getSeconds()
- );
- }
- news1 =
- 'Find info about your user! _id, color, etc. Use ' + prefix + 'aboutme!';
- news2 =
- 'New Shakespearean insult generator! Use ' + prefix + 'shakespeareinsult!';
- if (b == prefix + 'about') {
- sendChat(
- 'Bondbot is a bot written by oh including many fun console commands and chat commands. '
- );
- sendChat(
- 'Command list: ' +
- prefix +
- 'about, ' +
- prefix +
- 'version, ' +
- prefix +
- '8ball, ' +
- prefix +
- 'time_24hr, ' +
- prefix +
- 'rps, ' +
- prefix +
- 'google, ' +
- prefix +
- 'unbox, ' +
- prefix +
- 'fuck, ' +
- prefix +
- 'hug, ' +
- prefix +
- 'kiss, ' +
- prefix +
- 'lick, ' +
- prefix +
- 'kill, ' +
- prefix +
- 'me, ' +
- prefix +
- 'say, ' +
- prefix +
- 'afk, ' +
- prefix +
- 'shakespeareinsult, ' +
- prefix +
- 'aboutme'
- ); //FIXME: add an MPC variable without an autoregen
- sendChat(news1);
- sendChat(news2);
- }
- if (b == prefix + 'help') {
- sendChat(
- 'Bondbot is a bot written by oh including many fun console commands and chat commands. '
- );
- sendChat(
- 'Command list: ' +
- prefix +
- 'about, (help) ' +
- prefix +
- 'version, ' +
- prefix +
- '8ball, ' +
- prefix +
- 'time_24hr, ' +
- prefix +
- 'rps, ' +
- prefix +
- 'google, ' +
- prefix +
- 'unbox, ' +
- prefix +
- 'fuck, ' +
- prefix +
- 'hug, ' +
- prefix +
- 'kiss, ' +
- prefix +
- 'lick, ' +
- prefix +
- 'kill, ' +
- prefix +
- 'me, ' +
- prefix +
- 'say, ' +
- prefix +
- 'afk, ' +
- prefix +
- 'shakespeareinsult, ' +
- prefix +
- 'aboutme'
- ); //FIXME: add an MPC variable without an autoregen
- sendChat(news1);
- sendChat(news2);
- }
- //RPS START (there is a lot easier way to do this but I couldn't figure it out cause I'm retarded)
- var rockwords = [
- 'You Lose! Computer chose paper.',
- 'You win! Computer chose scissors.',
- 'Tie! You both chose rock.',
- ];
- var rockrandom = Math.floor(Math.random() * rockwords.length);
- var paperwords = [
- 'You Lose! Computer chose scisssors.',
- 'You win! Computer chose rock.',
- 'Tie! You both chose paper.',
- ];
- var paperrandom = Math.floor(Math.random() * paperwords.length);
- var scissorswords = [
- 'You Lose! Computer chose rock.',
- 'You win! Computer chose paper.',
- 'Tie! You both chose scissors.',
- ];
- var scissorsrandom = Math.floor(Math.random() * scissorswords.length); //FIXME: add some difficulty settings or something cause RPS is stupidly hard
- if (b == prefix + 'rps' || b == prefix + 'rockpaperscissors') {
- sendChat('Welcome to RPS: do .rps <rock, paper, scissors> to play!');
- }
- if (b == prefix + 'mouseinthewall') {
- sendChat(
- msg.p.name +
- ' found the easter egg, and the mouse in the wall says Hello!'
- );
- }
- if (
- b == prefix + 'rps r' ||
- b == prefix + 'rockpaperscissors rock' ||
- b == prefix + 'rps rock' ||
- b == prefix + 'rockpaperscissors r'
- ) {
- sendChat('RPS: ' + rockwords[rockrandom]);
- }
- if (
- b == prefix + 'rps s' ||
- b == prefix + 'rockpaperscissors s' ||
- b == prefix + 'rps scissors' ||
- b == prefix + 'rockpaperscissors scissors'
- ) {
- sendChat('RPS: ' + scissorswords[scissorsrandom]);
- }
- if (
- b == prefix + 'rps p' ||
- b == prefix + 'rockpaperscissors paper' ||
- b == prefix + 'rps paper' ||
- b == prefix + 'rockpaperscissors p'
- ) {
- sendChat('RPS: ' + paperwords[paperrandom]);
- }
- //RPS debug shits nothing
- if (msg.p._id == OHS.client.getOwnParticipant()._id) {
- if (msg.a.toLowerCase().includes('RPS: You win!')) {
- won++;
- games++;
- console.log('Games won: ' + won);
- console.log('Games total: ' + games);
- console.log('Games lost: ' + lost);
- console.log('Stalemates: ' + stalemates);
- }
- }
- if (msg.p._id == OHS.client.getOwnParticipant()._id) {
- if (msg.a.toLowerCase().includes('RPS: You lose!')) {
- lost++;
- games++;
- console.log('Games won: ' + won);
- console.log('Games total: ' + games);
- console.log('Games lost: ' + lost);
- console.log('Stalemates: ' + stalemates);
- }
- }
- if (msg.p._id == OHS.client.getOwnParticipant()._id) {
- if (msg.a.toLowerCase().includes('RPS: Tie!')) {
- stalemates++;
- games++;
- console.log('Games won: ' + won);
- console.log('Games total: ' + games);
- console.log('Games lost: ' + lost);
- console.log('Stalemates: ' + stalemates);
- }
- } //FIXME: idk what the fuck is wrong with this
- //magic number stuff
- /*if (b == magic_number) {
- sendChat(msg.p.name + ' guessed the magic number correctly! They win air!');
- magic_number = Math.floor(Math.random() * 100 + 1);
- }*/
- if (msg.a.toLowerCase().includes(magic_number)) {
- if (msg.a.length > 5) return;
- sendChat(
- msg.p.name +
- ' guessed the magic number correctly, ' +
- '(' +
- magic_number +
- ')' +
- ' and won ' +
- giftArray[giftrandom]
- );
- magic_number = Math.floor(Math.random() * 100 + 1); //FIXME: maybe turn into a math problem solving thing
- }
- if (
- b == prefix + 'unbox csweaponscase1' ||
- b == prefix + 'unbox Weapons Case 1' ||
- b == prefix + 'unbox 1'
- ) {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat(
- 'CS:GO: You unboxed a ' + csweaponscase1[case1random] + wear[wearrandom]
- );
- }
- }
- if (
- b == prefix + 'unbox Gamma' ||
- b == prefix + 'unbox gamma' ||
- b == prefix + 'unbox 2'
- ) {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat('CS:GO: You unboxed a ' + gamma[gammarandom] + wear[wearrandom]);
- }
- }
- });
- //CS:GO Unbox Sim START
- var wear = [
- 'Battle-Scarred (BS)',
- 'Field-Tested (FT)',
- 'Well-Worn (WW)',
- 'Minimal Wear (MW)',
- 'Factory New (FN)',
- ];
- var csweaponscase1 = [
- 'MP7 | Skulls | Mil-spec ',
- 'SG 553 | Ultraviolet | Mil-spec ',
- 'AUG | Wings | Mil-spec ',
- 'M4A1-S | Dark Water | Restricted ',
- 'USP-S | Dark Water | Restricted ',
- 'Glock-18 | Dragon Tattoo | Restricted ',
- 'Desert Eagle | Hypnotic | Classified ',
- 'AK-47 | Case Hardened | Classified ',
- 'AWP | Lightning Strike | Covert ',
- '★ Karambit | Exceedingly Rare ',
- ];
- var gamma = [
- 'Five-SeveN | Violent Daimyo | Mil-Spec',
- 'MAC-10 | Carnivore | Mil-Spec',
- 'Nova | Exo | Mil-Spec',
- 'P250 | Iron Clad | Mil-Spec',
- 'PP-Bizon | Harvester | Mil-Spec',
- 'SG 553 | Aerial | Mil-Spec',
- 'Tec-9 | Ice Cap | Mil-Spec',
- 'AUG | Aristocrat | Restricted',
- 'AWP | Phobos | Restricted',
- 'P90 | Chopper | Restricted',
- 'R8 Revolver | Reboot | Restricted',
- 'Sawed-Off | Limelight | Restricted',
- 'M4A4 | Desolate Space | Classified',
- 'P2000 | Imperial Dragon | Classified',
- 'SCAR-20 | Bloodsport | Classified',
- 'Glock-18 | Wasteland Rebel | Covert',
- 'M4A1-S | Mecha Industries | Covert',
- 'M9 Bayonet | Crimson Web',
- ];
- var case1random = Math.floor(Math.random() * csweaponscase1.length);
- var wearrandom = Math.floor(Math.random() * wear.length);
- var gammarandom = Math.floor(Math.random() * gamma.length);
- /*var chromarandom = Math.floor(Math.random() * chroma.length);
- var chroma2random = Math.floor(Math.random() * chroma2.length);*/
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (msg.a.toLowerCase == prefix + 'unbox') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat(
- '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)'
- );
- }
- }
- });
- /* if (
- b == prefix + 'unbox csweaponscase1' ||
- b == prefix + 'unbox Weapons Case 1' ||
- b == prefix + 'unbox 1'
- ) {
- sendChat(
- 'CS:GO: You unboxed a ' + csweaponscase1[case1random] + wear[wearrandom]
- );
- }*/
- /*if (
- b == prefix + 'unbox Gamma' ||
- b == prefix + 'unbox gamma' ||
- b == prefix + 'unbox 2'
- ) {
- sendChat('CS:GO: You unboxed a ' + gamma[gammarandom] + wear[wearrandom]);
- }*/
- /*if (
- b == prefix + 'unbox Chroma' ||
- b == prefix + 'unbox cschroma' ||
- b == prefix + 'unbox 3'
- ) {
- }*/
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'anon64') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat(
- '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)'
- );
- }
- }
- });
- /*if (b == prefix + 'anon64') {
- sendChat(
- '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)'
- );
- }*/
- /*if (
- (b == 'Bondbot, shutdown' && msg.p._id == 'd55bf273f64f37c5691f3bbb') ||
- (b == 'Bondbot, shutdown' && msg.p._id == '63ce4e6b86780ae23e04a5b8') ||
- (b == 'Bondbot, shutdown' && msg.p._id == 'a2db90c04712080af5d797a1')
- ) {
- sendChat('Shutting down -- Reason: Requested by Admin');
- location.reload();
- }*/
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (
- //FIXME: improve cmd above by using cmd below somehow
- msg.p._id == 'd55bf273f64f37c5691f3bbb' ||
- msg.p._id == '63ce4e6b86780ae23e04a5b8' ||
- msg.p._id == 'a2db90c04712080af5d797a1'
- ) {
- if (msg.a.toLowerCase().includes('shut down' && 'bondbot shutdown')) {
- sendChat('Shutting down -- Requested by Admin.');
- location.reload();
- }
- }
- if (msg.a.toLowerCase().includes('what')) {
- if (msg.a.toLowerCase().includes('time')) {
- sendChat(
- new Date().getHours() +
- ':' +
- new Date().getMinutes() +
- ':' +
- new Date().getSeconds()
- );
- }
- }
- Clockpower = 0;
- if (
- msg.p._id == 'd55bf273f64f37c5691f3bbb' ||
- msg.p._id == '63ce4e6b86780ae23e04a5b8' ||
- msg.p._id == 'a2db90c04712080af5d797a1'
- ) {
- if (msg.a.toLowerCase().includes('activate clock')) {
- if (msg.a.toLowerCase().includes('clock')) {
- if (Clockpower == 1 == true) {
- sendChat('Turning on 24Hr Clock');
- showClock24Hr();
- }
- }
- }
- }
- if (
- msg.p._id == 'd55bf273f64f37c5691f3bbb' ||
- msg.p._id == '63ce4e6b86780ae23e04a5b8' ||
- msg.p._id == 'a2db90c04712080af5d797a1'
- ) {
- if (msg.a.toLowerCase().includes('be doctor' && 'shaun murphy')) {
- sendChat('Making REBOAS...');
- botname = 'Dr. Shaun Murphy [.about]';
- }
- }
- if (msg.a.toLowerCase().includes('AMIGHTYWIND'.toLowerCase())) {
- sendChat('FUCK OFF!');
- }
- if (
- msg.a
- .toLowerCase()
- .includes('yeet'.toLowerCase() && 'y e e t'.toLowerCase())
- ) {
- sendChat('YEET');
- }
- });
- blNames = ['Anonymous'];
- blIds = [
- 'ffa07b701a54f9d408fc76b1', //A5R13L B0t
- '3a5270724d14b475e743ccb8', //SS Nazi
- '4cc022a2f4d68c57973d0892', //SS Nazi
- '512b456c97ffc5c491350a24', //zyphen4866
- ];
- function info(name) {
- //epicos shit
- var array = [];
- for (var pl in OHS.client.ppl) {
- if (OHS.client.ppl[pl].name.toLowerCase().includes(name.toLowerCase())) {
- array.push(OHS.client.ppl[pl]);
- }
- }
- return array[Math.floor(Math.random() * array.length)];
- }
- //also epicos shit wow im superlazy
- afkusersnames = [];
- afkusersids = [];
- OHS.client.on('a', function(msg) {
- if (
- msg.a.toLowerCase() == prefix + 'afk' ||
- msg.a.toLowerCase() == 'brb' ||
- msg.a.toLowerCase() == 'afk'
- ) {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat(
- '**' +
- msg.p.name +
- ' is now marked as AFK. Send any message to be unmarked.'
- );
- setTimeout(function() {
- afkusersnames.push(msg.p.name);
- afkusersids.push(msg.p._id);
- }, 2000);
- }
- } else {
- }
- });
- MPP.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'bunny')
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat('..( /)');
- sendChat('..(•.•)');
- sendChat('c(")(")');
- }
- });
- OHS.client.on('a', function(msg) {
- if (afkusersids.includes(msg.p._id)) {
- if (
- msg.a.toLowerCase() == 'afk' ||
- msg.a.toLowerCase() == 'brb' ||
- msg.a.toLowerCase() == prefix + 'afk'
- ) {
- sendChat('You are marked as AFK already ' + msg.p.name + '!');
- } else {
- sendChat('**' + msg.p.name + ' is no longer AFK.');
- afkusersids.splice(msg.p._id);
- afkusersnames.splice(msg.p.name);
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'say') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat('\u034f' + msg.a.substring(cmd.length).trim());
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'me') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat('**' + msg.p.name + ' ' + msg.a.substring(cmd.length).trim());
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'version') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat('Version: v1.4');
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- var eightballwords = [
- 'It is certain',
- 'It is decidedly so',
- 'Without a doubt',
- 'Yes, definitely.',
- 'You may rely on it',
- 'As I see it yes',
- 'Most likely',
- 'Outlook good',
- 'Yes',
- 'Signs point to yes',
- 'Reply hazy, try again.',
- 'Ask again later',
- 'Better not tell you now',
- 'Cannot predict now',
- 'Concentrate and ask again',
- 'Dont count on it',
- 'My reply is no',
- 'My sources say no',
- 'Outlook not so good',
- 'Very doubtful',
- 'No',
- ];
- eightballrandom = Math.floor(Math.random() * eightballwords.length);
- if (cmd == prefix + '8ball') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- if (input == '') {
- sendChat(
- '8ball: ' +
- msg.p.name +
- ", Ask me a question to answer, don't just stand there!"
- );
- } else {
- sendChat(
- '8ball: ' + msg.p.name + ', ' + eightballwords[eightballrandom]
- );
- }
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'fuck') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- if (input == '') {
- sendChat(msg.p.name + ' is so lonely they fuck air.');
- } else {
- if (input == msg.p.name) {
- //make infoinput.selfname function
- sendChat(msg.p.name + ' fucks themselves.');
- } else {
- sendChat(
- msg.p.name +
- ' fucks ' +
- info(input).name +
- ' so FUCKING HARD that they die from too much sex.'
- );
- }
- }
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'hug') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- if (input == '') {
- sendChat(msg.p.name + ' hugs no one. :(');
- } else {
- if (input == msg.p.name) {
- sendChat(msg.p.name + ' hugs themselves because they are lonely. :(');
- } else {
- sendChat(
- msg.p.name + ' gives ' + info(input).name + ' a big warm hug.'
- );
- }
- }
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'kiss') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- if (input == '') {
- sendChat(msg.p.name + ' kisses the air.');
- } else {
- if (input == msg.p.name) {
- sendChat(msg.p.name + ' is so lonely, they kiss their elbow.');
- } else {
- sendChat(msg.p.name + ' kisses ' + info(input).name + '.');
- }
- }
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'eat') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- if (input == '') {
- sendChat(msg.p.name + ' eats nothing. They then die of starvation.');
- } else {
- sendChat(
- msg.p.name +
- ' eats a ' +
- msg.a.substring(cmd.length).trim() +
- '. It was delicious!'
- );
- }
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'drink') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- if (input == '') {
- sendChat(
- msg.p.name +
- ' attempts to pour water into a cup. They start to drink, but nothing comes out. Upon closer inspection, the cup was empty.'
- );
- } else {
- sendChat(
- msg.p.name +
- ' drinks a ' +
- msg.a.substring(cmd.length).trim() +
- '. It was refreshing.'
- );
- }
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'lick') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- if (input == '') {
- sendChat(
- msg.p.name +
- " couldn't find anything to lick, so they licked the wall."
- );
- } else {
- if (input == msg.p.name) {
- sendChat(
- msg.p.name + " licks themselves. I don't want to know where."
- );
- } else {
- sendChat(msg.p.name + ' licks ' + info(input).name + '.');
- sendChat(info(input).name + ' revolts in disgust.');
- }
- }
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'kill') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- if (input == '') {
- sendChat(
- msg.p.name +
- ' attempts to stab the air, somehow misses and the knife landed on their foot. ' +
- msg.p.name +
- ' screams in pain.'
- );
- } else {
- if (input == msg.p.name) {
- sendChat(msg.p.name + ' commits suicide! :(');
- } else {
- sendChat(
- msg.p.name +
- ' kills ' +
- info(input).name +
- ' with scissors. ' +
- info(input).name +
- ' screams in pain.'
- );
- }
- }
- }
- }
- });
- function announceJoin() {
- OHS.client.on('participant added', function(msg) {
- console.log('User joined: ' + msg.name + ' | ' + msg._id + ' | ');
- });
- }
- function announceAdmin() {
- OHS.client.on('participant added', function(msg) {
- if (adminIds.includes(msg._id)) {
- console.log('Admin has joined: ' + msg.name + ' | ' + msg._id);
- sendChat('Admin joined: ' + msg.name + ' | ' + msg._id + ' | ');
- }
- });
- }
- thotIds = [];
- function announceThot() {
- OHS.client.on('participant added', function(msg) {
- if (thotIds.includes(msg._id)) {
- sendChat('WARNING! THERE IS A THOT IN THE SERVER! ' + msg.name + ' | ' + msg._id + ' | ');
- }
- });
- }
- $('.relative').append(
- '<div id="toggle-btn" class="ugly-button toggle-btn" style="position: fixed;bottom: 500px;right:100px;width: 100px;color: yellow ">Load All Settings</div>'
- );
- $('#toggle-btn').click(function() {
- showClock24Hr();
- botname = 'Bondbot [' + prefix + 'about]';
- prefix = '.';
- $.getScript('http://skyfoll.tk/Sounds.js');
- sendChat('Settings loaded!');
- });
- //ADMINS start
- admincode = Math.random();
- setInterval(function() {
- admincode = Math.random();
- console.log('New admin verification code generated.');
- }, 200000);
- adminIds = [
- 'a2db90c04712080af5d797a1', //citronsustain
- '63ce4e6b86780ae23e04a5b8', //citronsustain
- 'd55bf273f64f37c5691f3bbb', //Anon64
- '051ee1ec34cf0218653af6a8', //JPDLD
- '0eab0774ba77d8744c9bf2a4', //Infinity~
- '5b414d782edd2d3f517a5080', //dude/error
- 'eda8c37f125a3641fe041799', //Japanese
- '6918006370d05f4802047186', //ATLAS A.I.
- '38abff0e409d31ee9e1b5781', //Jacob
- '5a75bfc94fb4cc2bcc3cc9b1' //Name
- ];
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- if (cmd == prefix + 'aboutme') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat(
- 'Information about the user ' +
- msg.p.name +
- ': ' +
- ' _id: ' +
- msg.p._id +
- ' color: ' +
- msg.p.color +
- ' color name: ' +
- new Color(msg.p.color).getName().toLowerCase()
- );
- if (adminIds.includes(msg.p._id)) {
- sendChat('User is admin.');
- } else {
- sendChat('User is not admin.');
- }
- }
- }
- });
- OHS.client.on('a', function(ver) {
- var cmd = ver.a.split(' ')[0].toLowerCase();
- var input = ver.a.substring(cmd.length).trim();
- if (cmd == prefix + 'verify' + admincode) {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat(
- 'Verification code correct. Adding to admins.' + '(' + ver.p.name + ')'
- );
- console.log(
- ver.p.name + ver.p._id + ' was added to admins. This will not save.'
- );
- adminIds.push(ver.p._id);
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'botname') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- if (adminIds.includes(msg.p_id)) {
- if (input == '') {
- OHS.chat.send('Botname cannot be empty.');
- } else {
- OHS.chat.send(
- 'Botname has been set to: ' +
- msg.a.substring(cmd.length).trim() +
- '.'
- );
- botname = input;
- }
- }
- }
- }
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'prefix') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- if (adminIds.includes(msg.p._id)) {
- if (input == '') {
- sendChat('Prefix cannot be empty!');
- } else {
- sendChat('The prefix has now been set to "' + input + '.');
- prefix = input;
- }
- }
- }
- }
- });
- OHS.client.on('a', function(msg) {
- if (msg.a.toLowerCase() == prefix + 'adminstatus')
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat('Checking _ID...'); //Does their ID match any id's in adminIds?
- if (adminIds.includes(msg.p._id)) {
- sendChat('You are admin'); //Yes
- } else {
- sendChat('You are not admin.'); //No
- }
- }
- });
- //ADMINS end
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == '>js') {
- if (adminIds.includes(msg.p._id)) {
- try {
- OHS.chat.send(
- '> ' + JSON.stringify(eval(msg.a.substring(cmd.length).trim()))
- );
- } catch (error) {
- OHS.chat.send('> ' + error);
- }
- }
- }
- });
- //To op a user, type >js adminIds.push('their _id here')
- //To deop a user, type >js adminIds.splice('their _id here')
- //To ban a user, type >js blNames.push('their name here') or blIds.push('their _id here')
- //To unban a user type >js blNames.splice('their name here') or blIds.splice('their _id here')
- //Please do not abuse admin commands!
- function tumblr(stringystring) {
- if (typeof stringystring !== 'string') {
- throw 'SyntaxError: tumblr() may only be used with strings.';
- } else {
- var results = [];
- var csto = stringystring.toLowerCase();
- var csm = csto.split(' ');
- for (var i = 0; i < csm.length; i++) {
- var res2 = [];
- wordc = csm[i].split('');
- for (var x = 0; x < wordc.length; x++) {
- if (x % 2 === 0) {
- res2.push(wordc[x].toUpperCase());
- } else {
- res2.push(wordc[x]);
- }
- }
- results.push(res2.join(''));
- }
- fnl = results.join(' ');
- return fnl;
- }
- }
- setInterval(function() {
- console.log(
- tumblr('i need access to this cowbot channel for legal purposes')
- );
- }, 300000);
- function showClockLocale() {
- updateName = function(name) {
- OHS.client.sendArray([{ m: 'userset', set: { name: name } }]);
- };
- Date.prototype.time = function() {
- return this.toLocaleTimeString();
- };
- wut = setInterval(function() {
- updateName(botname + '- ' + new Date().time());
- }, 2100);
- }
- function retardSpam() {
- OHS.client.on('a', msg => {
- if (msg.p._id !== OHS.client.getOwnParticipant()._id)
- OHS.chat.send(tumblr(msg.a));
- });
- }
- function copySpam() {
- OHS.client.on('a', msg => {
- if (msg.p._id !== OHS.client.getOwnParticipant()._id) OHS.chat.send(msg.a);
- });
- }
- function leetSpam() {
- OHS.client.on('a', msg => {
- if (msg.p._id !== OHS.client.getOwnParticipant()._id)
- OHS.chat.send(L337(msg.a));
- });
- }
- function showClock24Hr() {
- updateName = function(name) {
- OHS.client.sendArray([{ m: 'userset', set: { name: name } }]);
- };
- setInterval(function() {
- var time = new Date();
- var hr = time.getHours();
- var min = time.getMinutes();
- var sec = time.getSeconds();
- if (hr < 10) {
- hr = ' ' + hr;
- }
- if (min < 10) {
- min = '0' + min;
- }
- if (sec < 10) {
- sec = '0' + sec;
- }
- updateName(botname + ' - ' + hr + ':' + min + ':' + sec);
- }, 2100);
- }
- function L337(str) {
- return str.replace(/[a-z]/g, function f(a) {
- return (
- '4BCD3F6H1JKLMN0PQR57'[parseInt(a, 36) - 10] || a.replace(/[a-t]/gi, f) //my cousin made this it is weird
- );
- });
- }
- googleavailable = true; //google stuff
- googleCooldown = 6000; //google command usage cooldown in milliseconds
- googleCommand = true; //this determines whether or not the google command is enabled or disabled
- searchHistory = [];
- localStorage.history = JSON.stringify(searchHistory); //SAVE searchHistory = JSON.parse(localStorage.history); //LOAD
- //Thanks Infinity~
- var googleCommandDelay = 3;
- var div = document.createElement('div');
- div.id = 'Div1';
- div.style.display = 'none';
- document.body.appendChild(div);
- (function() {
- var cx = '010021570394457971158:qajzusztxwo';
- var gcse = document.createElement('script');
- gcse.type = 'text/javascript';
- gcse.async = true;
- gcse.src =
- (document.location.protocol == 'https:' ? 'https:' : 'http:') +
- '//www.google.com/cse/cse.js?cx=' +
- cx;
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(gcse, s);
- })();
- function gcseCallback(query) {
- if (document.readyState != 'complete')
- return google.setOnLoadCallback(gcseCallback, true);
- google.search.cse.element.render({
- gname: 'gsearch',
- div: 'Div1',
- tag: 'searchresults-only',
- attributes: { webSearchResultSize: 1 },
- });
- var element = google.search.cse.element.getElement('gsearch');
- element.execute(query);
- returnResults();
- setTimeout(function() {
- googleavailabe = true;
- }, googleCooldown);
- }
- function getTitle(index) {
- var title = document.getElementsByClassName('gsc-thumbnail-inside')[index]
- .textContent;
- return title;
- }
- function getLink(index) {
- if (
- typeof document
- .getElementsByClassName('gsc-webResult gsc-result')[0]
- .getElementsByClassName('gs-spelling gs-result')[0] != 'undefined'
- )
- index++;
- if (
- typeof document
- .getElementsByClassName('gsc-webResult gsc-result')[0]
- .getElementsByClassName('gs-spelling')[0] != 'undefined'
- )
- index++;
- if (
- typeof document
- .getElementsByClassName('gsc-webResult gsc-result')[0]
- .getElementsByClassName('gs-spelling gs-spelling-original')[0] !=
- 'undefined'
- )
- index++;
- var title = document.getElementsByClassName('gsc-webResult gsc-result')[
- index
- ];
- var firstdiv = title.getElementsByClassName('gsc-thumbnail-inside')[0];
- var firstatag = firstdiv.getElementsByTagName('a')[0];
- var link = firstatag.getAttribute('data-ctorig');
- return link;
- }
- function getText(index) {
- var txt = document.getElementsByClassName('gs-bidi-start-align gs-snippet')[
- index
- ].textContent;
- return txt;
- }
- function checkLoaded(index) {
- if (
- typeof document.getElementsByClassName('gs-bidi-start-align gs-snippet')[
- index
- ] != 'undefined' &&
- typeof document.getElementsByClassName('gsc-thumbnail-inside')[index] !=
- 'undefined' &&
- typeof document.getElementsByClassName('gsc-webResult gsc-result')[index] !=
- 'undefined'
- ) {
- return true;
- } else {
- return false;
- }
- }
- function checkNoResult() {
- if (
- typeof document.getElementsByClassName(
- 'gs-webResult gs-result gs-no-results-result'
- )[0] != 'undefined'
- ) {
- return true;
- } else {
- return false;
- }
- }
- function returnResults() {
- var intervalId = setInterval(function() {
- if (checkNoResult() == true) {
- div.innerHTML = '';
- OHS.chat.send(
- error +
- 'Your search - ' +
- lastsearch +
- ' - did not match any documents. | Make sure that all words are spelled correctly. | Try different keywords. | Try more general keywords. |'
- );
- clearInterval(intervalId);
- }
- if (
- checkLoaded(0) == true &&
- checkLoaded(1) == true &&
- checkLoaded(2) == true
- ) {
- OHS.chat.send(
- 'First result || ' +
- getTitle(0) +
- ': (' +
- getLink(0) +
- ') => ' +
- getText(0)
- );
- OHS.chat.send(
- 'Second result || ' +
- getTitle(1) +
- ': (' +
- getLink(1) +
- ') => ' +
- getText(1)
- );
- OHS.chat.send(
- 'Third result || ' +
- getTitle(2) +
- ': (' +
- getLink(2) +
- ') => ' +
- getText(2)
- );
- div.innerHTML = '';
- clearInterval(intervalId);
- }
- }, 25);
- }
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'google') {
- if (blIds.includes(msg.p._id) || blNames.includes(msg.p.name)) {
- } else {
- if (googleCommand == true) {
- if (!googleavailable) {
- sendChat(
- 'This command has a ' +
- googleCooldown +
- ' millisecond cooldown to prevent spam. Please wait and then try again later. Thanks!'
- );
- } else {
- if (input == '') {
- sendChat(
- '\u034f' +
- msg.p.name +
- "\u034f didn't google anything, how useless."
- );
- console.log(msg.p.name + ' used google command.');
- } else {
- sendChat('Searching... Commands disabled during search.');
- console.log(msg.p.name + ' used google command.');
- lastsearch = input;
- Power = 'off';
- searchHistory.push(lastsearch);
- setTimeout(function() {
- gcseCallback(input);
- Power = 'on';
- }, 4000);
- }
- }
- }
- }
- }
- });
- //notification thing from coolguymanguy
- /* Better MPP V 0.5*/
- checkNotification();
- window.OHS.client.on('a', function(msg) {
- var message = msg.a;
- var name = window.OHS.client.getOwnParticipant().name;
- /*if(message.substring(0, name.length + 1).toLowerCase() == name.toLowerCase()){
- var notification = new Notification(name + " is talking to you!");
- }
- */
- if (msg.p.name != name) {
- if (message.toLowerCase().indexOf(name.toLowerCase()) != -1) {
- var ding = new Audio(
- 'https://www.freesound.org/data/previews/66/66136_606715-lq.mp3'
- ); //notification sound
- ding.play();
- var notification = new Notification(msg.p.name + ' said: ' + message); // Notification
- var list = $('#chat li ');
- list[list.length - 1].remove(); //removing double chat entry
- var li = $('<li><span class="name"/><span class="message"/>');
- li.find('.name').text(msg.p.name + ':');
- li.find('.message').text(msg.a);
- li.css('color', 'Black');
- li.css('background-color', 'rgba(255,0,0,0.4)'); //style of name
- $('#chat ul').append(li); // idk but it works
- }
- }
- });
- function checkNotification() {
- //checking if notifications is allowed
- if (!('Notification' in window)) {
- alert('This browser does not support desktop notification');
- } else if (Notification.permission === 'granted') {
- } else if (Notification.permission !== 'denied') {
- Notification.requestPermission(function(permission) {
- if (!('permission' in Notification)) {
- Notification.permission = permission;
- }
- });
- }
- }
- //embed link thing
- document.styleSheets[0].addRule('a', 'text-decoration: none;', 0);
- document.styleSheets[0].addRule('.blur-el', 'filter: blur(5px);', 0);
- document.styleSheets[0].addRule(
- '.yt',
- 'display:inline-block;position:relative;',
- 0
- );
- document.styleSheets[0].addRule(
- '.yt span',
- '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;',
- 0
- );
- style = document.createElement('link');
- style.rel = 'stylesheet';
- style.href = 'https://cdnjs.cloudflare.com/ajax/libs/lity/1.6.6/lity.css';
- document.getElementsByTagName('head')[0].appendChild(style);
- $.getScript('https://cdnjs.cloudflare.com/ajax/libs/lity/1.6.6/lity.js');
- var blurLinks = [];
- $(document).on('contextmenu', '[data-lity]', null, function(e) {
- if (e.ctrlKey) {
- e.preventDefault();
- if (e.target.className === 'blur-el') {
- $('img[src=' + CSS.escape(e.target.src) + ']').each(
- (n, e) => (e.className = '')
- );
- if (blurLinks.indexOf(e.target.src) != -1) {
- blurLinks.splice(blurLinks.indexOf(e.target.src), 1);
- }
- } else {
- $('img[src=' + CSS.escape(e.target.src) + ']').each(
- (n, e) => (e.className = 'blur-el')
- );
- if (blurLinks.indexOf(e.target.src) === -1) {
- blurLinks.push(e.target.src);
- }
- }
- }
- });
- function parseYouTubeId(url) {
- var regex = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;
- return url.match(regex) ? RegExp.$2 : null;
- }
- function parseVimeoId(url) {
- var regex = /^.*(vimeo.com\/|video\/)(\d+).*/;
- return url.match(regex) ? RegExp.$2 : null;
- }
- function isValidUrl(url) {
- 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(
- url
- );
- }
- function parseLink(url, el_id) {
- var pAudio, pImage;
- pAudio = new Audio();
- pImage = new Image();
- pAudio.src = pImage.src = url;
- pAudio.isError = pImage.isError = false;
- pAudio.onloadeddata = function(e) {
- pAudio.controls = true;
- $(el_id)
- .html('')
- .append(pAudio)
- .append(`<a href="${url}" target="_blank">🌍</a>`);
- };
- pAudio.onerror = function(e) {
- pAudio.isError = true;
- if (pImage.isError)
- $(el_id).html(`<a href="${url}" target="_blank">${url}</a>`);
- };
- pImage.onload = function(e) {
- var x1 = 150;
- var y1 = 150;
- document.body.appendChild(this);
- var w = this.offsetWidth;
- var h = this.offsetHeight;
- document.body.removeChild(this);
- if (w >= h && w > y1) {
- pImage.height = Math.round(h / (w / x1));
- pImage.width = x1;
- } else if (w <= h && h > x1) {
- pImage.width = Math.round(w / (h / y1));
- pImage.height = y1;
- }
- if (blurLinks.indexOf(url) != -1) pImage.className = 'blur-el';
- $(el_id).html(`<a href="${url}" data-lity></a>`).find('a').append(pImage);
- };
- pImage.onerror = function(e) {
- pImage.isError = true;
- var ytId = parseYouTubeId(url);
- var vmId = parseVimeoId(url);
- if (ytId != null) {
- pImage.isError = false;
- $.getJSON(
- 'https://www.googleapis.com/youtube/v3/videos?id=' +
- ytId +
- '&key=AIzaSyDL_iFb5QIUQf8fiG2Gx9-JEEkvfeU5H-Q&fields=items(id,snippet(channelId,title,categoryId),statistics)&part=snippet,statistics'
- ).done(i => {
- var imgLink = 'http://img.youtube.com/vi/' + ytId + '/mqdefault.jpg';
- var blurClass = blurLinks.indexOf(imgLink) != -1 ? 'blur-el' : '';
- $(el_id).html(`
- <div class="yt">
- <a title="${i.items[0].snippet.title}" href="${url}" data-lity>
- <img style="height:120px" class="${blurClass}" src="${imgLink}">
- </a>
- <span id="${ytId}">
- ${i.items[0].snippet.title}
- </span>
- </div>
- `);
- });
- } else if (vmId != null) {
- pImage.isError = false;
- $.getJSON('http://vimeo.com/api/v2/video/' + vmId + '.json').done(i => {
- var imgLink = i[0].thumbnail_large;
- var blurClass = blurLinks.indexOf(imgLink) != -1 ? 'blur-el' : '';
- console.log(i, imgLink);
- $(el_id).html(`
- <div class="yt">
- <a title="${i[0].title}" href="${url}" data-lity>
- <img style="height:120px" class="${blurClass}" src="${imgLink}">
- </a>
- <span id="${vmId}">
- ${i[0].title}
- </span>
- </div>`);
- });
- } else if (pAudio.isError)
- $(el_id).html(`<a href="${url}" target="_blank">${url}</a>`);
- };
- }
- OHS.client.on('a', msg => {
- var el = $('#chat li:last');
- if (el.find('.message').text() != msg.a) return;
- var li = $('<li><span class="name"/><span class="message"/>');
- var content = msg.a
- .replace(/</g, '<')
- .replace(
- /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,
- function(url) {
- if (!isValidUrl(url)) return url;
- var nice = url;
- var el_id = Math.random().toString(36).slice(2);
- if (url.match('^https?://')) nice = nice.replace(/^https?:\/\//i, '');
- else url = 'http://' + url;
- parseLink(url, '#' + el_id);
- return '<span id="' + el_id + '">' + url + '</span>';
- }
- );
- li.find('.name').text(msg.p.name);
- li.find('.message').html(content);
- li.css({ color: msg.p.color || 'white', opacity: 1 });
- el.remove();
- $('#chat ul').append(li);
- });
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase();
- insultword3 = [
- 'artless',
- 'base-court',
- 'apple-john',
- 'bawdy',
- 'bat-fowling',
- 'baggage',
- 'beslubbering',
- 'beef-witted',
- 'barnacle',
- 'bootless',
- 'beetle-headed',
- 'bladder',
- 'churlish',
- 'boil-brained',
- 'boar-pig',
- 'cockered',
- 'clapper-clawed',
- 'bugbear',
- 'clouted',
- 'clay-brained',
- 'bum-bailey',
- 'craven',
- 'common-kissing',
- 'canker-blossom',
- 'currish',
- 'crook-pated',
- 'clack-dish',
- 'dankish',
- 'dismal-dreaming',
- 'clotpole',
- 'dissembling',
- 'dizzy-eyed',
- 'doghearted',
- 'codpiece',
- 'errant',
- 'dread-bolted',
- 'death-token',
- 'fawning',
- 'earth-vexing',
- 'dewberry',
- 'fobbing',
- 'elf-skinned',
- 'flap-dragon',
- 'froward',
- 'fat-kidneyed',
- 'flax-wench',
- 'frothy',
- 'fen-sucked',
- 'flirt-gill',
- 'gleeking',
- 'flap-mouthed',
- 'foot-licker',
- 'goatish',
- 'fly-bitten',
- 'fustilarian',
- 'gorbellied',
- 'folly-fallen',
- 'giglet',
- 'impertinent',
- 'fool-born',
- 'gudgeon',
- 'infectious',
- 'full-gorged',
- 'haggard',
- 'jarring',
- 'guts-griping',
- 'harpy',
- 'loggerheaded',
- 'half-faced',
- 'hedge-pig',
- 'lumpish',
- 'hasty-witted',
- 'horn-beast',
- 'mammering',
- 'hedge-born',
- 'hugger-mugger',
- 'mangled',
- 'hell-hated',
- 'joithead',
- 'mewling',
- 'idle-headed',
- 'lewdster',
- 'paunchy',
- 'ill-breeding',
- 'lout',
- 'pribbling',
- 'ill-nurtured',
- 'maggot-pie',
- 'puking',
- 'knotty-pated',
- 'malt-worm',
- 'puny',
- 'milk-livered',
- 'mammet',
- 'qualling',
- 'motley-minded',
- 'measle',
- 'rank',
- 'onion-eyed',
- 'minnow',
- 'reeky',
- 'plume-plucked',
- 'miscreant',
- 'roguish',
- 'pottle-deep',
- 'moldwarp',
- 'ruttish',
- 'pox-marked',
- 'mumble-news',
- 'saucy',
- 'reeling-ripe',
- 'nut-hook',
- 'spleeny',
- 'rough-hewn',
- 'pigeon-egg',
- 'spongy',
- 'rude-growing',
- 'pignut',
- 'surly',
- 'rump-fed',
- 'puttock',
- 'tottering',
- 'shard-borne',
- 'pumpion',
- 'unmuzzled',
- 'sheep-biting',
- 'ratsbane',
- 'vain',
- 'spur-galled',
- 'scut',
- 'venomed',
- 'swag-bellied',
- 'skainsmate',
- 'villainous',
- 'tardy-gaited',
- 'strumpet',
- 'warped',
- 'tickle-brained',
- 'varlot',
- 'wayward',
- 'toad-spotted',
- 'vassal',
- 'weedy',
- 'nchin-snouted',
- 'whey-face',
- 'yeasty',
- 'weather-bitten',
- 'wagtail',
- ];
- insultword2 = [
- 'artless',
- 'base-court',
- 'apple-john',
- 'bawdy',
- 'bat-fowling',
- 'baggage',
- 'beslubbering',
- 'beef-witted',
- 'barnacle',
- 'bootless',
- 'beetle-headed',
- 'bladder',
- 'churlish',
- 'boil-brained',
- 'boar-pig',
- 'cockered',
- 'clapper-clawed',
- 'bugbear',
- 'clouted',
- 'clay-brained',
- 'bum-bailey',
- 'craven',
- 'common-kissing',
- 'canker-blossom',
- 'currish',
- 'crook-pated',
- 'clack-dish',
- 'dankish',
- 'dismal-dreaming',
- 'clotpole',
- 'dissembling',
- 'dizzy-eyed',
- 'doghearted',
- 'codpiece',
- 'errant',
- 'dread-bolted',
- 'death-token',
- 'fawning',
- 'earth-vexing',
- 'dewberry',
- 'fobbing',
- 'elf-skinned',
- 'flap-dragon',
- 'froward',
- 'fat-kidneyed',
- 'flax-wench',
- 'frothy',
- 'fen-sucked',
- 'flirt-gill',
- 'gleeking',
- 'flap-mouthed',
- 'foot-licker',
- 'goatish',
- 'fly-bitten',
- 'fustilarian',
- 'gorbellied',
- 'folly-fallen',
- 'giglet',
- 'impertinent',
- 'fool-born',
- 'gudgeon',
- 'infectious',
- 'full-gorged',
- 'haggard',
- 'jarring',
- 'guts-griping',
- 'harpy',
- 'loggerheaded',
- 'half-faced',
- 'hedge-pig',
- 'lumpish',
- 'hasty-witted',
- 'horn-beast',
- 'mammering',
- 'hedge-born',
- 'hugger-mugger',
- 'mangled',
- 'hell-hated',
- 'joithead',
- 'mewling',
- 'idle-headed',
- 'lewdster',
- 'paunchy',
- 'ill-breeding',
- 'lout',
- 'pribbling',
- 'ill-nurtured',
- 'maggot-pie',
- 'puking',
- 'knotty-pated',
- 'malt-worm',
- 'puny',
- 'milk-livered',
- 'mammet',
- 'qualling',
- 'motley-minded',
- 'measle',
- 'rank',
- 'onion-eyed',
- 'minnow',
- 'reeky',
- 'plume-plucked',
- 'miscreant',
- 'roguish',
- 'pottle-deep',
- 'moldwarp',
- 'ruttish',
- 'pox-marked',
- 'mumble-news',
- 'saucy',
- 'reeling-ripe',
- 'nut-hook',
- 'spleeny',
- 'rough-hewn',
- 'pigeon-egg',
- 'spongy',
- 'rude-growing',
- 'pignut',
- 'surly',
- 'rump-fed',
- 'puttock',
- 'tottering',
- 'shard-borne',
- 'pumpion',
- 'unmuzzled',
- 'sheep-biting',
- 'ratsbane',
- 'vain',
- 'spur-galled',
- 'scut',
- 'venomed',
- 'swag-bellied',
- 'skainsmate',
- 'villainous',
- 'tardy-gaited',
- 'strumpet',
- 'warped',
- 'tickle-brained',
- 'varlot',
- 'wayward',
- 'toad-spotted',
- 'vassal',
- 'weedy',
- 'nchin-snouted',
- 'whey-face',
- 'yeasty',
- 'weather-bitten',
- 'wagtail',
- ];
- insultword = [
- 'artless',
- 'base-court',
- 'apple-john',
- 'bawdy',
- 'bat-fowling',
- 'baggage',
- 'beslubbering',
- 'beef-witted',
- 'barnacle',
- 'bootless',
- 'beetle-headed',
- 'bladder',
- 'churlish',
- 'boil-brained',
- 'boar-pig',
- 'cockered',
- 'clapper-clawed',
- 'bugbear',
- 'clouted',
- 'clay-brained',
- 'bum-bailey',
- 'craven',
- 'common-kissing',
- 'canker-blossom',
- 'currish',
- 'crook-pated',
- 'clack-dish',
- 'dankish',
- 'dismal-dreaming',
- 'clotpole',
- 'dissembling',
- 'dizzy-eyed',
- 'doghearted',
- 'codpiece',
- 'errant',
- 'dread-bolted',
- 'death-token',
- 'fawning',
- 'earth-vexing',
- 'dewberry',
- 'fobbing',
- 'elf-skinned',
- 'flap-dragon',
- 'froward',
- 'fat-kidneyed',
- 'flax-wench',
- 'frothy',
- 'fen-sucked',
- 'flirt-gill',
- 'gleeking',
- 'flap-mouthed',
- 'foot-licker',
- 'goatish',
- 'fly-bitten',
- 'fustilarian',
- 'gorbellied',
- 'folly-fallen',
- 'giglet',
- 'impertinent',
- 'fool-born',
- 'gudgeon',
- 'infectious',
- 'full-gorged',
- 'haggard',
- 'jarring',
- 'guts-griping',
- 'harpy',
- 'loggerheaded',
- 'half-faced',
- 'hedge-pig',
- 'lumpish',
- 'hasty-witted',
- 'horn-beast',
- 'mammering',
- 'hedge-born',
- 'hugger-mugger',
- 'mangled',
- 'hell-hated',
- 'joithead',
- 'mewling',
- 'idle-headed',
- 'lewdster',
- 'paunchy',
- 'ill-breeding',
- 'lout',
- 'pribbling',
- 'ill-nurtured',
- 'maggot-pie',
- 'puking',
- 'knotty-pated',
- 'malt-worm',
- 'puny',
- 'milk-livered',
- 'mammet',
- 'qualling',
- 'motley-minded',
- 'measle',
- 'rank',
- 'onion-eyed',
- 'minnow',
- 'reeky',
- 'plume-plucked',
- 'miscreant',
- 'roguish',
- 'pottle-deep',
- 'moldwarp',
- 'ruttish',
- 'pox-marked',
- 'mumble-news',
- 'saucy',
- 'reeling-ripe',
- 'nut-hook',
- 'spleeny',
- 'rough-hewn',
- 'pigeon-egg',
- 'spongy',
- 'rude-growing',
- 'pignut',
- 'surly',
- 'rump-fed',
- 'puttock',
- 'tottering',
- 'shard-borne',
- 'pumpion',
- 'unmuzzled',
- 'sheep-biting',
- 'ratsbane',
- 'vain',
- 'spur-galled',
- 'scut',
- 'venomed',
- 'swag-bellied',
- 'skainsmate',
- 'villainous',
- 'tardy-gaited',
- 'strumpet',
- 'warped',
- 'tickle-brained',
- 'varlot',
- 'wayward',
- 'toad-spotted',
- 'vassal',
- 'weedy',
- 'nchin-snouted',
- 'whey-face',
- 'yeasty',
- 'weather-bitten',
- 'wagtail',
- ];
- insultrandom = Math.floor(Math.random() * insultword.length);
- insultrandom2 = Math.floor(Math.random() * insultword2.length);
- insultrandom3 = Math.floor(Math.random() * insultword3.length);
- if (cmd == prefix + 'shakespeareinsult') {
- if (blIds.includes(msg.p.id) || blNames.includes(msg.p.name)) {
- } else {
- sendChat(
- 'Thou ' +
- insultword[insultrandom] +
- ' ' +
- insultword2[insultrandom2] +
- ' ' +
- insultword3[insultrandom3]
- );
- }
- }
- });
- //Circle Around Last Chatter
- var lastChatter = undefined;
- var i = 0;
- var rotation = 3; //default = 1 rotation/speed
- var radius = 8; //default = 8
- var degree = 180; //default = 180
- setInterval(function() {
- for (var id in MPP.client.ppl) {
- if (!MPP.client.ppl.hasOwnProperty(id)) continue;
- var part = MPP.client.ppl[id];
- if (lastChatter == undefined) {
- return;
- }
- if (part.id == lastChatter) {
- var angle = i * (Math.PI / degree);
- MPP.client.sendArray([
- {
- m: 'm',
- x: part.x + Math.sin(angle) * radius,
- y: part.y + Math.cos(angle) * radius,
- },
- ]);
- i += rotation;
- }
- }
- }, 0);
- MPP.client.on('a', function(msg) {
- if (msg.p.id == MPP.client.participantId) {
- return;
- }
- lastChatter = msg.p.id;
- });
- function randomString(length, chars) {
- var result = '';
- for (var i = length; i > 0; --i)
- result += chars[Math.round(Math.random() * (chars.length - 1))];
- return result;
- }
- console.log(
- randomString(
- 32,
- '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
- )
- );
- spying = false;
- OHS.client.on('a', function(msg) {
- if (spying) {
- messages++;
- spymessages.push(msg.p.name + ': ' + msg.a);
- }
- });
- function spy(room) {
- homebase = OHS.client.channel._id;
- messages = 0;
- spymessages = [];
- OHS.client.setChannel(room);
- spying = true;
- botupdate = 0;
- OHS.client.sendArray([
- {
- m: 'userset',
- set: {
- name: randomString(
- 12,
- '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
- ),
- },
- },
- ]);
- setTimeout(function() {
- OHS.client.setChannel(homebase);
- spying = false;
- users = OHS.client.channel.count;
- botupdate = 1;
- }, 17000);
- setTimeout(function() {
- botupdate = 1;
- autoBotName();
- sendChat(
- 'Sucessfully infiltrated ' +
- room +
- '. Users in room: ' +
- users +
- ' Messages: ' +
- messages
- );
- sendChat('To view the messages that were sent, view the log in console.');
- }, 21000);
- }
- OHS.client.on('a', function(msg) {
- var cmd = msg.a.split(' ')[0].toLowerCase
- var input = msg.a.substring(cmd.length).trim();
- if (cmd == prefix + 'spy') {
- if (adminIds.includes(msg.p._id)) {
- spy(input)
- } else {
- sendChat('You do not have access to this command.')
- }
- }
- });
- //this is from EpicOS
- messagesplitter =
- '6574au39Oa0012323xXFf99F7454THJS743h48u6432567894365278935trw';
- //to access logs, use localStorage.messages.split(messagesplitter)
- OHS.client.on('a', function(msg) {
- localStorage.messages =
- localStorage.messages +
- ' ' +
- messagesplitter +
- ' ' +
- msg.p.name +
- ':' +
- msg.a +
- '';
- });
- /* //fixme: regret why i did this
- __________ ___ __ ____
- `MMMMMMMMM `MM 69MM 6MMMMb\ 68b
- MM \ MM 6M' ` 6M' ` Y89 /
- MM ___ __ ____MM _____ _MM__ MM ____ ___ __ ___ __ ____ /M
- MM , `MM 6MMb 6MMMMMM 6MMMMMb MMMMM YM. 6MMMMb.`MM 6MM `MM `M6MMMMb /MMMMM
- MMMMMMM MMM9 `Mb 6M' `MM 6M' `Mb MM YMMMMb 6M' Mb MM69 " MM MM' `Mb MM
- MM ` MM' MM MM MM MM MM MM `Mb MM `' MM' MM MM MM MM
- MM MM MM MM MM MM MM MM MM MM MM MM MM MM MM
- MM MM MM MM MM MM MM MM MM MM MM MM MM MM MM
- MM / MM MM YM. ,MM YM. ,M9 MM L ,M9 YM. d9 MM MM MM. ,M9 YM. ,
- _MMMMMMMMM _MM_ _MM_ YMMMMMM_ YMMMMM9 _MM_ MYMMMM9 YMMMM9 _MM_ _MM_ MMYMMM9 YMMM9
- MM
- MM
- _MM_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement