Bots Home
|
Create an App
ffff
Author:
funky_test
Description
Source Code
Launch Bot
Current Users
Created by:
Funky_Test
cb.settings_choices = [ {name: 'user1', label: 'User1(Usage: username/title)', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user2', label: 'User2', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user3', label: 'User3', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user4', label: 'User4', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user5', label: 'User5', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user6', label: 'User6', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user7', label: 'User7', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user8', label: 'User8', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user9', label: 'User9', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user10', label: 'User10', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user11', label: 'User11', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user12', label: 'User12', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user13', label: 'User13', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user14', label: 'User14', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user15', label: 'User15', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user16', label: 'User16', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user17', label: 'User17', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user18', label: 'User18', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user19', label: 'User19', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user20', label: 'User20', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, /* {name: 'user1', label: 'User1', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title1', label: 'Title1', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user2', label: 'User2', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title2', label: 'Title2', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user3', label: 'User3', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title3', label: 'Title3', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user4', label: 'User4', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title4', label: 'Title4', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user5', label: 'User5', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title5', label: 'Title5', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user6', label: 'User6', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title6', label: 'Title6', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user7', label: 'User7', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title7', label: 'Title7', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user8', label: 'User8', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title8', label: 'Title8', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user9', label: 'User9', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title9', label: 'Title9', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user10', label: 'User10', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title10', label: 'Title10', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user11', label: 'User11', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title13', label: 'Title11', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user12', label: 'User12', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title12', label: 'Title12', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user13', label: 'User13', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title13', label: 'Title13', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user14', label: 'User14', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title14', label: 'Title14', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user15', label: 'User15', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title15', label: 'Title15', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user16', label: 'User16', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title16', label: 'Title16', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user17', label: 'User17', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title17', label: 'Title17', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user18', label: 'User18', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title18', label: 'Title18', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user19', label: 'User19', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title19', label: 'Title19', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'user20', label: 'User20', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, {name: 'title20', label: 'Title20', type: 'str', minLength: 0, maxLength: 256, defaultValue: '', required: false}, */ ] var coolArray = new Array; var numPeople = 20; function pupulateCoolArray() { for(var i = 1; i <= numPeople; i++) { var userStr = cb.settings['user'+(i)] + ''; if(userStr != "") { var userArray = userStr.split('/'); if(userArray) { coolArray.push(userArray[0]); coolArray.push(userArray[1]); } } } /* for(var i = 1; i <= numPeople; i++) { var userStr = cb.settings['user'+(i)]; var titleStr = cb.settings['title'+(i)]; if(userStr != "" && titleStr != "") { coolArray.push(userStr); coolArray.push(titleStr); } }*/ } function isCool(user) { for(var i = 0; i < coolArray.length; i+=2) { if(coolArray[i] == user) { return true; } } return false; } function setTitles(user, message) { var msg = ""; for(var i = 0; i < coolArray.length; i+=2) { //Add title to users if(coolArray[i] == user) { msg = coolArray[i+1]; } } msg = msg + ' ' + message; return msg; } cb.onMessage(function (msg) { //Add title if(isCool(msg['user'])) { msg['m'] = setTitles(msg['user'],msg['m']); } return msg; }); pupulateCoolArray();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.