Bots Home
|
Create an App
Lotanus Test Bot
Author:
lotanus
Description
Source Code
Launch Bot
Current Users
Created by:
Lotanus
// Declare prefixes Object (user->text). var prefixes = new Object(); // Declare claims Object (user->nickname). var claims = new Object(); // Declare tippers Object (user->total_amount). var tippers = new Object(); // CSS colors. var colorNames = { 'picky_olivia': '#fff6fb', 'aliceblue': '#f0f8ff', 'antiquewhite': '#faebd7', 'aqua': '#00ffff', 'aquamarine': '#7fffd4', 'azure': '#f0ffff', 'beige': '#f5f5dc', 'bisque': '#ffe4c4', 'black': '#000000', 'blanchedalmond': '#ffebcd', 'blue': '#0000ff', 'blueviolet': '#8a2be2', 'brown': '#a52a2a', 'burlywood': '#deb887', 'cadetblue': '#5f9ea0', 'chartreuse': '#7fff00', 'chocolate': '#d2691e', 'coral': '#ff7f50', 'cornflowerblue': '#6495ed', 'cornsilk': '#fff8dc', 'crimson': '#dc143c', 'cyan': '#00ffff', 'darkblue': '#00008b', 'darkcyan': '#008b8b', 'darkgoldenrod': '#b8860b', 'darkgray': '#a9a9a9', 'darkgreen': '#006400', 'darkkhaki': '#bdb76b', 'darkmagenta': '#8b008b', 'darkolivegreen': '#556b2f', 'darkorange': '#ff8c00', 'darkorchid': '#9932cc', 'darkred': '#8b0000', 'darksalmon': '#e9967a', 'darkseagreen': '#8fbc8f', 'darkslateblue': '#483d8b', 'darkslategray': '#2f4f4f', 'darkturquoise': '#00ced1', 'darkviolet': '#9400d3', 'deeppink': '#ff1493', 'deepskyblue': '#00bfff', 'dimgray': '#696969', 'dodgerblue': '#1e90ff', 'firebrick': '#b22222', 'floralwhite': '#fffaf0', 'forestgreen': '#228b22', 'fuchsia': '#ff00ff', 'gainsboro': '#dcdcdc', 'ghostwhite': '#f8f8ff', 'gold': '#ffd700', 'goldenrod': '#daa520', 'gray': '#808080', 'green': '#008000', 'greenyellow': '#adff2f', 'honeydew': '#f0fff0', 'hotpink': '#ff69b4', 'indianred': '#cd5c5c', 'indigo': '#4b0082', 'ivory': '#fffff0', 'khaki': '#f0e68c', 'lavender': '#e6e6fa', 'lavenderblush': '#fff0f5', 'lawngreen': '#7cfc00', 'lemonchiffon': '#fffacd', 'lightblue': '#add8e6', 'lightcoral': '#f08080', 'lightcyan': '#e0ffff', 'lightgoldenrodyellow': '#fafad2', 'lightgray': '#d3d3d3', 'lightgreen': '#90ee90', 'lightpink': '#ffb6c1', 'lightsalmon': '#ffa07a', 'lightseagreen': '#20b2aa', 'lightskyblue': '#87cefa', 'lightslategray': '#778899', 'lightsteelblue': '#b0c4de', 'lightyellow': '#ffffe0', 'lime': '#00ff00', 'limegreen': '#32cd32', 'linen': '#faf0e6', 'magenta': '#ff00ff', 'maroon': '#800000', 'mediumaquamarine': '#66cdaa', 'mediumblue': '#0000cd', 'mediumorchid': '#ba55d3', 'mediumpurple': '#9370db', 'mediumseagreen': '#3cb371', 'mediumslateblue': '#7b68ee', 'mediumspringgreen': '#00fa9a', 'mediumturquoise': '#48d1cc', 'mediumvioletred': '#c71585', 'midnightblue': '#191970', 'mintcream': '#f5fffa', 'mistyrose': '#ffe4e1', 'moccasin': '#ffe4b5', 'navajowhite': '#ffdead', 'navy': '#000080', 'oldlace': '#fdf5e6', 'olive': '#808000', 'olivedrab': '#6b8e23', 'orange': '#ffa500', 'orangered': '#ff4500', 'orchid': '#da70d6', 'palegoldenrod': '#eee8aa', 'palegreen': '#98fb98', 'paleturquoise': '#afeeee', 'palevioletred': '#db7093', 'papayawhip': '#ffefd5', 'peachpuff': '#ffdab9', 'peru': '#cd853f', 'pink': '#ffc0cb', 'plum': '#dda0dd', 'powderblue': '#b0e0e6', 'purple': '#800080', 'red': '#ff0000', 'rosybrown': '#bc8f8f', 'royalblue': '#4169e1', 'saddlebrown': '#8b4513', 'salmon': '#fa8072', 'sandybrown': '#f4a460', 'seagreen': '#2e8b57', 'seashell': '#fff5ee', 'sienna': '#a0522d', 'silver': '#c0c0c0', 'skyblue': '#87ceeb', 'slateblue': '#6a5acd', 'slategray': '#708090', 'snow': '#fffafa', 'springgreen': '#00ff7f', 'steelblue': '#4682b4', 'tan': '#d2b48c', 'teal': '#008080', 'thistle': '#d8bfd8', 'tomato': '#ff6347', 'turquoise': '#40e0d0', 'violet': '#ee82ee', 'wheat': '#f5deb3', 'white': '#ffffff', 'whitesmoke': '#f5f5f5', 'yellow': '#ffff00', 'yellowgreen': '#9acd32', 'chaturbatedarkbluebackground': '#d5ebf8', 'chaturbatedarkgreenbackground': '#99ff99', 'chaturbatelightbluebackground': '#f2f9fd', 'chaturbateorange': '#dc5500', 'hiliteblue': '#9999ff', 'hilitecyan': '#99ffff', 'hilitegreen': '#99ff99', 'hiliteorange': '#ffcc66', 'hilitepurple': '#ff99ff', 'hilitered': '#ff9999', 'hiliteyellow': '#ffff99' }; // Specific user variables that will be used for cb.settings. var specific_users = ["user_1", "user_2", "user_3", "user_4", "user_5", "user_6", "user_7", "user_8", "user_9", "user_10", "user_11", "user_12", "user_13", "user_14", "user_15", "user_16", "user_17", "user_18", "user_19", "user_20"]; // Silencing var. var silenced = false; // Rotating Notifier vars var i = 0; var MAXITEMS = 10; // tipMenu Vars var lastTipper = '--'; var lastTipAmount = 0; var tipCounter = 0; var lastItem = '--'; // Bot settings. cb.settings_choices = [{ name: 'model_text', type: 'str', required: false, label: "Prefix my messages" }, { name: 'model_color', type: 'choice', required: false, label: "My font color", choice1: 'aliceblue', choice2: 'antiquewhite', choice3: 'aqua', choice4: 'aquamarine', choice5: 'azure', choice6: 'beige', choice7: 'bisque', choice8: 'black', choice9: 'blanchedalmond', choice10: 'blue', choice11: 'blueviolet', choice12: 'brown', choice13: 'burlywood', choice14: 'cadetblue', choice15: 'chartreuse', choice16: 'chocolate', choice17: 'coral', choice18: 'cornflowerblue', choice19: 'cornsilk', choice20: 'crimson', choice21: 'cyan', choice22: 'darkblue', choice23: 'darkcyan', choice24: 'darkgoldenrod', choice25: 'darkgray', choice26: 'darkgreen', choice27: 'darkkhaki', choice28: 'darkmagenta', choice29: 'darkolivegreen', choice30: 'darkorange', choice31: 'darkorchid', choice32: 'darkred', choice33: 'darksalmon', choice34: 'darkseagreen', choice35: 'darkslateblue', choice36: 'darkslategray', choice37: 'darkturquoise', choice38: 'darkviolet', choice39: 'deeppink', choice40: 'deepskyblue', choice41: 'dimgray', choice42: 'dodgerblue', choice43: 'firebrick', choice44: 'floralwhite', choice45: 'forestgreen', choice46: 'fuchsia', choice47: 'gainsboro', choice48: 'ghostwhite', choice49: 'gold', choice50: 'goldenrod', choice51: 'gray', choice52: 'green', choice53: 'greenyellow', choice54: 'honeydew', choice55: 'hotpink', choice56: 'indianred', choice57: 'indigo', choice58: 'ivory', choice59: 'khaki', choice60: 'lavender', choice61: 'lavenderblush', choice62: 'lawngreen', choice63: 'lemonchiffon', choice64: 'lightblue', choice65: 'lightcoral', choice66: 'lightcyan', choice67: 'lightgoldenrodyellow', choice68: 'lightgray', choice69: 'lightgreen', choice70: 'lightpink', choice71: 'lightsalmon', choice72: 'lightseagreen', choice73: 'lightskyblue', choice74: 'lightslategray', choice75: 'lightsteelblue', choice76: 'lightyellow', choice77: 'lime', choice78: 'limegreen', choice79: 'linen', choice80: 'magenta', choice81: 'maroon', choice82: 'mediumaquamarine', choice83: 'mediumblue', choice84: 'mediumorchid', choice85: 'mediumpurple', choice86: 'mediumseagreen', choice87: 'mediumslateblue', choice88: 'mediumspringgreen', choice89: 'mediumturquoise', choice90: 'mediumvioletred', choice91: 'midnightblue', choice92: 'mintcream', choice93: 'mistyrose', choice94: 'moccasin', choice95: 'navajowhite', choice96: 'navy', choice97: 'oldlace', choice98: 'olive', choice99: 'olivedrab', choice100: 'orange', choice101: 'orangered', choice102: 'orchid', choice103: 'palegoldenrod', choice104: 'palegreen', choice105: 'paleturquoise', choice106: 'palevioletred', choice107: 'papayawhip', choice108: 'peachpuff', choice109: 'peru', choice110: 'pink', choice111: 'plum', choice112: 'powderblue', choice113: 'purple', choice114: 'red', choice115: 'rosybrown', choice116: 'royalblue', choice117: 'saddlebrown', choice118: 'salmon', choice119: 'sandybrown', choice120: 'seagreen', choice121: 'seashell', choice122: 'sienna', choice123: 'silver', choice124: 'skyblue', choice125: 'slateblue', choice126: 'slategray', choice127: 'snow', choice128: 'springgreen', choice129: 'steelblue', choice130: 'tan', choice131: 'teal', choice132: 'thistle', choice133: 'tomato', choice134: 'turquoise', choice135: 'violet', choice136: 'wheat', choice137: 'white', choice138: 'whitesmoke', choice139: 'yellow', choice140: 'yellowgreen', choice141: 'chaturbatedarkbluebackground', choice142: 'chaturbatedarkgreenbackground', choice143: 'chaturbatelightbluebackground', choice144: 'chaturbateorange', choice145: 'hiliteblue', choice146: 'hilitecyan', choice147: 'hilitegreen', choice148: 'hiliteorange', choice149: 'hilitepurple', choice150: 'hilitered', choice151: 'hiliteyellow', choice152: 'picky_olivia', defaultValue: 'black' }, { name: 'model_background', type: 'choice', required: false, label: "My background color", choice1: 'aliceblue', choice2: 'antiquewhite', choice3: 'aqua', choice4: 'aquamarine', choice5: 'azure', choice6: 'beige', choice7: 'bisque', choice8: 'black', choice9: 'blanchedalmond', choice10: 'blue', choice11: 'blueviolet', choice12: 'brown', choice13: 'burlywood', choice14: 'cadetblue', choice15: 'chartreuse', choice16: 'chocolate', choice17: 'coral', choice18: 'cornflowerblue', choice19: 'cornsilk', choice20: 'crimson', choice21: 'cyan', choice22: 'darkblue', choice23: 'darkcyan', choice24: 'darkgoldenrod', choice25: 'darkgray', choice26: 'darkgreen', choice27: 'darkkhaki', choice28: 'darkmagenta', choice29: 'darkolivegreen', choice30: 'darkorange', choice31: 'darkorchid', choice32: 'darkred', choice33: 'darksalmon', choice34: 'darkseagreen', choice35: 'darkslateblue', choice36: 'darkslategray', choice37: 'darkturquoise', choice38: 'darkviolet', choice39: 'deeppink', choice40: 'deepskyblue', choice41: 'dimgray', choice42: 'dodgerblue', choice43: 'firebrick', choice44: 'floralwhite', choice45: 'forestgreen', choice46: 'fuchsia', choice47: 'gainsboro', choice48: 'ghostwhite', choice49: 'gold', choice50: 'goldenrod', choice51: 'gray', choice52: 'green', choice53: 'greenyellow', choice54: 'honeydew', choice55: 'hotpink', choice56: 'indianred', choice57: 'indigo', choice58: 'ivory', choice59: 'khaki', choice60: 'lavender', choice61: 'lavenderblush', choice62: 'lawngreen', choice63: 'lemonchiffon', choice64: 'lightblue', choice65: 'lightcoral', choice66: 'lightcyan', choice67: 'lightgoldenrodyellow', choice68: 'lightgray', choice69: 'lightgreen', choice70: 'lightpink', choice71: 'lightsalmon', choice72: 'lightseagreen', choice73: 'lightskyblue', choice74: 'lightslategray', choice75: 'lightsteelblue', choice76: 'lightyellow', choice77: 'lime', choice78: 'limegreen', choice79: 'linen', choice80: 'magenta', choice81: 'maroon', choice82: 'mediumaquamarine', choice83: 'mediumblue', choice84: 'mediumorchid', choice85: 'mediumpurple', choice86: 'mediumseagreen', choice87: 'mediumslateblue', choice88: 'mediumspringgreen', choice89: 'mediumturquoise', choice90: 'mediumvioletred', choice91: 'midnightblue', choice92: 'mintcream', choice93: 'mistyrose', choice94: 'moccasin', choice95: 'navajowhite', choice96: 'navy', choice97: 'oldlace', choice98: 'olive', choice99: 'olivedrab', choice100: 'orange', choice101: 'orangered', choice102: 'orchid', choice103: 'palegoldenrod', choice104: 'palegreen', choice105: 'paleturquoise', choice106: 'palevioletred', choice107: 'papayawhip', choice108: 'peachpuff', choice109: 'peru', choice110: 'pink', choice111: 'plum', choice112: 'powderblue', choice113: 'purple', choice114: 'red', choice115: 'rosybrown', choice116: 'royalblue', choice117: 'saddlebrown', choice118: 'salmon', choice119: 'sandybrown', choice120: 'seagreen', choice121: 'seashell', choice122: 'sienna', choice123: 'silver', choice124: 'skyblue', choice125: 'slateblue', choice126: 'slategray', choice127: 'snow', choice128: 'springgreen', choice129: 'steelblue', choice130: 'tan', choice131: 'teal', choice132: 'thistle', choice133: 'tomato', choice134: 'turquoise', choice135: 'violet', choice136: 'wheat', choice137: 'white', choice138: 'whitesmoke', choice139: 'yellow', choice140: 'yellowgreen', choice141: 'chaturbatedarkbluebackground', choice142: 'chaturbatedarkgreenbackground', choice143: 'chaturbatelightbluebackground', choice144: 'chaturbateorange', choice145: 'hiliteblue', choice146: 'hilitecyan', choice147: 'hilitegreen', choice148: 'hiliteorange', choice149: 'hilitepurple', choice150: 'hilitered', choice151: 'hiliteyellow', choice152: 'picky_olivia', defaultValue: 'white' }, { name: 'mod_users', type: 'str', required: false, label: "Mods [user1 user2 user3 ...]" }, { name: 'mod_text', type: 'str', required: false, label: "Prefix mod messages" }, { name: 'mod_color', type: 'choice', required: false, label: "Mods font color", choice1: 'aliceblue', choice2: 'antiquewhite', choice3: 'aqua', choice4: 'aquamarine', choice5: 'azure', choice6: 'beige', choice7: 'bisque', choice8: 'black', choice9: 'blanchedalmond', choice10: 'blue', choice11: 'blueviolet', choice12: 'brown', choice13: 'burlywood', choice14: 'cadetblue', choice15: 'chartreuse', choice16: 'chocolate', choice17: 'coral', choice18: 'cornflowerblue', choice19: 'cornsilk', choice20: 'crimson', choice21: 'cyan', choice22: 'darkblue', choice23: 'darkcyan', choice24: 'darkgoldenrod', choice25: 'darkgray', choice26: 'darkgreen', choice27: 'darkkhaki', choice28: 'darkmagenta', choice29: 'darkolivegreen', choice30: 'darkorange', choice31: 'darkorchid', choice32: 'darkred', choice33: 'darksalmon', choice34: 'darkseagreen', choice35: 'darkslateblue', choice36: 'darkslategray', choice37: 'darkturquoise', choice38: 'darkviolet', choice39: 'deeppink', choice40: 'deepskyblue', choice41: 'dimgray', choice42: 'dodgerblue', choice43: 'firebrick', choice44: 'floralwhite', choice45: 'forestgreen', choice46: 'fuchsia', choice47: 'gainsboro', choice48: 'ghostwhite', choice49: 'gold', choice50: 'goldenrod', choice51: 'gray', choice52: 'green', choice53: 'greenyellow', choice54: 'honeydew', choice55: 'hotpink', choice56: 'indianred', choice57: 'indigo', choice58: 'ivory', choice59: 'khaki', choice60: 'lavender', choice61: 'lavenderblush', choice62: 'lawngreen', choice63: 'lemonchiffon', choice64: 'lightblue', choice65: 'lightcoral', choice66: 'lightcyan', choice67: 'lightgoldenrodyellow', choice68: 'lightgray', choice69: 'lightgreen', choice70: 'lightpink', choice71: 'lightsalmon', choice72: 'lightseagreen', choice73: 'lightskyblue', choice74: 'lightslategray', choice75: 'lightsteelblue', choice76: 'lightyellow', choice77: 'lime', choice78: 'limegreen', choice79: 'linen', choice80: 'magenta', choice81: 'maroon', choice82: 'mediumaquamarine', choice83: 'mediumblue', choice84: 'mediumorchid', choice85: 'mediumpurple', choice86: 'mediumseagreen', choice87: 'mediumslateblue', choice88: 'mediumspringgreen', choice89: 'mediumturquoise', choice90: 'mediumvioletred', choice91: 'midnightblue', choice92: 'mintcream', choice93: 'mistyrose', choice94: 'moccasin', choice95: 'navajowhite', choice96: 'navy', choice97: 'oldlace', choice98: 'olive', choice99: 'olivedrab', choice100: 'orange', choice101: 'orangered', choice102: 'orchid', choice103: 'palegoldenrod', choice104: 'palegreen', choice105: 'paleturquoise', choice106: 'palevioletred', choice107: 'papayawhip', choice108: 'peachpuff', choice109: 'peru', choice110: 'pink', choice111: 'plum', choice112: 'powderblue', choice113: 'purple', choice114: 'red', choice115: 'rosybrown', choice116: 'royalblue', choice117: 'saddlebrown', choice118: 'salmon', choice119: 'sandybrown', choice120: 'seagreen', choice121: 'seashell', choice122: 'sienna', choice123: 'silver', choice124: 'skyblue', choice125: 'slateblue', choice126: 'slategray', choice127: 'snow', choice128: 'springgreen', choice129: 'steelblue', choice130: 'tan', choice131: 'teal', choice132: 'thistle', choice133: 'tomato', choice134: 'turquoise', choice135: 'violet', choice136: 'wheat', choice137: 'white', choice138: 'whitesmoke', choice139: 'yellow', choice140: 'yellowgreen', choice141: 'chaturbatedarkbluebackground', choice142: 'chaturbatedarkgreenbackground', choice143: 'chaturbatelightbluebackground', choice144: 'chaturbateorange', choice145: 'hiliteblue', choice146: 'hilitecyan', choice147: 'hilitegreen', choice148: 'hiliteorange', choice149: 'hilitepurple', choice150: 'hilitered', choice151: 'hiliteyellow', choice152: 'picky_olivia', defaultValue: 'black' }, { name: 'mod_background', type: 'choice', required: false, label: "Mods background color", choice1: 'aliceblue', choice2: 'antiquewhite', choice3: 'aqua', choice4: 'aquamarine', choice5: 'azure', choice6: 'beige', choice7: 'bisque', choice8: 'black', choice9: 'blanchedalmond', choice10: 'blue', choice11: 'blueviolet', choice12: 'brown', choice13: 'burlywood', choice14: 'cadetblue', choice15: 'chartreuse', choice16: 'chocolate', choice17: 'coral', choice18: 'cornflowerblue', choice19: 'cornsilk', choice20: 'crimson', choice21: 'cyan', choice22: 'darkblue', choice23: 'darkcyan', choice24: 'darkgoldenrod', choice25: 'darkgray', choice26: 'darkgreen', choice27: 'darkkhaki', choice28: 'darkmagenta', choice29: 'darkolivegreen', choice30: 'darkorange', choice31: 'darkorchid', choice32: 'darkred', choice33: 'darksalmon', choice34: 'darkseagreen', choice35: 'darkslateblue', choice36: 'darkslategray', choice37: 'darkturquoise', choice38: 'darkviolet', choice39: 'deeppink', choice40: 'deepskyblue', choice41: 'dimgray', choice42: 'dodgerblue', choice43: 'firebrick', choice44: 'floralwhite', choice45: 'forestgreen', choice46: 'fuchsia', choice47: 'gainsboro', choice48: 'ghostwhite', choice49: 'gold', choice50: 'goldenrod', choice51: 'gray', choice52: 'green', choice53: 'greenyellow', choice54: 'honeydew', choice55: 'hotpink', choice56: 'indianred', choice57: 'indigo', choice58: 'ivory', choice59: 'khaki', choice60: 'lavender', choice61: 'lavenderblush', choice62: 'lawngreen', choice63: 'lemonchiffon', choice64: 'lightblue', choice65: 'lightcoral', choice66: 'lightcyan', choice67: 'lightgoldenrodyellow', choice68: 'lightgray', choice69: 'lightgreen', choice70: 'lightpink', choice71: 'lightsalmon', choice72: 'lightseagreen', choice73: 'lightskyblue', choice74: 'lightslategray', choice75: 'lightsteelblue', choice76: 'lightyellow', choice77: 'lime', choice78: 'limegreen', choice79: 'linen', choice80: 'magenta', choice81: 'maroon', choice82: 'mediumaquamarine', choice83: 'mediumblue', choice84: 'mediumorchid', choice85: 'mediumpurple', choice86: 'mediumseagreen', choice87: 'mediumslateblue', choice88: 'mediumspringgreen', choice89: 'mediumturquoise', choice90: 'mediumvioletred', choice91: 'midnightblue', choice92: 'mintcream', choice93: 'mistyrose', choice94: 'moccasin', choice95: 'navajowhite', choice96: 'navy', choice97: 'oldlace', choice98: 'olive', choice99: 'olivedrab', choice100: 'orange', choice101: 'orangered', choice102: 'orchid', choice103: 'palegoldenrod', choice104: 'palegreen', choice105: 'paleturquoise', choice106: 'palevioletred', choice107: 'papayawhip', choice108: 'peachpuff', choice109: 'peru', choice110: 'pink', choice111: 'plum', choice112: 'powderblue', choice113: 'purple', choice114: 'red', choice115: 'rosybrown', choice116: 'royalblue', choice117: 'saddlebrown', choice118: 'salmon', choice119: 'sandybrown', choice120: 'seagreen', choice121: 'seashell', choice122: 'sienna', choice123: 'silver', choice124: 'skyblue', choice125: 'slateblue', choice126: 'slategray', choice127: 'snow', choice128: 'springgreen', choice129: 'steelblue', choice130: 'tan', choice131: 'teal', choice132: 'thistle', choice133: 'tomato', choice134: 'turquoise', choice135: 'violet', choice136: 'wheat', choice137: 'white', choice138: 'whitesmoke', choice139: 'yellow', choice140: 'yellowgreen', choice141: 'chaturbatedarkbluebackground', choice142: 'chaturbatedarkgreenbackground', choice143: 'chaturbatelightbluebackground', choice144: 'chaturbateorange', choice145: 'hiliteblue', choice146: 'hilitecyan', choice147: 'hilitegreen', choice148: 'hiliteorange', choice149: 'hilitepurple', choice150: 'hilitered', choice151: 'hiliteyellow', choice152: 'picky_olivia', defaultValue: 'white' }, { name: 'fan_users', type: 'str', required: false, label: "Fans [user1 user2 user3 ...]" }, { name: 'fan_text', type: 'str', required: false, label: "Prefix fan messages" }, { name: 'fan_background', type: 'choice', required: false, label: "Fans background color", choice1: 'aliceblue', choice2: 'antiquewhite', choice3: 'aqua', choice4: 'aquamarine', choice5: 'azure', choice6: 'beige', choice7: 'bisque', choice8: 'black', choice9: 'blanchedalmond', choice10: 'blue', choice11: 'blueviolet', choice12: 'brown', choice13: 'burlywood', choice14: 'cadetblue', choice15: 'chartreuse', choice16: 'chocolate', choice17: 'coral', choice18: 'cornflowerblue', choice19: 'cornsilk', choice20: 'crimson', choice21: 'cyan', choice22: 'darkblue', choice23: 'darkcyan', choice24: 'darkgoldenrod', choice25: 'darkgray', choice26: 'darkgreen', choice27: 'darkkhaki', choice28: 'darkmagenta', choice29: 'darkolivegreen', choice30: 'darkorange', choice31: 'darkorchid', choice32: 'darkred', choice33: 'darksalmon', choice34: 'darkseagreen', choice35: 'darkslateblue', choice36: 'darkslategray', choice37: 'darkturquoise', choice38: 'darkviolet', choice39: 'deeppink', choice40: 'deepskyblue', choice41: 'dimgray', choice42: 'dodgerblue', choice43: 'firebrick', choice44: 'floralwhite', choice45: 'forestgreen', choice46: 'fuchsia', choice47: 'gainsboro', choice48: 'ghostwhite', choice49: 'gold', choice50: 'goldenrod', choice51: 'gray', choice52: 'green', choice53: 'greenyellow', choice54: 'honeydew', choice55: 'hotpink', choice56: 'indianred', choice57: 'indigo', choice58: 'ivory', choice59: 'khaki', choice60: 'lavender', choice61: 'lavenderblush', choice62: 'lawngreen', choice63: 'lemonchiffon', choice64: 'lightblue', choice65: 'lightcoral', choice66: 'lightcyan', choice67: 'lightgoldenrodyellow', choice68: 'lightgray', choice69: 'lightgreen', choice70: 'lightpink', choice71: 'lightsalmon', choice72: 'lightseagreen', choice73: 'lightskyblue', choice74: 'lightslategray', choice75: 'lightsteelblue', choice76: 'lightyellow', choice77: 'lime', choice78: 'limegreen', choice79: 'linen', choice80: 'magenta', choice81: 'maroon', choice82: 'mediumaquamarine', choice83: 'mediumblue', choice84: 'mediumorchid', choice85: 'mediumpurple', choice86: 'mediumseagreen', choice87: 'mediumslateblue', choice88: 'mediumspringgreen', choice89: 'mediumturquoise', choice90: 'mediumvioletred', choice91: 'midnightblue', choice92: 'mintcream', choice93: 'mistyrose', choice94: 'moccasin', choice95: 'navajowhite', choice96: 'navy', choice97: 'oldlace', choice98: 'olive', choice99: 'olivedrab', choice100: 'orange', choice101: 'orangered', choice102: 'orchid', choice103: 'palegoldenrod', choice104: 'palegreen', choice105: 'paleturquoise', choice106: 'palevioletred', choice107: 'papayawhip', choice108: 'peachpuff', choice109: 'peru', choice110: 'pink', choice111: 'plum', choice112: 'powderblue', choice113: 'purple', choice114: 'red', choice115: 'rosybrown', choice116: 'royalblue', choice117: 'saddlebrown', choice118: 'salmon', choice119: 'sandybrown', choice120: 'seagreen', choice121: 'seashell', choice122: 'sienna', choice123: 'silver', choice124: 'skyblue', choice125: 'slateblue', choice126: 'slategray', choice127: 'snow', choice128: 'springgreen', choice129: 'steelblue', choice130: 'tan', choice131: 'teal', choice132: 'thistle', choice133: 'tomato', choice134: 'turquoise', choice135: 'violet', choice136: 'wheat', choice137: 'white', choice138: 'whitesmoke', choice139: 'yellow', choice140: 'yellowgreen', choice141: 'chaturbatedarkbluebackground', choice142: 'chaturbatedarkgreenbackground', choice143: 'chaturbatelightbluebackground', choice144: 'chaturbateorange', choice145: 'hiliteblue', choice146: 'hilitecyan', choice147: 'hilitegreen', choice148: 'hiliteorange', choice149: 'hilitepurple', choice150: 'hilitered', choice151: 'hiliteyellow', choice152: 'picky_olivia', defaultValue: 'white' }, { name: specific_users[0], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[1], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[2], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[3], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[4], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[5], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[6], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[7], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[8], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[9], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[10], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[11], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[12], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[13], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[14], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[15], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[16], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[17], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[18], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: specific_users[19], type: 'str', required: false, label: "Initial prefix for specific user [username prefix]" }, { name: 'notice_color', type: 'choice', required: false, label: "Global notices color", choice1: 'aliceblue', choice2: 'antiquewhite', choice3: 'aqua', choice4: 'aquamarine', choice5: 'azure', choice6: 'beige', choice7: 'bisque', choice8: 'black', choice9: 'blanchedalmond', choice10: 'blue', choice11: 'blueviolet', choice12: 'brown', choice13: 'burlywood', choice14: 'cadetblue', choice15: 'chartreuse', choice16: 'chocolate', choice17: 'coral', choice18: 'cornflowerblue', choice19: 'cornsilk', choice20: 'crimson', choice21: 'cyan', choice22: 'darkblue', choice23: 'darkcyan', choice24: 'darkgoldenrod', choice25: 'darkgray', choice26: 'darkgreen', choice27: 'darkkhaki', choice28: 'darkmagenta', choice29: 'darkolivegreen', choice30: 'darkorange', choice31: 'darkorchid', choice32: 'darkred', choice33: 'darksalmon', choice34: 'darkseagreen', choice35: 'darkslateblue', choice36: 'darkslategray', choice37: 'darkturquoise', choice38: 'darkviolet', choice39: 'deeppink', choice40: 'deepskyblue', choice41: 'dimgray', choice42: 'dodgerblue', choice43: 'firebrick', choice44: 'floralwhite', choice45: 'forestgreen', choice46: 'fuchsia', choice47: 'gainsboro', choice48: 'ghostwhite', choice49: 'gold', choice50: 'goldenrod', choice51: 'gray', choice52: 'green', choice53: 'greenyellow', choice54: 'honeydew', choice55: 'hotpink', choice56: 'indianred', choice57: 'indigo', choice58: 'ivory', choice59: 'khaki', choice60: 'lavender', choice61: 'lavenderblush', choice62: 'lawngreen', choice63: 'lemonchiffon', choice64: 'lightblue', choice65: 'lightcoral', choice66: 'lightcyan', choice67: 'lightgoldenrodyellow', choice68: 'lightgray', choice69: 'lightgreen', choice70: 'lightpink', choice71: 'lightsalmon', choice72: 'lightseagreen', choice73: 'lightskyblue', choice74: 'lightslategray', choice75: 'lightsteelblue', choice76: 'lightyellow', choice77: 'lime', choice78: 'limegreen', choice79: 'linen', choice80: 'magenta', choice81: 'maroon', choice82: 'mediumaquamarine', choice83: 'mediumblue', choice84: 'mediumorchid', choice85: 'mediumpurple', choice86: 'mediumseagreen', choice87: 'mediumslateblue', choice88: 'mediumspringgreen', choice89: 'mediumturquoise', choice90: 'mediumvioletred', choice91: 'midnightblue', choice92: 'mintcream', choice93: 'mistyrose', choice94: 'moccasin', choice95: 'navajowhite', choice96: 'navy', choice97: 'oldlace', choice98: 'olive', choice99: 'olivedrab', choice100: 'orange', choice101: 'orangered', choice102: 'orchid', choice103: 'palegoldenrod', choice104: 'palegreen', choice105: 'paleturquoise', choice106: 'palevioletred', choice107: 'papayawhip', choice108: 'peachpuff', choice109: 'peru', choice110: 'pink', choice111: 'plum', choice112: 'powderblue', choice113: 'purple', choice114: 'red', choice115: 'rosybrown', choice116: 'royalblue', choice117: 'saddlebrown', choice118: 'salmon', choice119: 'sandybrown', choice120: 'seagreen', choice121: 'seashell', choice122: 'sienna', choice123: 'silver', choice124: 'skyblue', choice125: 'slateblue', choice126: 'slategray', choice127: 'snow', choice128: 'springgreen', choice129: 'steelblue', choice130: 'tan', choice131: 'teal', choice132: 'thistle', choice133: 'tomato', choice134: 'turquoise', choice135: 'violet', choice136: 'wheat', choice137: 'white', choice138: 'whitesmoke', choice139: 'yellow', choice140: 'yellowgreen', choice141: 'chaturbatedarkbluebackground', choice142: 'chaturbatedarkgreenbackground', choice143: 'chaturbatelightbluebackground', choice144: 'chaturbateorange', choice145: 'hiliteblue', choice146: 'hilitecyan', choice147: 'hilitegreen', choice148: 'hiliteorange', choice149: 'hilitepurple', choice150: 'hilitered', choice151: 'hiliteyellow', choice152: 'picky_olivia', defaultValue: 'orangered' }, { name: 'msgonentry', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display Message 1 privately on entry - set to no for busy rooms" }, { name: 'msg1', type: 'str', required: true, label: 'Message 1', }, { name: 'msg2', type: 'str', required: false, label: 'Message 2', }, { name: 'msg3', type: 'str', required: false, label: 'Message 3', }, { name: 'msg4', type: 'str', required: false, label: 'Message 4', }, { name: 'msg5', type: 'str', required: false, label: 'Message 5', }, { name: 'msg6', type: 'str', required: false, label: 'Message 6', }, { name: 'msg7', type: 'str', required: false, label: 'Message 7', }, { name: 'msg8', type: 'str', required: false, label: 'Message 8', }, { name: 'msg9', type: 'str', required: false, label: 'Message 9', }, { name: 'msg10', type: 'str', required: false, label: 'Message 10', }, { name: 'msgcolor', type: 'str', label: 'Notice color (html code default dark red #000000)', defaultValue: '#000000' }, { name: 'chat_ad', type: 'int', minValue: 1, maxValue: 999, defaultValue: 2, label: 'Delay in minutes between notices being displayed (minimum 1)' }, { name: 'tipmenu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display Tip Menu when /menu is typed." }, { name: 'item_1', type: 'str', label: 'Item #1', defaultValue: 'show ass' }, { name: 'item_1_price', type: 'int', label: 'Price for item #1', defaultValue: 25 }, { name: 'item_1_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #1 in tip menu when /menu is typed." }, { name: 'item_2', type: 'str', label: 'Item #2 (optional)', defaultValue: 'all fours' }, { name: 'item_2_price', type: 'int', label: 'Price for item #2', defaultValue: 35 }, { name: 'item_2_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #2 in tip menu when /menu is typed." }, { name: 'item_3', type: 'str', label: 'Item #3 (optional)', defaultValue: 'show feet' }, { name: 'item_3_price', type: 'int', label: 'Price for item #3', defaultValue: 45 }, { name: 'item_3_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #3 in tip menu when /menu is typed." }, { name: 'item_4', type: 'str', label: 'Item #4 (optional)', defaultValue: 'spread cheeks' }, { name: 'item_4_price', type: 'int', label: 'Price for item #4', defaultValue: 50 }, { name: 'item_4_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #4 in tip menu when /menu is typed." }, { name: 'item_5', type: 'str', label: 'Item #5 (optional)', defaultValue: 'finger hole' }, { name: 'item_5_price', type: 'int', label: 'Price for item #5', defaultValue: 100 }, { name: 'item_5_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #5 in tip menu when /menu is typed." }, { name: 'item_6', type: 'str', label: 'Item #6 (optional)', defaultValue: '', required: false }, { name: 'item_6_price', type: 'int', label: 'Price for item #6', defaultValue: 75 }, { name: 'item_6_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #6 in tip menu when /menu is typed." }, { name: 'item_7', type: 'str', label: 'Item #7 (optional)', defaultValue: '', required: false }, { name: 'item_7_price', type: 'int', label: 'Price for item #7', defaultValue: 85 }, { name: 'item_7_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #7 in tip menu when /menu is typed." }, { name: 'item_8', type: 'str', label: 'Item #8 (optional)', defaultValue: '', required: false }, { name: 'item_8_price', type: 'int', label: 'Price for item #8', defaultValue: 95 }, { name: 'item_8_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #8 in tip menu when /menu is typed." }, { name: 'item_9', type: 'str', label: 'Item #9 (optional)', defaultValue: '', required: false }, { name: 'item_9_price', type: 'int', label: 'Price for item #9', defaultValue: 100 }, { name: 'item_8_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #9 in tip menu when /menu is typed." }, { name: 'item_10', type: 'str', label: 'Item #10 (optional)', defaultValue: '', required: false }, { name: 'item_10_price', type: 'int', label: 'Price for item #10', defaultValue: 125 }, { name: 'item_10_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #10 in tip menu when /menu is typed." }, { name: 'item_11', type: 'str', label: 'Item #11 (optional)', defaultValue: '', required: false }, { name: 'item_11_price', type: 'int', label: 'Price for item #11', defaultValue: 96 }, { name: 'item_11_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #11 in tip menu when /menu is typed." }, { name: 'item_12', type: 'str', label: 'Item #12 (optional)', defaultValue: '', required: false }, { name: 'item_12_price', type: 'int', label: 'Price for item #12', defaultValue: 97 }, { name: 'item_12_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #12 in tip menu when /menu is typed." }, { name: 'item_13', type: 'str', label: 'Item #13 (optional)', defaultValue: '', required: false }, { name: 'item_13_price', type: 'int', label: 'Price for item #13', defaultValue: 98 }, { name: 'item_13_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #13 in tip menu when /menu is typed." }, { name: 'item_14', type: 'str', label: 'Item #14 (optional)', defaultValue: '', required: false }, { name: 'item_14_price', type: 'int', label: 'Price for item #14', defaultValue: 99 }, { name: 'item_14_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #14 in tip menu when /menu is typed." }, { name: 'item_15', type: 'str', label: 'Item #15 (optional)', defaultValue: '', required: false }, { name: 'item_15_price', type: 'int', label: 'Price for item #15', defaultValue: 101 }, { name: 'item_15_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #15 in tip menu when /menu is typed." }, { name: 'item_16', type: 'str', label: 'Item #16 (optional)', defaultValue: '', required: false }, { name: 'item_16_price', type: 'int', label: 'Price for item #16', defaultValue: 905 }, { name: 'item_16_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #16 in tip menu when /menu is typed." }, { name: 'item_17', type: 'str', label: 'Item #17 (optional)', defaultValue: '', required: false }, { name: 'item_17_price', type: 'int', label: 'Price for item #17', defaultValue: 915 }, { name: 'item_17_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #17 in tip menu when /menu is typed." }, { name: 'item_18', type: 'str', label: 'Item #18 (optional)', defaultValue: '', required: false }, { name: 'item_18_price', type: 'int', label: 'Price for item #18', defaultValue: 925 }, { name: 'item_18_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #18 in tip menu when /menu is typed." }, { name: 'item_19', type: 'str', label: 'Item #19 (optional)', defaultValue: '', required: false }, { name: 'item_19_price', type: 'int', label: 'Price for item #19', defaultValue: 935 }, { name: 'item_19_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #19 in tip menu when /menu is typed." }, { name: 'item_20', type: 'str', label: 'Item #20 (optional)', defaultValue: '', required: false }, { name: 'item_20_price', type: 'int', label: 'Price for item #20', defaultValue: 945 }, { name: 'item_20_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #20 in tip menu when /menu is typed." }, { name: 'item_21', type: 'str', label: 'Item #21 (optional)', defaultValue: '', required: false }, { name: 'item_21_price', type: 'int', label: 'Price for item #21', defaultValue: 955 }, { name: 'item_21_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #21 in tip menu when /menu is typed." }, { name: 'item_22', type: 'str', label: 'Item #22 (optional)', defaultValue: '', required: false }, { name: 'item_22_price', type: 'int', label: 'Price for item #22', defaultValue: 965 }, { name: 'item_22_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #22 in tip menu when /menu is typed." }, { name: 'item_23', type: 'str', label: 'Item #23 (optional)', defaultValue: '', required: false }, { name: 'item_23_price', type: 'int', label: 'Price for item #23', defaultValue: 975 }, { name: 'item_23_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #23 in tip menu when /menu is typed." }, { name: 'item_24', type: 'str', label: 'Item #24 (optional)', defaultValue: '', required: false }, { name: 'item_24_price', type: 'int', label: 'Price for item #24', defaultValue: 985 }, { name: 'item_24_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #24 in tip menu when /menu is typed." }, { name: 'item_25', type: 'str', label: 'Item #25 (optional)', defaultValue: '', required: false }, { name: 'item_25_price', type: 'int', label: 'Price for item #25', defaultValue: 995 }, { name: 'item_25_menu', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display #25 in tip menu when /menu is typed." }, ]; // Fill mods and fans arrays. var mod_users = []; var fan_users = []; if (cb.settings.mod_users !== undefined) { mod_users = cb.settings.mod_users.split(" "); } if (cb.settings.fan_users !== undefined) { fan_users = cb.settings.fan_users.split(" "); } // Add the specific user defaults to the prefixes object. for (i = 0; i < specific_users.length; i++) { var element = specific_users[i]; if (cb.settings[element] !== undefined) { var input = cb.settings[element].split(" "); // Explode input to an array. if (input.length >= 2) { var target_user = input[0]; input.splice(0, 1); // Remove target_user from array. var text = input.join(" "); // Implode remains of array to string. prefix(cb.room_slug, target_user, text); } } } // Send welcome message. cb.onEnter(function(user) { if (cb.settings['msgonentry'] == 'yes') { var notices = 'Hi ' + user['user'] + '! ' cb.sendNotice(notices, user['user'], '', '', 'bold'); } }); // Rotating Notifier function function chatAd() { var msg; while (cb.settings['msg' + (i + 1)] == 0) { //skip empty messages i++; i %= MAXITEMS; } msg = cb.settings['msg' + (i + 1)]; i++; i %= MAXITEMS; cb.sendNotice(msg, '', '', cb.settings['msgcolor'], 'bold'); cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); } cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); // Act upon chat messages. cb.onMessage(function(msg) { var message = msg['m'].split(" "); // Explode message to an array. var user = msg['user']; var has_access = (user == cb.room_slug || msg['is_mod']); var commands = ["/prefix", "/no_prefix", "/claim", "/free", "/notice", "/silence", "/release", "/private", "/tippers"]; // Commands that can be called. // Check if a command is called. if (cbjs.arrayContains(commands, message[0])) { msg['X-Spam'] = true; // Hide command from chat by marking it as spam. var command = message[0]; var errorMessages = new Array(); // Do some checks. if (!has_access) { errorMessages.push("you are not allowed to execute this command."); } // if (message.length < 2) {errorMessages.push("this command needs an extra parameter, please try again: " + command + " [parameter]");} if (errorMessages.length == 0) { // No errors, execute! var target_user = message[1]; message.splice(0, 2); // Remove command and target_user from array. var text = message.join(" "); // Implode remains of array to string. switch (command) { case commands[0]: prefix(user, target_user, text); break; case commands[1]: removePrefix(user, target_user); break; case commands[2]: claim(user, msg['gender'], target_user, text); break; case commands[3]: removeClaim(user, target_user); break; case commands[4]: cb.sendNotice(msg['m'].split(" ").slice(1).join(" "), '', '', getColor(cb.settings.notice_color), 'bold'); break; case commands[5]: silenced = true; cb.sendNotice(cb.room_slug + " has been silenced!", '', '', getColor(cb.settings.notice_color), 'bold'); break; case commands[6]: silenced = false; cb.sendNotice(cb.room_slug + " has been released from the silence!", '', '', getColor(cb.settings.notice_color), 'bold'); break; case commands[7]: var private_text = "[" + user + "] " + msg['m'].split(" ").slice(1).join(" "); cb.sendNotice(private_text, cb.room_slug, getColor("picky_olivia"), '', 'bold'); cb.sendNotice(private_text, '', getColor("picky_olivia"), '', 'bold', 'red'); break; case commands[8]: getTipperList(); break; } } else { //Errors found, display them to the user! cb.sendNotice(errorMessages.join("\n"), user); } } else if (msg['m'].match(/\/menuoff/i)) { var is_mod = (cb.room_slug == msg['user'] || msg['is_mod']); msg['X-Spam'] = true; if (is_mod) { cb.settings['tipmenu'] = 'no' } } else if (msg['m'].match(/\/menuon/i)) { var is_mod = (cb.room_slug == msg['user'] || msg['is_mod']); msg['X-Spam'] = true; if (is_mod) { cb.settings['tipmenu'] = 'yes' } } else if ((msg['m'].match(/\/menu/i)) && (cb.settings['tipmenu'] == 'yes')) { msg['X-Spam'] = true; var notices = ' :lovey Say it with a tip :lovey '; for (var i = 1; i <= 25; i++) { if (cb.settings.get('item_' + i) && (parseInt(cb.settings['item_' + i + '_price']) > 0) && (cb.settings.get('item_' + i + '_menu') == 'yes')) { notices += '\n ' + cb.settings['item_' + i + '_price'] + 'tk: ' + cb.settings['item_' + i]; } } var is_mod = (cb.room_slug == msg['user'] || msg['is_mod']); if (!is_mod) { cb.sendNotice(notices, msg['user'], '#fef0e7', '', 'bold'); } else { cb.sendNotice(notices, '', '#fef0e7', '', 'bold'); } } else { // No command. if (msg['m'][0] != '/') { alterNormalMessage(msg); // Alter the message with prefix and/or claim. invokeSettingsCheck(msg); // Check if the extra settings for broadcaster/fan/mod need to be invoked. checkIfSilenced(msg); } } return msg; }); // used by tip menu function getItem(tokens) { for (var i = 1; i <= 25; i++) { if (parseInt(cb.settings['item_' + i + '_price']) == parseInt(tokens)) { return cb.settings['item_' + i]; } } } // Act upon tips. cb.onTip(function(tip) { var user = tip['from_user']; var amount = parseInt(tip['amount']); if (user in tippers) { tippers[user] += amount; } else { tippers[user] = amount; } //new stuff by SIMON tipCounter += parseInt(tip['amount']); lastTipAmount = parseInt(tip['amount']); lastTipper = tip['from_user']; lastItem = getItem(tip['amount']); if (lastItem && (cb.settings['tipmenu'] == 'yes')) { cb.sendNotice(tip['from_user'] + ' :heart2 says: ' + getItem(tip['amount']), '', '#fef0e7', '#000000', 'bold'); } cb.drawPanel(); }); // Add prefix entry. function prefix(user, target_user, text) { if (text.length > 0) { prefixes[target_user] = text; cb.sendNotice(target_user + "'s messages will be prefixed with: " + text, user); } else { cb.sendNotice("you forgot to supply a prefix, please try again: /prefix [username] [prefix text]", user); } } // Remove prefix entry. function removePrefix(user, target_user) { if (target_user in prefixes) { delete prefixes[target_user]; cb.sendNotice(target_user + "'s messages will no longer be prefixed.", user); } else { cb.sendNotice("no prefix for " + target_user + " found to remove.", user); } } // Add claim entry. function claim(user, gender, target_user, text) { if (text.length == 0) { text = "pet"; // Default value. } claims[target_user] = "[" + user + "'s " + text + "]"; var possesive = getPossesive(gender); cb.sendNotice(user + " has claimed " + target_user + " as " + possesive + " " + text + "!", '', '', getColor(cb.settings.notice_color), 'bold'); } // Remove claim entry. function removeClaim(user, target_user) { if (target_user in claims) { delete claims[target_user]; cb.sendNotice(user + " has freed " + target_user + "!", '', '', getColor(cb.settings.notice_color), 'bold'); } else { cb.sendNotice(target_user + " hasn't been claimed yet, you can't free this user.", user); } } // Alter message with prefix and/or claim. function alterNormalMessage(msg) { var user = msg['user']; // Prefix text of current user if applicable. if (user in prefixes) { msg['m'] = prefixes[user] + " " + msg['m']; } // Claim user if applicable. if (user in claims) { msg['m'] = claims[user] + " " + msg['m']; } } // Check if the extra settings for broadcaster/fan/mod need to be invoked. function invokeSettingsCheck(msg) { var mods cb.settings['mods']; if (msg['user'] == cb.room_slug) { // Broadcaster. invokeSettings(msg, 'model'); } else if (cbjs.arrayContains(mod_users, msg['user'])) { // Mod. invokeSettings(msg, 'mod'); } else if (cbjs.arrayContains(fan_users, msg['user'])) { // Fan. invokeSettings(msg, 'fan'); } } // Invoke bot settings to the message. function invokeSettings(msg, setting) { if (cb.settings[setting + '_text'] !== undefined) { msg['m'] = cb.settings[setting + '_text'] + " " + msg['m']; } if (setting != 'fan') { // Fans don't have color options. msg['c'] = getColor(cb.settings[setting + '_color']); } msg['background'] = getColor(cb.settings[setting + '_background']); } // Check if broadcaster is silenced. function checkIfSilenced(msg) { if (msg['user'] == cb.room_slug && silenced) { msg['X-Spam'] = true; cb.sendNotice("you have been silenced by your little devils! Other users will no longer see your messages.", msg['user']); } } // Generate the tippers list. function getTipperList() { var output = "Generating tippers list.\n------------------------------------------------"; if (Object.keys(tippers).length === 0) { output += "\nNo tippers found in current session."; } else { var keysSorted = Object.keys(tippers).sort(function(a, b) { return tippers[b] - tippers[a] }); for (i = 0; i < keysSorted.length; i++) { var user = keysSorted[i]; var amount = tippers[user]; output += "\n" + user + " | " + amount + " tokens"; } } output += "\n------------------------------------------------"; cb.sendNotice(output, cb.room_slug); cb.sendNotice(output, '', '', '', '', 'red'); } // Helper function to get possesive pronoun. function getPossesive(gender) { var possesive; switch (gender) { case 'm': possesive = "his"; break; case 'f': possesive = "her"; break; case 's': possesive = "its"; break; case 'c': possesive = "their"; break; } return possesive; } // Helper function to get color code. function getColor(color) { var result = null; result = colorNames[color].toUpperCase(); return result; }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.