Apps Home
|
My Uploads
|
Create an App
efx room settings
Author:
specialefx
Description
Source Code
Launch App
Current Users
Created by:
Specialefx
App Images
// Variables // estimohn1 devil icon :devil3 var backgroundImage = '99935ba1-09cc-4729-b8c3-76063406ef31'; var tipsReceived = 0; var highestTipReceived = 0; var highestTipReceivedText = '0'; var highestTipUser = ''; var lastTipReceived = 0; var lastTipUser = ''; var fontSize = 11; var fontWeight = 'bold'; var roomColours = {white: '#FFFFFF', black: '#000000', gold: '#FFD700', goldLight: '#FFF3AE', orange: '#DC5500', orangeLight: '#FFCBAC', blue: '#00D2FF', blueLight: '#B3F2FF', red: '#FF2D00', redLight : '#FFBEAF', pink: '#FF00D2', pinkLight : '#FFB1F1' } // Chaturbate functions cb.settings_choices = [ {name:'tipsGoal', type:'int', minValue:1, maxValue:3500, defaultValue: 3500, label:'Tokens to reach the goal'}, {name:'roomDescription', type:'str', minLength: 1, maxLength: 255, defaultValue:'#18 #student #blonde #ass #tits #private_is_open', label:'Room Subject'}, {name:'goalDescription', type:'str', minLength: 1, maxLength: 255, defaultValue:'Cum Show ', label:'Goal description'}, {name:'modelImage', type:'str', minLength:5, maxLength:255, defaultValue:':iet-titi', label:'Model Icon'}, {name:'modImage', type:'str', minLength:5, maxLength:255, defaultValue:':iet-sylvester', label:'Mod Icon'}, {name:'highestTipperImage', type:'str', minLength:5, maxLength:255, defaultValue:':pixelheart', label:'Highest Tipper Icon'}, {name: 'tipAmount', type: 'int', minValue: 1, defaultValue: 25, label: 'Minimum tokens required for a thank you message'}, {name: 'thankYouMsg', type: 'str', minLength: 8, maxLength: 128, defaultValue: ':pixelheart Thank you [tipper] for your tip :pixelheart', label: "Tip thank you message, [tipper] = tipper's name"} ]; cb.onDrawPanel(function(user) { return { "template": "image_template", "layers": [ {'type': 'image', 'fileID': backgroundImage}, ], }; }); cb.onTip(function(tip) { tipsReceived += tip['amount'] if (tipsReceived > cb.settings.tipsGoal) { tipsReceived = cb.settings.tipsGoal; } lastTipReceived = tip['amount'] + ' - '; lastTipUser = tip['from_user']; if (tip['amount'] > highestTipReceived) { highestTipReceived = tip['amount']; highestTipReceivedText = tip['amount'] + ' - '; highestTipUser = tip['from_user']; } cb.drawPanel(); if (parseInt(tip['amount']) >= cb.settings.tipAmount) { thankYouMsg = cb.settings.thankYouMsg; thankYouMsg = thankYouMsg.replace("[tipper]", lastTipUser); cb.sendNotice(thankYouMsg, '', roomColours.blueLight, roomColours.blue, 'bold'); } update_subject(); }); cb.onMessage(function (msg) { if (msg['is_mod']) { msg['background'] = roomColours.redLight; msg['c'] = roomColours.red; msg['m'] = cb.settings.modImage + " " + msg['m']; } if (msg['user'] == cb.room_slug) { msg['background'] = roomColours.orangeLight; msg['c'] = roomColours.orange; msg['m'] = cb.settings.modelImage + " " + msg['m']; } if (msg['user'] == highestTipUser) { msg['background'] = roomColours.gold; msg['c'] = roomColours.black; msg['m'] = cb.settings.highestTipperImage + " " + msg['m']; } return msg; }); // App functions function init() { cb.drawPanel(); update_subject(); } function output(message) { cb.sendNotice(message); } function update_subject() { if (tips_remaining() == 0) { if (subjectIsSetWith0) { return; } subjectIsSetWith0 = true; } else { subjectIsSetWith0 = false; } var newSsubject = cb.settings.roomDescription + " : " + cb.settings.goalDescription + " [" + tips_remaining() + " tokens remaining]"; cb.log("Changing subject to: " + newSsubject); cb.changeRoomSubject(newSsubject); } function tips_remaining() { var result = cb.settings.tipsGoal - tipsReceived; if (result < 0) { return 0; } else { return result; } } init();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.