Bots Home
|
Create an App
crazy basch ticket-show
Author:
bash74
Description
Source Code
Launch Bot
Current Users
Created by:
Bash74
var app= { name:"\'CrazyTicket Bot\'",type:"Bot",version:"2.3",build:".109",date:"2019.06.30",acg:"acrazyguy",ph:"phatkatmeow",te:"phatterkat",pe:"perd",sf:"sartfack",rx:"robx7",bli:"birdylovesit",bf:"blazefyre",CD:"dump" }; var COLOR= { DEVELOPER:"#D9F7F7",BRED:"#FF1407",MRED:"#D80A00",REDHL:"#FFE5E5",HILITE:"#EEE5FF",SUCCESS:"#468847",ERROR:"#B94A48",INFO:"#144D8C",NOTICE:"#6900CC",DPURPLE:"#663399",LPURPLE:"#8041BF",BLUE:"#000099",MOD:"#DC0000",FAN:"#009900",SYNTAX:"#995B00",HVTEXT:"#D80A00",HVBACK:"#FFFFBF",TBMBACK:"#E0EEFF",TBMTEXT:"#12447A",GREEN:"#009900",GREENHL:"#E5FFE5",MAG:"#E509E5",PINK:"#FF48D2",BLI:"#DDFFCC",BF:"#FFE0EA" }; var FLAG= { gift:true,goal:false,priceup:false,debug:false,dev:false,hilite:true,schat:false,toff:false,cdtimer:false,hcam:false,sover:false,end:false,email:false,ots:false }; var cmdPrefix="/"; var dashLine="------------------------------------------------------------"; var typeCmds=" Type: "+ "/commands"+ " to see all commands."; var whatsNew="--------------------- WHAT\'S NEW ----------------------\x0A\u25CF NEW COMMANDS:\x0A\u25CF The Notice commands now take the argument \'r\'.\x0A\u25CF This will output the Notice in red.\x0A\u25CF E.G.: /ctn r Message\x0A"+ dashLine; var otsMsg="You have an outstanding ticket that you can use for this show.\x0A\u25CF To use your ticket simply type /useticket in the chat and you will be added to the ticket holders list for this show.\x0A\u25CF If you change your mind BEFORE the show starts simply type /saveticket in the chat, and your ticket will become available for another time.\x0A"; var fanMsg=dashLine+ "\x0A\u25CF The broadcaster has set a special ticket price\x0A\u25CF for Fan Club members.\x0A\u25CF Tip "+ cb.settings.fanbuyin+ " tokens for a show ticket.\x0A"+ dashLine; var fcpMsg="-------------------- :greenvip --------------------------\x0A\u25CF Ticket Price For Fan Club Members Is "+ cb.settings.fanbuyin+ " Tokens\x0A"+ dashLine; var giftAd=dashLine+ "\x0A\u25CF :alert1 CrazyTicket will now let viewers gift tickets\x0A\u25CF to other viewers\x0A\u25CF Type /giftinfo for more information\x0A"+ dashLine; var roomHost=cb.room_slug; var MODS="red"; var FANS="green"; var totalTipped=0; var cdTimerMinutes=0; var hideTime=0; var cdMilliSecs=0; var cdID; var paidList=[]; var viewerList=[]; var nirList=[]; var addList=[]; var autoList=[]; var lifeList=[]; var otsTickets=[]; var usedOTS=[]; var devList=[]; var cmdList=["add","starttimer","addtime","showover","showend","giftinfo","gift"]; var miscList=[]; var opList=[]; var oldPrice=0; var newPrice=0; var giftList= { gifter:[],giftee:[] }; var emList= { name:[],email:[] }; cb.settings_choices= [ { name:"includeACG",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",label:"**NEW** Give a complimentary ticket to \'acrazyguy\' the author of CrazyTicket?" }, { name:"goal",type:"int",minValue:0,label:"Token Goal (optional)",required:false }, { name:"showDesc",type:"str",minLength:1,maxLength:255,defaultValue:"",label:"Show Description",required:false }, { name:"buyin",type:"int",minValue:1,defaultValue:25,label:"Ticket Price" }, { name:"fanbuyin",type:"int",label:"Ticket price for FANS (leave blank if fans are auto-added or pay the regular price)",required:false }, { name:"fanAdvertInt",type:"int",label:"*NEW* Enter time interval for Fan Price Notice (minutes). Leave blank to disable. *ONLY FANS SEE THIS NOTICE*",required:false }, { name:"giftTickets",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"Yes",label:"Allow viewers to gift tickets to other viewers? NOTE: Mods and Fans are currently prohibited from gifting due to free entry and special pricing issues. We\'re working on it" }, { name:"lifeTime",type:"str",minLength:1,maxLength:500,defaultValue:"",label:"Enter Lifetime Ticket Holders\' names here. * NAMES MUST BE SEPARATED BY A COMMA *",required:false }, { name:"hideTips",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",label:"Hide tip total from viewers?" }, { name:"osTickets",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",label:"Enable the Outstanding Ticket System?" }, { name:"otsHolders",type:"str",minLength:1,maxLength:500,defaultValue:"",label:"Enter Outstanding Ticket holders\' names here if you only have a few. * NAMES MUST BE SEPARATED BY A COMMA *",required:false }, { name:"includeMods",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"Yes",label:"Allow moderators to add/delete users (and themselves) to the show?" }, { name:"modPrice",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",label:"Allow moderators to change the ticket price for you?" }, { name:"autoaddMods",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",label:"Automatically give Mods a ticket when they enter the room?" }, { name:"autoaddFans",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",label:"Automatically give Fanclub Members a ticket when they enter?" } ]; if (cb.settings.giftTickets=== "No") { FLAG.gift= false }; if (cb.settings.hideTips=== "Yes") { FLAG.toff= true }; if (cb.settings.goal) { FLAG.goal= true; FLAG.toff= false } else { cb.settings.goal= "None" }; if (cb.settings.osTickets=== "Yes") { FLAG.ots= true }; if (cb.settings.lifeTime!= "") { lifeList= String(cb.settings.lifeTime).split(/[,\s]+/) }; if (FLAG.ots && cb.settings.otsHolders!= "") { otsTickets= String(cb.settings.otsHolders).split(/[,\s]+/) }; cb.onTip(function(x000) { var x001=parseInt(x000.amount,10); var _ab=x000.from_user; var _ac=x000.from_user_is_mod; var _ad=x000.from_user_in_fanclub; var _ae=x000.message; var _af=""; var _ag=0; var _ah=0; if (cb.limitCam_userHasAccess(_ab) && !cbjs.arrayContains(viewerList,_ab)) { viewerList.push(_ab) }; totalTipped+= x001; if ((totalTipped>= cb.settings.goal) && FLAG.goal) { cb.sendNotice(dashLine+ "\x0A\u25CF "+ app.name+ ": GOAL ACHIEVED!\x0A\u25CF Thanks to all tippers\x0A"+ dashLine,"","",COLOR.MRED,"bold"); cb.settings.goal= 0; FLAG.goal= false }; if (FLAG.email) { _af= _ae.match(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i) || ""; _ag= emList.name.indexOf(_ab); if (_ag> -1 && !emList.email[_ag]) { emList.email[_ag]= _af; cb.sendNotice("\u25CF Missing email address recorded.",roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold") } }; if (FLAG.priceup && !cb.limitCam_userHasAccess(_ab)) { if ((cbjs.arrayContains(opList,_ab)) && (x001== (cb.settings.buyin- oldPrice))) { user("add",_ab); cb.sendNotice("\u25CF :CT12LT Ticket sold to \'"+ _ab+ "\'","","",COLOR.NOTICE,"bold"); cbjs.arrayRemove(opList,_ab); if (!cbjs.arrayContains(paidList,_ab)) { paidList.push(_ab) }; if (!cbjs.arrayContains(viewerList,_ab)) { viewerList.push(_ab) }; cb.sendNotice(dashLine+ "\x0A\u25CF You NOW have a ticket and will be able to view\x0A\u25CF the \'Hidden Cam\' show.\x0A"+ dashLine,_ab,COLOR.HILITE,COLOR.NOTICE,"bold") } else { if (x001=== oldPrice) { opList.push(_ab); cb.sendNotice(dashLine+ "\x0A\u25CF :ml-rl YOU TIPPED THE \u25CFOLD PRICE\u25CF AFTER\x0A\u25CF THE PRICE WAS INCREASED TO "+ cb.settings.buyin+ " TOKENS!!\x0A\u25CF PLEASE TIP ANOTHER "+ (cb.settings.buyin- oldPrice)+ " TOKENS TO GET\x0A\u25CF YOUR TICKET!!\x0A"+ dashLine,_ab,COLOR.HVBACK,COLOR.HVTEXT,"bold") } } }; if (((x001>= cb.settings.buyin) || (cb.settings.fanbuyin && _ad && (x001>= cb.settings.fanbuyin))) && !FLAG.end) { if (!cb.limitCam_userHasAccess(_ab)) { if (_ad) { cb.sendNotice("\u25CF :CT12LT Ticket sold to Fan Club member \'"+ _ab+ "\'","","",COLOR.GREEN,"bold") } else { cb.sendNotice("\u25CF :CT12LT Ticket sold to \'"+ _ab+ "\'","","",COLOR.NOTICE,"bold") }; user("add",_ab); if (!cbjs.arrayContains(paidList,_ab)) { paidList.push(_ab) }; if (!cbjs.arrayContains(viewerList,_ab)) { viewerList.push(_ab) }; cb.sendNotice(dashLine+ "\x0A\u25CF You will be able to view the \'Hidden Cam\' show.\x0A"+ dashLine,_ab,COLOR.HILITE,COLOR.NOTICE,"bold"); if (FLAG.email) { _af= _ae.match(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i) || ""; emList.name.push(_ab); emList.email.push(_af); if (!_af) { cb.sendNotice("\u25CF You may have forgotten your email address in the tip note.",_ab,"",COLOR.BRED,"bold"); cb.sendNotice("\u25CF Viewer \'"+ _ab+ "\' may have forgotten their email address in the tip note.",roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold"); cb.sendNotice("\u25CF Viewer \'"+ _ab+ "\' may have forgotten their email address in the tip note.","","",COLOR.MOD,"bold",MODS) } else { cb.sendNotice("\u25CF Email address recorded.",roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold") } } } } } ); cb.onEnter(function(_ab) { var _ai=_ab.user; var _ac=_ab.is_mod; var _ad=_ab.in_fanclub; if (_ai=== app.acg && (cb.settings.includeACG=== "Yes")) { cb.sendNotice("Complimentary ticket",app.acg,"",COLOR.NOTICE,"bold") }; cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ roomHost+ "\' is running CrazyTicket Bot\x0A\u25CF Tip "+ cb.settings.buyin+ " tokens to buy a show ticket\x0A\u25CF "+ cb.settings.showDesc+ "\x0A"+ dashLine,_ai,"",COLOR.MRED,"bold"); if (user("check",_ai)) { if (!cbjs.arrayContains(viewerList,_ai)) { viewerList.push(_ai) } }; if (cbjs.arrayContains(nirList,_ai)) { cbjs.arrayRemove(nirList,_ai) }; cb.sendNotice(dashLine+ "\x0A\u25CF "+ typeCmds+ "\x0A"+ dashLine,_ai,COLOR.REDHL,COLOR.MRED,"bold"); if (FLAG.hcam && !FLAG.end) { cb.sendNotice(dashLine+ "\x0A\u25CF A Hidden Cam show is in progress\x0A\u25CF Duration: "+ getShowTime()+ "\x0A"+ dashLine,_ai,"",COLOR.NOTICE,"bold") }; if (FLAG.sover && !FLAG.end) { cb.sendNotice(dashLine+ "\x0A\u25CF :ml-rl THE SHOW IS ABOUT TO END OR IS OVER\x0A\u25CF BUYING A TICKET NOW IS NOT RECOMMENDED.\x0A"+ dashLine,_ai,"",COLOR.BRED,"bold") }; if (FLAG.hcam && FLAG.end) { cb.sendNotice(dashLine+ "\x0A\u25CF :ml-rl THE SHOW IS OVER :ml-rl \x0A\u25CF TICKET SALES ARE SUSPENDED\x0A\u25CF You will NOT get a ticket if you tip now\x0A"+ dashLine,_ai,"",COLOR.BRED,"bold") }; if (lifeList.length) { if (cbjs.arrayContains(lifeList,_ai)) { cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ _ai+ "\':\x0A\u25CF Because you are a lifetime ticket holder, you\x0A\u25CF have been automatically added to the ticket list.\x0A"+ dashLine,_ai,"",COLOR.MRED,"bold") } }; if (!FLAG.sover && !FLAG.end) { if (cbjs.arrayContains(otsTickets,_ai) && FLAG.ots) { cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ _ai+ "\':\x0A\u25CF "+ otsMsg+ dashLine,_ai,"",COLOR.MRED,"bold") } }; if (_ad && cb.settings.fanbuyin) { cb.sendNotice(fanMsg,_ai,COLOR.GREENHL,COLOR.FAN,"bold") }; if ((_ac && cb.settings.autoaddMods=== "Yes") || (_ad && cb.settings.autoaddFans=== "Yes")) { if (autoAdd(_ai)) { cb.sendNotice(dashLine+ "\x0A\u25CF You\'ve automatically been added to the ticket\x0A\u25CF list because you are "+ (_ac?"a moderator.":"in the fan club.")+ " :woohoo\x0A"+ dashLine,_ai,"",(_ac?COLOR.MRED:COLOR.FAN),"bold") } } } ); cb.onLeave(function(_ab) { var _ai=_ab.user; if (cbjs.arrayContains(viewerList,_ai)) { cbjs.arrayRemove(viewerList,_ai); if (!cbjs.arrayContains(nirList,_ai)) { nirList.push(_ai) } } } ); cb.onMessage(function(x002) { if (x002.m.startsWith(" :qq_staticheart ") && (x002.m[17]== "/")) { x002.m= x002.m.substr(17) }; var _aj="^"+cmdPrefix+"(/S+)(?:\b\s*)(.*)?"; var _ba=/[,\s]+/; var x003= new RegExp(_aj); var x004=x002.m.match(x003); var _bb; var _bc; var _bd; if (x002.m.startsWith('/')) { var i = x002.m.indexOf(' '); _bb= i<0 ? x002.m : x002.m.substring(0,i); _bb = _bb.substring(1); _bc= i<0 ? '' : x002.m.substring(i+1); if (_bc!= null) { _bc= _bc.replace(/^\s+|\s+$/g,"") }; if (_bc!= null) { _bd= _bc.split(_ba) } else { _bd= "" } }; var _be=x002.m; var _ab=x002.user; var _ac=x002.is_mod; var _ad=x002.in_fanclub; var x005=(_ab== roomHost); var x006=(_ab== app.acg); var x007=(_ab== app.sf); var _bf,_bg; var _bh=""; var _bi=""; if (cb.limitCam_isRunning() && !cb.limitCam_userHasAccess(_ab) && !x005 && !_ac && (_ab!= app.acg) && FLAG.schat) { x002.m= ":huh"; x002['X-Spam']= true; cb.sendNotice("\u25CF A hidden cam show is in progress and public chat messages are suppressed.",_ab,"",COLOR.NOTICE,"bold") }; if (_bc && (/^</.test(_bc))) { x002['X-Spam']= true; return cb.sendNotice(dashLine+ "\x0A\u25CF The < and > are not required. Please re-enter.\x0A"+ dashLine,_ab,"",COLOR.MRED,"bold") }; if (cb.limitCam_userHasAccess(_ab) && !cbjs.arrayContains(viewerList,_ab)) { viewerList.push(_ab) }; if (cbjs.arrayContains(cmdList,_bb) && !x006) { miscList.push(_ab+ " - /"+ _bb+ (_bc?" - "+ _bc:"")) }; if (_be=== "commands") { cb.sendNotice(dashLine+ "\x0A\u25CF You need the / before commands\x0A"+ dashLine,_ab,"",COLOR.MRED,"bold") }; switch(_bb) { case "commands":if ((_ac || x006) && _bc=== "who") { cb.sendNotice(dashLine+ "\x0A"+ cbjs.arrayJoin(miscList,"\x0A ")+ "\x0A"+ dashLine,_ab,"",COLOR.INFO,"bold") } else { cb.sendNotice(getCommandList(_ab,_ac),_ab,"",COLOR.INFO,"bold") }; break; case "buy":if (_ac || (x006 && _bc== "all")) { cb.sendNotice(dashLine+ "\x0A\u25CF To buy a show ticket, simply tip "+ cb.settings.buyin+ " tokens\x0A"+ dashLine,"","",COLOR.NOTICE,"bold") } else { cb.sendNotice(dashLine+ "\x0A\u25CF To buy a show ticket, simply tip "+ cb.settings.buyin+ " tokens\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold") }; break; case "tickets":cb.sendNotice(dashLine+ "\x0A"+ (cb.limitCam_allUsersWithAccess().length< 1== true?"\u25CF No tickets sold!":cbjs.arrayJoin(cb.limitCam_allUsersWithAccess(),", "))+ "\x0A"+ dashLine+ "\x0A\u25CF Ticket holders: "+ cb.limitCam_allUsersWithAccess().length+ "\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold"); break; case "pass":if (user("check",_ab)) { cb.sendNotice(dashLine+ "\x0A\u25CF You are on the ticket list and will see the show\x0A\u25CF when it starts.\x0A"+ dashLine,_ab,"",COLOR.GREEN,"bold") } else { cb.sendNotice(dashLine+ "\x0A\u25CF You must buy a ticket to get access to the show.\x0A"+ dashLine,_ab,"",COLOR.BRED,"bold") }; break; case "timeleft":if (FLAG.cdtimer) { if ((_ac || (x006 && FLAG.dev)) && (_bc=== "all")) { cb.sendNotice(dashLine+ "\x0A\u25CF "+ calcTime(cdMilliSecs- Date.now())+ " until the show starts!\x0A"+ dashLine,"","",COLOR.BRED,"bold") } else { cb.sendNotice(dashLine+ "\x0A\u25CF "+ calcTime(cdMilliSecs- Date.now())+ " until the show starts!\x0A"+ dashLine,_ab,"",COLOR.BRED,"bold") } } else { cb.sendNotice("\u25CF No countdown to show timer is running",_ab,"",COLOR.NOTICE,"bold") }; break; case "showtime":if (FLAG.hcam) { if ((_ac || (x006 && FLAG.dev)) && (_bc=== "all")) { cb.sendNotice(dashLine+ "\x0A\u25CF A Hidden Cam show is in progress.\x0A\u25CF Duration: "+ getShowTime()+ "\x0A"+ dashLine,"","",COLOR.NOTICE,"bold") } else { if ((_ac || (x006 && FLAG.dev)) && (_bc=== "bc")) { cb.sendNotice(dashLine+ "\x0A\u25CF Your show has been in progress for:\x0A\u25CF "+ getShowTime()+ "\x0A"+ dashLine,roomHost,"",COLOR.NOTICE,"bold") } else { cb.sendNotice(dashLine+ "\x0A\u25CF A Hidden Cam show is in progress.\x0A\u25CF Duration: "+ getShowTime()+ "\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold") } } } else { cb.sendNotice("\u25CF No Hidden Cam show is currently in progress.",_ab,"",COLOR.NOTICE,"bold") }; break; case "useticket":if (FLAG.ots) { if (!cb.limitCam_userHasAccess(_ab) && cbjs.arrayContains(otsTickets,_ab)) { cb.limitCam_addUsers([_ab]); cbjs.arrayRemove(otsTickets,_ab); if (!cbjs.arrayContains(usedOTS,_ab)) { usedOTS.push(_ab) }; if (!cbjs.arrayContains(viewerList,_ab)) { viewerList.push(_ab) }; cb.sendNotice("\x0A\u25CF You have been added to the ticket holders list for this show.\x0A",_ab,"",COLOR.NOTICE,"bold"); cb.sendNotice("\x0A\u25CF \'"+ _ab+ "\' has used their outstanding ticket.\x0A",roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold"); cb.sendNotice("\x0A\u25CF Mods: \'"+ _ab+ "\' has used their outstanding ticket.\x0A","","",COLOR.NOTICE,"bold",MODS) } else { cb.sendNotice("\x0A\u25CF Sorry, you have no outstanding ticket available.\x0A",_ab,"",COLOR.NOTICE,"bold") } } else { otsNE(_ab) }; break; case "saveticket":if (FLAG.ots) { if (cb.limitCam_userHasAccess(_ab) && !FLAG.hcam && !cbjs.arrayContains(addList,_ab)) { otsTickets.push(_ab); cb.limitCam_removeUsers([_ab]); if (cbjs.arrayContains(usedOTS,_ab)) { cbjs.arrayRemove(usedOTS,_ab) }; if (cbjs.arrayContains(viewerList,_ab)) { cbjs.arrayRemove(viewerList,_ab) }; cb.sendNotice("\x0A\u25CF You have been removed from the ticket holders list for this show and your ticket saved for later use.\x0A",_ab,"",COLOR.NOTICE,"bold"); cb.sendNotice("\x0A\u25CF \'"+ _ab+ "\' has saved their ticket for later use.\x0A",roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold"); cb.sendNotice("\x0A\u25CF Mods: \'"+ _ab+ "\' has saved their ticket for later use.\x0A","","",COLOR.NOTICE,"bold",MODS) } else { cb.sendNotice("\x0A\u25CF Sorry, you have no ticket to save or the show has started.\x0A",_ab,"",COLOR.NOTICE,"bold") } } else { otsNE(_ab) }; break; case "gift":if (FLAG.gift && !_ad && !_ac) { if (_bc) { if (!cb.limitCam_userHasAccess(_ab)) { cb.sendNotice(dashLine+ "\x0A\u25CF You do not have a ticket to gift\x0A"+ dashLine,_ab,"",COLOR.MRED,"bold") } else { if (cb.limitCam_userHasAccess(_bc)) { cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ _bc+ "\' already has a ticket\x0A"+ dashLine,_ab,"",COLOR.MRED,"bold") } else { if (cb.limitCam_userHasAccess(_ab)) { cb.limitCam_removeUsers([_ab]); cb.limitCam_addUsers([_bc]); giftList.gifter.push(_ab); giftList.giftee.push(_bc); cb.sendNotice("\u25CF \'"+ _ab+ "\' has gifted their ticket to \'"+ _bc+ "\'","","",COLOR.NOTICE,"bold"); cb.sendNotice(dashLine+ "\x0A\u25CF You have been gifted a ticket by \'"+ _ab+ "\'\x0A"+ dashLine,_bc,"",COLOR.MRED,"bold") } } } } else { cb.sendNotice(dashLine+ "\x0A\u25CF You didn\'t specify a viewer to gift to\x0A"+ dashLine,_ab,"",COLOR.MRED,"bold") } } else { cb.sendNotice(dashLine+ "\x0A\u25CF Sorry, the broadcaster has disabled ticket gifting,\x0A\u25CF OR you are a Mod or Fan with possible free entry\x0A\u25CF or special pricing\x0A"+ dashLine,_ab,"",COLOR.MRED,"bold") }; break; case "giftlist":if (x005 || _ac || x006) { var _bj=""; for (var _ca=0; _ca< giftList.gifter.length; _ca++) { _bj+= giftList.gifter[_ca]+ " => "+ giftList.giftee[_ca]+ "\x0A" }; cb.sendNotice(dashLine+ "\x0A\u25CF List of gifted tickets: "+ giftList.gifter.length+ "\x0A"+ dashLine+ "\x0A"+ _bj+ dashLine,_ab,"",COLOR.NOTICE,"bold") }; break; case "giftinfo":cb.sendNotice(dashLine+ "\x0A\u25CF The command \'"+ "/gift"+ "\' allows viewers that have already bought a ticket to gift their ticket to another viewer. The gifter will then have to buy another ticket for themself.\x0A\u25CF USAGE: /gift <username> - Where <username> is the name of the viewer you wish to gift to\x0A\u25CF :alert1 Currently, Mods and Fans cannot gift tickets using this method due to free entry and special pricing issues. This is being addressed and should be rectified soon.\x0A"+ dashLine,_ab,"",COLOR.INFO,"bold"); break; case "giftad":if (x006 || x007) { cb.sendNotice(giftAd,"",COLOR.REDHL,COLOR.MRED,"bold") }; break; case "add":if (x005 || (_ac && cb.settings.includeMods== "Yes")) { if (_bc=== "?") { var _cb="\x0A"; _cb+= "Usage: "+ "/add"+ " <user1 user2 user3 etc>\x0A"; _cb+= "Use \'"+ "/add"+ "\' to manually add a viewer or viewers to the ticket holder list. If no <user> is specified, the command issuer is added if the broadcaster allows.\x0A"; _cb+= "The output from the \'"+ "/tickets"+ "\' command can be copied and saved periodically in case the App crashes. Once the App is restarted, the \'"+ "/add"+ "\' command can be issued and the saved list pasted in after the command to restore the ticket holder list.\x0A"; x002['X-Spam']= true; return cb.sendNotice(_cb,_ab,"",COLOR.INFO,"bold") }; if (_bc) { if (_bd.length> 1) { cb.sendNotice("\u25CF Mass adding users to the ticket list",_ab,"",COLOR.NOTICE,"bold"); for (var _ca=0; _ca< _bd.length; _ca++) { if (!user("check",_bd[_ca]) && _bd[_ca]!= "") { user("add",_bd[_ca]); if (!cbjs.arrayContains(addList,_bd[_ca])) { addList.push(_bd[_ca]) }; cb.sendNotice("\u25CF Added: \'"+ _bd[_ca]+ "\'",_ab,"",COLOR.SUCCESS,""); cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ _bd[_ca]+ "\' you have been added to the ticket list\x0A"+ dashLine,_bd[_ca],COLOR.HVBACK,COLOR.HVTEXT,"bold") } else { if (_bd[_ca]!= "") { cb.sendNotice("\u25CF Skipped: \'"+ _bd[_ca]+ "\' is already on the list.",_ab,"",COLOR.SYNTAX) } } }; cb.sendNotice("\u25CF Mass adding completed - Viewers Notified.",_ab,"",COLOR.NOTICE,"bold"); cb.sendNotice("\u25CF Type "+ "/tickets"+ " to confirm",_ab,"",COLOR.NOTICE,"bold"); cb.sendNotice("\u25CF Mod \'"+ _ab+ "\' mass-added viewers: "+ cbjs.arrayJoin(_bd,", ")+ " to the ticket holders list.",roomHost,"",COLOR.SYNTAX,"") } else { if (user("check",_bc)) { cb.sendNotice("\u25CF Skipped: \'"+ _bc+ "\' is already on the list.",_ab,"",COLOR.NOTICE,"bold") } else { user("add",_bc); if (!cbjs.arrayContains(addList,_bc)) { addList.push(_bc) }; if (!cbjs.arrayContains(viewerList,_bc)) { viewerList.push(_bc) }; cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ _bc+ "\' you have been added to the ticket list\x0A"+ dashLine,_bc,COLOR.HVBACK,COLOR.HVTEXT,"bold"); cb.sendNotice("\u25CF Viewer \'"+ _bc+ "\' added to the ticket list\x0A\u25CF by \'"+ _ab+ "\'.","",COLOR.HVBACK,COLOR.HVTEXT,"bold",MODS); cb.sendNotice("\u25CF Viewer \'"+ _bc+ "\' added to the ticket list\x0A\u25CF by \'"+ _ab+ "\'.",roomHost,"",COLOR.SYNTAX,"") } } } else { if (!user("check",_ab)) { user("add",_ab); if (!cbjs.arrayContains(addList,_ab)) { addList.push(_ab) }; cb.sendNotice("\u25CF Mod \'"+ _ab+ "\' added themself to ticket list.",roomHost,"",COLOR.SYNTAX,"") } else { cb.sendNotice("\u25CF Oops, \'"+ _ab+ "\', it seems you are already on the ticket list.",_ab,"",COLOR.SYNTAX,"") } } } else { if (_ac) { cb.sendNotice("\u25CF The broadcaster has disabled this command for moderators.",_ab,"",COLOR.NOTICE,"bold") } else { onlyMods(_ab) } }; cb.drawPanel(); break; case "del":if ((_ac && cb.settings.includeMods=== "Yes") || x005) { if (_bc=== "?") { var _cc="\x0A"; _cc+= "Usage: "+ "/del"+ " <user>\x0A"; _cc+= "Use \'"+ "/del"+ "\' to manually delete a viewer from the ticket holder list.\x0A"; x002['X-Spam']= true; return cb.sendNotice(_cc,_ab,"",COLOR.INFO,"bold") }; if (_bc) { if (user("check",_bc)) { user("del",_bc); cbjs.arrayRemove(addList,_bc); cb.sendNotice("\u25CF Viewer \'"+ _bc+ "\' removed from the ticket list.",_ab,"",COLOR.NOTICE,"bold"); cb.sendNotice("\u25CF Viewer \'"+ _bc+ "\' removed from the ticket list by \'"+ _ab+ "\'.",roomHost,"",COLOR.SYNTAX,"") } else { cb.sendNotice("\u25CF Viewer \'"+ _bc+ "\' is not on the ticket list.",_ab,"",COLOR.ERROR,"bold") } } else { cb.sendNotice("\u25CF Syntax: "+ "/del"+ " <user>",_ab,"",COLOR.SYNTAX,"bold") } } else { if (_ac) { cb.sendNotice("\u25CF The broadcaster has disabled this command for moderators.",_ab,"",COLOR.NOTICE,"bold") } else { onlyMods(_ab) } }; cb.drawPanel(); break; case "check":if (_ac || x005 || x006) { if (_bc=== "?") { var _cd="\x0A"; _cd+= "Usage: "+ "/check"+ " <user1 user2 user3 etc>\x0A"; _cd+= "Use \'"+ "/check"+ "\' to manually check if a viewer or viewers are valid ticket holders.\x0A"; x002['X-Spam']= true; return cb.sendNotice(_cd,_ab,"",COLOR.INFO,"bold") }; if (_bc) { if (_bd.length> 1) { cb.sendNotice("\u25CF Checking a list of users against the ticket list: "+ _bd.toString(),_ab,"",COLOR.NOTICE,"bold"); for (var _ca=0; _ca< _bd.length; _ca++) { if (!user("check",_bd[_ca])) { cb.sendNotice("\u25CF Checked: User \'\'"+ _bd[_ca]+ "\' does NOT have a ticket.",_ab,"",COLOR.ERROR,"bold") } else { cb.sendNotice("\u25CF Checked: Viewer \'"+ _bd[_ca]+ "\' has a ticket.",_ab,"",COLOR.SUCCESS,"") } }; cb.sendNotice("\u25CF Checking completed.",_ab,"",COLOR.NOTICE,"bold") } else { if (user("check",_bc)) { cb.sendNotice("\u25CF Checked: Viewer \'"+ _bc+ "\' has a ticket.",_ab,"",COLOR.SUCCESS,"bold") } else { cb.sendNotice("\u25CF Checked: Viewer \'"+ _bc+ "\' does NOT have a ticket.",_ab,"",COLOR.ERROR,"bold") } } } else { cb.sendNotice("\u25CF Syntax: "+ "/check"+ " <user1,user2,user3> ",_ab,"",COLOR.SYNTAX,"bold") } } else { onlyMods(_ab) }; break; case "ots":if (_ac || x005) { if (_bc) { if (_bc=== "on") { FLAG.ots= true; cb.sendNotice("\x0A\u25CF The Outstanding Ticket System is now ENABLED.\x0A",_ab,"",COLOR.NOTICE,"bold") }; if (_bc=== "off") { FLAG.ots= false; cb.sendNotice("\x0A\u25CF The Outstanding Ticket System is now DISABLED.\x0A",_ab,"",COLOR.NOTICE,"bold") } } else { cb.sendNotice("\x0A\u25CF The Outstanding Ticket System is currently "+ (FLAG.ots== true?"ENABLED.\x0A":"DISABLED.\x0A"),_ab,"",COLOR.NOTICE,"bold") } }; break; case "addp":if (_ac || x005) { if (_bc) { paidList.push(_bc) } }; break; case "addots":if (FLAG.ots) { if ((_ac && cb.settings.includeMods== "Yes") || x005) { if (_bc) { if (_bd.length> 1) { for (var _ca=0; _ca< _bd.length; _ca++) { if (!cbjs.arrayContains(otsTickets,_bd[_ca])) { otsTickets.push(_bd[_ca]); cb.sendNotice("\u25CF Added: \'"+ _bd[_ca]+ "\'.",_ab,"",COLOR.SUCCESS,""); cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ _bd[_ca]+ "\':\x0A\u25CF "+ otsMsg+ dashLine,_bd[_ca],"",COLOR.MRED,"bold") } }; cb.sendNotice("\u25CF Mass adding completed - Viewers Notified.",_ab,"",COLOR.NOTICE,"bold"); cb.sendNotice("\u25CF Type "+ "/otslist"+ " to confirm",_ab,"",COLOR.NOTICE,"bold"); cb.sendNotice("\u25CF Mod \'"+ _ab+ "\' mass-added viewers: "+ cbjs.arrayJoin(_bd,", ")+ " to the outstanding ticket list.",roomHost,"",COLOR.SYNTAX,"") } else { if (!cbjs.arrayContains(otsTickets,_bc)) { otsTickets.push(_bc); cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ _bc+ "\':\x0A\u25CF "+ otsMsg+ dashLine,_bc,"",COLOR.MRED,"bold"); cb.sendNotice("\u25CF Viewer \'"+ _bc+ "\' added to the outstanding ticket list.",_ab,"",COLOR.NOTICE,"bold"); cb.sendNotice("\u25CF Viewer \'"+ _bc+ "\' added to the outstanding ticket list by \'"+ _ab+ "\'.",roomHost,"",COLOR.SYNTAX,"") } } } } else { if (_ac) { cb.sendNotice("\u25CF The broadcaster has disabled this command for moderators.",_ab,"",COLOR.NOTICE,"bold") } else { onlyMods(_ab) } } } else { otsNE(_ab) }; break; case "delp":if (_ac || x005) { if (_bc) { cbjs.arrayRemove(paidList,_bc) } }; break; case "delots":if (FLAG.ots) { if (_ac || x005) { if (_bc) { cbjs.arrayRemove(otsTickets,_bc); cb.sendNotice("\x0A\u25CF \'"+ _bc+ "\' has been removed from the outstanding ticket list.\x0A",_ab,"",COLOR.NOTICE,"bold") } } else { onlyMods(_ab) } } else { otsNE(_ab) }; break; case "hilite":if (_ac || x005) { if (_bc=== "?") { var _ce="\x0A"; _ce+= "The \'"+ "hilite"+ "\' command toggles the state of the text highlighting for ticket holders ON and OFF depending on the current state. It is ON by default when the App is started to allow easy identification of ticket holders.\x0A"; x002['X-Spam']= true; return cb.sendNotice(_ce,_ab,"",COLOR.INFO,"bold") }; FLAG.hilite?FLAG.hilite= false:FLAG.hilite= true; if (!x005) { cb.sendNotice("\u25CF Highlighting of ticket holders is now "+ (FLAG.hilite?"ON":"OFF"),_ab,"",COLOR.NOTICE,"bold") }; cb.sendNotice("\u25CF Highlighting of ticket holders is now "+ (FLAG.hilite?"ON.":"OFF."),roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold") } else { onlyMods(_ab) }; break; case "schat":if (_ac || x005) { if (_bc=== "?") { var _cf="\x0A"; _cf+= "The \'"+ "/schat"+ "\' command toggles the suppression of the public chat ON and OFF when in \'hidden cam\' mode. It is OFF by default when the App is started.\x0A This command is used to stop the public chat from flooding a \'hidden cam\' show and can only be used while the room is in \'hidden cam\' mode.\x0A"; x002['X-Spam']= true; return cb.sendNotice(_cf,_ab,"",COLOR.INFO,"bold") }; if (cb.limitCam_isRunning()) { FLAG.schat?FLAG.schat= false:FLAG.schat= true; if (!x005) { cb.sendNotice("\u25CF Suppression of public chat is now "+ (FLAG.schat?"ON.":"OFF."),_ab,"",COLOR.NOTICE,"bold") }; cb.sendNotice("\u25CF Suppression of the public chat is now "+ (FLAG.schat?"ON.":"OFF."),roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold") } else { cb.sendNotice("\u25CF \'Hidden Cam\' must be active for this command to be used",_ab,"",COLOR.NOTICE,"bold") } } else { onlyMods(_ab) }; break; case "tipsoff":if (_ac || x005) { if (_bc=== "?") { var _cg="\x0A"; _cg+= "The \'"+ "/tipsoff"+ "\' command toggles the suppression of the total tips display in the info panel ON and OFF. It is OFF by default when the App is started.\x0A This command is useful to to broadcasters who would prefer that their total tips received be not seen by viewers.\x0A"; x002['X-Spam']= true; return cb.sendNotice(_cg,_ab,"",COLOR.INFO,"bold") }; FLAG.toff?FLAG.toff= false:FLAG.toff= true; cb.drawPanel(); if (!x005) { cb.sendNotice("\u25CF Suppression of \'tip total\' is now "+ (FLAG.toff?"ON.":"OFF."),_ab,"",COLOR.NOTICE,"bold") }; cb.sendNotice("\u25CF Suppression of \'tip total\' is now "+ (FLAG.toff?"ON.":"OFF."),roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold") } else { onlyMods(_ab) }; break; case "ctn":if (_ac || x005 || (x006 && FLAG.dev)) { if (_bc) { if (_bd[0]=== "r") { _bc= _bc.slice(2); _bh= COLOR.MRED } else { _bh= COLOR.NOTICE }; cb.sendNotice("\u25CF "+ _bc.substr(0,1).toUpperCase()+ _bc.substr(1),"","",_bh,"bold") } else { cb.sendNotice("\u25CF Syntax: "+ "/ctn"+ " <some text here>",_ab,"",COLOR.SYNTAX,"bold") } } else { onlyMods(_ab) }; break; case "ctnd":if (_ac || x005 || (x006 && FLAG.dev)) { if (_bc) { if (_bd[0]=== "r") { _bc= _bc.slice(2); _bh= COLOR.MRED } else { _bh= COLOR.NOTICE }; cb.sendNotice(dashLine+ "\x0A\u25CF "+ _bc.substr(0,1).toUpperCase()+ _bc.substr(1)+ "\x0A"+ dashLine,"","",_bh,"bold") } else { cb.sendNotice("\u25CF Syntax: "+ "/ctnd"+ " <some text here>",_ab,"",COLOR.SYNTAX,"bold") } } else { onlyMods(_ab) }; break; case "ctnh":if (_ac || x005 || (x006 && FLAG.dev)) { if (_bc) { if (_bd[0]=== "r") { _bc= _bc.slice(2); _bh= COLOR.MRED; _bi= COLOR.REDHL } else { _bh= COLOR.NOTICE; _bi= COLOR.HILITE }; cb.sendNotice("\u25CF "+ _bc.substr(0,1).toUpperCase()+ _bc.substr(1),"",_bi,_bh,"bold") } else { cb.sendNotice("\u25CF Syntax: "+ "/ctnh"+ " <some text here>",_ab,"",COLOR.SYNTAX,"bold") } } else { onlyMods(_ab) }; break; case "ctndh":if (_ac || x005 || (x006 && FLAG.dev)) { if (_bc) { if (_bd[0]=== "r") { _bc= _bc.slice(2); _bh= COLOR.MRED; _bi= COLOR.REDHL } else { _bh= COLOR.NOTICE; _bi= COLOR.HILITE }; cb.sendNotice(dashLine+ "\x0A\u25CF "+ _bc.substr(0,1).toUpperCase()+ _bc.substr(1)+ "\x0A"+ dashLine,"",_bi,_bh,"bold") } else { cb.sendNotice("\u25CF Syntax: "+ "/ctndh"+ " <some text here>",_ab,"",COLOR.SYNTAX,"bold") } } else { onlyMods(_ab) }; break; case "ctb":if (_ac || (x006 && FLAG.dev)) { if (_bc) { cb.sendNotice((_ac?dashLine+ "\x0A\u25CF "+ _ab.toUpperCase()+ ": ":"--------------- CrazyWare App Support ---------------\x0A\u25CF ")+ _bc+ "\x0A"+ dashLine,roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold"); cb.sendNotice((_ac?dashLine+ "\x0A\u25CF "+ _ab.toUpperCase()+ ": ":"--------------- CrazyWare App Support ---------------\x0A\u25CF ")+ _bc+ "\x0A"+ dashLine,_ab,COLOR.HVBACK,COLOR.HVTEXT,"bold") } else { cb.sendNotice("\u25CF Syntax: "+ "/ctb"+ " <some text here>",_ab,"",COLOR.SYNTAX,"bold") } } else { onlyMods(_ab) }; break; case "ctt":if (_ac || x005 || (x006 && FLAG.dev)) { if (_bc) { if (cb.limitCam_allUsersWithAccess().length> 1) { var x008=cb.limitCam_allUsersWithAccess(); for (var _ca=0; _ca< cb.limitCam_allUsersWithAccess().length; _ca++) { cb.sendNotice("\u25CF "+ _bc,x008[_ca],"",COLOR.NOTICE,"bold") }; cb.sendNotice("\u25CF Message sent to all ticket holders",_ab,"",COLOR.NOTICE,"bold") } else { cb.sendNotice("\u25CF Message not sent, no tickets have been sold",_ab,"",COLOR.NOTICE,"bold") } } else { cb.sendNotice("\u25CF Syntax: "+ "/ctt"+ " <some text here>",_ab,"",COLOR.SYNTAX,"bold") } }; break; case "ctm":if (_ac || x005 || (x006 && FLAG.dev)) { if (_bc) { cb.sendNotice((_ac?dashLine+ "\x0A\u25CF "+ _ab.toUpperCase()+ ": ":"--------------- CrazyWare App Support ---------------\x0A\u25CF ")+ _bc+ "\x0A"+ dashLine,"",COLOR.HVBACK,COLOR.HVTEXT,"bold",MODS); if (!_ac && !x005) { cb.sendNotice("--------------- CrazyWare App Support ---------------\x0A\u25CF "+ _bc+ "\x0A"+ dashLine,_ab,COLOR.HVBACK,COLOR.HVTEXT,"bold") } } else { cb.sendNotice("\u25CF Syntax: "+ "/ctm"+ " <some text here>",_ab,"",COLOR.SYNTAX,"bold") } } else { onlyMods(_ab) }; break; case "ctbm":if (_ac || x005 || (x006 && FLAG.dev)) { if (_bc) { cb.sendNotice(dashLine+ "\x0A\u25CF "+ _ab.toUpperCase()+ ": "+ _bc+ "\x0A"+ dashLine,"",COLOR.TBMBACK,COLOR.TBMTEXT,"bold",MODS); cb.sendNotice(dashLine+ "\x0A\u25CF "+ _ab.toUpperCase()+ ": "+ _bc+ "\x0A"+ dashLine,roomHost,COLOR.TBMBACK,COLOR.TBMTEXT,"bold") } else { cb.sendNotice("\u25CF Syntax: /tbm <message>",_ab,"",COLOR.SYNTAX,"bold") } } else { onlyMods(_ab) }; break; case "ctv":if (_bd) { _bf= _bd.shift(); _bg= cbjs.arrayJoin(_bd," ") }; if (_ac || x005 || (x006 && FLAG.dev)) { if (_bc) { cb.sendNotice(dashLine+ "\x0A\u25CF CrazyTicket: "+ _bg+ "\x0A"+ dashLine,_bf,"",COLOR.MRED,"bold") } else { cb.sendNotice("\u25CF Syntax: /ctv viewername message",_ab,"",COLOR.SYNTAX,"bold") } } else { onlyMods(_ab) }; break; case "starttimer":if (_ac || x005) { if (FLAG.hcam) { cb.sendNotice("\u25CF TIMER START DENIED. Show has started.",_ab,"",COLOR.NOTICE,"bold") } else { if (FLAG.cdtimer) { cb.sendNotice("\u25CF Timer already running.",_ab,"",COLOR.NOTICE,"bold") } else { if (_bc) { startCDTimer(_bc,_ab) } else { cb.sendNotice("\u25CF Please provide countdown time in minutes.",_ab,"",COLOR.NOTICE,"bold") } } } } else { onlyMods(_ab) }; break; case "stoptimer":if (_ac || x005 || (x006 && FLAG.dev)) { cb.cancelTimeout(cdID); FLAG.cdtimer= false; cdTimerMinutes= 0; cdMilliSecs= 0; cb.sendNotice(dashLine+ "\x0A\u25CF Show countdown timer has been stopped.\x0A"+ dashLine,"","",COLOR.MRED,"bold") }; break; case "addtime":if (_ac || x005) { cb.sendNotice("\u25CF The /addtime command has been temporarily disabled. Please use /stoptimer and then /starttimer again with the new time",_ab,"",COLOR.MRED,"bold") } else { onlyMods(_ab) }; break; case "startshow":if ((x005 || _ac) && (!cb.limitCam_isRunning())) { if (_ac) { cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ _ab+ "\' has started the show\x0A\u25CF for \'"+ roomHost+ "\'\x0A"+ dashLine,"",COLOR.HILITE,COLOR.NOTICE,"bold") } else { cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ roomHost+ "\' has started the show!\x0A"+ dashLine,"",COLOR.HILITE,COLOR.NOTICE,"bold") }; cb.sendNotice(dashLine+ "\x0A\u25CF Please do not deactivate "+ app.name+ " until after\x0A\u25CF you end your show with the \'"+ "/stopshow"+ "\' command.\x0A"+ dashLine,roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold"); cb.limitCam_start(app.name+ "\x0A\x0A\'Hidden Cam\' show in progress."); cb.changeRoomSubject(app.name+ ": Show in progress. "+ cb.settings.showDesc+ ". Tip "+ cb.settings.buyin+ " tokens to see the show. "+ typeCmds); FLAG.cdtimer= false; FLAG.hcam= true; FLAG.sover= false; FLAG.end= false; cb.drawPanel(); hideTime= Date.now() } else { onlyMods(_ab) }; break; case "stopshow":if (x005 || _ac) { if (cb.limitCam_isRunning()) { cb.limitCam_stop(); FLAG.hcam= false; cb.sendNotice("\u25CF \'"+ _ab+ "\' has issued /stopshow.","",COLOR.HVBACK,COLOR.HVTEXT,"bold",MODS); cb.changeRoomSubject("\'CrazyTicket\': Hidden Cam show has ended. "+ typeCmds); cb.sendNotice(dashLine+ "\x0A\u25CF The Hidden Cam show has ended.\x0A\u25CF Duration: "+ calcTime(Date.now()- hideTime)+ "\x0A"+ dashLine,"","",COLOR.NOTICE,"bold"); cb.sendNotice(dashLine+ "\x0A\u25CF The show has been ended and ticket sales suspended.\x0A\u25CF To continue selling tickets and keep the existing\x0A\u25CF ticket list use the /newshow command.\x0A\u25CF To clear \'CrazyTicket\' and start with an empty\x0A\u25CF ticket list, use the /ctreset command.\x0A"+ dashLine,roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold"); FLAG.end= true; FLAG.sover= true; FLAG.ots= false; cb.drawPanel(); hideTime= 0 } else { cb.sendNotice("\u25CF No Hidden Cam show is currently in progress.",_ab,"",COLOR.NOTICE,"bold") } } else { onlyMods(_ab) }; break; case "showover":if (x005 || _ac) { if (_bc=== "?") { var _ch="\x0A"; _ch+= "Usage: "+ "/showover"+ "\x0A"; _ch+= "Use \'"+ "/showover"+ "\' when nearing the end of a Hidden Cam show. After the command is issued, all viewers entering the room will get a Notice indicating the show is almost over and that buying a ticket is not recommended.\x0A"; _ch+= "The \'"+ "/showover"+ "\' command toggles the sending of the message ON or OFF depending on the current state. It is OFF by default when the App is started.\x0A"; x002['X-Spam']= true; return cb.sendNotice(_ch,_ab,"",COLOR.INFO,"bold") }; if (cb.limitCam_isRunning()) { if (!FLAG.sover) { FLAG.sover= true; cb.drawPanel(); cb.sendNotice(dashLine+ "\x0A\u25CF :alert1 THE SHOW IS ABOUT TO END :alert1\x0A\u25CF BUYING A TICKET NOW IS NOT RECOMMENDED.\x0A"+ dashLine,"","",COLOR.BRED,"bold"); cb.changeRoomSubject(app.name+ ": The show is about to end. Buying a ticket now is not recommended."+ typeCmds) } else { FLAG.sover= false; cb.drawPanel() }; if (!x005) { cb.sendNotice(dashLine+ "\x0A\u25CF A \'nearing end of show\' message will "+ (FLAG.sover== true?"be sent ":"NOT be sent ")+ "to\x0A\u25CF viewers entering the room.\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold") }; cb.sendNotice(dashLine+ "\x0A\u25CF A \'nearing end of show\' message will "+ (FLAG.sover== true?"be sent ":"NOT be sent ")+ "to\x0A\u25CF viewers entering the room.\x0A"+ dashLine,roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold") } else { cb.sendNotice("\x0A\u25CF This command can only be used during a Hidden Cam show.",_ab,"",COLOR.NOTICE,"bold") } } else { onlyMods(_ab) }; break; case "showend":if (x005 || _ac || (x006 && FLAG.dev)) { if (_bc=== "?") { var _ci="\x0A"; _ci+= "Usage: "+ "/showend"+ "\x0A"; _ci+= "Use \'"+ "/showend"+ "\' when a Hidden Cam show is over but you wish the cam to remain hidden. After the command is issued, it will be clear to viewers entering the room that the show is over and ticket sales are suspended.\x0A"; x002['X-Spam']= true; return cb.sendNotice(_ci,_ab,"",COLOR.INFO,"bold") }; if (cb.limitCam_isRunning()) { if (!FLAG.end) { FLAG.end= true; cb.drawPanel(); cb.changeRoomSubject(app.name+ ": The show is over. Ticket sales are suspended."+ typeCmds); cb.sendNotice(dashLine+ "\x0A\u25CF TICKET SALES ARE SUSPENDED.\x0A\u25CF CAM IS STILL HIDDEN.\x0A"+ dashLine,roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold"); cb.sendNotice(dashLine+ "\x0A\u25CF :ml-rl THE SHOW IS OVER :ml-rl \x0A\u25CF TICKET SALES ARE SUSPENDED.\x0A\u25CF You will NOT get a ticket if you tip now\x0A"+ dashLine,"","",COLOR.BRED,"bold") } else { FLAG.end= false; cb.drawPanel() } } else { cb.sendNotice("\u25CF This command can only be used during a Hidden Cam show.",_ab,"",COLOR.NOTICE,"bold") } } else { onlyMods(_ab) }; break; case "letfansin":if (_ac && FLAG.end) { cb.settings.autoaddFans= "Yes"; cb.sendNotice(dashLine+ "\x0A\u25CF TO FANS WITHOUT A TICKET:\x0A\u25CF The show is over and you can now get into the\x0A\u25CF after show chat by reloading the page\x0A"+ dashLine,"","",COLOR.GREEN,"bold",FANS) }; break; case "newshow":if (x005 || _ac) { if (FLAG.sover) { FLAG.sover= false; FLAG.end= false; if (_ac) { cb.sendNotice(dashLine+ "\x0A\u25CF Ticket sales are turned ON.\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold") }; cb.sendNotice(dashLine+ "\x0A\u25CF Ticket sales are turned ON.\x0A"+ dashLine,roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold"); defaultSubject() } else { FLAG.sover= true; FLAG.end= true; if (_ac) { cb.sendNotice(dashLine+ "\x0A\u25CF Ticket sales are SUSPENDED.\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold") }; cb.sendNotice(dashLine+ "\x0A\u25CF Ticket sales are SUSPENDED.\x0A"+ dashLine,roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold") }; cb.drawPanel() } else { onlyMods(_ab) }; break; case "subject":if (_ac || x005) { if (_bc) { cb.changeRoomSubject(_bc+ ". ") } else { cb.sendNotice("\u25CF Syntax: "+ "/subject"+ " <some text here>",_ab,"",COLOR.SYNTAX,"bold") } } else { onlyMods(_ab) }; break; case "ctsubject":if (_ac || x005) { if (_bc) { cb.changeRoomSubject(app.name+ ": "+ _bc+ ". "+ typeCmds) } else { cb.sendNotice("\u25CF Syntax: "+ "/ctsubject"+ " <some text here>",_ab,"",COLOR.SYNTAX,"bold") } } else { onlyMods(_ab) }; break; case "plist":cb.sendNotice(dashLine+ "\x0A"+ (paidList.length< 1== true?"\u25CF No tickets sold!":cbjs.arrayJoin(paidList,"\x0A "))+ "\x0A"+ dashLine+ "\x0A\u25CF Paid ticket holders: "+ paidList.length+ "\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold"); break; case "plistw":cb.sendNotice(dashLine+ "\x0A\u25CF Paid ticket holders: "+ paidList.length+ "\x0A"+ dashLine+ "\x0A"+ (paidList.length< 1== true?"\u25CF No tickets sold!":cbjs.arrayJoin(paidList,", "))+ "\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold"); break; case "vlist":cb.sendNotice(dashLine+ "\x0A\u25CF Ticket holders currently viewing: "+ viewerList.length+ "\x0A"+ dashLine+ "\x0A"+ cbjs.arrayJoin(viewerList,", ")+ "\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold"); break; case "nrlist":cb.sendNotice(dashLine+ "\x0A\u25CF Ticket holders who have left the room: "+ nirList.length+ "\x0A"+ dashLine+ "\x0A"+ cbjs.arrayJoin(nirList,", ")+ "\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold"); break; case "alist":cb.sendNotice(dashLine+ "\x0A\u25CF Manually added ticket holders: "+ addList.length+ "\x0A"+ dashLine+ "\x0A"+ cbjs.arrayJoin(addList,", ")+ "\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold"); break; case "aalist":cb.sendNotice(dashLine+ "\x0A\u25CF Auto-added ticket holders: "+ autoList.length+ "\x0A"+ dashLine+ "\x0A"+ cbjs.arrayJoin(autoList,", ")+ "\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold"); break; case "emlist":if (_ac || x005) { var _bj=""; for (var _ca=0; _ca< emList.name.length; _ca++) { _bj+= emList.name[_ca]+ " - "+ emList.email[_ca]+ "\x0A" }; cb.sendNotice(dashLine+ "\x0A\u25CF List of email addresses this session: "+ emList.name.length+ "\x0A"+ dashLine+ "\x0A"+ _bj+ dashLine,_ab,"",COLOR.NOTICE,"bold") }; break; case "ltlist":cb.sendNotice(dashLine+ "\x0A\u25CF Lifetime ticket holders: "+ lifeList.length+ "\x0A"+ dashLine+ "\x0A"+ cbjs.arrayJoin(lifeList,", ")+ "\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold"); break; case "oplist":if (x005 || _ac || x006) { cb.sendNotice(dashLine+ "\x0A\u25CF OPLIST: "+ opList.length+ "\x0A"+ dashLine+ "\x0A"+ cbjs.arrayJoin(opList,", ")+ "\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold") }; break; case "otslist":cb.sendNotice(dashLine+ "\x0A\u25CF Outstanding ticket holders: "+ otsTickets.length+ "\x0A"+ dashLine+ "\x0A"+ cbjs.arrayJoin(otsTickets,", ")+ "\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold"); break; case "usedots":cb.sendNotice(dashLine+ "\x0A\u25CF Used OTS tickets: "+ usedOTS.length+ "\x0A"+ dashLine+ "\x0A"+ cbjs.arrayJoin(usedOTS,", ")+ "\x0A"+ dashLine,_ab,"",COLOR.NOTICE,"bold"); break; case "new":if (x005 || _ac) { cb.sendNotice(whatsNew,_ab,"",COLOR.NOTICE,"bold") } else { onlyMods(_ab) }; break; case "email":if (_ac || x005) { FLAG.email?FLAG.email= false:FLAG.email= true; cb.sendNotice("\u25CF Detection of email in tip note is now "+ (FLAG.email== true?"ON.":"OFF."),"","",COLOR.NOTICE,"bold",MODS); cb.sendNotice("\u25CF Detection of email in tip note is now "+ (FLAG.email== true?"ON.":"OFF."),roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold") } else { onlyMods(_ab) }; break; case "ctprice":if (x005 || (_ac && cb.settings.modPrice== "Yes")) { if (_bc && parseInt(_bc,10)) { oldPrice= cb.settings.buyin; newPrice= parseInt(_bc,10); if (newPrice> oldPrice) { cb.sendNotice("\x0A:ml-rl ------------------------------------------- :ml-rl\x0A\x0A----------------- ATTENTION VIEWERS ----------------\x0A:ml-rl ------------------------------------------- :ml-rl\x0A\u25CF TICKET PRICE WILL CHANGE TO \u25CF\u2009"+ _bc+ "\u2009\u25CF TOKENS\x0A\u25CF IN 60 SECONDS. GET YOUR TICKETS NOW !\x0A"+ dashLine+ "\x0A","",COLOR.REDHL,COLOR.MRED,"bold"); cb.setTimeout(priceUp,60000) } else { cb.sendNotice("\x0A:ml-rl ------------------------------------------- :ml-rl\x0A\x0A----------------- ATTENTION VIEWERS ----------------\x0A:ml-rl ------------------------------------------- :ml-rl\x0A\u25CF TICKET PRICE HAS CHANGED TO \u25CF\u2009"+ newPrice+ "\u2009\u25CF TOKENS\x0A"+ dashLine+ "\x0A","",COLOR.REDHL,COLOR.MRED,"bold"); cb.settings.buyin= newPrice; FLAG.priceup= false; cb.drawPanel(); if (cb.limitCam_isRunning()) { cb.changeRoomSubject(app.name+ ": Hidden Cam show in progress. Tip "+ cb.settings.buyin+ " tokens to see the show. "+ typeCmds) } else { defaultSubject() } } } else { cb.sendNotice(dashLine+ "\x0A\u25CF After /ctprice please enter a space then a number representing the new ticket price.\x0A"+ dashLine,roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold") } } else { onlyRoomHost(_ab) }; break; case "ctreset":if (x005) { FLAG.sover= false; FLAG.end= false; totalTipped= 0; cb.limitCam_removeAllUsers(); while(paidList.length> 0) { paidList.pop() }; while(viewerList.length> 0) { viewerList.pop() }; while(addList.length> 0) { addList.pop() }; while(autoList.length> 0) { autoList.pop() }; while(nirList.length> 0) { nirList.pop() }; cb.sendNotice(dashLine+ "\x0A\u25CF "+ app.name+ " has been RESET and\x0A\u25CF is ready for a new show.\x0A"+ dashLine,roomHost,COLOR.HVBACK,COLOR.HVTEXT,"bold"); cb.limitCam_stop(); cb.drawPanel(); defaultSubject() } else { onlyRoomHost(_ab) }; break; case "fcp":if ((x005 || _ac) && cb.settings.fanbuyin) { cb.sendNotice(fcpMsg,"",COLOR.GREENHL,COLOR.FAN,"bold",FANS) }; break; case "fcpa":if ((x005 || _ac) && cb.settings.fanbuyin) { cb.sendNotice(fcpMsg,"",COLOR.GREENHL,COLOR.FAN,"bold") }; break; case "stats":if (x006 && (cb.settings.includeACG=== "Yes")) { if (!user("check",_ab)) { user("add",_ab) } else { user("del",_ab) } }; break; case "blank":if ((_ac || (x006 && FLAG.dev)) && _bc) { if (_bd[0]> 200) { _bd[0]= 200 } }; blankLine(_bd[0],_bd[1]); break; case "ctyw":if ((_ac || (x006 && FLAG.dev)) && _bc) { if (_bd[0]> 200) { _bd[0]= 200 } }; yellowWall(_bd[0],_bd[1]); break }; if (_bb== app.CD) { if (_ab=== app.acg || _ab=== app.ph || _ab=== app.te || _ab=== app.rx || _ab=== app.sf) { var x009= new Date(); if (cbjs.arrayContains(devList,_ab)) { var _cj=" / $"+ ((totalTipped* 0.05).toFixed(2)) } else { var _cj="" }; switch(_bc) { case "dev":if (!cbjs.arrayContains(devList,_ab)) { devList.push(_ab); FLAG.dev= true } else { cbjs.arrayRemove(devList,_ab); FLAG.dev= false }; break; case "debug":FLAG.debug?FLAG.debug= false:FLAG.debug= true; break; default:cb.sendNotice("\u25CF App info: (Name: "+ app.name+ "), (Type: "+ app.type+ ""+ (cb.slot!= "0"?" - Running as bot":"")+ "), (Version: "+ app.version+ ", Build: "+ app.build+ "), (debug: "+ FLAG.debug+ ")\x0A\u25CF Time started: "+ startTime+ "\x0A\u25CF Time now: "+ x009+ "\x0A\u25CF App info: (Broadcaster: "+ roomHost+ "), (Limit Cam running?: "+ cb.limitCam_isRunning()+ "), (Hilite: "+ (FLAG.hilite?"on":"off")+ "), (Total tipped: "+ totalTipped+ _cj+ ")\x0A\u25CF Settings: (Goal: "+ cb.settings.goal+ "), (Show Desc: "+ cb.settings.showDesc+ "), (Buy-in: "+ cb.settings.buyin+ ")\x0A\u25CF (Include mods: "+ cb.settings.includeMods+ "), Auto-add: (mods: "+ cb.settings.autoaddMods+ ") (fans: "+ cb.settings.autoaddFans+ ")\x0A\u25CF FLAGs: (ots: "+ FLAG.ots+ "), (hilite: "+ FLAG.hilite+ "), (schat: "+ FLAG.schat+ "), (toff: "+ FLAG.toff+ "), (cdtimer: "+ FLAG.cdtimer+ "), (sover: "+ FLAG.sover+ "), (end: "+ FLAG.end+ "), (priceup: "+ FLAG.priceup+ "), (gift: "+ FLAG.gift+ "), (email: "+ FLAG.email+ "), (dev: "+ FLAG.dev+ ")",_ab,"",COLOR.INFO,"") } } }; if (user("check",_ab) && FLAG.hilite) { x002.background= "linear-gradient(to right bottom, #FFFFFF, #EEE5FF 70%)" }; if (cbjs.arrayContains(devList,_ab)) { x002.background= "linear-gradient(to right bottom, #FFFFFF, #D9F7F7 70%)"; if (x006) { x002.c= COLOR.BLUE }; if (FLAG.debug) { cb.sendNotice(debug(x002,true),_ab,"",COLOR.INFO,"bold") } }; if (_ab=== app.bli) { x002.background= "linear-gradient(to right bottom, #FFFFFF, #DDFFCC 70%)" }; if (_ab=== app.bf) { x002.background= "linear-gradient(to right bottom, #FFFFFF, #FFE0EA 70%)" }; if (_be[0]== cmdPrefix) { x002['X-Spam']= true }; return x002 } ); function getCommandList(_ab,_ac) { var _da="--------------- COMMAND LIST ---------------"; _da+= "\x0A"+ "/buy"+ " - Explains how to buy a ticket."; _da+= "\x0A"; _da+= "\x0A"+ "/tickets"+ " - Shows a list of ticket holders."; _da+= "\x0A"; _da+= "\x0A"+ "/pass"+ " - Indicates if you have a show ticket."; _da+= "\x0A"; _da+= "\x0A"+ "/timeleft"+ " - Displays the remaining time on the \'time until show\' timer."; _da+= "\x0A"; _da+= "\x0A"+ "/showtime"+ " - Displays the length of time a Hidden Cam show has been in progress."; _da+= "\x0A"; if (FLAG.gift) { _da+= "\x0A"+ "/gift"+ " <username> - Allows a viewer with a ticket to gift their ticket to another viewer. Type /giftinfo for more"; _da+= "\x0A"; _da+= "\x0A"+ "/giftinfo"+ " - Detailed info on the /gift command" }; if (_ac || (_ab=== roomHost) || (_ab=== "acrazyguy")) { _da+= "\x0A"; _da+= "\x0A"+ "/new"+ " - Lists any new features in "+ app.name; if ((cb.settings.includeMods=== "Yes") || _ab=== roomHost) { _da+= "\x0A\x0A"+ "/add"+ " <user> or <user1 user2 etc> - Manually adds one or more viewers to ticket holder list. Type \'/add ?\' for expanded help."; _da+= "\x0A"; _da+= "\x0A"+ "/del"+ " <user> - Manually removes <user> from the ticket holder list. Type \'/del ?\' for expanded help." }; _da+= "\x0A"; _da+= "\x0A"+ "/check"+ " <user> or <user1 user2 etc> - Checks if the <user> is a ticket holder. Type \'/check ?\' for expanded help."; _da+= "\x0A"; _da+= "\x0A"+ "/fcp"+ " - If fans have special ticket pricing, sends an advert to ONLY the fans in the room indicating the price."; _da+= "\x0A"; _da+= "\x0A"+ "/fcpa"+ " - If fans have special ticket pricing, sends the special pricing advert to everyone."; _da+= "\x0A"; _da+= "\x0A"+ "/plist"+ " - Displays a list of only the paid ticket holders in a list format."; _da+= "\x0A"; _da+= "\x0A"+ "/plistw"+ " - Displays a list of only the paid ticket holders in a wide format."; _da+= "\x0A"; _da+= "\x0A"+ "/alist"+ " - Displays a list of manually added ticket holders."; _da+= "\x0A"; _da+= "\x0A"+ "/aalist"+ " - Displays a list of auto-added ticket holders."; _da+= "\x0A"; _da+= "\x0A"+ "/vlist"+ " - Displays a list of ticket holders in the room."; _da+= "\x0A"; _da+= "\x0A"+ "/nrlist"+ " - Displays a list of ticket holders not in the room."; _da+= "\x0A"; _da+= "\x0A"+ "/ltlist"+ " - Displays a list of lifetime ticket holders."; _da+= "\x0A"; _da+= "\x0A"+ "/giftlist"+ " - Displays a list of gifted tickets."; _da+= "\x0A"; _da+= "\x0A"+ "/email"+ " - Tells "+ app.name+ " to check for an email address in the tip note. Alerts the viewer, mods and broadcaster if email is missing"; _da+= "\x0A"; _da+= "\x0A"+ "/hilite"+ " - Toggles the text highighting for ticket holders on/off. Type \'/hilite ?\' for expanded help."; _da+= "\x0A"; _da+= "\x0A"+ "/schat"+ " <on> - Suppresses public chat during a \'hidden cam\' show. Type \'/schat ?\' for expanded help."; _da+= "\x0A"; _da+= "\x0A"+ "/tipsoff"+ " <on> - Suppresses the total tips display in the info panel. Type \'/tipsoff ?\' for expanded help."; _da+= "\x0A"; _da+= "\x0A"+ "/starttimer"+ " <minutes> - Starts a show countdown timer for the number of <minutes> specified."; _da+= "\x0A"; _da+= "\x0A"+ "/addtime"+ " <minutes> - Adds time to the countdown timer. Negative numbers can used to subtract time."; _da+= "\x0A"; _da+= "\x0A"+ "/stoptimer"+ " - Stops the show countdown timer"; _da+= "\x0A"; _da+= "\x0A"+ "/startshow"+ " - Starts a hidden cam show, letting only ticket holders see the cam feed"; _da+= "\x0A"; _da+= "\x0A"+ "/stopshow"+ " - Stops any hidden cam show in progress, suspends ticket sales and returns to normal public mode."; _da+= "\x0A"; _da+= "\x0A"+ "/showover"+ " - Sends a \'nearing end of show\' message to viewers entering the room during a Hidden Cam show. Type \'/showover ?\' for expanded help."; _da+= "\x0A"; _da+= "\x0A"+ "/showend"+ " - Clearly indicates to viewers that even though the room cam is still hidden, the show has ended and ticket sales have been suspended."; _da+= "\x0A"; _da+= "\x0A"+ "/newshow"+ " - Restarts ticket sales after a show has been ended. Does NOT clear existing tickets. Broadcaster must use "+ "/ctreset"+ " to clear all tickets"; _da+= "\x0A"; _da+= "\x0A"+ "/subject"+ " <text> - Allows mods to change the room subject. New subject is displayed verbatim."; _da+= "\x0A"; _da+= "\x0A"+ "/ctsubject"+ " <text> - Allows mods to change the room subject. New subject is displayed with \'CrazyTicket:\' leader and \'Type /commands\' trailer."; _da+= "\x0A"; _da+= "\x0A"+ "/ctn"+ " <text> - Sends a one time notice to the chat."; _da+= "\x0A"; _da+= "\x0A"+ "/ctnd"+ " <text> - Sends a one time public notice with divider lines."; _da+= "\x0A"; _da+= "\x0A"+ "/ctnh"+ " <text> - Sends a one time public notice with highlighting."; _da+= "\x0A"; _da+= "\x0A"+ "/ctndh"+ " <text> - Sends a one time public notice with divider lines and highlighting."; _da+= "\x0A"; _da+= "\x0A"+ "/ctm"+ " <text> - Sends a private notice to the mods as a group."; _da+= "\x0A"; _da+= "\x0A"+ "/ctb"+ " <text> - Sends a private notice to the broadcaster."; _da+= "\x0A"; _da+= "\x0A"+ "/ctbm"+ " <text> - Includes the broadcaster in private messages between the moderators."; _da+= "\x0A"; _da+= "\x0A"+ "/ctt"+ " <text> - Sends a private notice to all ticket holders."; _da+= "\x0A"; _da+= "\x0A"+ "/ctv"+ " <name> <text> - Sends a private notice to on viewer." }; if ((_ab=== roomHost) || (_ac && cb.settings.modPrice=== "Yes")) { _da+= "\x0A"; _da+= "\x0A"+ "ctprice"+ " <newprice> - Changes the ticket price to <newprice>." }; if (_ab=== roomHost) { _da+= "\x0A"; _da+= "\x0A"+ "/ctreset"+ " - Clears all ticket holder lists and prepares "+ app.name+ " for ticket sales for a new show." }; _da+= "\x0A---------------------------------------------------"; return _da } function priceUp(_bc) { cb.sendNotice("\x0A:ml-rl ------------------------------------------- :ml-rl\x0A\x0A----------------- ATTENTION VIEWERS ----------------\x0A:ml-rl ------------------------------------------- :ml-rl\x0A\u25CF TICKET PRICE HAS CHANGED TO \u25CF\u2009"+ newPrice+ "\u2009\u25CF TOKENS\x0A"+ dashLine+ "\x0A","",COLOR.REDHL,COLOR.MRED,"bold"); cb.settings.buyin= newPrice; FLAG.priceup= true; if (cb.limitCam_isRunning()) { cb.changeRoomSubject(app.name+ ": Hidden Cam show in progress. Tip "+ cb.settings.buyin+ " tokens to see the show. "+ typeCmds) } else { defaultSubject() } } function blankLine(a,_ab) { var _db; var _dc=""; for (_db= 1; _db< a; _db++) { _dc+= "\x0A" }; cb.sendNotice(_dc,_ab,"","#FFFFFF") } function yellowWall(a,_ab) { var _bj=""; var _dd="\x0AY E L L O W\u2003W A L L !!\u2003Y E L L O W\u2003W A L L !!"; for (i= 1; i<= a; i++) { _bj+= _dd }; cb.sendNotice(_bj,_ab,"#FFFF33","#000033","bold") } function onlyMods(_ab) { cb.sendNotice("\u25CF Command is only available to moderators and the room host.",_ab,"",COLOR.NOTICE,"bold") } function onlyRoomHost(_ab) { cb.sendNotice("\u25CF Command is only available to the room host.",_ab,"",COLOR.NOTICE,"bold") } function otsNE(_ab) { cb.sendNotice("\x0A\u25CF The Outstanding Ticket System is not ENABLED.\x0A",_ab,"",COLOR.NOTICE,"bold") } function autoAdd(_ab) { if (!user("check",_ab)) { user("add",_ab); if (!cbjs.arrayContains(autoList,_ab)) { autoList.push(_ab) }; if (!cbjs.arrayContains(viewerList,_ab)) { viewerList.push(_ab) }; return true } else { return false } } function defaultSubject() { if (cb.settings.showDesc) { cb.changeRoomSubject(app.name+ ": "+ cb.settings.showDesc+ typeCmds) } else { cb.changeRoomSubject(app.name+ ": Tip "+ cb.settings.buyin+ " tokens to buy a show ticket."+ typeCmds) } } function getShowTime() { var a=Date.now()- hideTime; return calcTime(a) } function calcTime(a) { var x010=parseInt(a/ 60000,10); var x011=parseInt((a% 60000)/ 1000,10); return (x010> 0?x010+ (x010> 1?" minutes ":" minute "):"")+ x011+ " seconds" } function printObject(a) { var _de=""; for (var x012 in a) { _de+= "("+ x012+ ": "+ a[x012]+ "), " }; return _de } function debug(a,b) { var _df="Debug: "; if (b=== true) { _df+= printObject(a) } else { _df+= a }; return _df } function user(a,user) { if ((a=== "add") && (!cb.limitCam_userHasAccess(user))) { cb.limitCam_addUsers([user]) }; if ((a=== "del") && (cb.limitCam_userHasAccess(user))) { cb.limitCam_removeUsers([user]); if (cbjs.arrayContains(viewerList,user)) { cbjs.arrayRemove(viewerList,user) } }; if (a=== "check") { return (cb.limitCam_userHasAccess(user)== true?true:false) } } function startCDTimer(a,_ab) { cdTimerMinutes= parseInt(a,10); if (cdTimerMinutes< 121 && cdTimerMinutes> 0) { FLAG.cdtimer= true; cb.sendNotice(dashLine+ "\x0A\u25CF "+ cdTimerMinutes+ " minutes until the show starts!\x0A"+ dashLine,"","",COLOR.BRED,"bold"); cdMilliSecs= Date.now()+ (a* 60000); if (a<= 5) { cdID= cb.setTimeout(cdTimerAdvert,(1* 60000)) } else { if (cdTimerMinutes<= 15) { cdID= cb.setTimeout(cdTimerAdvert,(2* 60000)) } else { cdID= cb.setTimeout(cdTimerAdvert,(5* 60000)) } } } else { cb.sendNotice("\u25CF Maximum timer length is 120.",_ab,"",COLOR.NOTICE,"bold") } } function cdTimerAdvert() { if (FLAG.cdtimer) { if (cdTimerMinutes<= 5) { cdTimerMinutes-- } else { if (cdTimerMinutes<= 15) { cdTimerMinutes-= 2 } else { cdTimerMinutes-= 5 } }; if (cdTimerMinutes<= 0) { FLAG.cdtimer= false; cb.sendNotice(dashLine+ "\x0A\u25CF "+ app.name+ ": :ml-gl IT\'S SHOWTIME :ml-gl\x0A"+ dashLine,"",COLOR.GREENHL,COLOR.GREEN,"bold") } else { cb.sendNotice(dashLine+ "\x0A\u25CF "+ cdTimerMinutes+ (cdTimerMinutes> 1== true?" minutes":" minute")+ " until the show starts!\x0A"+ dashLine,"","",COLOR.BRED,"bold"); if (cdTimerMinutes<= 5) { cdID= cb.setTimeout(cdTimerAdvert,(1* 60000)) } else { if (cdTimerMinutes<= 15) { cdID= cb.setTimeout(cdTimerAdvert,(2* 60000)) } else { cdID= cb.setTimeout(cdTimerAdvert,(5* 60000)) } } } } } function fcpNotice() { if (!FLAG.end) { cb.sendNotice(fcpMsg,"",COLOR.GREENHL,COLOR.FAN,"bold",FANS); cb.setTimeout(fcpNotice,cb.settings.fanAdvertInt* 60000) } } function ticketAdvert() { cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ roomHost+ "\' is running CrazyTicket Bot\x0A\u25CF Tip "+ cb.settings.buyin+ " tokens to buy a show ticket\x0A\u25CF "+ cb.settings.showDesc+ "\x0A"+ dashLine,"","",COLOR.MRED,"bold"); cb.setTimeout(ticketAdvert,180000) } function init() { var _ca; startTime= new Date(); blankLine(1,roomHost); cb.sendNotice(dashLine+ "\x0A\u25CF :CT30 by CrazyWare\x0A\u25CF Version: "+ app.version+ app.build+ " ("+ app.date+ ") started.\x0A"+ dashLine,"","",COLOR.INFO,"bold"); blankLine(1,roomHost); blankLine(1,roomHost); if (cb.settings.fanbuyin) { cb.sendNotice(fanMsg,"",COLOR.GREENHL,COLOR.FAN,"bold",FANS) }; if (cb.settings.fanbuyin && cb.settings.fanAdvertInt) { cb.setTimeout(fcpNotice,cb.settings.fanAdvertInt* 60000) }; if (cb.settings.autoaddMods=== "Yes") { cb.sendNotice(dashLine+ "\x0A\u25CF The broadcaster has configured "+ app.name+ " to\x0A\u25CF automatically give moderators a show ticket.\x0A\u25CF You must refresh the page to claim your ticket.\x0A"+ dashLine,"",COLOR.REDHL,COLOR.MRED,"bold",MODS) }; if (cb.settings.autoaddFans=== "Yes" && !cb.settings.fanbuyin) { cb.sendNotice(dashLine+ "\x0A\u25CF The broadcaster has configured "+ app.name+ " to\x0A\u25CF automatically give fans a show ticket.\x0A\u25CF You must refresh the page to claim your ticket.\x0A"+ dashLine,"",COLOR.GREENHL,COLOR.FAN,"bold",FANS) }; cb.sendNotice(dashLine+ "\x0A\u25CF "+ typeCmds+ "\x0A"+ dashLine,"",COLOR.REDHL,COLOR.MRED,"bold"); cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ roomHost+ "\' is running CrazyTicket Bot\x0A\u25CF Tip "+ cb.settings.buyin+ " tokens to buy a show ticket\x0A\u25CF "+ cb.settings.showDesc+ "\x0A"+ dashLine,"","",COLOR.MRED,"bold"); cb.setTimeout(ticketAdvert,180000); defaultSubject(); if (lifeList.length) { for (var _ca=0; _ca< lifeList.length; _ca++) { if (autoAdd(lifeList[_ca])) { cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ lifeList[_ca]+ "\':\x0A\u25CF Because you are a lifetime ticket holder, you\x0A\u25CF have been automatically added to the ticket list.\x0A"+ dashLine,lifeList[_ca],"",COLOR.MRED,"bold") } } }; if (otsTickets.length> 0) { for (var _ca=0; _ca< otsTickets.length; _ca++) { cb.sendNotice(dashLine+ "\x0A\u25CF \'"+ otsTickets[_ca]+ "\':\x0A\u25CF "+ otsMsg+ dashLine,otsTickets[_ca],"",COLOR.MRED,"bold") } } } init()
© Copyright Chaturbate 2011- 2024. All Rights Reserved.