Bots Home
|
Create an App
Entering Gender
Author:
uk_dave_43_app
Description
Source Code
Launch Bot
Current Users
Created by:
Uk_Dave_43_App
//************************************************************* // // Title: Entering Gender // Author: UK_Dave_43 // Description: Bot that displays the gender of viewers // entering and leaving the room. // // Version 1.0 // //************************************************************* function mk_gender_msg(gender) { var GenderMsg = ""; switch (gender) { case 'm': GenderMsg = 'Male user '; break; case 'f': GenderMsg = 'Female user '; break; case 's': GenderMsg = 'Trans user '; break; case 'c': GenderMsg = 'Couple '; break; default: GenderMsg = 'Unkown user '; break; } return GenderMsg; } function get_gender_text_colour(gender) { switch (gender) { case 'f': return "#E74C3C"; case 'c': return "#8E44AD"; case 'm': return "#3498DB"; default: return "#2ECC71"; } } function get_text_weight(solvent) { if (solvent = "True") { return "bold"; } else { return "normal"; } } cb.onEnter(function(user) { var gender = user['gender']; var solvent = user['has tokens']; var GenderMsg = mk_gender_msg(gender); var TextColour = get_gender_text_colour(gender); var TxtWeight = get_text_weight(solvent); cb.chatNotice(GenderMsg+user['user'] + ' entered!', cb.room_slug, TextColour,' ',TxtWeight); }); cb.onLeave(function(user) { var gender = user['gender']; var GenderMsg = mk_gender_msg(gender); var TextColour = get_gender_text_colour(gender); var isWorthy = is_worthy(gender); cb.chatNotice(GenderMsg+user['user'] + ' left!', cb.room_slug, TextColour); });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.