Bots Home
|
Create an App
fappy
Author:
fappyone
Description
Source Code
Launch Bot
Current Users
Created by:
Fappyone
/** * fappy v0.0.1-beta1 * https://github.com/WanielDeiss/fappy * * Copyright (c) 2018-present, Daniel Weiß <wanieldeiss@gmail.com> (https://sircode.xyz) * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree on github. * * Date: 6/12/2018 */ cb.settings_choices = [ /** * RN - Rotating Notifier */ { 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)' }, /** * TTYM - Tip Thank You Message */ { name: 'ttymActive', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'no', label: 'Thank you message by Tip feature active? #############################################' }, { name: 'ttymAmount', type: 'int', minValue: 1, defaultValue: 10, label: 'Minimum tokens required for a thank you notice.' }, { name: 'ttymMsg', type: 'str', minLength: 8, maxLength: 255, defaultValue: '>> Thank you %tipper% for your tip! <3 #loveyou', label: "Thank you message | %tipper% = tipper's nickname" }, { name: 'ttymMsgBackground', type: 'str', minLength: 4, maxLength: 7, defaultValue: '#b248cc', label: "Background-Color - Hex-Code needed! Example: #ff0000" }, { name: 'ttymMsgFontColor', type: 'str', minLength: 4, maxLength: 7, defaultValue: '#ffffff', label: "Font-Color - Hex-Code needed! Example: #ff0000" }, { name: 'ttymFontWeight', type: 'choice', choice1: 'normal', choice2: 'bold', choice3: 'bolder', defaultValue: 'bolder', label: 'Font-Weight' }]; var i = 0; var MAXITEMS = 10; 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.onTip(function (tip) { var tipper = tip['from_user']; var _cb$settings = cb.settings, ttymActive = _cb$settings.ttymActive, ttymAmount = _cb$settings.ttymAmount, ttymMsg = _cb$settings.ttymMsg, ttymMsgBackground = _cb$settings.ttymMsgBackground, ttymMsgFontColor = _cb$settings.ttymMsgFontColor, ttymFontWeight = _cb$settings.ttymFontWeight; if (parseInt(tip['amount']) >= ttymAmount && ttymActive === 'yes') { var tipmsg = ttymMsg.replace("%tipper%", tipper); cb.sendNotice(tipmsg, tipper, ttymMsgBackground, ttymMsgFontColor, ttymFontWeight); } });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.