Apps Home
|
Create an App
Old_free_menu
Author:
geohydro99
Description
Source Code
Launch App
Current Users
Created by:
Geohydro99
cb.settings_choices = [ {name:'lbdelay', type:'int', minValue:1, maxValue:999, label:'Send Leader Board Delay in Minutes', defaultValue:1}, {name:'lbamount', type:'int', minValue:1, maxValue:999, label:'How many users do you want to display in leaderboard', defaultValue:3}, {name:'lbbg', type:'str', label:'Leader Board Background Color', defaultValue:'#ffccff'}, {name:'lbtxtclr', type:'str', label:'Leader Board Text Color', defaultValue:'#ff66cc'} ]; let myArray = []; cb.onTip(tip => { var tippers = {name: tip.from_user, amount: tip.amount, sendmsg:0, sendmsg2:0}; var userExist = false; for (let i=0; i < myArray.length; i++) { if (myArray[i].name == tip.from_user){ myArray[i].amount += tip.amount; userExist = true; break; } } if (!userExist) { myArray.push(tippers); } }); function advertiseBot() { cb.sendNotice("I have created a new All in One Bot. It is called 'All in One 2022' and i strongly recommend this bot. It has a bunch of features, it's all my previous bots merged in to 1 bot\nLink: https://www.freesexcam.ca/app/startup/all-in-one-2022/?version=&slot=2", cb.room_slug, "#F00", "#FFF", 'bold') } cb.setTimeout(advertiseBot, 10000) function leaderboard() { var msg = "\u2022 \u2022 \u2022 Leader Board \u2022 \u2022 \u2022\n"; myArray.sort(function (a, b) { return b.amount - a.amount; }); if (myArray === undefined || myArray.length == 0) { msg += "No tippers yet"; }else{ for(let i = 0; i < myArray.length; i++) { if(i < cb.settings.lbamount) { msg += (i+1)+". "+myArray[i].name+" ("+myArray[i].amount+" tokens)\n"; } } } cb.sendNotice(msg, '', cb.settings.lbbg, cb.settings.lbtxtclr, 'bold'); cb.setTimeout(leaderboard, cb.settings.lbdelay*60000); } cb.setTimeout(leaderboard, cb.settings.lbdelay*60000);
© Copyright Freesexcam 2011- 2024. All Rights Reserved.