Bots Home
|
Create an App
Adele's menu
Author:
mistressadelle
Description
Source Code
Launch Bot
Current Users
Created by:
Mistressadelle
/**Name: Adele's Bot Author: Mistress Adele Created: 16/05/2020 See Change Log on bot description page for revision history **/ {cb.settings_choices = [ // *** Tip Menu 1: 70 slots {name: 'tksmenu', label: 'Tip Menu 1 ', type: 'choice',required: false}, {name: 'enableTipMenu', label: 'Enable Menu -- Start Tip Menu when you launch the bot? Note you can also turn the tip menu on and off during the show using the "/startmenu" and "/stopmenu" commands.', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'No'}, {name: 'tipMenuNoticeType',label: 'Menu Notice Format -- What format should be used for displaying the tip menu in the chat? Paragraph form is recommended as it uses the fewest lines, and it is recommended if you use more than 15-20 tip menu items to also split the menu into two halves that are displayed on a rotating basis. There must be at least 8 tip menu items for the split to occur. A list format is also available, where each tip menu item is on one line, but this is not recommended as it takes up too many lines in the chat.',type: 'choice',choice1: 'Full Menu - Paragraph Form',choice2: 'Split Menu - Paragraph Form',choice3: 'Full Menu - List Form',choice4: 'Notice only',defaultValue: 'Full Menu - Paragraph Form'}, {name: 'tipMenuDisplayInterval',type: 'str',defaultValue: 3,required: false,label: 'Tip Menu display interval. Decimals are ok as long as they are greater than 1. For example, 1.5 = one minute 30 second intervals.'}, {name: 'listSort',type: 'choice',choice1: 'Do not sort the list',choice2: 'Ascending',choice3: 'Descending',defaultValue: 'Ascending',label: 'Sort the items in the tip menu by price?'}, {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: 'Custom',defaultValue: 'Vertical Bar',label: 'Choose your separator character to appear between menu items. You can also use a specific gif by entering one in the next setting below, which will override this setting'}, {name: 'sepCharCustom',type: 'str',defaultValue: ':heart2',required: false,label: 'Choose your custom separator (optional). It can be a gif or a string of text/special characters (&!&). If using a gif, make sure to start it with the colon (:) as it would be typed in the chat'}, {name: 'sepCharInPrize', label: 'Separator in Chat Response Message? -- Set to "Yes" to have the separator also show at the beginning and end of the chat reponse message that notifies when someone tips for a menu item. Set to "No" to have the Chat Response as text only', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'No'}, {name: 'menuTextColor1',type: 'choice',label: 'Choose your text color for the single menu or part 1 of the split menu',required: false,choice1: 'White/No Color',choice2: 'Black',choice3: 'Dark Grey',choice4: 'Dark Red',choice5: 'Dark Orange',choice6: 'Dark Green',choice7: 'Dark Aqua',choice8: 'Dark Blue',choice9: 'Dark Purple',choice10: 'Dark Pink',choice11: 'Custom',defaultValue: 'Dark Orange'}, {name: 'menuCustTxtColor1',type: 'str',minLength: 1,maxLength: 7,label: 'If you picked a custom text color in the previous setting, enter the hex color (6 character hex color codes plus the # prefix):',required: false}, {name: 'menuBgColor1',label: 'Choose the background color for the above',required: false,type: 'choice', choice1: 'White/No Color',choice2: 'Light Yellow',choice3: 'Light Blue',choice4: 'Light Pink',choice5: 'Light Red',choice6: 'Light Green',choice7: 'Light Purple',choice8: 'Light Orange',choice9: 'Light Grey',choice10: 'Light Aqua',choice11: 'Custom',defaultValue: 'White/No Color'}, {name: 'menuCustBgColor1',type: 'str',minLength: 1,maxLength: 7,label: 'If you picked a custom background highlight color in the previous setting, enter the hex color (6 character hex color codes plus the # prefix)',required: false}, {name: 'menuTextColor2',type: 'choice',label: 'Choose your text color for part 2 of the split menu',required: false,choice1: 'White/No Color',choice2: 'Black',choice3: 'Dark Grey',choice4: 'Dark Red',choice5: 'Dark Orange',choice6: 'Dark Green',choice7: 'Dark Aqua',choice8: 'Dark Blue',choice9: 'Dark Purple',choice10: 'Dark Pink',choice11: 'Custom',defaultValue: 'Dark Green'}, {name: 'menuCustTxtColor2',type: 'str',minLength: 1,maxLength: 7,label: 'If you picked a custom text color in the previous setting, enter the hex color (6 character hex color codes plus the # prefix):',required: false}, {name: 'menuBgColor2',label: 'Choose the background color for the above',required: false,type: 'choice', choice1: 'White/No Color',choice2: 'Light Yellow',choice3: 'Light Blue',choice4: 'Light Pink',choice5: 'Light Red',choice6: 'Light Green',choice7: 'Light Purple',choice8: 'Light Orange',choice9: 'Light Grey',choice10: 'Light Aqua',choice11: 'Custom',defaultValue: 'White/No Color'}, {name: 'menuCustBgColor2',type: 'str',minLength: 1,maxLength: 7,label: 'If you picked a custom background highlight color in the previous setting, enter the hex color (6 character hex color codes plus the # prefix)',required: false}, {name: 'menuitem1',type: 'str',required: false,defaultValue: 'If you like the show',label: 'Tip Menu Item 1'}, {name: 'menuitemprice1',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 3,required: false,label: 'Item 1 price'}, {name: 'menuitem2',type: 'str',required: false,defaultValue: 'Kiss',label: 'Tip Menu Item 2'}, {name: 'menuitemprice2',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 9,required: false,label: 'Item 2 price'}, {name: 'menuitem3',type: 'str',required: false,defaultValue: 'Makeout',label: 'Tip Menu Item 3'}, {name: 'menuitemprice3',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 21,required: false,label: 'Item 3 price'}, {name: 'menuitem4',type: 'str',required: false,defaultValue: 'Show Feet',label: 'Tip Menu Item 4'}, {name: 'menuitemprice4',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 23,required: false,label: 'Item 4 price'}, {name: 'menuitem5',type: 'str',required: false,defaultValue: '10 Jumping Jacks',label: 'Tip Menu Item 5'}, {name: 'menuitemprice5',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 27,required: false,label: 'Item 5 price'}, {name: 'menuitem6',type: 'str',required: false,defaultValue: '10 Squats',label: 'Tip Menu Item 6'}, {name: 'menuitemprice6',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 31,required: false,label: 'Item 6 price'}, {name: 'menuitem7',type: 'str',required: false,defaultValue: 'Flash Boobs',label: 'Tip Menu Item 7'}, {name: 'menuitemprice7',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 36,required: false,label: 'Item 7 price'}, {name: 'menuitem8',type: 'str',required: false,defaultValue: 'Flash Butt',label: 'Tip Menu Item 8'}, {name: 'menuitemprice8',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 38,required: false,label: 'Item 8 price'}, {name: 'menuitem9',type: 'str',required: false,defaultValue: '5 bare ass hand spanks',label: 'Tip Menu Item 9'}, {name: 'menuitemprice9',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 41,required: false,label: 'Item 9 price'}, {name: 'menuitem10',type: 'str',required: false,defaultValue: '5 paddle spanks',label: 'Tip Menu Item 10'}, {name: 'menuitemprice10',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 43,required: false,label: 'Item 10 price'}, {name: 'menuitem11',type: 'str',required: false,defaultValue: 'PM',label: 'Tip Menu Item 11'}, {name: 'menuitemprice11',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 47,required: false,label: 'Item 11 price'}, {name: 'menuitem12',type: 'str',required: false,defaultValue: 'Flash cock/pussy',label: 'Tip Menu Item 12'}, {name: 'menuitemprice12',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 56,required: false,label: 'Item 12 price'}, {name: 'menuitem13',type: 'str',required: false,defaultValue: 'Tickling',label: 'Tip Menu Item 13'}, {name: 'menuitemprice13',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 62,required: false,label: 'Item 13 price'}, {name: 'menuitem14',type: 'str',required: false,defaultValue: '1 Minute Handjob Tease',label: 'Tip Menu Item 14'}, {name: 'menuitemprice14',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 103,required: false,label: 'Item 14 price'}, {name: 'menuitem15',type: 'str',required: false,defaultValue: '1 Minute BJ Tease',label: 'Tip Menu Item 15'}, {name: 'menuitemprice15',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 115,required: false,label: 'Item 15 price'}, {name: 'menuitem16',type: 'str',required: false,defaultValue: '1 Minute Fingering Tease',label: 'Tip Menu Item 16'}, {name: 'menuitemprice16',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 127,required: false,label: 'Item 16 price'}, {name: 'menuitem17',type: 'str',required: false,defaultValue: 'Tip Menu Item 17',label: 'Tip Menu Item 17'}, {name: 'menuitemprice17',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 17 price'}, {name: 'menuitem18',type: 'str',required: false,label: 'Tip Menu Item 18'}, {name: 'menuitemprice18',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 18 price'}, {name: 'menuitem19',type: 'str',required: false,label: 'Tip Menu Item 19'}, {name: 'menuitemprice19',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 19 price'}, {name: 'menuitem20',type: 'str',required: false,label: 'Tip Menu Item 20'}, {name: 'menuitemprice20',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 20 price'}, {name: 'menuitem21',type: 'str',required: false,label: 'Tip Menu Item 21'}, {name: 'menuitemprice21',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 21 price'}, {name: 'menuitem22',type: 'str',required: false,label: 'Tip Menu Item 22'}, {name: 'menuitemprice22',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 22 price'}, {name: 'menuitem23',type: 'str',required: false,label: 'Tip Menu Item 23'}, {name: 'menuitemprice23',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 23 price'}, {name: 'menuitem24',type: 'str',required: false,label: 'Tip Menu Item 24'}, {name: 'menuitemprice24',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 24 price'}, {name: 'menuitem25',type: 'str',required: false,label: 'Tip Menu Item 25'}, {name: 'menuitemprice25',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 25 price'}, {name: 'menuitem26',type: 'str',required: false,label: 'Tip Menu Item 26'}, {name: 'menuitemprice26',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 26 price'}, {name: 'menuitem27',type: 'str',required: false,label: 'Tip Menu Item 27'}, {name: 'menuitemprice27',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 27 price'}, {name: 'menuitem28',type: 'str',required: false,label: 'Tip Menu Item 28'}, {name: 'menuitemprice28',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 28 price'}, {name: 'menuitem29',type: 'str',required: false,label: 'Tip Menu Item 29'}, {name: 'menuitemprice29',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 29 price'}, {name: 'menuitem30',type: 'str',required: false,label: 'Tip Menu Item 30'}, {name: 'menuitemprice30',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 30 price'}, {name: 'menuitem31',type: 'str',required: false,label: 'Tip Menu Item 31'}, {name: 'menuitemprice31',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 31 price'}, {name: 'menuitem32',type: 'str',required: false,label: 'Tip Menu Item 32'}, {name: 'menuitemprice32',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 32 price'}, {name: 'menuitem33',type: 'str',required: false,label: 'Tip Menu Item 33'}, {name: 'menuitemprice33',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 33 price'}, {name: 'menuitem34',type: 'str',required: false,label: 'Tip Menu Item 34'}, {name: 'menuitemprice34',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 34 price'}, {name: 'menuitem35',type: 'str',required: false,label: 'Tip Menu Item 35'}, {name: 'menuitemprice35',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 35 price'}, {name: 'menuitem36',type: 'str',required: false,label: 'Tip Menu Item 36'}, {name: 'menuitemprice36',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 36 price'}, {name: 'menuitem37',type: 'str',required: false,label: 'Tip Menu Item 37'}, {name: 'menuitemprice37',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 37 price'}, {name: 'menuitem38',type: 'str',required: false,label: 'Tip Menu Item 38'}, {name: 'menuitemprice38',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 38 price'}, {name: 'menuitem39',type: 'str',required: false,label: 'Tip Menu Item 39'}, {name: 'menuitemprice39',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 39 price'}, {name: 'menuitem40',type: 'str',required: false,label: 'Tip Menu Item 40'}, {name: 'menuitemprice40',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 40 price'}, {name: 'menuitem41',type: 'str',required: false,label: 'Tip Menu Item 41'}, {name: 'menuitemprice41',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 41 price'}, {name: 'menuitem42',type: 'str',required: false,label: 'Tip Menu Item 42'}, {name: 'menuitemprice42',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 42 price'}, {name: 'menuitem43',type: 'str',required: false,label: 'Tip Menu Item 43'}, {name: 'menuitemprice43',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 43 price'}, {name: 'menuitem44',type: 'str',required: false,label: 'Tip Menu Item 44'}, {name: 'menuitemprice44',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 44 price'}, {name: 'menuitem45',type: 'str',required: false,label: 'Tip Menu Item 45'}, {name: 'menuitemprice45',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 45 price'}, {name: 'menuitem46',type: 'str',required: false,label: 'Tip Menu Item 46'}, {name: 'menuitemprice46',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 46 price'}, {name: 'menuitem47',type: 'str',required: false,label: 'Tip Menu Item 47'}, {name: 'menuitemprice47',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 47 price'}, {name: 'menuitem48',type: 'str',required: false,label: 'Tip Menu Item 48'}, {name: 'menuitemprice48',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 48 price'}, {name: 'menuitem49',type: 'str',required: false,label: 'Tip Menu Item 49'}, {name: 'menuitemprice49',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 49 price'}, {name: 'menuitem50',type: 'str',required: false,label: 'Tip Menu Item 50'}, {name: 'menuitemprice50',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 50 price'}, {name: 'menuitem51',type: 'str',required: false,label: 'Tip Menu Item 51'}, {name: 'menuitemprice51',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 51 price'}, {name: 'menuitem52',type: 'str',required: false,label: 'Tip Menu Item 52'}, {name: 'menuitemprice52',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 52 price'}, {name: 'menuitem53',type: 'str',required: false,label: 'Tip Menu Item 53'}, {name: 'menuitemprice53',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 53 price'}, {name: 'menuitem54',type: 'str',required: false,label: 'Tip Menu Item 54'}, {name: 'menuitemprice54',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 54 price'}, {name: 'menuitem55',type: 'str',required: false,label: 'Tip Menu Item 55'}, {name: 'menuitemprice55',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 55 price'}, {name: 'menuitem56',type: 'str',required: false,label: 'Tip Menu Item 56'}, {name: 'menuitemprice56',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 56 price'}, {name: 'menuitem57',type: 'str',required: false,label: 'Tip Menu Item 57'}, {name: 'menuitemprice57',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 57 price'}, {name: 'menuitem58',type: 'str',required: false,label: 'Tip Menu Item 58'}, {name: 'menuitemprice58',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 58 price'}, {name: 'menuitem59',type: 'str',required: false,label: 'Tip Menu Item 59'}, {name: 'menuitemprice59',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 59 price'}, {name: 'menuitem60',type: 'str',required: false,label: 'Tip Menu Item 60'}, {name: 'menuitemprice60',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 60 price'}, {name: 'menuitem61',type: 'str',required: false,label: 'Tip Menu Item 61'}, {name: 'menuitemprice61',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 61 price'}, {name: 'menuitem62',type: 'str',required: false,label: 'Tip Menu Item 62'}, {name: 'menuitemprice62',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 62 price'}, {name: 'menuitem63',type: 'str',required: false,label: 'Tip Menu Item 63'}, {name: 'menuitemprice63',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 63 price'}, {name: 'menuitem64',type: 'str',required: false,label: 'Tip Menu Item 64'}, {name: 'menuitemprice64',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 64 price'}, {name: 'menuitem65',type: 'str',required: false,label: 'Tip Menu Item 65'}, {name: 'menuitemprice65',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 65 price'}, {name: 'menuitem66',type: 'str',required: false,label: 'Tip Menu Item 66'}, {name: 'menuitemprice66',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 66 price'}, {name: 'menuitem67',type: 'str',required: false,label: 'Tip Menu Item 67'}, {name: 'menuitemprice67',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 67 price'}, {name: 'menuitem68',type: 'str',required: false,label: 'Tip Menu Item 68'}, {name: 'menuitemprice68',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 68 price'}, {name: 'menuitem69',type: 'str',required: false,label: 'Tip Menu Item 69'}, {name: 'menuitemprice69',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 69 price'}, {name: 'menuitem70',type: 'str',required: false,label: 'Tip Menu Item 70'}, {name: 'menuitemprice70',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 0,required: false,label: 'Item 70 price'}, // *** Spoil Model Tip Menu {name: 'SMmenu', label: '****************Spoil Model Menu *********************', type: 'choice',required: false}, {name: 'enableSMMenu', label: 'Enable the Spoil Tip Menu at the start of the show? Note you can also turn SpoilModel menu on and off during the show using the "/useSMmenu on" and "/useSMmenu off" commands.', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'No'}, {name: 'SMMenuInterval',type: 'str',defaultValue: 3,required: false,label: 'Spoil Tip Menu display interval. Decimals are ok as long as they are greater than 1. For example, 1.5 = one minute 30 second intervals.'}, {name: 'SMListSort',type: 'choice',choice1: 'Do not sort the list',choice2: 'Ascending',choice3: 'Descending',defaultValue: 'Ascending',label: 'Sort the items in the spoil menu by price?'}, {name: 'SMSepChar', 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: 'Custom',defaultValue: 'Vertical Bar',label: 'Choose your separator character to appear between menu items. You can also use a specific gif by entering one in the next setting below, which will override this setting.'}, {name: 'SMSepCharCustom',type: 'str',defaultValue: ':heart2',required: false,label: 'Choose your custom separator (optional). It can be a gif or a string of text/special characters (&!&). If using a gif, make sure to start it with the colon (:) as it would be typed in the chat'}, {name: 'SMMenuTxtColor',type: 'choice',label: 'Choose your text color for the spoil menu',required: false,choice1: 'White/No Color',choice2: 'Black',choice3: 'Dark Grey',choice4: 'Dark Red',choice5: 'Dark Orange',choice6: 'Dark Green',choice7: 'Dark Aqua',choice8: 'Dark Blue',choice9: 'Dark Purple',choice10: 'Dark Pink',choice11: 'Custom',defaultValue: 'Dark Pink'}, {name: 'SMMenuCustTxtColor',type: 'str',minLength: 1,maxLength: 7,label: 'If you picked a custom text color in the previous setting, enter the hex color (6 character hex color codes plus the # prefix):',required: false}, {name: 'SMMenuBgColor',label: 'Choose your background color for spoil menu',required: false,type: 'choice', choice1: 'White/No Color',choice2: 'Light Yellow',choice3: 'Light Blue',choice4: 'Light Pink',choice5: 'Light Red',choice6: 'Light Green',choice7: 'Light Purple',choice8: 'Light Orange',choice9: 'Light Grey',choice10: 'Light Aqua',choice11: 'Custom',defaultValue: 'Light Pink'}, {name: 'SMMenuCustBgColor',type: 'str',minLength: 1,maxLength: 7,label: 'If you picked a custom background highlight color in the previous setting, enter the hex color (6 character hex color codes plus the # prefix):',required: false}, {name: 'SMMenuItem1',type: 'str',required: false,defaultValue: 'cup of coffee',label: 'Spoil Model Menu Item 1 '}, {name: 'SMMenuItemPrice1',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 66,required: false,label: 'Spoil Item 1 price'}, {name: 'SMMenuItem2',type: 'str',required: false,defaultValue: 'chocolate',label: 'Spoil Model Menu Item 2'}, {name: 'SMMenuItemPrice2',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 77,required: false,label: 'Spoil Model Item 2 price'}, {name: 'SMMenuItem3',type: 'str',required: false,defaultValue: 'fruits',label: 'Spoil Model Menu Item 3'}, {name: 'SMMenuItemPrice3',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 88,required: false,label: 'Spoil Model Item 3 price'}, {name: 'SMMenuItem4',type: 'str',required: false,defaultValue: 'Glasses',label: 'Spoil Model Menu Item 4'}, {name: 'SMMenuItemPrice4',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 111,required: false,label: 'Spoil Model Item 4 price'}, {name: 'SMMenuItem5',type: 'str',required: false,defaultValue: 'Cosmetics',label: 'Spoil Model Menu Item 5'}, {name: 'SMMenuItemPrice5',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 123,required: false,label: 'Spoil Model Item 5 price'}, {name: 'SMMenuItem6',type: 'str',required: false,defaultValue: 'Rent',label: 'Spoil Model Menu Item 6'}, {name: 'SMMenuItemPrice6',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 199,required: false,label: 'Spoil Model Item 6 price'}, {name: 'SMMenuItem6',type: 'str',required: false,defaultValue: 'ELSE',label: 'Spoil Model Menu Item 6'}, {name: 'SMMenuItemPrice6',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 234,required: false,label: 'Spoil Model Item 6 price'}, {name: 'SMMenuItem8',type: 'str',required: false,defaultValue: 'Medical insuranse',label: 'Spoil Model Menu Item 8'}, {name: 'SMMenuItemPrice8',type: 'int',minValue: -99999,maxValue: 99999,defaultValue: 333,required: false,label: 'Spoil Model Item 8 price'}, {name: 'SMMenuItem9',type: 'str',required: false,label: 'Spoil Model Menu Item 9'}, {name: 'SMMenuItemPrice9',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 9 price'}, {name: 'SMMenuItem10',type: 'str',required: false,label: 'Spoil Model Menu Item 10'}, {name: 'SMMenuItemPrice10',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 10 price'}, {name: 'SMMenuItem11',type: 'str',required: false,label: 'Spoil Model Menu Item 11'}, {name: 'SMMenuItemPrice11',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 11 price'}, {name: 'SMMenuItem12',type: 'str',required: false,label: 'Spoil Model Menu Item 12'}, {name: 'SMMenuItemPrice12',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 12 price'}, {name: 'SMMenuItem13',type: 'str',required: false,label: 'Spoil Model Menu Item 13'}, {name: 'SMMenuItemPrice13',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 13 price'}, {name: 'SMMenuItem14',type: 'str',required: false,label: 'Spoil Model Menu Item 14'}, {name: 'SMMenuItemPrice14',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 14 price'}, {name: 'SMMenuItem15',type: 'str',required: false,label: 'Spoil Model Menu Item 15'}, {name: 'SMMenuItemPrice15',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 15 price'}, {name: 'SMMenuItem16',type: 'str',required: false,label: 'Spoil Model Menu Item 16'}, {name: 'SMMenuItemPrice16',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 16 price'}, {name: 'SMMenuItem17',type: 'str',required: false,label: 'Spoil Model Menu Item 17'}, {name: 'SMMenuItemPrice17',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 17 price'}, {name: 'SMMenuItem18',type: 'str',required: false,label: 'Spoil Model Menu Item 18'}, {name: 'SMMenuItemPrice18',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 18 price'}, {name: 'SMMenuItem19',type: 'str',required: false,label: 'Spoil Model Menu Item 19'}, {name: 'SMMenuItemPrice19',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 19 price'}, {name: 'SMMenuItem20',type: 'str',required: false,label: 'Spoil Model Menu Item 20'}, {name: 'SMMenuItemPrice20',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 20 price'}, {name: 'SMMenuItem21',type: 'str',required: false,label: 'Spoil Model Menu Item 21'}, {name: 'SMMenuItemPrice21',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 21 price'}, {name: 'SMMenuItem22',type: 'str',required: false,label: 'Spoil Model Menu Item 22'}, {name: 'SMMenuItemPrice22',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 22 price'}, {name: 'SMMenuItem23',type: 'str',required: false,label: 'Spoil Model Menu Item 23'}, {name: 'SMMenuItemPrice23',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 23 price'}, {name: 'SMMenuItem24',type: 'str',required: false,label: 'Spoil Model Menu Item 24'}, {name: 'SMMenuItemPrice24',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 24 price'}, {name: 'SMMenuItem25',type: 'str',required: false,label: 'Spoil Model Menu Item 25'}, {name: 'SMMenuItemPrice25',type: 'int',minValue: -99999,maxValue: 99999,required: false,label: 'Spoil Model Item 25 price'} ]; } { // *********************************** Variables and Arrays ************************************** var initialize = 0; // Used to run initialization once var tipMenuToggle = 0; var SMMenuToggle = 0; var BC = cb.room_slug; var appNoticeColor = '#a2dfac'; // green highlight var appAlertColor = '#f4c1bc'; // red highlight var dashLine60 = new Array(60).join('-'); var dashLine70 = new Array(70).join('-'); var dashLine80 = new Array(80).join('-'); var dashLine90 = new Array(90).join('-'); var priceCheckArray = {amount: [], name: []}; var TIPMENU = { menuDspIntTime: 0, sepChar: '| ', tipMenu: '', menuPart1: '', menuPart2: '', menuToken: 1, tipMenuPrice: [], tipMenuItem: [], initToken: true, txtColor1: '', bgColor1: '', txtColor2: '', bgColor2: '', menuLength: 0, requesters: [], request: [], }; var SMMENU = { SMMenuDspIntTime: 0, SMSepChar: '| ', SMMenu: '', SMMenuPrice: [], SMMenuItem: [], SMInitToken: true, SMTxtColor: '', SMBgColor: '', SMMenuLength: 0, SMRequesters: [], SMRequest: [], }; } { // *********************************** Functions ************************************** { // Generic functions to set the color or separator characters function checkTextColor(color) { switch (color) { case 'White/No Color': return '#FFFFFF'; case 'Black': return '#000000'; case 'Dark Blue': return '#0629AC'; case 'Dark Pink': return '#FF6680'; case 'Dark Green': return '#006600'; case 'Dark Red': return '#cc0000'; case 'Dark Purple': return '#3d003d'; case 'Dark Grey': return '#737373'; case 'Dark Orange': return '#e77400'; case 'Dark Aqua': return '#006767'; default: if (/^#[0-9A-F]{6}$/i.test(color)) { return color; } else if (/^[0-9A-F]{6}$/i.test(color)) { return ('#' + color); } else { return ('default'); } } } function checkBgColor(color) { switch (color) { case 'White/No Color': return '#FFFFFF'; case 'Light Aqua': return '#adeaea'; case 'Light Pink': return '#FFE6EA'; case 'Light Green': return '#94e594'; case 'Light Red': return '#ff9a9a'; case 'Light Purple': return '#f2cdff'; case 'Light Orange': return '#ffd9b3'; case 'Light Grey': return '#e6e6e6'; case 'Light Blue': return '#d1eaee'; case 'Light Yellow': return '#ffff94' case 'Cream': return '#f9f6ed' default: if (/^#[0-9A-F]{6}$/i.test(color)) { return color; } else if (/^[0-9A-F]{6}$/i.test(color)) { return ('#' + color); } else { return ('default'); } } } function checkSepChar(char) { switch (char) { case 'Hearts': return ':heart2'; case 'Glitter': return ':pixelglitter'; case 'Flowers': return ':tinyflower2'; case 'Bow': return ':bluebow'; case 'Hearts2': return ':Hearts2'; case 'Smiley': return ':smile'; case 'Text Heart': return '\u2665'; case 'Text Diamond': return '\u2666'; case 'Text Star': return '\u2605'; default: return ('|'); } } //********** Price Check Function ************** function priceChecker(mode, name, price, sendto) { if (price != 0 && price !=null) { if (mode === 'add') { if (cbjs.arrayContains(priceCheckArray.name,name)) { nameIndex = priceCheckArray.name.indexOf(name); priceCheckArray.name.splice(nameIndex,1); priceCheckArray.amount.splice(nameIndex,1); } if (cbjs.arrayContains(priceCheckArray.amount,price)) { priceIndex = priceCheckArray.amount.indexOf(price); cb.sendNotice('Warning! There is a duplicate price entry. When adding ' + name + ', the configured price of ' + price + ' was found already in use for ' + priceCheckArray.name[priceIndex] + '.',sendto,appNoticeColor); } if (price == 1 || price == 5 || price == 10 || price == 15 || price == 20 || price == 25 || price == 50 || price == 100) { cb.sendNotice('Warning! When adding ' + name + ', the configured price of ' + price + ' is a common tip amount (1,5,10,15,20,25,50,100) and not recommended for any specific feature price. It is recommended to use uncommon tip amounts for all prices.',sendto,appNoticeColor); } priceCheckArray.name.push(name); priceCheckArray.amount.push(price); } else if (mode === 'rmv') { if (cbjs.arrayContains(priceCheckArray.name,name)) { nameIndex = priceCheckArray.name.indexOf(name); priceCheckArray.name.splice(nameIndex,1); priceCheckArray.amount.splice(nameIndex,1); } } } } // *************************** Tip Menu Functions ************************ function setTipMenuToggle(option, mod) { if(option == 'on') { if(tipMenuToggle == 1) { cb.sendNotice('Tip Menu 1 is already turned on.',mod,appNoticeColor); } else { tipMenuToggle = 1; initMenu(mod); cb.sendNotice(' ' + mod + ' has enabled Tip Menu. You control the action by tipping for selections from the menu!','',appNoticeColor,'','bold'); } } else if(option == 'off') { if(tipMenuToggle == 0) { cb.sendNotice('Tip Menu 1 is already turned off.',mod,appNoticeColor); } else { tipMenuToggle = 0; TIPMENU.tipMenuPrice = []; TIPMENU.tipMenuItem = []; cb.sendNotice(' ' + mod + ' has disabled Tip Menu 1. You can no longer tip for selections from Menu 1.','',appNoticeColor,'','bold'); } } else if(option != null) { cb.sendNotice(option + ' is not a valid option for /usemenu.',mod,appNoticeColor); } else if(option == null) { cb.sendNotice('You did not enter a valid option for /usemenu.',mod,appNoticeColor); } } function initMenu(mod) { if (cb.settings.menuTextColor1 == 'Custom') { TIPMENU.txtColor1 = checkTextColor(cb.settings.menuCustTxtColor1); if (TIPMENU.txtColor1 == 'default') { cb.sendNotice('Tip Menu - Error while setting the text color, it has to be in a HEX format, such as #0629AC. Using default value.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); TIPMENU.txtColor1 = '#0629AC'; } } else { TIPMENU.txtColor1 = checkTextColor(cb.settings.menuTextColor1); } if (cb.settings.menuBgColor1 == 'Custom') { TIPMENU.bgColor1 = checkBgColor(cb.settings.menuCustBgColor1); if (TIPMENU.bgColor1 == 'default') { cb.sendNotice('Tip Menu - Error while setting the background color. It has to be in a HEX format, such as #FFFFFF. Using default value.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); TIPMENU.bgColor1 = '#FFFFFF'; } } else { TIPMENU.bgColor1 = checkBgColor(cb.settings.menuBgColor1); } if (cb.settings.tipMenuNoticeType == 'Split Menu - Paragraph Form') { if (cb.settings.menuTextColor2 === 'Custom') { TIPMENU.txtColor2 = checkTextColor(cb.settings.menuCustTxtColor2); if (TIPMENU.txtColor2 == 'default') { cb.sendNotice('Tip Menu part 2 - Error while setting the text color for second half of menu, it has to be in a HEX format, such as #0629AC. Using default value.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); TIPMENU.txtColor2 = '#0629AC'; } } else { TIPMENU.txtColor2 = checkTextColor(cb.settings.menuTextColor2); } if (cb.settings.menuBgColor2 == 'Custom') { TIPMENU.bgColor2 = checkBgColor(cb.settings.menuCustBgColor2); if (TIPMENU.bgColor2 == 'default') { cb.sendNotice('Tip Menu part 2 - Error while setting the background color for second half of menu, it has to be in a HEX format, such as #FFFFFF. Using default value.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); TIPMENU.bgColor2 = '#FFFFFF'; } } else { TIPMENU.bgColor2 = checkBgColor(cb.settings.menuBgColor2); } } displayMenuTimer(); setSepChar(); let maxItems = 70; for (let j = 0; j <= maxItems; j++) { if (cb.settings['menuitem' + j] !== '' && cb.settings['menuitemprice' + j] > 0) { if (cbjs.arrayContains(TIPMENU.tipMenuPrice, cb.settings['menuitemprice' + j])) { cb.sendNotice('Tip Menu - ' + cb.settings['menuitemprice' + j] + ' is already on the menu. It is recommended to have different price for each item.', cb.room_slug, '#FFFFFF', '#FF0000'); } if (cb.settings.tipMenuSalePct > 0) { regularprice = cb.settings['menuitemprice' + j]; saleprice = Math.round(regularprice - (cb.settings.tipMenuSalePct/100*regularprice)); if (saleprice <= 0) { saleprice = 1; } TIPMENU.tipMenuPrice.push(saleprice.toString()); priceused = saleprice.toString(); } else { TIPMENU.tipMenuPrice.push(cb.settings['menuitemprice' + j]); priceused = cb.settings['menuitemprice' + j]; } TIPMENU.tipMenuItem.push(cb.settings['menuitem' + j]); priceChecker('add','Tip Menu Option: '+(cb.settings['menuitem' + j]), priceused, mod); } } buildMenu(); displayMenu(); } function displayMenuTimer() { let timer = parseFloat(cb.settings.tipMenuDisplayInterval); if (timer < 1) { cb.sendNotice('Tip Menu - Time lapse is too short. Using default value.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); timer = 3; } timer *= 60000; timer = parseInt(timer); TIPMENU.menuDspIntTime = timer; } function buildMenu() { TIPMENU.tipMenu = 'Tip Menu: '; TIPMENU.menuPart1 = 'Tip Menu 1 Part 1:'; TIPMENU.menuPart2 = 'Tip Menu 1 Part 2:'; let menuArray = []; let menuArray1 = []; let menuArray2 = []; let sorted = []; let menuL = TIPMENU.tipMenuPrice.length; for (let i = 0; i < menuL; i++) { sorted.push({ 'prices': TIPMENU.tipMenuPrice[i], 'id': i }); } if (cb.settings.listSort !== 'Do not sort the list') { sorted.sort(function(a, b) { return a.prices - b.prices; }); if (cb.settings.listSort === 'Descending') { sorted.reverse(); } } if (cb.settings.tipMenuNoticeType == 'Full Menu - List Form') { for (let j = 0; j < sorted.length; j++) { if (TIPMENU.tipMenuPrice[sorted[j].id] !== 0) { menuArray.push(TIPMENU.tipMenuPrice[sorted[j].id] + ' - ' + TIPMENU.tipMenuItem[sorted[j].id]); } } tempsepchar = '\n' + TIPMENU.sepChar; TIPMENU.tipMenu += tempsepchar; TIPMENU.tipMenu += menuArray.join(tempsepchar); } else { for (let j = 0; j < sorted.length; j++) { if (TIPMENU.tipMenuPrice[sorted[j].id] !== 0) { menuArray.push(TIPMENU.tipMenuItem[sorted[j].id] + ' (' + TIPMENU.tipMenuPrice[sorted[j].id] + ') '); } } TIPMENU.tipMenu += menuArray.join(TIPMENU.sepChar); if (cb.settings.tipMenuNoticeType == 'Split Menu - Paragraph Form') { if (menuArray.length < 10) { cb.sendNotice('Tip Menu - Error - The menu has less than 10 items, it will not be split.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); } else { let msglength1 = 0; let msgHalf = (TIPMENU.tipMenu.length - 9) / 2; for (let k = 0; k < sorted.length; k++) { if (TIPMENU.tipMenuPrice[sorted[k].id] !== 0) { if (msglength1 < msgHalf) { menuArray1.push(TIPMENU.tipMenuItem[sorted[k].id] + ' (' + TIPMENU.tipMenuPrice[sorted[k].id] + ') '); msglength1 = menuArray1.join(TIPMENU.sepChar).length; } else { menuArray2.push(TIPMENU.tipMenuItem[sorted[k].id] + ' (' + TIPMENU.tipMenuPrice[sorted[k].id] + ') '); } } } TIPMENU.menuPart1 += '\n' + menuArray1.join(TIPMENU.sepChar) + '\n To see the full menu type /menu.'; TIPMENU.menuPart2 += '\n' + menuArray2.join(TIPMENU.sepChar) + '\n To see the full menu type /menu.'; } } } TIPMENU.menuLength = TIPMENU.tipMenuPrice.length; if (TIPMENU.menuLength <= 0) { cb.sendNotice('Error - No menu items found', '', '', TIPMENU.txtColor1, 'bold'); } } function displayMenu() { if(tipMenuToggle == 1) { if (cb.settings.tipMenuNoticeType === 'Notice only' && !TIPMENU.initToken) { cb.sendNotice('Dorothy\'s Tip Menu Pro is active, but menu is not automatically posted to the chat.\n To see the full tip menu type /menu', '', TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); if (cb.settings.tipMenuSalePct > 0) { cb.sendNotice('There is a Tip Menu sale today! Tip Menu prices have been discounted ' + cb.settings.tipMenuSalePct + '% off normal prices!', '', TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); } } else if (TIPMENU.menuLength > 0 && !TIPMENU.initToken && cb.settings.tipMenuNoticeType == 'Split Menu - Paragraph Form') { if (TIPMENU.menuToken === 1) { cb.sendNotice(TIPMENU.menuPart1,'', TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); if (cb.settings.tipMenuSalePct > 0) { cb.sendNotice('There is a Tip Menu sale today! Tip Menu prices are discounted ' + cb.settings.tipMenuSalePct + '% off normal prices!', '', TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); } TIPMENU.menuToken = 2; } else if (TIPMENU.menuToken === 2) { cb.sendNotice(TIPMENU.menuPart2, '', TIPMENU.bgColor2, TIPMENU.txtColor2, 'bold'); if (cb.settings.tipMenuSalePct > 0) { cb.sendNotice('There is a Tip Menu sale today! Tip Menu prices have been discounted ' + cb.settings.tipMenuSalePct + '% off normal prices!', '', TIPMENU.bgColor2, TIPMENU.txtColor2, 'bold'); } TIPMENU.menuToken = 1; } } else if (TIPMENU.menuLength > 0) { cb.sendNotice(TIPMENU.tipMenu,'', TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); if (cb.settings.tipMenuSalePct > 0) { cb.sendNotice('There is a Tip Menu sale today! Tip Menu prices are discounted ' + cb.settings.tipMenuSalePct + '% off normal prices!', '', TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); } if (TIPMENU.initToken) { TIPMENU.initToken = false; } } else { cb.sendNotice('Tip Menu setup error - there are no entries in the menu.', '', '#FFFFFF', '#FF0000', 'bold'); } cb.setTimeout(displayMenu, TIPMENU.menuDspIntTime); } } // *************************** Spoil Model Menu Functions ************************ function setSMMenuToggle(option, mod) { if(option == 'on') { if(SMMenuToggle == 1) { cb.sendNotice('Spoil Model Menu is already enabled.',mod,appNoticeColor); } else { SMMenuToggle = 1; cb.sendNotice(' ' + mod + ' has enabled Spoil Model Menu. You can spoil model how you prefer!','',appNoticeColor,'','bold'); initSMMenu(); } } else if(option == 'off') { if(SMMenuToggle == 0) { cb.sendNotice('Spoil Model Menu is already disabled.',mod,appNoticeColor); } else { SMMenuToggle = 0; SMMENU.SMMenuPrice = []; SMMENU.SMMenuItem = []; cb.sendNotice(' ' + mod + ' has disabled Spoil Model Menu. You can no longer spoil model.','',appNoticeColor,'','bold'); } } else if(option != null) { cb.sendNotice(option + ' is not a valid option for /usesmmenu.',mod,appNoticeColor); } else if(option == null) { cb.sendNotice('You did not enter a valid option for /usesmmenu.',mod,appNoticeColor); } } function initSMMenu(mod) { let maxItems = 8; if (cb.settings.SMMenuTxtColor === 'Custom') { SMMENU.SMTxtColor = checkTextColor(cb.settings.SMMenuCustTxtColor); if (SMTIPMENU.SMTxtColor === 'default') { cb.sendNotice('Spoil Model Menu - Error while setting the text color. It has to be in a HEX format. Using default value.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); SMMENU.SMTxtColor = '#FFFFFF'; } } else { SMMENUSMTxtColor = checkTextColor(cb.settingsSMMenuTxtColor); } if (cb.settings.SMMenuBgColor === 'Custom') { SMMENU.SMBgColor = checkBgColor(cb.settings.SMMenuCustBgColor); if (SMMENU.SMBgColor === 'default') { cb.sendNotice('Spoil Model Menu - Error while setting the background color. It has to be in a HEX format. Using default value.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); SMMENU.SMBgColor = '#0629AC'; } } else { SMMENU.SMBgColor = checkBgColor(cb.settings.SMMenuBgColor); } displaySMMenuTimer(); setSMSepChar(); for (let j = 0; j <= maxItems; j++) { if (cb.settings['SMMenuItem' + j] !== '' && cb.settings['SMMenuItemPrice' + j] > 0) { if (cbjs.arrayContains(SMMENU.SMMenuPrice, cb.settings['SMMenuItemPrice' + j])) { cb.sendNotice('Spoil Model Menu - ' + cb.settings['SMMenuItemPrice' + j] + ' is already on the menu. It is recommended to have different price for each item.', cb.room_slug, '#FFFFFF', '#FF0000'); } SMMENU.SMMenuPrice.push(cb.settings['SMMenuItemPrice' + j]); SMMENU.SMMenuItem.push(cb.settings['SMMenuItem' + j]); priceChecker('add','Spoil Model Menu Option: '+(cb.settings['SMMenuItem' + j]), (cb.settings['SMMenuItemPrice' + j]),mod); } } cb.sendNotice('Type /menuhelp tipmenu to see all the Tip Menu Pro commands.', '', '', '', 'bold'); SMMenuSanitize(); displaySMMenu(); } function displaySMMenu() { if(SMMenuToggle == 1) { if (cb.settings.SMChatNotice === 'Only display the short notice' && !SMMENU.SMInitToken) { cb.sendNotice('Spoil Model menu is active. To see the full tip menu type: /SMmenu', '', SMMENU.SMBgColor, SMMENU.SMTxtColor, 'bold'); } else if (SMMENU.SMMenu !== 'Spoil Model Menu: \n' && !SMMENU.SMInitToken) { cb.sendNotice(SMMENU.SMMenu, '', SMMENU.SMBgColor, SMMENU.SMTxtColor, 'bold'); } else if (SMMENU.SMTipMenu !== 'Spoil Model Menu: ') { cb.sendNotice(SMMENU.SMMenu, '', SMMENU.SMBgColor, SMMENU.SMTxtColor, 'bold'); if (SMMENU.SMInitToken) { PSMMENU.SMInitToken = false; } } else { cb.sendNotice('Something went wrong with Spoil Model menu.', '', '#FFFFFF', '#FF0000', 'bold'); } cb.setTimeout(displaySMMenu, SMMENU.SMMenuDspIntTime); } } function displaySMMenuTimer() { let SMtimer = parseFloat(cb.settings.SMMenuInterval); if (SMtimer < 1) { cb.sendNotice('Spoil Model Menu - Time interval is less than 1 minute. Using default value.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); SMtimer = 3; } SMtimer *= 60000; SMtimer = parseInt(SMtimer); SMMENU.SMMenuDspIntTime = SMtimer; } function SMMenuSanitize() { SMMENU.SMMenu = 'Spoil Model Menu: '; let SMMenuArray = []; let SMSorted = []; let SMMenuL = SMMENU.SMMenuPrice.length; for (let i = 0; i < SMMenuL; i++) { SMSorted.push({ 'SMprices': SMMENU.SMMenuPrice[i], 'SMid': i }); } if (cb.settingsSMListSort !== 'Do not sort the list') { SMSorted.sort(function(a, b) { return a.SMprices - b.SMprices; }); if (cb.settings.SMListSort === 'Descending') { SMSorted.reverse(); } } for (let j = 0; j < SMSorted.length; j++) { if (SMMENU.SMMenuPrice[SMSorted[j].SMid] !== 0) { SMMenuArray.push(SMMENU.SMMenuItem[SMSorted[j].SMid] + ' (' + SMMENU.SMMenuPrice[SMSorted[j].SMid] + ') '); } } SMMENU.SMMenu += SMMenuArray.join(SMMENU.SMSepChar); SMMENU.SMMenuLength = SMMENU.SMMenuPrice.length; if (SMMENU.SMMenu === 'Spoil Model Menu: ') { cb.sendNotice('Error - No Spoil Model menu items found', '', '', SMMENU.SMTxtColor, 'bold'); } } function setSMSepChar() { if (cb.settings.SMSepChar == 'Custom') { if (cb.settings.SMSepCharCustom) { SMMENU.SMSepChar = cb.settings.SMSepCharCustom; } else { SMMENU.SMSepChar = '|'; } } else { SMMENU.SMSepChar = checkSepChar(cb.settings.SMSepChar) } SMMENU.SMSepChar += ' '; } // *********************************** Help Function ************************************** function helpModBC(from) { cb.sendNotice('Adele\'s Tip Menu Pro Menu for Broadcasters and Moderators', from, appNoticeColor); cb.sendNotice('',from,appNoticeColor); cb.sendNotice( '\nTIP MENU 1:' + '\n/menu: (all users) Display the Tip Menu in the chat. Available to any user, menu only shown to the user that requests it.' + '\n/startmenu: Turn on Tip Menu if it was not started on the launch page.' + '\n/stopmenu: Turn off Tip Menu, the notice will no longer display, and tips will no longer select a menu item.' + '\n/menurequests: Show recent Tip Menu requests, defaults to a maximum of the 10 most recent when no quantity is entered.' + '\n/menurequests X: Show the last "X" Tip Menu requests.' + '\n/menurequests all: Show all the Tip Menu requests, maximum of 50.' + '\n/menuadd X Y: Add an item name "Y" with a price of "X" tokens to the menu.' + '\n/menurmv X: Removes every item with a price of "X" tokens from the Tip Menu.' + '\n/menurmv Y: Will remove any item labeled "Y" regardless of price from the Tip Menu.' + '\n/menuprice X Y: Updates a menu item with description of "Y" to "X" tokens. Description entered for "Y" must be an exact match of the text in the menu.' + '\nSPOIL MODEL MENU:' + '\n/SMmenu: (all users) Display Spoil Model Menu in the chat. Available to any user, menu only shown to the user that requests it.' + '\n/startSMmenu: Turn on Spoil Model Menu if it was not started on the launch page.' + '\n/stopSMmenu: Turn off Spoil Model Menu, the notice will no longer display, and tips will no longer select a menu item.' + '\n/SMmenurequests: Show recent Spoil Menu requests, defaults to a maximum of the 10 most recent.' + '\n/\SMmenuadd X Y: Add an item name "Y" with a price of "X" tokens to Spoil menu.' + '\n/SMmenurmv X: Removes every item from Spoil Menu with a price of "X" tokens from Spoil menu.' + '\n/SMmenurmv Y: Will remove any item labeled "Y" regardless of price from Spoil Menu.' ,from); cb.sendNotice('',from,appNoticeColor); } } } // ******************************* Upon user entry of a Message ************************************** { cb.onMessage(function (msg) { var message = msg['m'].split(' '); var cmd = 0; var symbolString = '~`!@#$%^&*()_-+={[}]|\\:;"\'<,>.?/'; var listRegExp = /[,\s]+/; var listRegExpSpc = /[,]+/; var m = msg.m; var u = msg.user; var isMod = msg.is_mod; var isBC = (u === cb.room_slug); var BC = cb.room_slug; var command = message[0] var commandVar1 = parseInt(message[1]); var commandVar2 = parseInt(message[2]); if(message[0].charAt(0) == '/') { msg['X-Spam'] = true; var ntc = null; for (var i = 1; i < message.length; i++) { if (i == 1) ntc = message[i]; else ntc += ' ' + message[i]; } var ntc2 = null; for (var i = 2; i < message.length; i++) { if (i == 2) ntc2 = message[i]; else ntc2 += ' ' + message[i]; } var cmdval = null; for (var i = 1; i < message.length; i++) { if (i == 1) cmdval = message[i]; else cmdval += ' ' + message[i]; } switch(command) { //********* Tip Menu Commands case '/menu': { cmd = 1; if (tipMenuToggle == 1) { if (isMod || isBC) { u = ''; } cb.sendNotice(TIPMENU.tipMenu, u, TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); } else if (tipMenu2Toggle == 1) { if (isMod || isBC) { u = ''; } cb.sendNotice(TIPMENU2.tipMenu, u, TIPMENU2.bgColor1, TIPMENU2.txtColor1, 'bold'); } else { cb.sendNotice('The Tip Menu has not been enabled.', u, appNoticeColor); } break; } case '/startmenu': { cmd = 1; if (isMod || isBC) { if (tipMenu2Toggle == 1) { cb.sendNotice('Cannot enable Tip Menu 1 while Tip Menu 2 is active. You can use the "/swapmenu" command to switch from Menu 2 to Menu 1.', u, appNoticeColor); } else { setTipMenuToggle('on',u) } } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.',u,appNoticeColor); } break; } case '/stopmenu': { cmd = 1; if (isMod || isBC) { setTipMenuToggle('off',u) } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.',u,appNoticeColor); } break; } case '/menurequests': { cmd = 1; touser = u; if (isMod) { touser = ''; } if (tipMenuToggle == 1) { let rL = TIPMENU.request.length; if (rL === 0) { cb.sendNotice('There have been no Tip Menu requests.', u, TIPMENU.bgColor1, TIPMENU.txtColor1); } else { let cmdInt1 = parseInt(message['1']); if (cmdInt1 <= 0) { cb.sendNotice('There have been no Tip Menu requests.', u, TIPMENU.bgColor1, TIPMENU.txtColor1); } else { let noticeMsg; let rS = 0; if (message['1'] === 'all' || message['1'] === 'All') { cmdInt1 = rL; } else if (cmdInt1 === undefined || isNaN(cmdInt1)) { cmdInt1 = 10; rS = rL - 10; } if (rL <= cmdInt1) { noticeMsg = '**** Here is the list of all the requests! ****\n'; cmdInt1 = rL; rS = 0; } else if (rL > 50) { noticeMsg = '**** Here is are the last 50 requests! ****\n'; rS = rL - 50; } else { noticeMsg = '**** Here ' + (cmdInt1 === 1 ? 'is the last' : 'are the last ' + cmdInt1) + ' request' + (cmdInt1 === 1 ? '' : 's') + '! **** \n'; rS = rL - cmdInt1; } for (let i = rS; i < rL; i++) { noticeMsg += 'Request #' + (i + 1) + ': ' + TIPMENU.requesters[i] + ' requested ' + TIPMENU.request[i] + '\n'; } noticeMsg += '**************************************'; cb.sendNotice(noticeMsg, touser, TIPMENU.bgColor1, TIPMENU.txtColor1); } } } break; } case '/menuadd': { cmd = 1; if (!isMod && !isBC) { cb.sendNotice('Only mods and broadcasters can use this command.', u, '#FFFFFF', '#FF0000'); } else { let label; let newItemPrice = parseInt(message['1']); if (newItemPrice <= 0 || isNaN(newItemPrice)) { cb.sendNotice('The correct format is "/menuadd X item" where X has to be a number over 0. This is the amount the viewers will tip for it.', u, '#FFFFFF', '#FF0000'); return; } if (!message[2]) { cb.sendNotice('You need to include a label for that option.', u, '#FFFFFF', '#FF0000'); return; } for (let j = 2; j < message.length; j++) { if (j === 2) { label = message[j]; } else { label += ' ' + message[j]; } } if (tipMenuToggle == 1) { cb.sendNotice('Tip menu to Broadcaster - ' + (u === cb.room_slug ? 'You' : u) + ' added the option "' + label + '" for ' + newItemPrice + ' tokens to the menu.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); cb.sendNotice('Tip menu to mods - ' + u + ' added the option "' + label + '" for ' + newItemPrice + ' tokens the menu.', '', '#FFFFFF', '#FF0000', 'bold', 'red'); if (cbjs.arrayContains(TIPMENU.tipMenuPrice, newItemPrice)) { cb.sendNotice('Tip Menu - ' + newItemPrice + ' is already on the menu. It is recommended to have different price for each item.', u, '#FFFFFF', '#FF0000'); } TIPMENU.tipMenuPrice.push(newItemPrice); TIPMENU.tipMenuItem.push(label); priceChecker('add','Tip Menu Option: '+label, newItemPrice); buildMenu(); } break; } } case '/menurmv': { cmd = 1; if (!isMod && !isBC) { cb.sendNotice('Only mods and broadcasters can use this command.', u, '#FFFFFF', '#FF0000'); } else { let itemPrice = parseInt(message['1']); let label; let s = 2; if (isNaN(itemPrice)) { s = 1; } for (let i = s; i < message.length; i++) { if (i === s) { label = message[i]; } else { label += ' ' + message[i]; } } if (itemPrice <= 0) { cb.sendNotice('Error! Price must be greater than 0.', '', '#FFFFFF', '#FF0000', 'bold'); return; } if (tipMenuToggle == 1) { if (itemPrice > 0) { if (cbjs.arrayContains(TIPMENU.tipMenuPrice, itemPrice)) { if (!message[2]) { cb.sendNotice('Tip menu - No item label was given with the command, so all menu items that match the price of "' + itemPrice + '" will be removed from the menu.', u, '#FFFFFF', '#FF0000', 'bold'); for (let i = 0; i < TIPMENU.menuLength; i++) { if (itemPrice === TIPMENU.tipMenuPrice[i]) { priceChecker('rmv','Tip Menu Option: '+TIPMENU.tipMenuItem[i], TIPMENU.tipMenuPrice[i],u); TIPMENU.tipMenuPrice[i] = 0; cb.sendNotice('Tip menu to Broadcaster - ' + (u === cb.room_slug ? 'You' : u) + ' removed the option "' + TIPMENU.tipMenuItem[i] + '" from the menu.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); cb.sendNotice('Tip menu to mods - ' + u + ' removed the option "' + TIPMENU.tipMenuItem[i] + '" from the menu.', '', '#FFFFFF', '#FF0000', 'bold', 'red'); } } buildMenu(); } else { let labelFound = false; for (let i = 0; i < TIPMENU.menuLength; i++) { if (itemPrice === TIPMENU.tipMenuPrice[i] && label === TIPMENU.tipMenuItem[i]) { labelFound = true; priceChecker('rmv','Tip Menu Option: '+TIPMENU.tipMenuItem[i], TIPMENU.tipMenuPrice[i],u); TIPMENU.tipMenuPrice[i] = 0; cb.sendNotice('Tip menu to Broadcaster - ' + (u === cb.room_slug ? 'You' : u) + ' removed the option "' + TIPMENU.tipMenuItem[i] + '" from the menu.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); cb.sendNotice('Tip menu to mods - ' + u + ' removed the option "' + TIPMENU.tipMenuItem[i] + '" from the menu.', '', '#FFFFFF', '#FF0000', 'bold', 'red'); buildMenu(); } } if (!labelFound) { cb.sendNotice('Tip menu - Unable find item ' + label + '(' + itemPrice + ') on the menu. Skipping.', u, '#FFFFFF', '#FF0000', 'bold'); } } } else { cb.sendNotice('Tip menu - Unable find any item at ' + itemPrice + ' tokens on the menu.', u, '#FFFFFF', '#FF0000', 'bold'); } } else { if (!label) { cb.sendNotice('Tip menu - Unable to process. Use "/menurmv X Label". Where X is the amount of tokens and label is the name of the item.', u, '#FFFFFF', '#FF0000', 'bold'); } else if (cbjs.arrayContains(TIPMENU.tipMenuItem, label)) { for (let i = 0; i < TIPMENU.menuLength; i++) { if (label === TIPMENU.tipMenuItem[i]) { priceChecker('rmv','Tip Menu Option: '+TIPMENU.tipMenuItem[i], TIPMENU.tipMenuPrice[i],u); TIPMENU.tipMenuPrice[i] = 0; cb.sendNotice('Tip menu to Broadcaster - ' + (u === cb.room_slug ? 'You' : u) + ' removed the option "' + TIPMENU.tipMenuItem[i] + '" from the menu.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); cb.sendNotice('Tip menu to mods - ' + u + ' removed the option "' + TIPMENU.tipMenuItem[i] + '" from the menu.', '', '#FFFFFF', '#FF0000', 'bold', 'red'); } } buildMenu(); } else { cb.sendNotice('Tip menu - Unable find item ' + label + ' on the menu. Skipping.', u, '#FFFFFF', '#FF0000', 'bold'); } } } break; } } case '/menuprice': { cmd = 1; if (!isMod && !isBC) { cb.sendNotice('Tip Menu Pro: Only mods and broadcasters can use this command.', u, appNoticeColor); } else { let label; let newItemPrice = parseInt(message[1]); if (newItemPrice <= 0 || isNaN(newItemPrice)) { cb.sendNotice('Tip Menu Pro: The first parameter for price is missing or is not a positive number. The correct command format is "/menuprice X Y" where "X" is the new price and must be a number over 0, and "Y" is the exact match of the current description of the item.', u, appNoticeColor); return; } if (!message[2]) { cb.sendNotice('Tip Menu Pro: The second parameter for menu item description is missing. The correct command format is "/menuprice X Y" where "X" is the new price and must be a number over 0, and "Y" is the exact match of the current description of the item.', u, appNoticeColor); return; } for (let j = 2; j < message.length; j++) { if (j === 2) { label = message[j]; } else { label += ' ' + message[j]; } } if (tipMenuToggle == 1) { if (!cbjs.arrayContains(TIPMENU.tipMenuItem, label)) { cb.sendNotice('Tip Menu Pro: Tip Menu item with description "' + label + '" was not found. Make sure you are entering an exact match of the menu item description, including upper and lower case.', u, appNoticeColor); } else { menuitemindex = TIPMENU.tipMenuItem.indexOf(label); priceChecker('rmv','Tip Menu Option: '+label, TIPMENU.tipMenuPrice[menuitemindex]); TIPMENU.tipMenuPrice[menuitemindex] = newItemPrice; priceChecker('add','Tip Menu Option: '+label, newItemPrice); cb.sendNotice('Tip menu to broadcaster - ' + (u === cb.room_slug ? 'You' : u) + ' updated the price of "' + label + '" to ' + newItemPrice + ' tokens.', cb.room_slug, appNoticeColor); cb.sendNotice('Tip menu to mods - ' + u + ' updated the price of "' + label + '" to ' + newItemPrice + ' tokens.', '', appNoticeColor, '', '', 'red'); buildMenu(); } } break; } } //********* Spoil Model Menu Commands case '/SMmenu': { cmd = 1; if (SMMenuToggle == 1) { if (isMod) { u = ''; } cb.sendNotice(SMMENU.SMMenu, u, SMMENU.SMBgColor, SMMENU.SMTxtColor, 'bold'); } else { cb.sendNotice('Spoil Model Menu has not been enabled.', u, appNoticeColor); } break; } case '/startSMmenu': { cmd = 1; if (isMod || isBC) { setSMMenuToggle('on', u) } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.', u,appNoticeColor); } break; } case '/stopSMmenu': { cmd = 1; if (isMod || isBC) { setSMMenuToggle('off', u) } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.', u,appNoticeColor); } break; } case '/SMmenurequests': { cmd = 1; m.background = '#d9d9d9'; if (isMod) { u = ''; } let SMrL = SMMENU.SMRequest.length; if (SMrL === 0) { cb.sendNotice('There is no request at the moment.', u, SMMENU.SMBgColor, SMMENU.SMTxtColor); } else { let cmdInt1 = 10; let SMNoticeMsg; let SMrS = 0; if (SMrL <= cmdInt1) { SMNoticeMsg = '**** Here is the list of the requests! ****\n'; cmdInt1 = SMrL; SMrS = 0; } else if (SMrL > 10) { SMNoticeMsg = '**** Here is are the last 10 requests! ****\n'; SMrS = SMrL - 10; } for (let i = SMrS; i < SMrL; i++) { SMNoticeMsg += 'Spoil Request #' + (i + 1) + ': ' + SMMENU.SMRequesters[i] + ' requested ' + SMMENU.SMRequest[i] + '\n'; } SMNoticeMsg += '**************************************'; cb.sendNotice(SMNoticeMsg, u, SMMENU.SMBgColor, SMMENU.SMTxtColor); } break; } case '/SMmenuadd': { cmd = 1; m.background = '#d9d9d9'; if (!isMod && !isBC) { cb.sendNotice('Only mods and broadcasters can use this command.', u, '#FFFFFF', '#FF0000'); } else { let SMlabel; let newSMItemPrice = parseInt(message['1']); if (newSMItemPrice <= 0 || isNaN(newSMItemPrice)) { cb.sendNotice('No price was given. The correct format is "/SMmenuadd X Y" where X has to be a number greater than 0. This is the amount the viewers will tip for item.', u, '#FFFFFF', '#FF0000'); return; } if (!message[2]) { cb.sendNotice('No Spoil was given. The correct format is "/SMmenuadd X Y" where Y has to be the name of Spoil being added.', u, '#FFFFFF', '#FF0000'); return; } for (let j = 2; j < message.length; j++) { if (j === 2) { SMlabel = message[j]; } else { SMlabel += ' ' + message[j]; } } cb.sendNotice('Spoil Model menu notification - ' + (u === cb.room_slug ? 'You' : u) + ' added the option "' + SMlabel + '" for ' + newSMItemPrice + ' tokens to Spoil Model menu.', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); cb.sendNotice('Spoil Model menu notification - The option "' + SMlabel + '" for ' + newSMItemPrice + ' tokens was added to Spoil Model Menu.', '', '#FFFFFF', '#FF0000', 'bold', 'red'); if (cbjs.arrayContains(SMMENU.SMMenuPrice, newSMItemPrice)) { cb.sendNotice('Spoil Model Menu - ' + newSMItemPrice + ' is already on Spoil menu. It is recommended to have different price for each item.', u, '#FFFFFF', '#FF0000'); } SMMENU.SMMenuPrice.push(newSMItemPrice); SMMENU.SMMenuItem.push(SMlabel); priceChecker('add','Spoil Menu Option: '+SMlabel, newSMItemPrice,u); SMMenuSanitize(); } break; } case '/SMmenurmv': { cmd = 1; m.background = '#d9d9d9'; if (!isMod && !isBC) { cb.sendNotice('Only mods and broadcasters can use this command.', u, '#FFFFFF', '#FF0000'); } else { let SMItemPrice = parseInt(message['1']); let SMlabel; let s = 2; if (isNaN(SMItemPrice)) { s = 1; } for (let i = s; i < message.length; i++) { if (i === s) { SMlabel = message[i]; } else { SMlabel += ' ' + message[i]; } } if (SMItemPrice <= 0) { cb.sendNotice('Spoil Model menu - Error! Price to be removed must be greater than 0.', '', '#FFFFFF', '#FF0000', 'bold'); } if (SMItemPrice > 0) { if (cbjs.arrayContains(SMMENU.SMMenuPrice, SMItemPrice)) { if (!message[2]) { cb.sendNotice('Spoil Model Menu - No spoil name was provided, all options that match the "' + SMItemPrice + '" token price will be removed.', u, '#FFFFFF', '#FF0000', 'bold'); for (let i = 0; i < SMMENU.SMMenuLength; i++) { if (SMItemPrice === SMMENU.SMMenuPrice[i]) { priceChecker('rmv','Spoil Menu Option: '+SMMENU.SMMenuItem[i], SMMENU.SMMenuPrice[i],u); SMMENU.SMMenuPrice[i] = 0; cb.sendNotice('Spoil Model Menu - ' + (u === cb.room_slug ? 'You' : u) + ' removed the option "' + SMMENU.SMMenuItem[i] + '".', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); cb.sendNotice('Spoil Model Menu - The option "' + SMMENU.SMMenuItem[i] + '" was removed.', '', '#FFFFFF', '#FF0000', 'bold', 'red'); } } SMMenuSanitize(); } else { let SMlabelFound = false; for (let i = 0; i < SMMENU.SMLength; i++) { if (SMItemPrice === SMMENU.SMMenuPrice[i] && label === SMMENU.SMMenuItem[i]) { SMlabelFound = true; priceChecker('rmv','Spoil Menu Option: '+SMMENU.SMTipMenuItem[i], SMMENU.SMMenuPrice[i],u); SMMENU.SMMenuPrice[i] = 0; cb.sendNotice('Spoil Model Menu - ' + (u === cb.room_slug ? 'You' : u) + ' removed the option "' + SMMENU.SMMenuItem[i] + '".', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); cb.sendNotice('Spoil Model Menu - The option "' + SMMENU.SMMenuItem[i] + '" was removed.', '', '#FFFFFF', '#FF0000', 'bold', 'red'); buildMenu(); } } if (!SMlabelFound) { cb.sendNotice('Spoil Model Menu - Unable find item ' + SMlabel + '(' + SMItemPrice + ') on the menu. Skipping.', u, '#FFFFFF', '#FF0000', 'bold'); } } } else { cb.sendNotice('Spoil Model Menu - Unable find any item at ' + SMItemPrice + ' tokens on Spoil menu.', u, '#FFFFFF', '#FF0000', 'bold'); } } else { if (!SMlabel) { cb.sendNotice('Spoil Model Menu - Unable to process command. Use "/SMmenurmv X Y". Where X is the tip amount and Y is the name of the Spoil.', u, '#FFFFFF', '#FF0000', 'bold'); } else if (cbjs.arrayContains(SMMENU.SMMenuItem, SMlabel)) { for (let i = 0; i < SMMENU.SMMenuLength; i++) { if (SMlabel === SMMENU.SMMenuItem[i]) { priceChecker('rmv','Spoil Model Menu Option: '+SMMENU.SMpMenuItem[i], SMMENU.SMMenuPrice[i],u); SMMENU.SMMenuPrice[i] = 0; cb.sendNotice('Spoil Model Menu - ' + (u === cb.room_slug ? 'You' : u) + ' removed the option "' + SMMENU.SMMenuItem[i] + '".', cb.room_slug, '#FFFFFF', '#FF0000', 'bold'); cb.sendNotice('Spoil Model Menu - The option "' + SMMENU.SMMenuItem[i] + '" was removed.', '', '#FFFFFF', '#FF0000', 'bold', 'red'); } } SMMenuSanitize(); } else { cb.sendNotice('Spoil Model Menu - Unable find item ' + SMlabel + ' on Spoil menu. Skipping.', u, '#FFFFFF', '#FF0000', 'bold'); } } } break; } //********* Price Check List case '/pricechecklist': { cmd = 1; if (isMod || isBC) { if (priceCheckArray.name.length > 0) { cb.sendNotice('Alphabetic listing of Price Check Array entries : ', u, appNoticeColor); var outString = ''; for (var i = 0; i < priceCheckArray.name.length; i++) { if (priceCheckArray.name[i] == null) outString += ' ' + i + '. empty' + '\n'; else outString += ' ' + (i+1) + '. ' + '"' + priceCheckArray.name[i] + '"' + ': ' + priceCheckArray.amount[i] + '\n'; } cb.sendNotice(outString,u); cb.sendNotice('End of List', u, appNoticeColor); } else { cb.sendNotice('No entries yet.', u, appNoticeColor); } } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.', u, appNoticeColor); } break; } //********* Help Menu case '/menuhelp': { cmd = 1; if (isMod || isBC) { helpModBC(u); } else { cb.sendNotice('There is no help text for users, the commands "/menu" and "/SMmenu" can be used to display tip menu or spoil menu on demand.', u, appNoticeColor); } break; } //********* End of Expected commands } } return msg; }); } // *********************************** Actions on user entering ************************************** { cb.onEnter(function(user) { // Variables var u = user.user; var isMod = user.is_mod; var isCBMod = user.is_mod; var isBC = (u === cb.room_slug); var isFan = user.in_fanclub; // **** General Entry Message var entryMessage = ''; if (tipMenuToggle == 1) { entryMessage += '\u21E8 A Tip Menu is available. The menu may display periodically if enabled by the broadcaster, or you can see the menu at anytime by typing "/menu".'; } if (SMTipMenuToggle == 1) { if (tipMenuToggle == 1) { entryMessage += '\n'; } entryMessage += '\u21E8 Spoil Model Menu is active. The menu may display periodically if enabled by the broadcaster, or you can see the menu at anytime by typing "/SMmenu".'; } temptextcolor = checkTextColor('Dark Green'); tempbgcolor = checkBgColor('Cream'); cb.sendNotice(entryMessage, u, tempbgcolor, temptextcolor, 'bold'); }); } // *********************************** Actions upon leaving ************************************** { cb.onLeave(function(user) { }); } // *********************************** Actions upon tipping ************************************** { cb.onTip(function (tip) { var tipAmount = Number.parseInt(tip.amount, 10); var u = tip.from_user // ***** Tip Menu if (tipMenuToggle == 1) { for (let i = 0; i < TIPMENU.menuLength; i++) { if (tipAmount == TIPMENU.tipMenuPrice[i]) { TIPMENU.requesters.push(tip.from_user); TIPMENU.request.push(TIPMENU.tipMenuItem[i]); if (cb.settings.sepCharInPrize == 'Yes') { cb.sendNotice(TIPMENU.sepChar + ' ' + u + ' tipped for ' + TIPMENU.tipMenuItem[i] + ' ' + TIPMENU.sepChar, '', TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); } else { cb.sendNotice(u + ' tipped for ' + TIPMENU.tipMenuItem[i], '', TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); } } } } if (SMTipMenuToggle == 1) { for (let i = 0; i < SMMENU.SMMenuLength; i++) { if (tipAmount == SMMENU.SMMenuPrice[i]) { SMMENU.SMRequesters.push(tip.from_user); SMMENU.SMRequest.push(SMMENU.SMMenuItem[i]); if (cb.settings.sepCharInPrize == 'Yes') { cb.sendNotice(SMMENU.SMSepChar + ' ' + u + ' tipped for ' + SMMENU.SMMenuItem[i] + ' ' + SMMENU.SMSepChar, '', SMMENU.SMBgColor, SMMENU.SMTxtColor, 'bold'); } else { cb.sendNotice(u + ' tipped for ' + SMMENU.SMMenuItem[i], '', SMMENU.SMBgColor, SMMENU.SMTxtColor, 'bold'); } } } } }); } // *********************************** Initialize ************************************** { if (initialize == 0) { cb.sendNotice('Adele\'s Tip Menu Pro'); intromessage = '\nYou can type "/menuhelp" to display the command list summary.'; cb.sendNotice(intromessage, cb.room_slug, appAlertColor); if (cb.settings.enableTipMenu == 'Yes') { setTipMenuToggle('on',cb.room_slug); } } if (cb.settings.enableSMMenu == 'Yes') { setSMMenuToggle('on',cb.room_slug); } initialize = 1; }
© Copyright Chaturbate 2011- 2025. All Rights Reserved.