Bots Home
|
Create an App
annesRmB03
Author:
annabanana02
Description
Source Code
Launch Bot
Current Users
Created by:
Annabanana02
// Bot var tipperList = []; var currentLoverTip = 0; var currentLover = ''; var annesLoverTip = cb.settings.annesLoverTip; var loveTimer = 0; var heroTimer = 0; var rmNoticesTimer = 0; var annesHeroesFG; var annesLoverFG; var rmNoticesFG; cb.settings_choices = [{ name: 'annesHeroes', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes', label: 'Do you want to use the heroes feature?' }, { name: 'annesLover', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes', label: 'Do you want to use the lover feature?' }, { name: 'annesLoverTip', type: 'int', minValue: 1, maxValue: 10000, defaultValue: 111, label: 'How many tokens to be your lover?' }, { name: 'roomNotices', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes', label: 'Do you want notices turned on?' }]; cb.onEnter(function(user) { if (user['has_tokens'] && user['user'] != cb.room_slug) { cb.chatNotice( 'Hi ' + user['user'] + '! My name is Anne, Welcome to my room!! I am ' + 'from exotic Jungle Island and am sure your going to love my show so feel ' + 'free to chat and TIP if you like me!! hehe. The more fun we have the hotter ' + 'the show!!!', user['user'], '#ccff66', '', 'bold', ''); } }); cb.onTip(function(tip) { var login = tip['from_user']; var amt = tip['amount']; if (amt >= 5 && login != currentLover) { tipNotice(login, amt) } addTipper(login, amt) }); function tipNotice(login, amt) { if (numRange(amt, 5, 24)) { cb.chatNotice('Thank you ' + login + ' for your tip', '', '#00cccc', '', '', '') } else if (numRange(amt, 25, 99)) { cb.chatNotice('Thank you very much ' + login + ' for your tip!', '', '#6699cc', '', 'bold', '') } else { cb.chatNotice('Thank you so much ' + login + ' for your great tip!', '', '#66cccc', '', 'bolder', '') }; }; function numRange(amt, min, max) { return amt >= min && amt <= max; }; function addTipper(login, amt) { function user(login, amt) { this.login = login; this.amt = amt; this.has_tokens = true; }; var user = new user(login, amt); outer: if (tipperList.length > 0) { for (var i = 0; i < tipperList.length; i++) { if (tipperList[i].login == user.login) { tipperList[i].amt += user.amt; break outer; }; } tipperList.push(user); }; if (tipperList.length == 0) { tipperList.push(user) }; tipperList.sort(function (a, b) { if (a.amt > b.amt) { return -1; } if (a.amt < b.amt) { return 1; } return 0 }); if (annesLoverFG == 'Yes') { annesLover(login, amt) }; }; cb.onMessage(function(msg) { if (!msg['has_tokens']) { var txt = msg.m; var findx = /:\b|[A-Z]{2,}|(.)\1{2}|bitch|slut|whore|asshole|cunt|feet|bobs/; if (findx.test(txt)) { msg['X-Spam'] = true; } } }); function heroListDisplay() { var tl = tipperList.length; var minHeroTip = 10; if (annesHeroesFG == 'Yes') { if (tl == 0) { cb.chatNotice('Annes Heroes', '', '#999933', '', 'bolder', ''); cb.chatNotice('Tip to Be my Hero', '', '#9999ff', '', 'bold', ''); cb.chatNotice('Tip to Be my Hero', '', '#66ccff', '', 'bold', ''); cb.chatNotice('Tip to Be my Hero', '', '#66ffcc', '', 'bold', ''); } if (tl == 1 && tipperList[0].amt >= minHeroTip) { cb.chatNotice('Annes Heroes', '', '#999933', '', 'bolder', ''); cb.chatNotice(tipperList[0].login + ' : ' + tipperList[0].amt, '', '#9999ff', '', 'bold', ''); cb.chatNotice('Tip to Be my Hero', '', '#66ccff', '', 'bold', ''); cb.chatNotice('Tip to Be my Hero', '', '#66ffcc', '', 'bold', ''); } if (tl == 2 && tipperList[1].amt >= minHeroTip) { cb.chatNotice('Annes Heroes', '', '#999933', '', 'bolder', ''); cb.chatNotice(tipperList[0].login + ' : ' + tipperList[0].amt, '', '#9999ff', '', 'bold', ''); cb.chatNotice(tipperList[1].login + ' : ' + tipperList[1].amt, '', '#66ccff', '', 'bold', ''); cb.chatNotice('Tip to Be my Hero', '', '#66ffcc', '', 'bold', ''); } if (tl >= 3 && tipperList[2].amt >= minHeroTip) { cb.chatNotice('Annes Heroes', '', '#999933', '', 'bolder', ''); cb.chatNotice(tipperList[0].login + ' : ' + tipperList[0].amt, '', '#9999ff', '', 'bold', ''); cb.chatNotice(tipperList[1].login + ' : ' + tipperList[1].amt, '', '#66ccff', '', 'bold', ''); cb.chatNotice(tipperList[2].login + ' : ' + tipperList[2].amt, '', '#66ffcc', '', 'bold', ''); } }; heroTimer = cb.setTimeout(heroListDisplay, 45000) }; function annesLover(login, amt) { if (amt >= annesLoverTip || login == currentLover) { if (login == currentLover) { currentLoverTip += amt; cb.chatNotice('Thank you My Love!', '', '#ff9999', '', 'bolder', ''); }; if (amt > currentLoverTip && login != currentLover) { currentLover = login; currentLoverTip = amt; cb.chatNotice(login + ' is my New lover!', '', '#ff9999', '', 'bolder', ''); }; } }; function loverNotices() { if (currentLover == '') { cb.chatNotice(annesLoverTip + ' tokens to be My Lover', '', '#ff9999', '', 'bold', '') } else { cb.chatNotice((currentLoverTip + 1) + ' tokens to be My New Lover', '', '#ff9999', '', 'bold', '') }; loveTimer = cb.setTimeout(loverNotices, 65000) }; var rmIndex = 0; function rmNotices() { var rmNoticeList = []; rmNoticeList[0] = 'Be Nice Please!'; rmNoticeList[1] = 'Tip if you like me'; rmNoticeList[2] = 'Thank you for choosing my room'; rmNoticeList[3] = 'Tip for Requests please, No Demands!'; rmNoticeList[4] = 'Thank you tippers!'; cb.chatNotice(rmNoticeList[rmIndex], '', '#ccff33', '', 'bold', ''); rmIndex++; if (rmIndex == 5) { rmIndex = 0; } rmNoticesTimer = cb.setTimeout(rmNotices, 25000); }; function init() { annesLoverFG = cb.settings.annesLover; if (annesLoverFG == 'Yes' && loveTimer == 0) { loverNotices(); }; rmNoticesFG = cb.settings.roomNotices; if (rmNoticesFG == 'Yes' && rmNoticesTimer == 0) { rmNotices(); }; annesHeroesFG = cb.settings.annesHeroes; if (annesHeroesFG == 'Yes' && heroTimer == 0) { heroListDisplay(); }; }; init()
© Copyright Chaturbate 2011- 2024. All Rights Reserved.