Bots Home
|
Create an App
SammyTipMenu
Author:
bk77777
Description
Source Code
Launch Bot
Current Users
Created by:
Bk77777
/* Title: "SammyTipMenu" Author: bryan4547 Original Author: badbadbudda Version: 1.0.0 (11/18/2016) */ var HEART = '\u2665'; // ♥ var BDIAMOND = '\u2666'; // ♦ var BSTAR = '\u2605'; // ★ var tip_amt = 0; var separator_char = "| "; var msg; var MAXITEMS = 20; var tipmenuprice = []; var tipmenuitem = []; var MAXSEP = 9; separators = [ { label: 'Hearts', shortcut: ':heart2' }, { label: 'Glitter', shortcut: ':pixelglitter' }, { label: 'Flowers', shortcut: ':tinyflower2' }, { label: 'Bow', shortcut: ':bluebow' }, { label: 'Hearts2', shortcut: ':pixelheart' }, { label: 'Smiley', shortcut: ':smile' }, { label: 'Text Heart', shortcut: HEART }, { label: 'Text Diamond', shortcut: BDIAMOND }, { label: 'Text Star', shortcut: BSTAR }, { label: 'Jap char', shortcut: ':wheelicon' }, ] cb.settings_choices = [ { name: 'sepchar', type: 'choice', choice1: 'Vertical Bar', choice2: 'Hearts', choice3: 'Glitter', choice4: 'Flowers', choice5: 'Bow', choice6: 'Hearts2', choice7: 'Smiley', choice8: 'Text Heart', choice9: 'Text Diamond', choice10: 'Text Star', choice11: 'Jap char', defaultValue: 'Text Star', label: "Separator character" }, { name: 'item1', type: 'choice', choice1: '24--PM', defaultValue: '24--PM', label: 'Item 1' }, { name: 'item2', type: 'choice', choice1: '49--Feet', defaultValue: '49--Feet', label: 'Item 2', }, { name: 'item3', type: 'choice', choice1: '85--Ass', defaultValue: '89--Ass', label: 'Item 3', }, { name: 'item4', type: 'choice', choice1: '99--Tits', defaultValue: '99--Tits', label: 'Item 4', }, { name: 'item5', type: 'choice', choice1: '110--Pussy', defaultValue: '110--Pussy', label: 'Item 5', }, { name: 'item6', type: 'choice', choice1: '10--Blow Kiss', defaultValue: '10--Blow Kiss', label: 'Item 6', }, { name: 'noticecolor', type: 'choice', choice1: 'F97B0B', label: 'Notice color (html code default F97B0B)', defaultValue: 'F97B0B' }, { name: 'speccolor', type: 'choice', choice1: '#EFFBF5', label: 'Notice color (html code default ##EFFBF5)', defaultValue: '#EFFBF5' }, { name: 'highcolor', type: 'choice', choice1: '#FF8000', label: 'BackgroundHighlight', defaultValue: '#FF8000' }, { name: 'awesomecolor', type: 'choice', choice1: '#2E9AFE', label: 'BackgroundHighlight', defaultValue: '#2E9AFE' }, { name: 'lovecolor', type: 'choice', choice1: '#FF0040', label: 'BackgroundHighlight', defaultValue: '#FF0040' }, { name: 'chat_ad', type: 'int', minValue: 1, maxValue: 999, defaultValue: 5, label: 'Delay in minutes between notice being displayed (minimum 1)' } ]; cb.onTip(function (tip) { tip_amt = parseInt(tip['amount']); for (var i = 1; i <= MAXITEMS; i++) { if (tip_amt == tipmenuprice[i]) { cb.sendNotice(tip['from_user'] + ' tipped for ' + tipmenuitem[i], '', cb.settings['highcolor'], cb.settings['speccolor'], 'bold'); } else if ((tip_amt > 99) && (tip_amt < 499) && (tip_amt != 150) && (tip_amt != 110) && (tip_amt != 129) && (tip_amt != 111)) { cb.sendNotice(':vibration_1 :vibration_1 MMMMMMMM :vibration_1 :vibration_1 ', '', '', cb.settings['awesomecolor'], 'bold'); break; } else if ((tip_amt > 499) && (tip_amt < 999)) { cb.sendNotice(':fireworksmany Someone call the :firefighter ***' + tip['from_user'] + '*** is trying to burn down the house!! :clap ', '', '', cb.settings['awesomecolor'], 'bold'); break; } else if ((tip_amt > 999)) { cb.sendNotice(':explos1on !!OMFG!! Hail ****' + tip['from_user'] + '**** SOOOOO GOOOD!!!! :awesome7 ', '', '', cb.settings['awesomecolor'], 'bold'); cb.sendNotice(':clap :clap :clap', '', '', cb.settings['awesomecolor'], 'bold'); break; } else if ((tip_amt == 3) || (tip_amt == 2) || (tip_amt == 4)) { cb.sendNotice(tip['from_user'] + ' mmmm such a tease!', '', '', cb.settings['awesomecolor'], 'bold'); break; } else if (tip_amt == 5) { cb.sendNotice(tip['from_user'] + ' :highfive1 Thanks for the tip!!', '', '', cb.settings['awesomecolor'], 'bold'); break; } else if (tip_amt == 15) { cb.sendNotice(tip['from_user'] + ' :heart2 Thanks for the tip!! :heart2', '', '', cb.settings['awesomecolor'], 'bold'); break; } } }); function chatAd() { if (msg != 'Tip Menu: ') { cb.sendNotice(msg, '', '', cb.settings['noticecolor'], 'bold'); } cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); } cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); function init() { for (i = 0; i <= MAXSEP - 1; i++) { if (cb.settings['sepchar'] == separators[i].label) { separator_char = separators[i].shortcut + ' '; } } msg = 'Tip Menu: '; for (i = 1; i <= MAXITEMS; i++) { var tmp; tmp = cb.settings['item' + i]; if (tmp) { var arr = tmp.split('--'); if (arr[1] === undefined) { cb.sendNotice('Error-You need two dashes to separate the tip amount and menu item for item no ' + i, '', '', cb.settings['noticecolor'], 'bold'); } else { var amt = parseInt(arr[0]); if (amt > 0) { tipmenuprice[i] = amt; tipmenuitem[i] = arr[1]; if (i >= 2) { msg += separator_char; } msg += arr[1] + '(' + amt + ') '; } } } } if (msg != 'Tip Menu: ') { cb.sendNotice(msg, '', '', cb.settings['noticecolor'], 'bold'); } else { cb.sendNotice('Error-No menu items found', '', '', cb.settings['noticecolor'], 'bold'); } } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.