Apps Home
|
My Uploads
|
Create an App
JXtestbed
Author:
jimxtreme
Description
Source Code
Launch App
Current Users
Created by:
Jimxtreme
App Images
//App: JimXtreme AIO //Version: 1.0 //Author: JimXtreme //Contact: jimxtreme@quaint.com.mx var backgroundImage = 'ce2b97ad-c30b-4fa0-a38e-c17b1b8384e2'; 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: '#81DAF5', red: '#FF2D00', redLight : '#FFBEAF', pink: '#FF00D2', pinkLight : '#FFB1F1',greenLight : '#2EFE2E' } cb.onDrawPanel(function(user) { return { "template": "image_template", "layers": [ {'type': 'image', 'fileID': backgroundImage}, { 'type': 'text', 'text': 'TIPS RECEIVED', 'top': 5, 'left': 5, 'font-size': fontSize, 'font-weight': fontWeight, 'color': roomColours.greenLight, }, { 'type': 'text', 'text': 'HIGHEST TIP', 'top': 29, 'left': 73, 'font-size': fontSize, 'font-weight': fontWeight, 'color': roomColours.greenLight, }, { 'type': 'text', 'text': 'LATEST TIP RECEIVED', 'top': 52, 'left': 28, 'font-size': fontSize, 'font-weight': fontWeight, 'color': roomColours.greenLight, }, { 'type': 'text', 'text': tipsReceived, 'top': 5, 'left': 100, 'font-size': fontSize, 'font-weight': fontWeight, 'color': 'white', }, { 'type': 'text', 'text': highestTipReceivedText + highestTipUser, 'top': 29, 'left': 147, 'font-size': fontSize, 'font-weight': fontWeight, 'color': 'white', }, { 'type': 'text', 'text': lastTipReceived + lastTipUser, 'top': 51, 'left': 147, 'font-size': fontSize, 'font-weight': fontWeight, 'color': 'white', }, ], }; }); 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.blue, roomColours.black, '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.greenLight; msg['c'] = roomColours.white; 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; }); 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.