Apps Home
|
Create an App
TC's Cum For Me
Author:
tc4gk
Description
Source Code
Launch App
Current Users
Created by:
Tc4gk
/* Use the settings to: Set a room topic Send the user a welcome message when they join the room replacing ${user} with their name Send the user a list of rules Send the user instructions on how your room works Set a message sent to the room when the "/cumshot viewer" command is used, ${user} is replaced with viewer How the watchlist works When watchlist is set users viewers may use the command "/watchme" to add themselves to a list of cams to be watched. Mods can use "/unverified" to grab a viewer from the list, check the cam, and then "/add viewer" to add the viewer to the broadcasters wait list. If a cam isn't up to snuff, "/remove viewer reason" drops the viewer from the list and notifies them with reason The broadcaster can use "/next" to grab a random verified cam to watch. The "/c1 viewer" and "/c2 viewer" commands can be used update the panel with who the broadcaster is watching, or clear them if no viewer specified. Various "/list" commands show the different lists and who's on them: /la = all, /lc = who came, /lw = who's waiting, /lr = who's been removed, etc When watchlist is set to mods, only the broadcaster and moderators may manage the watchlist, adding users with "/add viewer" This is constantly evolving... */ cb.settings_choices = [ {name: 'topic', type: 'str', minLength: 1, maxLength: 255, label: "Set room subject:", defaultValue:"Cum for me!"}, {name: 'welcome_message', type: 'str', minLength: 1, maxLength: 255, defaultValue: "Welcome to my room ${user}!", label: "Set a welcome message:"}, {name: 'rules', type: 'str', minLength: 1, maxLength: 255, label: "Rules:", required: false, defaultValue:"No PMs, no privates, no demands, no passworded/blocked rooms.|If I'm broadcasting open, so can you."}, {name: 'watchlist', type:'choice',defaultValue: 'users', label: "Who can use the watchlist", choice1:'off', choice2: 'users', choice3:'mods' }, {name: 'instructions', type: 'str', minLength: 1, maxLength: 255, label: "Instructions:", required: false, defaultValue:"If you want me to watch your cam, type /watchme|I pick a random name from the list to watch."}, {name: 'cum_message', type: 'str', minLength: 1, maxLength: 255, label: "Message send to the room when using /cum:", required: false, defaultValue:"${user} came for me!"}, ]; var watchlist = new Array(); var cummers = 0; var lastCumshot = ''; var cam1 = ''; var cam2 = ''; var green = "#006600"; var red = "#e60000"; var blue = "#0033cc"; var purple = "#754AA8"; var white = "#FFFFFF"; var pink = "#FF00FF"; var yellow = "#AAAA00"; var cyan = "#008888"; var orange = "#ff8c00"; var help = " /subject message - change the room's subject to message\n /add,a username message - adds username to the watchlist with an optional message.\n /remove,r username message - Removes the user from the watchlist, message says why\n /next,n - pick a random cam from the watchlist and displays their name/message\n /list,l,w - list all the cams and their messages\n /cam1[2],c1,c2,1,2 name - set the panel's watching status to the given name and remove them from the watchlist\n /cum,c,cs name - increment the cumshot counter and add the last cummer's name, broadcasting to the room who came"; function showlist(status,user) { // status values: // watched = user has been watch, but didn't cum // removed = user was removed // leftroom = user left the room // came = user came // waiting = user is waiting // unverified = user's cam has not been checked // ignored = let them think they're on the list, but ignore them var list = new Array(); for (var i=0;i<watchlist.length;i++){ if (watchlist[i].status == status || status == "all") list.push(watchlist[i]); } var notice = status+" list:"; if (list.length > 0) { for (var i=0;i<list.length;i++){ if (status == "all") { notice = notice + "\n" + list[i].username + " ["+list[i].status+"] (by:"+list[i].statusby+") "+list[i].msg; } else { notice = notice + "\n" + list[i].username + " (by:"+list[i].statusby+") "+list[i].msg; } } } else { notice = status+" list is empty."; } cb.sendNotice(notice, user,"",blue); } function setstatus(user,by,status,message) { var exists = false; if (message === undefined) message = ""; for (var i=0;i<watchlist.length;i++){ if (watchlist[i].username == user) { exists = true; if (watchlist[i].status == "came") break; // no removing users from the came list if (message.length > 0) { watchlist[i].msg = message; } else { watchlist[i].msg = ""; } watchlist[i].status = status; watchlist[i].statusby = by; } if (exists) break; } if (!exists) { var newuser = new Object(); newuser.username=user; newuser.status = status; newuser.statusby = by; if (message.length > 0) { newuser.msg = message; } else { newuser.msg = ""; } watchlist.push(newuser); } //if (message.length > 0) message = ", reason: "+message; // don't spam the channel when the app updates someone's status because they left/re-joined //if (by != "app") { //cb.sendNotice(user+" status set to "+status+" by "+by+""+message,"",red,white,"","red"); //cb.sendNotice(user+" status set to "+status+" by "+by+""+message,cb.room_slug,red,white); //} cb.drawPanel(); } function getstatus(user) { var status = "unknown"; var exists = false; for (var i=0;i<watchlist.length;i++){ if (watchlist[i].username == user) { status = watchlist[i].status; } if (exists) break; } return status; } function rules(user) { var rules = cb.settings.rules.replace(/\|/g,"\n") if (rules.length > 0) cb.sendNotice("Rules:\n"+rules,user,"",purple,"bold"); } function instructions(user) { var instructions = cb.settings.instructions.replace(/\|/g,"\n") if (instructions.length > 0) cb.sendNotice("Instructions:\n"+instructions,user,"",blue,"bold"); } cb.onLeave(function(user) { var status = getstatus(user.user); if (status == "waiting") { setstatus(user.user,"app","leftroom"); } }); cb.onEnter(function(user) { var userName = user['user']; var status = getstatus(userName); if (status == "leftroom") { setstatus(user.user,"app","waiting"); cb.sendNotice("Welcome back "+userName,userName,"",green,"bold"); } else { var welcome = cb.settings.welcome_message.replace(/\$\{user\}/, userName); welcome = welcome.replace(/\|/g,"\n"); if (welcome.length > 0 ) cb.sendNotice(welcome,userName,"",green,"bold"); rules(userName); instructions(userName); } }); cb.onMessage(function(msg) { //"use strict"; var msgText = msg['m']; if (msgText[0] == '/' || msgText[0] == '\\'){ msg['X-Spam'] = true; var command = ""; var arg = ""; var parsedMsg = msgText.match(/\/(\w+)($| (.*))/); if (parsedMsg) { command = parsedMsg[1]; arg = parsedMsg[3] || ""; } else { return; } // only broadcaster and mods can use these commands if(msg.user == cb.room_slug || msg.is_mod) { switch (command) { // Add a user to the watchlist case "add": case "a": if (cb.settings.watchlist != 'off') { var args = arg.split(' '); var name = args.shift(); arg = args.join(' '); cb.sendNotice("You've beed added to the list to be watched. The list is random, be patient, and be ready.", name,"",blue); setstatus(name,msg.user,"waiting",arg); } break; // Remove a user from the watchlist case "remove": case "r": if (cb.settings.watchlist != 'off') { var args = arg.split(' '); var name = args.shift(); arg = args.join(' '); if (getstatus(name) == "unverified") { if (arg.length == 0) arg = "Your camera couldn't be viewed."; cb.sendNotice("You're not being added to the list because: "+arg+"\nRead the bio for instructions.", name,"",blue); } setstatus(name,msg.user,"removed",arg); } break; case "ignore": case "i": if (cb.settings.watchlist != 'off') { setstatus(arg,msg.user,"ignored"); } break; case "unverified": case "u": var u = -1; for (var i=0;i<watchlist.length;i++){ if (watchlist[i].status == "unverified") { u = i; break; } } if (u >= 0) { cb.sendNotice("Unverified cam: "+watchlist[u].username+": "+watchlist[u].msg,msg.user,"",red,"bold"); //cb.sendNotice(u.username+" removed from the watchlist",msg.user,"",blue); //setstatus(u.username,msg.user,"watched"); } else { cb.sendNotice("No unverified cams.",msg.user,"",red,"bold"); } break; case "help": case "h": cb.sendNotice("Commands\n"+help, msg.user, "", blue); break; case "list": case "l": case "w": showlist("waiting",msg.user); break; case "la": case "status": showlist("all",msg.user); break; case "removed": case "lr": showlist("removed",msg.user); break; case "left": case "ll": showlist("leftroom",msg.user); break; case "watched": case "lw": showlist("watched",msg.user); break; case "came": case "lc": showlist("came",msg.user); break; case "li": showlist("ignored",msg.user); break; case "lu": showlist("unverified",msg.user); break; case "cam1": case "c1": case "1": var exists = false; if (arg.length > 0) { setstatus(arg,msg.user,"watched"); cb.sendNotice(cb.room_slug + " is watching your cam.\nTime to get your stroke on. Don't take too long.",arg,"",red); cb.sendNotice(cb.room_slug + " is watching "+arg,"",red,white,"","red"); cam1 = 'Watching ' + arg; } else { cam1 = ''; } cb.drawPanel(); break; case "cam2": case "c2": case "2": var exists = false; if (arg.length > 0) { setstatus(arg,msg.user,"watched"); cb.sendNotice(cb.room_slug + " is watching your cam.",arg,"",red); cb.sendNotice(cb.room_slug + " is watching "+arg,"",red,white,"","red"); cam2 = 'Watching ' + arg; } else { cam2 = ''; } cb.drawPanel(); break; case "cumshot": case "cum": case "cs": case "c": var exists = false; if (arg.length > 0) { if (getstatus(arg) != "came") { var note = cb.settings.cum_message.replace(/\$\{user\}/g, arg); cb.sendNotice(note,"","",green,"bold"); cummers++; lastCumshot = " (last: "+arg+")"; setstatus(arg,msg.user,"came"); } else { cb.sendNotice(arg+" was already announced",msg.user,"",red); } } cb.drawPanel(); break; case "next": case "n": var u = -1; for (var i=0;i<watchlist.length;i++){ if (watchlist[i].status == "waiting") { u = i; break; } } if (u >= 0) { cb.sendNotice("Next cam: "+watchlist[u].username+": "+watchlist[u].msg,msg.user,"",red,"bold"); //cb.sendNotice(u.username+" removed from the watchlist",msg.user,"",blue); setstatus(u.username,msg.user,"watched"); } else { cb.sendNotice("No waiting cams.",msg.user,"",red,"bold"); } break; case "random": case "nr": var list = new Array(); for (var i=0;i<watchlist.length;i++){ if (watchlist[i].status == "waiting") list.push(watchlist[i]); } if (list.length > 0) { var i = Math.floor(Math.random() * list.length); var u = list[i]; cb.sendNotice("Next random cam: "+u.username+": "+u.msg,msg.user,"",red,"bold"); //cb.sendNotice(u.username+" removed from the watchlist",msg.user,"",blue); setstatus(u.username,msg.user,"watched"); } else { cb.sendNotice("The wait list is empty.",msg.user,"",red,"bold"); } break; case "subject": var newTopic = arg; cb.changeRoomSubject(newTopic); break; case "hidecam": cb.limitCam_start("My cam hidden right now", arg.split(' ')); break; case "addviewer": cb.limitCam_addUsers(arg.split(' ')); break; case "showcam": cb.limitCam_stop(); break; case "viewers": var usersWithAccess = cb.limitCam_allUsersWithAccess(); cb.sendNotice("The following users have access to view the cam: ", msg.user, "" , "", "bold"); cb.sendNotice(usersWithAccess.toString(), msg.user, "#bbc8c8", "","bold"); break; case "rules": rules(arg); break; case "instructions": instructions(arg); break; } } else { // commands users can use switch (command) { // user adding themselves to the watchlist case "watchme": case "w": if (cb.settings.watchlist == 'users') { switch(getstatus(msg.user)) { case 'waiting': case 'ignored': cb.sendNotice("Your cam is verified working and you are on the list.\nBe patient, cams are selected randomly.", msg.user,"",blue); break; case 'watched': cb.sendNotice("Your cam was (or is being) watched. If you didn't finish, better luck next time.\nYou are no longer on the list.", msg.user,"",blue); break; case 'removed': cb.sendNotice("You were removed from the list for some reason, maybe your cam couldn't be verified.\nRe-adding your cam to be verified again. Hopefully you fixed the problem.", msg.user,"",blue); cb.sendNotice(msg.user+" is trying to be verified again","",red,white,"","red"); setstatus(msg.user,msg.user,"unverified",arg); break; case 'unverified': cb.sendNotice("Your cam is waiting to be verified. You'll get a notice once it has been.", msg.user,"",blue); break; case 'came': cb.sendNotice("You came for "+cb.room_slug+"! Well done.", msg.user,"",blue); break; default: cb.sendNotice("You'll be added to the list once your cam is verified. It may take a little while, be patient.\nYou'll get a notice when you're verified.", msg.user,"",blue); cb.sendNotice(msg.user+" needs to be verified","",red,white,"","red"); setstatus(msg.user,msg.user,"unverified",arg); } } break; default: if (cb.settings.watchlist == 'users') { cb.sendNotice("Type /watchme to add yourself to the list of cams to watch, or to see your current status.\nYou'll get notices when something's happening, or it's your turn.\nDon't spam the room asking to be on the list.", msg.user,"", blue, ""); } break; } } } var gender = msg['gender']; var genderStr = ""; switch (gender) { case 'm': genderStr = ':genderM'; break; case 'f': genderStr = ':genderF'; break; case 's': genderStr = ':genderS'; break; case 'c': genderStr = ':genderC'; break; } // change the user's message colors based on their status // watched = user has been watch, but didn't cum // removed = user was removed // leftroom = user left the room // came = user came // waiting = user is waiting switch(getstatus(msg.user)) { case 'waiting': case 'ignored': msg.c = blue; break; case 'watched': msg.c = cyan; break; case 'removed': msg.c = orange; break; case 'unverified': msg.c = purple; break; case 'came': msg.c = green; break; default: msg.c = '#000000'; break; } if (msg.user == cb.room_slug) msg.c = pink; msg['m'] = genderStr + ' ' + msg['m']; return msg; }); cb.changeRoomSubject(cb.settings.topic); cb.onDrawPanel(function(user) { var fapstring = ''; var waiting = 0; if (cb.settings.watchlist != 'off') { for (var i=0;i<watchlist.length;i++){ if (watchlist[i].status == "waiting" || watchlist[i].status == "ignored") waiting++; } fapstring = waiting+" waiting, "; } return { 'template': '3_rows_11_21_31', 'row1_value': fapstring+cummers+" have cum"+lastCumshot, 'row2_value': cam1, 'row3_value': cam2, }; });
© Copyright Chaturbate 2011- 2026. All Rights Reserved.