Bots Home
|
Create an App
expensive-squats2
Author:
root202
Description
Source Code
Launch Bot
Current Users
Created by:
Root202
/* @author root202 @email root202@email.tg uses code from @aety's `A_Bettter_Dice_Roller_by_aety_v1.2.0.js` for reference, and sometimes blatant copy */ var tip_items = []; var notify = function () { var y = 1; while (y < 6) { cb.sendNotice("Tip " + tip_items[y]["amount"] + " for " + cb.settings["tip_item_" + y]); y++; } }; var init = function () { bootstrap_settings(); var y = 1; while (y < 6) { tip_items.push({ "amount": cb.settings["tip_item_" + y + "_amount"], "increment": 0 }); y++; } notify(); //cb.setTimeout(notify(), parseInt(cb.settings.notice_wait_time) * 60000); /* cb.onTip(function (tip) { var notify = false; var y = 1; while (y < 6) { if (cb.settings["tip_item_" + y] === "blah") { continue; } if ((tip_items[y]["amount"] === tip["amount"]) && tip["message"].includes(cb.settings["tip_item_" + y])) { cb.sendNotice(tip["user"] + " tipped for " + cb.settings["tip_item_" + y] + " at " + tip["amount"] + " tokens, which has been tipped for " + tip_items[y]["increment"] + " times..."); tip_items[y]["increment"]++; if (tip_items[y]["increment"] >= cb.settings['tip_item_' + y + '_threshold']) { if ( cb.settings['tip_item_' + y + '_increase_multiplier'] === "x" || cb.settings['tip_item_' + y + '_increase_multiplier'] === "X") { tip_items[y]["amount"] = tip_items[y]["amount"] ^ tip_items[y]["increment"]; } else { tip_items[y]["amount"] = tip_items[y]["amount"] + Math.round( ( tip_items[y]["increment"] * parseInt(cb.settings['tip_item_' + y + '_increase_multiplier']) ) ); } } notify = true; break; } y++; } if (notify === true) { notify(); } });*/ }; var bootstrap_settings = function () { cb.settings_choices = [ { name: 'settings_section_label', type: 'choice', label: '################# Basic Settings #################', required: false }, { name: 'notice_wait_time', type: 'choice', label: 'In minutes, how often should the bot advertise itself?', choice1: 5, choice2: 10, choice3: 15, choice4: 20, choice5: 25, choice6: 30, choice7: 45, choice8: 60, defaultValue: 10 } ]; cb.settings_choices.push({ name: 'cmd_prefix', type: 'str', minLength: 1, label: 'Prefix for bot commands. (Might want to change if you have other bots using the same commands.)', defaultValue: '/ex_squat_' }); x = 1; while (x < 6) { cb.settings_choices.push({ name: 'tip_item_' + x, label: 'Tip item ' + x, type: 'str', defaultValue: "blah", required: false }); cb.settings_choices.push({ name: 'tip_item_' + x + '_amount', label: 'Tip item ' + x + ' amount', type: 'int', required: false, defaultValue: 1 }); cb.settings_choices.push({ name: 'tip_item_' + x + '_threshold', label: 'Tip item ' + x + ' threashold, i.e. the number of times the item must be tipped for for the ' + ' incrementing amount to kick it', type: 'int', required: false, defaultValue: 1 }); cb.settings_choices.push({ name: 'tip_item_' + x + '_increase_multiplier', label: "What multiplier should be applied to the value added to the increase amount? e.g. 1 would cause" + " the amount to be increase linearly with a slope of 1/1, 2 would cause the amount to be increase with a" + " slope of 2/1, etc... The special value of X can be used to make the slope exponential", type: 'str', required: false, defaultValue: "1" }); x++; } }; //init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.