Bots Home
|
Create an App
ForinoTipMenu
Author:
bk77777
Description
Source Code
Launch Bot
Current Users
Created by:
Bk77777
/* Title: "ForinoTipMenu" Author: bryan4547, smoochaman, and others Original Author: badbadbudda Version: 1.0.44 (5/12/2017) 1.0.0 Modifications, Defaulting more options 1.0.2 Reduced to 15 items maximum 1.0.3 Special Tips added, and special messages 1.0.4 - removed MAXSEP variable to simplify settings - added "simple_user_tipped_texts" and "tipmenu_user_tipped_texts" - changed tip item lookup to object key lookup for simpler code and speed - added some error checking for settings_choices */ var HEART = '\u2665'; // ♥ var BDIAMOND = '\u2666'; // ♦ var BSTAR = '\u2605'; // ★ var tip_amt = 0; var separator_char = "| "; var msg; var MAXITEMS = 22; var tipmenuitem = {}; 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 Diamond', label: "Separator character" }, { name: 'item1', type: 'choice', choice1: '50-- Flash Undies', defaultValue: '50-- Flash Undie', label: 'Item 1' }, { name: 'item2', type: 'choice', choice1: '6--Kisses', defaultValue: '6--Kisses', label: 'Item 2', }, { name: 'item3', type: 'choice', choice1: '35--Feet', defaultValue: '35--Feet', label: 'Item 3', }, { name: 'item4', type: 'choice', choice1: '75--Ass', defaultValue: '75--Ass', label: 'Item 4', }, { name: 'item5', type: 'choice', choice1: '29--Socks', defaultValue: '29--Socks', label: 'Item 5', }, { name: 'item6', type: 'choice', choice1: '45--PM', defaultValue: '45--PM', label: 'Item 6', }, { name: 'item7', type: 'choice', choice1: '49--Pushups or Situps', defaultValue: '49--Pushups or Situps', label: 'Item 7', }, { name: 'item8', type: 'choice', choice1: '100--Shirt OFf 2 minutes', defaultValue: '100--Shirt OFf 2 minutes', label: 'Item 8', }, { name: 'item9', type: 'choice', choice1: '400--Naked 5 minutes', defaultValue: '400--Naked 5 minutes', label: 'Item 9', }, { name: 'item10', type: 'choice', choice1: '10--Smile', defaultValue: '10--Smile', label: 'Item 10', }, { name: 'item11', type: 'choice', choice1: '500--Play With Cock', defaultValue: '500--Play With Cock', label: 'Item 11', }, { name: 'item12', type: 'choice', choice1: '1000--Cum Show', defaultValue: '1000--Cum Show', label: 'Item 12', }, { name: 'noticecolor', type: 'choice', choice1: '#FF0000', label: 'Notice color (html code default beige #3CB371)', defaultValue: '#FF0000' }, { 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: 3, label: 'Delay in minutes between notice being displayed (minimum 1)' } ]; cb.onTip(function (tip) { tip_amt = parseInt(tip['amount']); if (tipmenuitem[tip_amt] !== undefined) { cb.sendNotice(tip['from_user'] + ' tipped for ' + tipmenuitem[tip_amt], '', cb.settings['highcolor'], cb.settings['speccolor'], 'bold'); if (tipmenu_user_tipped_texts[tip_amt] !== undefined) { cb.sendNotice(tipmenu_user_tipped_texts[tip_amt], '', '', ''); } } }); 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 < separators.length; 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) { cb.sendNotice('Error - invalid tip amount ' + amt + ' used in item no ' + i, '', '', cb.settings['noticecolor'], 'bold'); continue; } if (tipmenuitem[amt] !== undefined) { cb.sendNotice('Error - duplicate tip amount ' + amt + ' used in item no ' + i, '', '', cb.settings['noticecolor'], 'bold'); continue; } tipmenuitem[amt] = 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.