Bots Home
|
Create an App
informat-ion
Author:
sleepwalker7
Description
Source Code
Launch Bot
Current Users
Created by:
Sleepwalker7
// LittleMission's utility bot // // Multi-purpose CB bot built for Miss ion. // // coded by Sleepwalker7, 2014 /* Operations: * Provides visual feedback to show what add-ion has been tipped for. * Implements a block on grey graphics. * hides a random tip value that will announce itself when found. Operator commands: * !commands ionson - enables add ions override switch * !commands ionsoff - disables add ions override switch * !tip x - run the tip engine for selected add-ion.... possibly Changelog 1.3.1 support multiplier via tipnote command (put quantity inside []) 1.3 add ability for ion to "tip" herself... kinda. 1.2.2 add broadcaster commands 1.2.1 bug fixes 1.2 add magic number game and refactor indentation 1.1 add welcome message and !info option 1.0 initial release */ /* Description text <ul style = "padding: 0; margin: 0 0 0 40px;"><li>When "add-ions" are available and tipped for, announce each one to the room.</li><li>Block graphics from users without credits</li><li>Generate a random tip value between provided limits and keeps it secret until found, then it loudly announces the winner of a secret prize.</li></ul> <b>Operator commands:</b><ul><li>!command ionson (turns them on)</li><li>!command ionsoff (turns them off)</li><li>!tip x (runs the tip engine for x tips)</li></ul> <p style="color: grey;">developed for chaturbate.com/littlemission</p> */ var magicNumber = 0; var magicNumberHigh = 0; var magicNumberLow = 0; var ionsEnabled = cb.settings["ionsEnabled"] == "yes" ? true : false; var addions = { // addons array. key is tip value. The value array is addion type and description // type: 0=general, 1=pussyplay, 2=pain, 3=electricity 9: [2, "One ass smack"] ,10: [0, "Tell a dirty joke"] ,15: [2, "Clothespin on right tit/nip"] ,20: [0, "Write on my body"] ,30: [2, "Clothespin on outer labia"] ,32: [0, "Earplugs (1 min)"] ,33: [0, "Draw a smiley face on my ass"] ,35: [2, "Wax dripping on tits"] ,40: [0, "Add blindfold to toy-play"] ,44: [0, "Ass Andy"] ,45: [2, "Wartenberg wheel"] ,46: [0, "Headphones: Music of my choice (1 min)"] ,49: [0, "Cat Nail Caress"] ,50: [0, "Boob flash"] ,55: [2, "Clothespin on left nip"] ,59: [2, "Vibrating nipple-clamps (1 min)"] ,60: [0, "Orally please a toy"] ,61: [1, "Finger myself (3 mins)"] ,66: [0, "Icecube rubdown"] ,70: [0, "Show feet"] ,75: [0, "Ass flash"] ,77: [1, "Vibrating Bullet in pussy (1 min)"] ,78: [1, "Hitachi over the panties (1 min)"] ,79: [2, "Rubber band snap on right nip"] ,80: [0, "Leather gag (3 mins)"] ,89: [1, "Toy in pussy and play (3 mins)"] ,90: [0, "Jennings gag (3 mins)"] ,91: [0, "Write on my face"] ,92: [2, "One pussy smack"] ,99: [2, "Clothespin on inner labia"] ,100: [1, "Pussy flash"] ,101: [0, "NecoMimi time"] ,108: [1, "PingPong Hide-n-seek"] ,123: [0, "Wear a wig"] ,133: [1, "Toy in pussy and play & vibe (3 mins)"] ,144: [2, "Wax dripping on pussy"] ,146: [0, "Headphones: Music of your choice (1 min)"] ,310: [1, "Pump-toy and Hitachi for 3 minutes"] ,400: [2, "Rubber band snap on pussy"] ,500: [0, "Boom!! New MAG member"] ,777: [0, "Uh Oh! Sleep has something special in mind !"] ,1000: [1, "Plug my ass (20 mins)"] ,2000: [1, "Collared !"] }; // bot can be launched in "off" mode, just for reminders. cb.settings_choices = [ {name: "ionsEnabled" ,label: "Enable add-ion announcements?" ,type: "choice" ,choice1: "yes" ,choice2: "no" ,defaultValue: "yes"} ,{name: "pussyPlay" ,label: "Pussy Play today?" ,type: "choice" ,choice1: "yes" ,choice2: "no" ,defaultValue: "yes"} ,{name: "painPlay" ,label: "Pain Play today?" ,type: "choice" ,choice1: "yes" ,choice2: "no" ,defaultValue: "yes"} ,{name: "electroPlay" ,label: "Electricity today?" ,type: "choice" ,choice1: "yes" ,choice2: "no" ,defaultValue: "yes"} ,{name: "magicNumberLowLimit" ,label: "Magic Number, Low limit (Set both to zero to disable feature)" ,type: "int" ,defaultValue: 0} ,{name: "magicNumberHighLimit" ,label: "Magic Number, High limit" ,type: "int" ,defaultValue: 0} ,{name: "repeatingMessage" ,label: "Repeating message" ,type: "str" ,defaultValue: "not yet implimented" ,required: false} ]; function announceAddion(addion, available) { if (available) { cb.sendNotice(addion + " !", "", "", "#e05cff", "bold"); } else { cb.sendNotice(addion + " tipped for (Thank You!!) but it is not currently available :(", "", "", "#aaaaaa", "bold"); } } function announceSelfAddion(addion, available) { if (available) { cb.sendNotice("ion tipped for: '"+addion+"' lets see what happens :sw_dots", "", "#ffff00", "#000000", "bold"); setTimeout(function() { var ionRandom = Math.floor(Math.random()*10)+ 1; if (ionRandom > 3) { cb.sendNotice("Lets do this! "+addion+" approved!", "", "#fafad5", "#000000", "bold"); } else { if (ionRandom == 1) { cb.sendNotice("DENIED !", "", "#fafad5", "#ff0000", "bold"); } if (ionRandom == 2) { cb.sendNotice("Nah, let's do something else instead :sw_dots", "", "#fdfd5f", "#ff0000", "bold"); setTimeout(function() { //var ionRandomised = Math.floor(Math.random()*3)+ 1; cb.sendNotice("I pick: "+pickRandomAddion(), "", "#fdfd5f", "#000000", "bold"); }, 4000); } } }, 3000); } else { cb.sendNotice("Silly girl, "+addion+" is not available!", "", "", "#aaaaaa", "bold"); } } cb.onTip(function (tip) { var multiplier = 1; var tipValue = parseInt(tip["amount"]); // check tip message for multiplier hint var regex = /\[([0-9]+)\]/; var matches = tip["message"].match(regex); if (null != matches) { // multiplier detected, divide tip val by this to find root // invalid math (tip 19 and put a multiplier of 2, wont mach anything as the // script later on will be looking for an ion of tip 9.5 which is nothing var mult = matches[1]; var realTip = tipValue / mult; multiplier = mult; tipValue = realTip; } var addionType = addions[tipValue] ? addions[tipValue][0] : null; var addionSelected = addions[tipValue] ? addions[tipValue][1] : null; var electroPlay = cb.settings["electroPlay"] == "yes" ? true : false; var pussyPlay = cb.settings["pussyPlay"] == "yes" ? true : false; var painPlay = cb.settings["painPlay"] == "yes" ? true : false; for (i=0;i<multiplier;i++) { if (addionSelected && ionsEnabled) { switch (addionType) { case 0: announceAddion (addionSelected, true); break; case 1: announceAddion (addionSelected, pussyPlay); break; case 2: announceAddion (addionSelected, painPlay); break; case 3: announceAddion (addionSelected, electroPlay); break; }; } } checkForMagicNumber (tip); }); cb.onEnter(function (data) { // say hello to people other than broadcaster if (data.user != cb.room_slug) { var greetingText = "Hi " + data.user + " welcome to my room! Check out my bio or type !info for a quick introduction."; cb.sendNotice(greetingText, data.user, "", "#082E96", "bold"); } }); cb.onMessage(function (data) { // block grey graphics if (!data["has_tokens"] && !data["in_fanclub"] && !data["is_mod"]) { // data.m = data.m.replace(":", ":\u200b"); data.m = data.m.replace(/\:/g, ':\u200b'); } // display info when requested if (data.m == "!info") { data['X-Spam'] = true; var infoText = "Thank you for reading!\nPlease be friendly and polite! Keep the really dirty talk to a tipnote \n Read the bio and tip for something you like.\n Group or Private shows happen toward the end of the show, or when I'm feeling uncontrollably horny!"; cb.sendNotice(infoText, data.user, "", "#082E96", "normal"); } // broadcaster commands if (data.m.substring(0, 8) == "!command" && data.user == cb.room_slug) { data['X-Spam'] = true; switch (data.m.substring(9)) { case "ionson": cb.sendNotice("add-ions turned on", data.user, "", "#082E96", "normal"); ionsEnabled = true; break; case "ionsoff": ionsEnabled = false; cb.sendNotice("add-ions turned off", data.user, "", "#082E96", "normal"); break; default: cb.sendNotice("Unknown command", data.user, "", "#082E96", "normal"); } } if (data.m.substring(0, 4) == "!tip" && data.user == cb.room_slug) { data['X-Spam'] = true; var tipValue = parseInt(data.m.substring(5, 9)); var addionType = addions[tipValue] ? addions[tipValue][0] : null; var addionSelected = addions[tipValue] ? addions[tipValue][1] : null; var electroPlay = cb.settings["electroPlay"] == "yes" ? true : false; var pussyPlay = cb.settings["pussyPlay"] == "yes" ? true : false; var painPlay = cb.settings["painPlay"] == "yes" ? true : false; if (addionSelected && ionsEnabled) { switch (addionType) { case 0: announceSelfAddion (addionSelected, true); break; case 1: announceSelfAddion (addionSelected, pussyPlay); break; case 2: announceSelfAddion (addionSelected, painPlay); break; case 3: announceSelfAddion (addionSelected, electroPlay); break; }; } } return data; }); function checkForMagicNumber (tipData) { var tipValue = parseInt(tipData["amount"]); if (magicNumber == 0 ) { // new magic number needed magicNumberHigh = cb.settings["magicNumberHighLimit"]; magicNumberLow = cb.settings["magicNumberLowLimit"]; magicNumber = makeNewRandomNumber(magicNumberLow, magicNumberHigh); } if (tipValue == magicNumber) { // winner !! magicNumber = 0; // reset it to have a new number picked next time var username = tipData.from_user; var colors = ["#ffcccc", "#ff9999", "#ff6666", "#ff3232"]; for (var i = 0; i < colors.length; i++) { cb.sendNotice("====== WINNER ======", "", "", colors[i], "bold"); } cb.sendNotice("ion's Secret Number has been FOUND !!!", "", "", "#000000", "bold"); cb.sendNotice(username + " has won a special surprise prize!", "", "", "#000000", "bold"); colors.reverse(); for (var i = 0; i < colors.length; i++) { cb.sendNotice("====== WINNER ======", "", "", colors[i], "bold"); } } } function pickRandomAddion() { // pick a random add-ion var random = 0; while (!addions[random] || random == 0) { var random = Math.floor(Math.random()*2001) + 1; // some are not allowed, check for them: if (random == 777 || random == 2000 || random == 1000) {random = 0;} } return addions[random][1]; } function makeNewRandomNumber (low, high) { // pick a random number that does not equate to a valid add-ion if (low == high) { // basically disable it return 0; } var random = magicNumber; while (addions[random] || random == 0) { var random = Math.floor(Math.random()*(1+ high - low))+ low; // cb.sendNotice("trying "+ random, "", "", "#ff0000", "bold"); } return random; }
© Copyright Chaturbate 2011- 2026. All Rights Reserved.