Bots Home
|
Create an App
Test Futu
Author:
futurextestbed
Description
Source Code
Launch Bot
Current Users
Created by:
Futurextestbed
var i = 0; var MAXITEMS = 10; cb.settings_choices = [ { name: 'palabras_prohibidas', type: 'str', minLength: 1, maxLength: 599, label: 'Palabras Prohibidas (Separar cada palabra con un espacio)' }, { name: 'remplazos', type: 'str', minLength: 1, maxLength: 599, defaultValue: 'Bad Word!', label: 'Remplazar con (Separa cada frase o palabra con un guiĆ³n -):' }, { name: 'NombreCasa1', type: 'str', minLength: 1, maxLength: 599, defaultValue: 'Power', label: 'Nombre De la Primera Casa:' }, { name: 'NombreCasa2', type: 'str', minLength: 1, maxLength: 599, defaultValue: 'Wisdom', label: 'Nombre De la Segunda Casa:' }, { name: 'NombreCasa3', type: 'str', minLength: 1, maxLength: 599, defaultValue: 'Courage', label: 'Nombre De la Tercera Casa:' }, { 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 #9F000F)', defaultValue: '#9F000F' }, { name: 'chat_ad', type: 'int', minValue: 1, maxValue: 999, defaultValue: 2, label: 'Delay in minutes between notices being displayed (minimum 1)' } ]; cb.onEnter(function (user) { if (cb.settings['msgonentry'] == 'yes') { cb.sendNotice('Welcome ' + user['user'] + '! ' + cb.settings['msg1'], user['user'], '', cb.settings['msgcolor'], 'bold'); } }); 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)); cb.onMessage(function(message) { string_to_array = function(str) { return str.trim().split(' '); }; string_to_array2 = function(str) { return str.trim().split('-'); }; palabras = string_to_array(cb.settings.palabras_prohibidas.toLowerCase()); remplazos = string_to_array2(cb.settings.remplazos); mensajeA = string_to_array(message.m.toLowerCase()); for (i = 0; i < palabras.length; i++) { for (j = 0; j < mensajeA.length; j++) { if (mensajeA[j] == palabras[i]) { message['m'] = remplazos[Math.floor(Math.random() * (remplazos.length - 1))]; } } } }); cb.onEnter(function(user) { if (cb.settings['msgonentry'] == 'yes') { cb.sendNotice('Welcome ' + user['user'] + '! ' + cb.settings['msg1'],user['user'],'',cb.settings['msgcolor'],'bold'); } }); var total_tipped; cb.onTip(function(tip) { total_tipped += parseInt(tip['amount']); cb.chatNotice('Total Tipped: ' + total_tipped); cb.chatNotice(tip); user = tip.from_user; total_tipped = { user: tip.amount }; });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.