Bots Home
|
Create an App
Age Range
Author:
justdevelop
Description
Source Code
Launch Bot
Current Users
Created by:
Justdevelop
//Written by Justooking var minAge = cb.settings["minAge"]; var maxAge = cb.settings["maxAge"]; var favoritesList = cb.settings["favorites"]; var blockedNames = []; cb.settings_choices = [ {name: 'minAge', type: 'int', minValue: 18, default: 18}, {name: 'maxAge', type: 'int', minValue: 18, default: 30}, {name: 'favorites', type: 'str', minLength: 1, maxLength: 255, defaultValue:"justooking,",required:false, label:"Fav Users: Separate with a comma."} ]; cb.onEnter(function(user) { if (!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), user['user'])) { cb.chatNotice("Hello, " +user['user']+ ".Welcome to " +cb.room_slug+"'s cam. Please answer the following question to see the cam. All viewers regardless of token status must answer this question to see cam.", user['user'], '#fcb2bf', '#000000', 'bold'); } else if (cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), user['user'])) { cb.chatNotice("Welcome back, " +user['user']+ ". Glad to have you back in " +cb.room_slug+"'s Have fun!", user['user'], '#fcb2bf', '#000000', 'bold'); } /*if(cbjs.arrayContains(blockedNames,user['user']){ cb.chatNotice("Hello, " +user['user']+ ". Your age does not match the age range preferred, please look for another room. " +cb.room_slug+"'s cam.", user['user'], '#fcb2bf', '#000000', 'bold'); //msg['X-Spam'] = true; }*/ }); cb.onMessage(function(msg) { var incomingMessage = msg['m'].split(" "); if (incomingMessage[0] == '/add') { cb.chatNotice("The Name to add is: "+ incomingMessage[1]); cb.limitCam_addUsers([incomingMessage[1]]); msg['X-Spam'] = true; } if (!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), msg['user'])) { var age = msg['m']; cb.chatNotice("Please type your age, this user has a preferred age range. If you age matches, then the cam will be visible.",'', '#1651a6', '#FFF', 'bold'); msg['X-Spam'] = true; if (age >= minAge && age <= maxAge){ cb.limitCam_addUsers([msg['user']]); cb.chatNotice("Hello, " +msg['user']+ ". Your age matches the age range. " +cb.room_slug+"'s cam.", msg['user'], '#fcb2bf', '#000000', 'bold'); msg['X-Spam'] = true; } else { cb.chatNotice("Hello, " +msg['user']+ ". Your age does not match the age range preferred, please look for another room. " +cb.room_slug+"'s cam.", msg['user'], '#fcb2bf', '#000000', 'bold'); cb.chatNotice("UserNotice: " +msg['user']+ ".Didn't match your age range. They have been added to your blocked list", msg['user'], '#fcb2bf', '#000000', 'bold','orange'); blockedNames.push(msg['user']); msg['X-Spam'] = true; } } if (cbjs.arrayContains(blockedNames,msg['user'])){ cb.chatNotice("Hello, " +msg['user']+ ". Your age does not match the age range preferred, please look for another room.Your Message is blocked from being sent. Thanks." +cb.room_slug+"'s cam.", msg['user'], '#fcb2bf', '#000000', 'bold'); msg['X-Spam'] = true; } return msg; }); function loadFavorites(){ var favs = favoritesList.split(","); for(var i = 0; i < favs.length;i++){ cb.chatNotice("The Name to add is: "+ favs[1]); cb.limitCam_addUsers([favs[1]]); } } function init() { cb.limitCam_start("Can't see Cam? Please Answer the Question asked!"); cb.chatNotice("Now blocking anonymous viewers, and anyone outside the age range. Before you can see the cam, we ask to please type in your age.", '', '#d22b09', '#FFF', 'bold'); //loadFavorites(); cb.limitCam_addUsers(['justooking']); } init();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.