Bots Home
|
Create an App
rumatahello
Author:
rumataestor3
Description
Source Code
Launch Bot
Current Users
Created by:
Rumataestor3
var hello_mess = ['Howdy','Hi','Hello','Welcome','Glad to see you','Great to see you','Nice to see you']; var danger = '#cc0000'; var warning = '#ff8800'; var success = '#007e33'; var info = '#0099cc'; var defcolor = '#2bbbad'; var primary = '#4285f4'; var secondary = '#aa66cc'; //var userCount = 0; cb.settings_choices = [ {name:'is_working', type:'choice', label: 'I am working', choice1:'no', choice2:'yes', defaultValue:'no'}, ]; //------------------ВХОД------------------ cb.onEnter(function(user) { var i = Math.floor(Math.random() * hello_mess.length); cb.sendNotice('', user['user'], '', '#ffffff', ''); cb.sendNotice(hello_mess[i] + ' ' + uppercase(user['user']) + '!\nDon\'t be shy, say hi, I don\'t bite :)\n:ru-hi', user['user'], '', success, 'bold'); cb.sendNotice('', user['user'], '', '#ffffff', ''); setTimeout(() => { cb.sendNotice('', user['user'], '', '#ffffff', ''); cb.sendNotice('There is important information in my bio, read it, please!', user['user'], '', danger, 'bold'); cb.sendNotice('', user['user'], '', '#ffffff', ''); }, 2000); if (cb.settings['is_working'] == 'yes') { setTimeout(() => { cb.sendNotice('I\'m working on my computer and the chat window is closed.\nPlease wait when I get back or tip 1 tk to get my attention!\nI\'ll take a break for you :)', user['user'], '', warning, 'bold'); }, 5000); } setTimeout(() => { cb.sendNotice(uppercase(user['user']) + ', how are you?', user['user'], '', '', ''); }, 7000); }); //------------------ВЫХОД------------------ cb.onLeave(function(user) { Data = new Date(); if (user['user'] == cb.room_slug) { cb.sendNotice('', '', '', '#ffffff', ''); // cb.sendNotice('I can\'t go on. Sorry :-( Read the disclaimer in my bio.', '', '', danger, 'bold'); cb.sendNotice('Thank you all! Love you! See you soon and follow me!', '', '', danger, 'bold'); cb.sendNotice(':rumatafollow', '', '', '#ffffff', ''); cb.sendNotice('', '', '', '#ffffff', ''); } else { } }); /* cb.onMessage(function (msg) { if (msg['user'] == cb.room_slug) { msg['c'] = '#dc5500'; } return msg; }); */ cb.onMessage(function (msg) { msg['X-Spam'] = true; q = change(msg); msg['m'] = q; msg['X-Spam'] = false; return msg; }); //------------------ФУНКЦИИ------------------ // Информация о юзере function userinfo(user) { if (user['tipped_alot_recently']) { var rec = 'recently'; } else { var rec = 'not recently'; } return rec; } // Первая буква в имени function uppercase(user) { return user[0].toUpperCase() + user.substring(1); } // Сокращения function change (text) { var res; switch (text['m']) { case '/help': case '/h': printHelp (); break; case '/ty': res = 'Thank you!'; break; case '/brb': res = 'Short break. Be right back.'; break; case '/hru': res = 'How are you?'; break; case '/wruf': res = 'Where are you from?'; break; case '/u': res = 'And you? What about you?'; break; case '/wrul': res = 'What are you looking for?'; break; case '/omg': res = 'Oh my gosh!'; break; } return res; } function printHelp () { cb.sendNotice('/ty - Thank you! :ru-tx', cb.room_slug, '', info, ''); cb.sendNotice('/brb - Short break. Be right back.', cb.room_slug, '', info, ''); cb.sendNotice('/hru - How are you?', cb.room_slug, '', info, ''); cb.sendNotice('/wruf - Where are you from?', cb.room_slug, '', info, ''); cb.sendNotice('/u - And you? What about you?', cb.room_slug, '', info, ''); cb.sendNotice('/wrul - What are you looking for in CB?', cb.room_slug, '', info, ''); cb.sendNotice('/omg - Oh my gosh!', cb.room_slug, '', info, ''); }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.