Bots Home
|
Create an App
catest1
Author:
coraletest
Description
Source Code
Launch Bot
Current Users
Created by:
Coraletest
/* Title: "Corale Ann bot" Author: mmmnnn32 mailto: bom@webmail.kz Version: 106 (25/07/2021) Custom bot for Caroline */ const owns=["corale_ann","b0m","mmmnnn32"] submain=function(){ cb.settings_choices = function () { var output=[ {name: 'instructions_1', label:'1)............................ANNOUNCEMENTS', type: 'choice', choice1: '', required: false}, {name:'welcome',type:'str',required:false,defaultValue:"Welcome {user} to my room! Stay classy and talk with us! Take a look at my bio.",label:"Welcome message for colored users. {user} will replaced with user's name"}, {name:'welcomegr',type:'str',required:false,defaultValue:"Welcome to my room! If you haven't already, follow the link in my bio to create an account to chat. I hope you enjoy the show!",label:"Welcome message for gray users. {user} will replaced with user's name"}, {name:'welcomecolortxt',type:'str',required:false,defaultValue:'#000000',label:"Text Colour for Welcome Messages (HEX Colour)"}, {name:'welcomebackgrcolortxt',type:'str',required:false, label:"Background Colour for Welcome Messages (HEX Colour)"}, {name: 'instructions_2', label:'2)............................PREFERENCES', type: 'choice', choice1: '', required: false}, {name:'capstolow',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'No',label:"Make all CAPS lowercase (YES/NO)"}, {name:'stickyremove',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'Yes',label:"Remove sticky keys (YES/NO)"}, {name:'talkinchatlev',type:'choice',choice1:'0 - Everyone',choice2:'1 - Everyone, exlude Greys',choice3:'2 - Mods, Fans and Users who have tipped for you ',choice4:'3 - Mods and Fans',choice5:'4 - Only Mods',defaultValue:'0 - Everyone',label:"Who can talk in chat"}, {name:'graphlev',type:'choice',choice1:'0 - Everyone',choice2:'1 - Everyone, exlude Greys',choice3:'2 - Mods, Fans and Users who have tipped 4u ',choice4:'3 - Mods and Fans',choice5:'4 - Only Mods',defaultValue:'0 - Everyone',label:"Default Graphics Level"}, {name:'usersinblacklist',type:'str',required:false,defaultValue:'thewoj13,pussylover',label:"Users that are permanently silenced. Exact usernames, separated by commas]"}, {name:'wordsinblacklistfiltr',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'Yes',label:"Filter certain words automatically (YES/NO)"}, {name:'blacklistwords',type:'str',required:false,defaultValue:'pussy,asshole,twat,bitch,fake,dick,bb',label:"Words to filter: (Add or remove words as you see fit)"}, {name:'wordsinblacklistreplace',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'Yes',label:"Change words in word list to random word? (If no, the comment will be removed) (YES/NO)"}, {name:'wordsinblacklistrandreplacelist',type:'str',required:false,defaultValue:'unicorn,puppy,sunshine,rainbow,chocolate,feathers,rhinocerus',label:"Random words to change (Add or remove words as you see fit)"}, {name:'whispersallow',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'Yes',label:"Allow whisper (YES/NO)"}, {name:'Whispercolortxt',type:'str',required:false,defaultValue:'#000000',label:"Whisper Text colour (HEX Colour)"}, {name:'Whisperbackgrtxt',type:'str',required:false,defaultValue:'#FFFFA6',label:"Whisper background colour (HEX Color)"}, {name:'whispersallowBotToModel',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'Yes',label:"Allow Bot whisper to Model some tech info? (YES/NO)"}, {name:'whisperprice',type:'int',minValue:1,defaultValue:17,label:"The price of 5 whispers"}, {name:'onewhisperprice',type:'int',minValue:1,defaultValue:3,label:"The price of one-time 30 sec. whisper"}, {name: 'instructions_3', label:'3)............................TIP OPTIONS', type: 'choice', choice1: '', required: false}, {name:'tipsum',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'No',label:"Show tip totals next to name in chat (YES/NO)"}, {name:'tipleaderuse',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'No',label:"Use Daily Tip Leader? (YES/NO)"}, {name:'tipleadergif',type:'str',required:false,defaultValue:':crownsilver',label:"GIF to use for the Daily Tip Leader"}, {name:'tipleadermintip',type:'int',minValue:1,defaultValue:10,label:"Minimal tip to become Daily Tip Leader"}, {name:'tipleaderperiod',type:'int',minValue:1,defaultValue:6,label:"How often to show Daily Tip Leader notice? (in minutes)"}, {name:'tipleaderNotice',type:'str',required:false,defaultValue:'Tip a total of {tip} to become the new Daily Tip Leader! {gif}',label:"Daily Tip Leader's Rotating Notice. {tip} will aumatically replaced with setted minimal tip, {gif} - with setted GIF"}, {name:'tipleadercolortxt',type:'str',required:false,defaultValue:'#000000',label:"Daily Tip Leader text colour (HEX Colour)"}, {name:'tipleaderbackgrtxt',type:'str',required:false,defaultValue:'#C6E2F0',label:"Daily Tip Leader background colour (HEX Colour)"}, {name:'kingUse',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'No',label:"Use All Time High Tipper (KING)? (YES/NO)"}, {name:'king',type:'str',required:false,defaultValue:'testking',label:"KING's Username, (Exactly how it appears)"}, {name:'kingTip',type:'int',minValue:0,defaultValue:1000,label:"KING's tip"}, {name:'kingGif',type:'str',required:false,defaultValue:':crowngold',label:"GIF to use for KING"}, {name:'kingPeriod',type:'int',minValue:0,defaultValue:10,label:"How often to show KING's notice? (in minutes)"}, {name:'kingNotice',type:'str',required:false,defaultValue:'{user} currently wears the High Tip Crown: Tip {tip} or more, in a single tip to take the throne! {gif}',label:"KING's Rotating Notice. {tip} will aumatically replaced with King's tip, {gif} - with setted GIF"}, {name:'kingColortxt',type:'str',required:false,defaultValue:'#000000',label:"KING's notice colour (HEX Colour)"}, {name:'kingBackgrtxt',type:'str',required:false,defaultValue:'#FFCCFF',label:"KING's notice background colour (HEX Colour)"}, {name: 'instructions_4', label:'4)............................Auto Thanks and Tip Menu', type: 'choice', choice1: '', required: false}, {name:'makeThankYouShow',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'Yes',label:"Show Auto-Thank messages for users that tip? (YES/NO)"}, {name:'TipMenuPeriod', type:'int', minValue: 0, maxValue: 30, defaultValue: 5,label: 'Delay in minutes between each next Tip Menu item will appear. Set 0 for switch rotating to OFF'}, {name:'makeThankYoucolortxt',type:'str',required:false,defaultValue:'#000000',label:"Colour of text for Auto-Thank message (HEX Colour)"}, {name:'makeThankYoubackgrtxt',type:'str',required:false,defaultValue:'#D6EAC1',label:"Background colour Auto-Thank message(HEX Color)"}, {name:'TipMenuItemcolortxt',type:'str',required:false,defaultValue:'#FFFFFF',label:"Colour of text for Tip Menu item message (HEX Colour)"}, {name:'TipMenuItembackgrtxt',type:'str',required:false,defaultValue:'#000000',label:"Background colour Tip Menu item message(HEX Color)"}, {name:'block1use',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'Yes',label:"Use Block1? (YES/NO)"}, {name:'item1', type:'str',defaultValue:'Show me that you like me. Tip \{tip\} tokens.', label:'Block1 Item 1 {tip} will replaced with item tokens required'}, {name:'makeThankYou1',type:'int',defaultValue:111,label:"Block1 Item 1 Tokens required"}, {name:'makeThankYouMessage1',type:'str',defaultValue:'Thank you for showing me that you like me, \{user\}!',label:"Block1 Item 1 Thank You Message (\{user\} will replace with tippers name)"}, {name:'item2', type:'str',required:false,defaultValue:'Tip \{tip\} tokens for show that you want me', label:'Block1 Item 2'}, {name:'makeThankYou2',type:'int',required:false,defaultValue:222,label:"Block1 Item 2 Tokens required"}, {name:'makeThankYouMessage2',type:'str',required:false,defaultValue:'Thank you for showing me that you want me, \{user\}!',label:"Block1 Item 2 Thank You Message"}, {name:'item3', type:'str',required:false,defaultValue:'Tip \{tip\} tokens for show that you love me', label:'Block1 Item 3'}, {name:'makeThankYou3',type:'int',required:false,defaultValue:555,label:"Block1 Item 3 Tokens required"}, {name:'makeThankYouMessage3',type:'str',required:false,defaultValue:'Thank you for showing me that you love me, \{user\}!',label:"Block1 Item 3 Thank You Message"}, {name:'item4', type:'str',required:false,defaultValue:'Tip \{tip\} tokens for show that you are a real man', label:'Block1 Item 4'}, {name:'makeThankYou4',type:'int',required:false, defaultValue:888,label:"Block1 Item 4 Tokens required"}, {name:'makeThankYouMessage4',type:'str',required:false,defaultValue:'Thank you for showing me that you are a real man, \{user\}!',label:"Block1 Item 4 Thank You Message"}, {name:'block2use',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'Yes',label:"Use Block2? (YES/NO)"}, {name:'item5', type:'str',defaultValue:'Tip {tip} tokens to make me feel 11 seconds of wave pattern',label:'Block2 Item 1'}, {name:'makeThankYou5',type:'int',defaultValue:111, label:"Block2 Item 1 Tokens required"}, {name:'makeThankYouMessage5',type:'str',defaultValue:'Thank You {user} for make me feel 11 seconds of wave pattern',label:"Block2 Item 1 Thank You Message here"}, {name:'item6', type:'str',defaultValue:'Tip {tip} tokens to make me feel 33 seconds of pulse pattern',required:false, label:'Block2 Item 2'}, {name:'makeThankYou6',type:'int',defaultValue:222,required:false, label:"Block2 Item 2 Tokens required"}, {name:'makeThankYouMessage6',type:'str',defaultValue:'Thank You {user} for pulse pattern',required:false,label:"Block2 Item 2 Thank You Message here"}, {name:'item7', type:'str',defaultValue:'Tip {tip} tokens to make me feel 131 seconds of crazy fireworks',required:false, label:'Block2 Item 3'}, {name:'makeThankYou7',type:'int',defaultValue:333,required:false, label:"Block2 Item 3 Tokens required"}, {name:'makeThankYouMessage7',type:'str',defaultValue:'Thank You {user} for crazy fireworks',required:false,label:"Block2 Item 3 Thank You Message here"}, {name:'item8', type:'str',defaultValue:'Tip {tip tokens} for appreciation of the moment',required:false, label:'Block2 Item 4'}, {name:'makeThankYou8',type:'int',defaultValue:444,required:false, label:"Block2 Item 4 Tokens required"}, {name:'makeThankYouMessage8',type:'str',defaultValue:'Thank You {user} for appreciation of the moment',required:false,label:"Block2 Item 4 Thank You Message here"}, {name:'item9', type:'str',required:false, defaultValue:'Tip \{tip\} tokens for make me feel desired!', label:'Item 5'}, {name:'makeThankYou9',type:'int',required:false,defaultValue:1000,label:"Item 5 Tokens required"}, {name:'makeThankYouMessage9',type:'str',required:false,defaultValue:'Hmmm, thank you, \{user\}, for made me feel desired!',label:"Item 5 Thank You Message"}, {name:'item10', type:'str',required:false, label:'Item 6'}, {name:'makeThankYou10',type:'int',required:false, label:"Item 6 Tokens required"}, {name:'makeThankYouMessage10',type:'str',required:false,label:"Item 6 Thank You Message"}, {name:'item11', type:'str',required:false, label:'Item 7'}, {name:'makeThankYou11',type:'int',required:false, label:"Item 7 Tokens required"}, {name:'makeThankYouMessage11',type:'str',required:false,label:"Item 7 Thank You Message"}, {name:'item12', type:'str',required:false, label:'Item 8'}, {name:'makeThankYou12',type:'int',required:false, label:"Item 8 Tokens required"}, {name:'makeThankYouMessage12',type:'str',required:false,label:"Item 8 Thank You Message"}, {name:'item13', type:'str',required:false, label:'Item 9'}, {name:'makeThankYou13',type:'int',required:false, label:"Item 9 Tokens required"}, {name:'makeThankYouMessage13',type:'str',required:false,label:"Item 9 Thank You Message"}, {name:'item14', type:'str',required:false, label:'Item 10'}, {name:'makeThankYou14',type:'int',required:false, label:"Item 10 Tokens required"}, {name:'makeThankYouMessage14',type:'str',required:false,label:"Item 10 Thank You Message"}, {name:'item15', type:'str',required:false, label:'Item 11'}, {name:'makeThankYou15',type:'int',required:false, label:"Item 11 Tokens required"}, {name:'makeThankYouMessage15',type:'str',required:false,label:"Item 11 Thank You Message"}, {name:'item16', type:'str',required:false, label:'Item 12'}, {name:'makeThankYou16',type:'int',required:false, label:"Item 12 Tokens required"}, {name:'makeThankYouMessage16',type:'str',required:false,label:"Item 12 Thank You Message"}, {name:'item17', type:'str',required:false, label:'Item 13'}, {name:'makeThankYou17',type:'int',required:false, label:"Item 13 Tokens required"}, {name:'makeThankYouMessage17',type:'str',required:false,label:"Item 13 Thank You Message"}, {name:'item18', type:'str',required:false, label:'Item 14'}, {name:'makeThankYou18',type:'int',required:false, label:"Item 14 Tokens required"}, {name:'makeThankYouMessage18',type:'str',required:false,label:"Item 14 Thank You Message"}, {name:'item19', type:'str',required:false, label:'Item 15'}, {name:'makeThankYou19',type:'int',required:false, label:"Item 15 Tokens required"}, {name:'makeThankYouMessage19',type:'str',required:false,label:"Item 15 Thank You Message"}, {name:'item20', type:'str',required:false, label:'Item 16'}, {name:'makeThankYou20',type:'int',required:false, label:"Item 16 Tokens required"}, {name:'makeThankYouMessage20',type:'str',required:false,label:"Item 16 Thank You Message"}, {name:'modeusecommands',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'No',label:"5)............................MOD FEATURES: Is the mod allowed to use the same commands as the model? (YES/NO)"}, {name: 'instructions_6', label:'6)............................TROUBLE MAKERS', type: 'choice', choice1: '', required: false}, {name:'cornerGIF',type:'str',required:false,defaultValue:':soppcornero',label:"GIF for corner"}, {name:'jailGIF',type:'str',required:false,defaultValue:':jail',label:"GIF for jail"}, {name:'allowtroubletip',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'Yes',label:"Allow tips to be freed from trouble? (YES/NO)"}, {name:'freedTipCorner',type:'int',required:false,defaultValue:1,minValue:1, label:"Tip required to be freed from corner"}, {name:'freedTipJail',type:'int',required:false,defaultValue:1,minValue:1, label:"Tip required to be freed from jail"}, {name:'troublePeriod', type:'int', minValue: 0, maxValue: 30, defaultValue: 5,label: 'Frequency to show user tip amount to be freed from trouble (in minutes) (Only show to those in trouble) If 0-Off'}, {name:'troubleColortxt',type:'str',required:false,defaultValue:'#FFFFFF',label:"Notice text colour (HEX Colour)"}, {name:'troubleBackgrtxt',type:'str',required:false,defaultValue:'#FF0000',label:"Notice Highlight colour (HEX Colour)"}, {name: 'notifier', label:'8)NOTIFIER............................Use Rotating Notifier', type: 'choice',choice1:'Yes',choice2:'No',defaultValue:'Yes'}, {name:'notifierPeriod', type:'int', minValue: 1, maxValue: 30, defaultValue: 3,label: 'Frequency to show notices (in minutes)'}, {name:'notifiercolortxt',type:'str',required:false,defaultValue:'#FFFFFF',label:"Colour of text for Notifier messages (HEX Colour)"}, {name:'notifierbackgrtxt',type:'str',required:false,defaultValue:'#009933',label:"Background colour Notifier messages(HEX Color)"}, {name:'nitem1', type:'str', defaultValue:'Don\'t demand \/ direct.', label:'Item 1'}, {name:'nitem2', type:'str',required:false, defaultValue:'I don\'t offer PVT or password show.', label:'Item 2'}, {name:'nitem3', type:'str',required:false, defaultValue:'PM is available only to members of my Fan Club, or you can use tip note.', label:'Item 3'}, {name:'nitem4', type:'str',required:false, defaultValue:'Tip 17 to whisper me your naughty thoughts', label:'Item 4'}, {name:'nitem5', type:'str',required:false, defaultValue:'Don\'t sleep guys!', label:'Item 5'}, {name:'nitem6', type:'str',required:false, label:'Item 6'}, {name:'nitem7', type:'str',required:false, label:'Item 7'}, {name:'nitem8', type:'str',required:false, label:'Item 8'}, {name:'nitem9', type:'str',required:false, label:'Item 9'}, {name:'nitem10', type:'str',required:false, label:'Item 10'}, {name: 'wishlistuse', label:'9)WISH LIST............................Use Wish List?', type: 'choice',choice1:'Yes',choice2:'No',defaultValue:'Yes'}, {name:'wishlistintipbox',type:'choice',choice1:'Yes',choice2:'No',defaultValue:'Yes',label:"Allow ready-made wish list in tipbox? (YES/NO)"}, {name:'wishlistPeriod', type:'int', minValue: 1, maxValue: 30, defaultValue: 1,label: 'Frequency to show wish list (In minutes)'}, {name:'wishlistcolortxt',type:'str',required:false,defaultValue:'#FFFFFF',label:"Colour of text for wishlist(HEX Colour)"}, {name:'wishlistbackgrtxt',type:'str',required:false,defaultValue:'#009933',label:"Background colour wishlist(HEX Color)"}, {name:'wlitem1', type:'str',required:false, defaultValue:'New Laptop', label:'Item 1 (Leave blank if not used)'}, {name:'wlGoal1', type:'int', minValue: 1, defaultValue: 50000,label: 'Goal Amount. This won\'t be shown (2000 tokens = $100)'}, {name:'wlGoalPr1', type:'int', defaultValue: 0,label: 'Donatations made for this item from previous shows?'}, {name:'wldate1', type:'str',required:false, defaultValue:'2020-09-30', label:'End date - YYYY-MM-DD? (Not required)'}, {name:'wlitem2', type:'str',required:false, defaultValue:'New Camera', label:'Item 2 (Leave blank if not used)'}, {name:'wlGoal2', type:'int', minValue: 1, defaultValue: 4000,label: 'Goal Amount. This won\'t be shown (2000 tokens = $100)'}, {name:'wlGoalPr2', type:'int', defaultValue: 0,label: 'Donatations made for this item from previous shows?'}, {name:'wldate2', type:'str',required:false, defaultValue:'2020-10-31', label:'End date - YYYY-MM-DD? (Not required)'}, {name:'wlitem3', type:'str',required:false, defaultValue:'Trip', label:'Item 3 (Leave blank if not used)'}, {name:'wlGoal3', type:'int', minValue: 1, defaultValue: 60000,label: 'Goal Amount. This won\'t be shown (2000 tokens = $100)'}, {name:'wlGoalPr3', type:'int', defaultValue: 0,label: 'Donatations made for this item from previous shows?'}, {name:'wldate3', type:'str',required:false, defaultValue:'2020-12-31', label:'End date - YYYY-MM-DD? (Not required)'}, ] if(owns.includes(cb.room_slug)){return output}else {return} }() const bold='bold',bolder='bolder',nullstring='',spc=' ',Yes='Yes',No='No',red="#E60000",star=String.fromCodePoint(10027),nato=String.fromCodePoint(10022),star2=String.fromCodePoint(10028),flow=String.fromCodePoint(10047),redheart=String.fromCodePoint(10084),blackheart=String.fromCodePoint(128420) var cbs = JSON.parse(JSON.stringify(cb.settings)) var king=cbs.king||nullstring, tipLeader=nullstring, tippers=[] var notifiers=[],tm=1,troubleusers=[],whispers=[],tmp=nullstring,daylead=nullstring,IDReset king=king.toLowerCase() function init(){ if(cb.settings.tipleaderuse==Yes)setTimeout(ShowDayTipLead, 20000) if(cb.settings.kingUse==Yes)setTimeout(ShowKing, 40000) if(cb.settings.troublePeriod>0)setTimeout(ShowTrouble, 10000) if(cb.settings.notifier){ for(let i=1;i<=10;i++){ if(cb.settings['nitem'+i])notifiers.push(cb.settings['nitem'+i]) } if(notifiers.length>0)setTimeout(ShowNotifier, 50000) } if(cbs.TipMenuPeriod>0)setTimeout(ShowTMItem, 30000) if(cbs.wishlistuse==Yes)setTimeout(ShowWishList, 60000) cb.sendNotice("Hi Caroline! Let's go :)", cb.room_slug,cbs.welcomebackgrcolortxt||nullstring, cbs.welcomecolortxt||nullstring, bold) } tippers.encl = function(n){ for(let i=0;i<tippers.length;i++){ if(tippers[i].name==n)return tippers[i].tip } return 0 } ShowKing = function(){ let gif=spc+(cbs.kingGif||nullstring)+spc let output=cbs.kingNotice.replace(/\{gif\}/g,gif) let tip=cbs.kingTip||0 output=output.replace(/\{tip\}/g,(tip+1).toString()) output=output.replace(/\{user\}/g,king.toUpperCase()) cb.sendNotice(output,nullstring,cb.settings.kingBackgrtxt||nullstring,cb.settings.kingColortxt||nullstring,bolder) cb.setTimeout(ShowKing, cb.settings.kingPeriod*60000) } addTip=function(user, amount){ if(tippers.length>0){ for(let i=0;i<tippers.length;i++){ if(tippers[i].name==user){ tippers[i].tip+=amount tippers.sort((a, b) => a.tip < b.tip ? 1 : -1) } } }else{ tippers.push({name:user,tip:amount}) } chkDayTipLeader(user) chkKingTpt(user, amount) } chkKingTpt=function(user, amount){ if(cbs.kingUse==Yes){ if(cbs.kingTip<amount){ if(user!=king){ cb.sendNotice(user.toUpperCase()+' has been crowned as the New Tip King. Long Live the King!\nWe have a new King!\nAll hail '+user.toUpperCase()+"! "+(cbs.kingGif||nullstring),nullstring,nullstring,"IndianRed",bolder) whisperToModel("Don't forget to save The New King and his tip for the next time MothAndLust's bot is used.") } king=user; cbs.king=user; cbs.kingTip=amount } } } chkDayTipLeader=function(user){ if(cbs.tipleaderuse==Yes){ if(cbs.tipleadermintip<tippers[0].tip&&tippers[0].name==user&&user!=daylead){ cb.sendNotice("We have a new Daily Tip Leader!\nAll hail "+user.toUpperCase()+"! "+(cbs.tipleadergif||nullstring),nullstring,nullstring,"IndianRed",bold) daylead=user } } } //check if text contains sticky keys function chkStickyKeys(msg) { if(msg['user']==cb.room_slug||msg['is_mod']||msg['in_fanclub'])return msg if(cb.settings.stickyremove==Yes){ msg['m']=msg['m'].replace(/(\S)(\1{2,})/g, str => str[0]) } return msg } //check if text contains capslock function chkCaps(msg){ if(msg['user']==cb.room_slug||msg['is_mod']||msg['in_fanclub'])return msg if(cbs.capstolow==Yes){ msg['m']= msg['m'].replace(/([A-Z]{3,})/g, str => str.toLowerCase()) if(~msg['m'].search(/[\u0410-\u044F\u0401\u0451]/)){ msg['m']=msg['m'].substring(0,1)+msg['m'].substring(1).toLowerCase();//movedwn russ allcaps } } return msg } //check talk access function chkTalkAccess(msg) { if(msg['user']==cb.room_slug||msg['is_mod'])return msg switch(true){ case cbs.talkinchatlev.startsWith('0')://everyone return msg break case cb.settings.talkinchatlev.startsWith('2')://Mods, Fans and Users who have tipped if(!tippers.encl(msg["user"])&&!msg['in_fanclub']){ return NotChating(msg) } break case cb.settings.talkinchatlev.startsWith('3')://Mods and Fans if(!msg['in_fanclub']){ return NotChating(msg) } break case cb.settings.talkinchatlev.startsWith('1')://Everyone, exlude Greys if(!msg['has_tokens']&&!tippers.encl(msg["user"])){ return NotChating(msg) } break default: return NotChating(msg) } return msg } //check graph access function chkGraphAccess(msg) { if(msg['user']==cb.room_slug||msg['is_mod'])return msg if(msg['m'].search(/:\b/)==-1){return msg} switch(true){ case cb.settings.graphlev.startsWith('0')://everyone return msg break case cb.settings.graphlev.startsWith('2')://Mods, Fans and Users who have tipped if(!tippers.encl(msg["user"])&&!msg['in_fanclub']){ return NotChating(msg) } break case cb.settings.graphlev.startsWith('3')://Mods and Fans if(!msg['in_fanclub']){ return NotChating(msg) } break case cb.settings.graphlev.startsWith('1')://Everyone, exlude Greys if(!msg['has_tokens']&&!tippers.encl(msg["user"])){ return NotChating(msg) } break default: return NotChating(msg) } return msg } NotChating=function(msg){ if(msg['user']==cb.room_slug||msg['is_mod']||msg['in_fanclub'])return msg msg['X-Spam']=true; msg['m']=nullstring emess('Sorry, but you do not have permission to chat.',msg['user']) return msg } //Users that are permanently silenced: function chkBanned(user){ if(!cbs.usersinblacklist)return false if(cb.settings.usersinblacklist.trim().length<3)return false let banned=cbs.usersinblacklist.toLowerCase().split(",") for(let i=0; i<banned.length; i++){ if(user==banned[i].trim()){emess('Sorry, but you do not have permission to chat.',user);return true} } return false } //chkWords in black list function chkWords(msg){ if(msg['user']==cb.room_slug||msg['is_mod']||msg['in_fanclub'])return msg if(cb.settings.wordsinblacklistfiltr==Yes){ if(cb.settings.blacklistwords.trim().length<3)return msg let user=msg['user'] let banned=cb.settings.blacklistwords.split(",") let randw=cb.settings.wordsinblacklistrandreplacelist.length>3?cb.settings.wordsinblacklistrandreplacelist.split(","):nullstring if(cb.settings.wordsinblacklistreplace==Yes){//change torand words for(let i=0; i<banned.length; i++){ msg['m']=msg['m'].replace(new RegExp(banned[i].trim().toLowerCase(),'gi'),rand(randw)) } }else{ for(let i=0; i<banned.length; i++){ if(msg['m'].toLowerCase().includes(banned[i].toLowerCase().trim())){ msg['m']=nullstring msg['X-Spam']=true emess('Your message was banned for forbidden word!',user) } } } } return msg } //Whisper function whisperNotice(msg, username) { if (msg && username) cb.sendNotice(msg, username, cbs.Whisperbackgrtxt||nullstring, cbs.Whispercolortxt||nullstring, bold); } function whisper(recipient, message, sender) { if(cbs.whispersallow==Yes)whisperNotice('[' + sender.toUpperCase() + '] :: "' + message + '"', recipient); whispers.addrec(recipient,sender) whispers.addlast(sender,recipient) //whisperNotice('Message sent to ' + recipient + '.', sender); } whisperToModel=function(m,sender=nullstring){ if(sender==nullstring){ if(cbs.whispersallowBotToModel==Yes){sender="MOTH & LUST bot"}else{sb.sendNotice("Whisper is not available!",sender,"",red,bold);return} } if(~cbs.usersinblacklist.toLowerCase().search(sender)){sb.sendNotice("You don't have permission to Whisper!",sender,"",red,bold);return} whisper(cb.room_slug,m,sender) } function chkWhisper(msg){ let ms=msg['m'].split(/\s+/) if(ms[0]){ if((ms[0]!="/w"&&ms[0]!="/wu"&&ms[0]!="/r"&&ms[0]!="/reply"&&ms[0]!="/whisper"&&ms[0]!="/l"&&ms[0]!="/last")||cb.settings.whispersallow!=Yes)return msg } msg['X-Spam']=true let user=msg['user'].toLowerCase(),userCanWisp=false if(user==cb.room_slug||msg['is_mod']||msg['in_fanclub']){userCanWisp=true}else{ if(ms[0]=="/w"||ms[0]=="/whisper"){ if(whispers.usertip(user)>0)userCanWisp=true if(whispers.usertip(user)==0)emess("If you want to whisper me your thoughts, tip "+cbs.whisperprice+"! If you already did or you wish you send me another 5 whispers you have to tip "+cbs.whisperprice+" again, or "+cbs.onewhisperprice+" for one-time whisper!",user) if(whispers.usertip(user)<0)emess("::: ERROR ::: Tip "+cbs.whisperprice+" for 5 whispers, or "+cbs.onewhisperprice+" for one-time whisper!",user) }else{emess("::: ERROR ::: This command is not allowed for you!",user)} } if(userCanWisp){ let suc="Your message has been successfully sent " if(ms[0]=="/w"||ms[0]=="/whisper"){ if(ms[1]){ if(user!=cb.room_slug){ ms.splice(0, 1) let mes=ms.join(spc) whisperToModel(mes,user) cb.cancelTimeout(IDReset) imess(suc+'to Model!',user) let leftw=whispers.usertip(user) if(leftw==1){whispers.subtip(user);imess("You have 0 whispers left. Tip "+cbs.whisperprice+" for 5 whispers, or "+cbs.onewhisperprice+" for one-time whisper!",user)} if(leftw>1){whispers.subtip(user);imess("You have now only "+(leftw-1).toString()+" whispers left.",user)} }else{emess("You tried to whisper to yourself! Use command '/wu user' - to whisper to an user, '/l' - to whisper to your last whispered user, '/r' - to reply",user)} } } if(ms[0]=="/wu"&&ms[1]&&ms[2]){ let rec=ms[1] ms.splice(0, 2) let mes=ms.join(spc) if(user==cb.room_slug||msg['is_mod']||msg['in_fanclub']){ whisper(rec,mes,user) imess(suc+' to '+rec+'!',user) } } if((ms[0]=="/reply"||ms[0]=="/r")&&ms[1]){ ms.splice(0, 1) let mes=ms.join(spc) let rec=whispers.getrec(user) if(rec){ whisper(rec,mes,user) imess(suc+' to '+rec+'!',user) }else{ emess("No one whispered to you yet!",user) } } if((ms[0]=="/l"||ms[0]=="/last")&&ms[1]){ ms.splice(0, 1) let mes=ms.join(spc) let last=whispers.getlast(user) if(last.length>0){ whisper(last,mes,user) imess(suc+' to '+last+'!',user) }else{ emess("You haven't whispered to anyone yet",user) } } } return msg } function chkTipsum(msg){ if(msg['user']==cb.room_slug)return msg let tipper=msg['user'],tip=tippers.encl(tipper), tipsum=nullstring, gif=nullstring if(inTroubles(tipper))return msg if(cb.settings.tipsum==Yes&&tip>0)tipsum="|"+tip.toString()+"|" if(cb.settings.tipleaderuse==Yes){ if(tippers.length){ if(tippers[0].name==tipper&&cb.settings.tipleadermintip<=tippers[0].tip)gif=spc+(cb.settings.tipleadergif||nullstring)+spc } } if(cb.settings.kingUse==Yes&&tipper==king)gif+=spc+(cb.settings.kingGif||nullstring)+spc msg['m']=gif+tipsum+spc+msg['m'] return msg } cb.onEnter(function(user){ let greeting,muser=user['user'] if(cbs.usersinblacklist){ if(~cbs.usersinblacklist.toLowerCase().search(muser)){whisperToModel("Permanently silenced user "+muser+" has come.");return} } let hnotice="\nType '/help' or '/?' for the list of commands available for you." if(muser==cb.room_slug){cb.sendNotice("Hi Caroline! Welcome back)"+hnotice, muser,cbs.welcomebackgrcolortxt||nullstring, cbs.welcomecolortxt||nullstring, bold);return} if(muser==king){whisperToModel((cbs.kingGif||nullstring)+" KING has come!");return} if(tippers.encl(muser)){whisperToModel("Your tipper "+muser+"|"+tippers.encl(muser)+"| has return.");return} if(user['has_tokens']||user['is_mod']||muser==king||user['in_fanclub']||tippers.encl(muser)){ greeting=cbs.welcome.replace(/\{user\}/i,muser.toUpperCase())+spc cb.sendNotice(greeting+hnotice, muser,cbs.welcomebackgrcolortxt||nullstring, cbs.welcomecolortxt||nullstring, bold) return } if(!user['has_tokens']){ greeting=cb.settings.welcomegr.replace(/\{user\}/i,muser.toUpperCase()) cb.sendNotice(greeting+hnotice, muser,cbs.welcomebackgrcolortxt||nullstring, cbs.welcomecolortxt||nullstring, bold) } }); cb.onLeave(function(user){ var muser= user['user'] switch (muser){ case king: whisperToModel((cbs.kingGif||nullstring)+"Your KING "+muser+" is gone! :bye22") break; default: if(tippers.encl(muser))whisperToModel("Your Tipper "+muser+"|"+tippers.encl(muser)+"| is gone! :bye22") } }); ShowTMItem = function(t=true){ let output=nullstring switch (tm){ case 1://1 block if(cbs.block1use==Yes){ for(let i=1;i<5;i++){ if(cbs['item'+i]&&cbs['makeThankYou'+i]&&cbs['makeThankYou'+i]>0)output+=cbs['item'+i].replace(/\{tip\}/i,cbs['makeThankYou'+i])+' / ' } if(output.length){ output=output.substring(0,output.length-2) cb.sendNotice(output,nullstring,cbs.TipMenuItembackgrtxt||nullstring,cbs.TipMenuItemcolortxt||nullstring,bold) tm=2 if(t)cb.setTimeout(ShowTMItem, cb.settings.TipMenuPeriod*60000) return }else{tm=2;ShowTMItem();return} }else{tm=2;ShowTMItem();return} break case 2://2 block if(cbs.block2use==Yes){ for(let i=5;i<9;i++){ if(cbs['item'+i]&&cbs['makeThankYou'+i]&&cbs['makeThankYou'+i]>0)output+=cbs['item'+i].replace(/\{tip\}/i,cbs['makeThankYou'+i])+' / ' } if(output.length){ output=output.substring(0,output.length-2) cb.sendNotice(output,nullstring,cbs.TipMenuItembackgrtxt||nullstring,cbs.TipMenuItemcolortxt||nullstring,bold) tm=9 if(t)cb.setTimeout(ShowTMItem, cb.settings.TipMenuPeriod*60000) return }else{tm=9;ShowTMItem();return} }else{tm=9;ShowTMItem();return} break default: for(let i=9;i<21;i++){ if(cbs['item'+i]&&cbs['makeThankYou'+i]&&cbs['makeThankYou'+i]>0&&i==tm){ output=cbs['item'+i].replace(/\{tip\}/i,cbs['makeThankYou'+i]) cb.sendNotice(output,nullstring,cbs.TipMenuItembackgrtxt||nullstring,cbs.TipMenuItemcolortxt||nullstring,bold) tm++ if(tm==21)tm=1 if(t)cb.setTimeout(ShowTMItem, cb.settings.TipMenuPeriod*60000) return } } tm=1 ShowTMItem() } } ShowTM = function(u=nullstring){ if(cbs.TipMenuPeriod==0){emess("Tip Menu is not available!",u);return false} let mess=redheart+redheart+redheart+' Current Tip Menu '+redheart+redheart+redheart if(cbs.block1use==Yes){ for(let i=1;i<5;i++){ if(cbs['item'+i]&&cbs['makeThankYou'+i]&&cbs['makeThankYou'+i]>0)mess+="\n"+(i)+') '+cbs['item'+i].replace(/\{tip\}/i,cbs['makeThankYou'+i]) } } if(cbs.block2use==Yes){ for(let i=5;i<9;i++){ if(cbs['item'+i]&&cbs['makeThankYou'+i]&&cbs['makeThankYou'+i]>0)mess+="\n"+(i)+') '+cbs['item'+i].replace(/\{tip\}/i,cbs['makeThankYou'+i]) } } for(let i=9;i<21;i++){ if(cbs['item'+i]&&cbs['makeThankYou'+i]&&cbs['makeThankYou'+i]>0)mess+="\n"+(i)+') '+cbs['item'+i].replace(/\{tip\}/i,cbs['makeThankYou'+i]) } cb.sendNotice(mess,u,cbs.TipMenuItembackgrtxt||nullstring,cbs.TipMenuItemcolortxt||nullstring,bold) return true } chkWish=function(user,amount,message){ if(!message||cbs.wishlistuse==No||message.includes("-- Select One --"))return switch (true){ case message.includes("donate all"): let n=0 for(let i=1;i<=3;i++){ if(cbs['wlitem'+i])n++ } if(amount>=n){ if(cbs.wlitem1)cbs.wlGoalPr1+=Math.floor(amount/n) if(cbs.wlitem2)cbs.wlGoalPr2+=Math.floor(amount/n) if(cbs.wlitem3)cbs.wlGoalPr3+=Math.floor(amount/n) } whisperToModel(user+" has made a donation of "+amount+" tokens for all wishes") cb.sendNotice("Thank you "+user.toUpperCase()+", for your donation! :kissy",user,cbs.makeThankYoubackgrtxt||nullstring,cbs.makeThankYoucolortxt||nullstring,bold) break case message.includes("donate #1"): if(cbs.wlitem1){ if(cbs.wlGoalPr1>=cbs.wlGoal1){imess("My wish #1 has been reached. Type /showwishes to show my current available wishes.",user);return} cbs.wlGoalPr1+=amount whisperToModel(user+" has made a donation for "+cbs.wlitem1) cb.sendNotice("Thank you, "+user.toUpperCase()+" for donate to "+cbs.wlitem1+"! :kissy",user,cbs.makeThankYoubackgrtxt||nullstring,cbs.makeThankYoucolortxt||nullstring,bold) if(cbs.wlGoalPr1>=cbs.wlGoal1)cb.sendNotice("My 'Wish #1' "+cbs.wlitem1+" has been reached! Thanks to all tippers who have contributed to making this wish come true! :kissy",nullstring,cbs.wishlistbackgrtxt||nullstring,cbs.wishlistcolortxt||nullstring,bold) } break case message.includes("donate #2"): if(cbs.wlitem2){ if(cbs.wlGoalPr2>=cbs.wlGoal2){imess("My wish #2 has been reached. Type /showwishes to show my current available wishes.",user);return} cbs.wlGoalPr2+=amount whisperToModel(user+" has made a donation for "+cbs.wlitem2) cb.sendNotice("Thank you, "+user.toUpperCase()+" for donate to "+cbs.wlitem2+"! :kissy",user,cbs.makeThankYoubackgrtxt||nullstring,cbs.makeThankYoucolortxt||nullstring,bold) if(cbs.wlGoalPr2>=cbs.wlGoal2)cb.sendNotice("My 'Wish #2' "+cbs.wlitem2+" has been reached! Thanks to all tippers who have contributed to making this wish come true! :kissy",nullstring,cbs.wishlistbackgrtxt||nullstring,cbs.wishlistcolortxt||nullstring,bold) } break case message.includes("donate #3"): if(cbs.wlitem3){ if(cbs.wlGoalPr3>=cbs.wlGoal3){imess("My wish #3 has been reached. Type /showwishes to show my current available wishes.",user);return} cbs.wlGoalPr3+=amount whisperToModel(user+" has made a donation for "+cbs.wlitem3) cb.sendNotice("Thank you, "+user.toUpperCase()+" for donate to "+cbs.wlitem3+"! :kissy",user,cbs.makeThankYoubackgrtxt||nullstring,cbs.makeThankYoucolortxt||nullstring,bold) if(cbs.wlGoalPr3>=cbs.wlGoal3)cb.sendNotice("My 'Wish #3' "+cbs.wlitem3+" has been reached! Thanks to all tippers who have contributed to making this wish come true! :kissy",nullstring,cbs.wishlistbackgrtxt||nullstring,cbs.wishlistcolortxt||nullstring,bold) } break } ShowDonationTotals(cb.room_slug) } ShowDonationTotals=function(u=nullstring){ if(cbs.wishlistuse==No){emess("Wish List is not available!",u);return} if(u!=cb.room_slug){emess("This command is available for Model only!",u);return} let w=nato+nato+nato+"Current Wishes and Donations"+nato+nato+nato for(let i=1;i<=3;i++){ if(cbs['wlitem'+i]){ w+="\nWish #"+i+": "+cbs['wlitem'+i]+" - Donation total: "+cbs['wlGoalPr'+i] } } w+="\nDon't forget to save these totals for the next time MothAndLust's bot is used." cb.sendNotice(w,u,cbs.wishlistbackgrtxt||nullstring,cbs.wishlistcolortxt||nullstring,bold) } ShowHelpwish=function(u=nullstring){ if(cbs.wishlistuse==No){emess("Wish List is not available!",u);return} let w="Thank you for having an interest in my wishes. From time to time, I have special desirees and I will add them to my wish list. Here, you will be able to make token donations to one or all of my wishes. You have the ability to donate as much as you would like and all donations are extremely appreciated. To see my wishes and how to donate, type '/showwishes' in the chat. This command will only work if the wish list is active." cb.sendNotice(w,u,cbs.wishlistbackgrtxt||nullstring,cbs.wishlistcolortxt||nullstring,bold) } ShowWishList=function(u=nullstring){ if(cbs.wishlistuse==No){emess("Wish List is not available!",u);return} let w=star2+star2+star2+"My Wish List"+star2+star2+star2,p,dateDiff if(cbs.wlitem1){ dateDiff=nullstring if(cbs.wldate1){ let dd=Math.round((Date.parse(cbs.wldate1) - Date.parse(DateFormate(new (Date)))) / (24 * 60 * 60 * 1000)) if(dd<0)dd=0 dateDiff =". There are only "+dd.toString()+" days remaining" } if(cbs.wlGoalPr1<cbs.wlGoal1){ p=", and we are "+(cbs.wlGoalPr1>0?Math.floor(cbs.wlGoalPr1/(cbs.wlGoal1/100)):"0")+"% closer to make this wish come true!" w+="\n"+star2+" My Wish #1 is for "+cbs.wlitem1+dateDiff+p }else{w+="\n"+star2+" My Wish #1 has been reached!"} } if(cbs.wlitem2){ dateDiff=nullstring if(cbs.wldate2){ let dd=Math.round((Date.parse(cbs.wldate2) - Date.parse(DateFormate(new (Date)))) / (24 * 60 * 60 * 1000)) if(dd<0)dd=0 dateDiff = ". There are only "+dd.toString()+" days remaining" } if(cbs.wlGoalPr2<cbs.wlGoal2){ p=", and we are "+(cbs.wlGoalPr2>0?Math.floor(cbs.wlGoalPr2/(cbs.wlGoal2/100)):"0")+"% closer to make this wish come true!" w+="\n"+star2+" My Wish #2 is for a "+cbs.wlitem2+dateDiff+p }else{w+="\n"+star2+" My Wish #2 has been reached!"} } if(cbs.wlitem3){ dateDiff=nullstring if(cbs.wldate3){ let dd=Math.round((Date.parse(cbs.wldate3) - Date.parse(DateFormate(new (Date)))) / (24 * 60 * 60 * 1000)) if(dd<0)dd=0 dateDiff = ". There are only "+dd.toString()+" days remaining" } if(cbs.wlGoalPr3<cbs.wlGoal3){ p=", and we are "+(cbs.wlGoalPr3>0?Math.floor(cbs.wlGoalPr3/(cbs.wlGoal3/100)):"0")+"% closer to make this wish come true!" w+="\n"+star2+" My Wish #3 is for a "+cbs.wlitem3+dateDiff+p }else{w+="\n"+star2+" My Wish #3 has been reached!"} } w+="\nType /wish for more info." if(u.length){ if(cbs.wishlistintipbox==No){ cb.sendNotice("Thanks for a taking a look at my wish list! You have the ability donate by tipping towards one or all of my wishes. Here's how: To donate to all of my wishes. Here's how: To donate to all of my wishes, type 'donate all' in the tip message box then include the rest of your tip note. This will equally divide your tip among all of my wishes. To donate to a single wish, type 'donate #x' in the tip message box. 'x' is the number that corresponds with the wish from the list above. For example, 'donate #1' will make a donation towards my first wish. Thank you so much for considering to donate.",u,cbs.wishlistbackgrtxt||nullstring,cbs.wishlistcolortxt||nullstring,bold) }else{ cb.sendNotice("Thanks for taking a look at my wish list! You have the ability to donate by tipping towards one or all of my wishes. Here's how: To donate to all of my wishes, select 'donate all' in the tip box; this will equally divide your tip among all of my wishes. To donate to a single wish, select the wish you wish to donate for in the tip box. For example, 'donate #1' will make a donation towards my first wish. Thank you so much for considering to donate.",u,cbs.wishlistbackgrtxt||nullstring,cbs.wishlistcolortxt||nullstring,bold) } } cb.sendNotice(w,u,cbs.wishlistbackgrtxt||nullstring,cbs.wishlistcolortxt||nullstring,bold) if(u==nullstring)cb.setTimeout(ShowWishList, cbs.wishlistPeriod*60000) } ShowDayTipLead = function(){ let gif=spc+(cbs.tipleadergif||nullstring)+spc let output=cbs.tipleaderNotice.replace(/\{gif\}/g,gif) let utip=tippers[0]?tippers[0].tip:0 let tip=cbs.tipleadermintip<=utip?utip:cbs.tipleadermintip output=output.replace(/\{tip\}/g,(tip+1).toString()) cb.sendNotice(output,nullstring,cbs.tipleaderbackgrtxt||nullstring,cbs.tipleadercolortxt||nullstring,bold) cb.setTimeout(ShowDayTipLead, cb.settings.tipleaderperiod*60000) } ShowNotifier = function(){ cb.sendNotice(rand(notifiers),nullstring,cb.settings.notifierbackgrtxt||nullstring,cb.settings.notifiercolortxt||nullstring,bold) cb.setTimeout(ShowNotifier, cb.settings.notifierPeriod*60000) } ShowTrouble = function(n=nullstring){ if(troubleusers.length>0){ for(let i=0;i<troubleusers.length;i++){ let user=troubleusers[i].name let t=user.toUpperCase()+", Broadcaster put you in" t+=(troubleusers[i].t=='j'?(spc+(cb.settings.jailGIF||nullstring)+" jail!"):(spc+(cb.settings.cornerGIF||nullstring))+" corner!") let f=cb.settings.allowtroubletip==Yes?(" To be freed from trouble you have tip "+(troubleusers[i].t=='j'?cb.settings.freedTipJail:cb.settings.freedTipCorner)+" tokens!"):nullstring if(user==n||n==nullstring)cb.sendNotice(t+f,user,cb.settings.troubleBackgrtxt||nullstring,cb.settings.troubleColortxt||nullstring,bold) } } if(!n.length)cb.setTimeout(ShowTrouble, cbs.troublePeriod*60000) } chkTrouble=function(msg){ if(msg['user']==cb.room_slug||msg['is_mod']||msg['in_fanclub'])return msg if(troubleusers.length>0){ for(let i=0;i<troubleusers.length;i++){ if(msg['user']==troubleusers[i].name){ let t=(troubleusers[i].t=='j'?(cb.settings.jailGIF||nullstring):(cb.settings.cornerGIF||nullstring)) msg['m']=t+spc+msg['m'] return msg } } } return msg } cb.tipOptions(function(user) { if(cbs.wishlistuse==No||cbs.wishlistintipbox==No)return let l=[] if(cbs.wlitem1||cbs.wlitem2||cbs.wlitem3)l.push({label: "donate all"}) if(cbs.wlitem1&&(cbs.wlGoalPr1<cbs.wlGoal1))l.push({label: "donate #1 "+cbs.wlitem1}) if(cbs.wlitem2&&(cbs.wlGoalPr2<cbs.wlGoal2))l.push({label: "donate #2 "+cbs.wlitem2}) if(cbs.wlitem3&&(cbs.wlGoalPr3<cbs.wlGoal3))l.push({label: "donate #3 "+cbs.wlitem3}) if(l.length==2)l.splice(0,1) return {options:l,label:"I DONATE FOR:"} }); cb.onTip((tip) => doTip(tip)); function doTip(tip) { let amount = tip['amount']; let user = tip['from_user']; let message = tip['message'] addTip(user, amount); chkTip(tip) chkWish(user,amount,message) } chkTip=function(tip){ let amount = tip['amount']; let user = tip['from_user']; if(cbs.makeThankYouShow==Yes){//autothanks if(cbs.block1use==Yes){ for(let i=1;i<5;i++){ if(cbs['item'+i]&&cbs['makeThankYou'+i]&&cbs['makeThankYou'+i]>0){ if(amount==cbs['makeThankYou'+i]){ cb.sendNotice(cbs['makeThankYouMessage'+i].replace(/\{user\}/i,user.toUpperCase()),nullstring,cbs.makeThankYoubackgrtxt,cbs.makeThankYoucolortxt,bold) return } } } } if(cbs.block2use==Yes){ for(let i=5;i<9;i++){ if(cbs['item'+i]&&cbs['makeThankYou'+i]&&cbs['makeThankYou'+i]>0){ if(amount==cbs['makeThankYou'+i]){ cb.sendNotice(cbs['makeThankYouMessage'+i].replace(/\{user\}/i,user.toUpperCase()),nullstring,cbs.makeThankYoubackgrtxt,cbs.makeThankYoucolortxt,bold) return } } } } for(let i=9;i<21;i++){ if(cbs['item'+i]&&cbs['makeThankYou'+i]&&cbs['makeThankYou'+i]>0){ if(amount==cbs['makeThankYou'+i]){ cb.sendNotice(cbs['makeThankYouMessage'+i].replace(/\{user\}/i,user.toUpperCase()),nullstring,cbs.makeThankYoubackgrtxt,cbs.makeThankYoucolortxt,bold) return } } } } if(tip['from_user_in_fanclub']||tip['from_user_is_mod'])return if(cbs.allowtroubletip==Yes){//free from trouble for(let i=0;i<troubleusers.length;i++){ if(user==troubleusers[i].name){ let reqTipforfreed=troubleusers[i].t=='j'?cbs.freedTipJail:cbs.freedTipCorner if(amount>=reqTipforfreed){//free troubleusers.splice(i,1) imess("You have been freed from trouble!",user) whisperToModel(user+" have been freed from trouble!") return } if(amount==cbs.whisperprice&&cbs.whispersallow==Yes)return//users in trouble can't whisper } } } if(cbs.whispersallow==Yes){//whisper price futures: // if(cbs.usersinblacklist){ if(~cbs.usersinblacklist.toLowerCase().search(user)){emess("::: ERROR ::: You don't have permission to whisper me!");return} }//user in blacklist if(amount==cbs.whisperprice){ whispers.addtip(user,5) imess("Type: '/w message' to send a whisper to the model. You have only 5 whispers available during the show, use them at any time during this show!",user) } if(amount==cbs.onewhisperprice){ tmp=user IDReset=cb.setTimeout(resetwisptimer, 30000) whispers.addtip(user,1) imess("Type: '/w message' to send what you want to say to the model. You have only 30 seconds to send the whisper before the feature turns off. Say something nice :)",user) } } } resetwisptimer=function(user=nullstring){ if(user==nullstring)user=tmp whispers.subtip(user) } whispers.usertip=function(user){ if(whispers.length>0){ for(let i=0;i<whispers.length;i++){ if(whispers[i].name==user)return whispers[i].tip } } return -1 } whispers.addtip=function(user,tip){ if(whispers.length>0){ for(let i=0;i<whispers.length;i++){ if(whispers[i].name==user){whispers[i].tip+=tip;return 0} } } whispers.push({name:user,tip:tip,rec:nullstring}) return -1 } whispers.subtip=function(user){ if(user==nullstring)user=tmp if(whispers.length>0){ for(let i=0;i<whispers.length;i++){ if(whispers[i].name==user){whispers[i].tip--;return 0} } } return -1 } whispers.addrec=function(user,rec){ //last recipient whispers if(whispers.length>0){ for(let i=0;i<whispers.length;i++){ if(whispers[i].name==user){whispers[i].rec=rec;return 0} } } whispers.push({name:user,rec:rec,tip:0,last:nullstring}) return -1 } whispers.addlast=function(user,rec){ //last sent to user if(whispers.length>0){ for(let i=0;i<whispers.length;i++){ if(whispers[i].name==user){whispers[i].last=rec;return 0} } } whispers.push({name:user,user:rec,tip:0,last:rec}) return -1 } whispers.getrec=function(user){ if(whispers.length>0){ for(let i=0;i<whispers.length;i++){ if(whispers[i].name==user)return whispers[i].rec } } return nullstring } whispers.getlast=function(user){ if(whispers.length>0){ for(let i=0;i<whispers.length;i++){ if(whispers[i].name==user){return whispers[i].last} } } return nullstring } inTroubles=function(user,doFree=false){ if(troubleusers.length>0){ for(let i=0;i<troubleusers.length;i++){ if(troubleusers[i].name==user.toLowerCase()){ if(doFree)troubleusers.splice(i,1) return true } } } return false } clearChat=function(){ for(let i=0;i<30;i++){ cb.chatNotice(flow+flow+flow+"MOTH & LUST"+flow+flow+flow,'','',"#A900B2") } } function showHelp(msg){ let user=msg['user'] let output = star+star+star+'MOTH & LUST Commands'+star+star+star+'\ \nFor more info, type /help x or /? x where x is one of the following commands:\ \ntipmenu\ \nmenu\ \nwish\ \nshowwishes' if(cb.settings.whispersallow==Yes){ output += '\nw\ \nwhisper' } if(user==cb.room_slug||(msg['is_mod']&&cbs.modeusecommands==Yes)){ if(cb.settings.whispersallow==Yes){ output += '\nwu' } output += '\nreply\ \nr\ \nlast\ \nl\ \nremovet\ \naddj\ \naddc\ \ncn\ \nban\ \ncc' } if(user==cb.room_slug){ output += '\ndonationtotals' } cb.sendNotice(output,user,cbs.welcomebackgrcolortxt||nullstring, cbs.welcomecolortxt||nullstring, bold) } chkHelp=function(msg){ let ms=msg['m'].split(/\s+/) let user = msg['user'],o=nullstring ms[0]=="/help" if(ms[1]){ switch (ms[1]){ //for all: case "wish": o="Thank you for having an interest in my wishes. From time to time, I have special desires and I will add them to my Wishlist. Here, you will be able to make token donations to one or all of my wishes. You have the ability to donate as much as you would like and all donations are extremely appreciated. To see my wishes and how to donate, type /showwishes in the chat - note, this command will only work if the wish list is active." break case "showwishes": o="The '/showwishes' command is used to display the current wishes set by the model and how to make donations to a particular item. This command will only display information if the wish list is active. The syntax for the command is \'/showwishes\'." break case "tipmenu": case "menu": o="The '/tipmenu' or '/menu' command is used to display the tip menu without the need to wait for the tip menu to cycle through the chat. The tip menu feature must be active for this feature to function. If a moderator or the model uses this command it will display the tip menu to the entire chat. If a user who has tokens uses this command, it will display the tip menu only for him. The syntax for the command is /tipmenu." break case "w": case "whisper": if(cb.settings.whispersallow==Yes){ o="The '/w' or '/whisper' command is used to send private messages to model in the chat. In order to send a whisper, the whisper feature must be active, and you must not be ignored by the user you are sending the message. The model has her own whisper level as well. Proper spelling of the user's username is required to send the message properly. The syntax for the command is '/whisper x' where xx is the message being sent." }else{ o="Whisper is not allowed!" } if(user!=cb.room_slug&&!msg['is_mod'])o+=" (You have tip "+cbs.whisperprice+" tokens before whisper. You will have 1 min. for ones whisper to model)" break default: o="Unknown command! Type '/help' to see a list of available commands." } //for model and mods: if(user==cb.room_slug||(msg['is_mod']&&cbs.modeusecommands==Yes)){ switch (ms[1]){ case "wu": if(cb.settings.whispersallow==Yes){o="The '/wu' command is used to send private messages to other users in the chat. In order to send a whisper, the whisper feature must be active, and you must not be ignored by the user you are sending the message. Proper spelling of the user\'s username is required to send the message properly. The syntax for the command is \'/wu x xx\' where x is the user you are sending the message and xx is the message being sent."}else{o="Whisper is not allowed!"} break case "r": case "reply": if(cb.settings.whispersallow==Yes){o="The '/reply' or '/r' command is used to reply to the last person that has sent you a whisper. Please note, if your level does not designate you can use the whisper feature your reply will not be sent. The syntax of the command is /reply xx where xx is the message."}else{o="Whisper is not allowed!"} break case "l": case "last": if(cb.settings.whispersallow==Yes){o="The '/last' or '/l' command is used to resend to the last person that you sent last before. Please note, if your level does not designate you can use the whisper feature your reply will not be sent. The syntax of the command is /l xx where xx is the message."}else{o="Whisper is not allowed!"} break case "removet": o="The '/removet' command is to remove a user from trouble. This command applies to users in the corner or in jail. The syntax for the command is \'/removet x\' where x is the username of the user to be removed from trouble. Proper spelling of the user\'s username is required." break case "cn": o="The '/cn' command is used to send a one-time notice to the chat. Text or images can be used for this notice. The syntax for the command is \'/cn xx\' where xx is the notice to be shown in the chat." break case "donationtotals": o="The '/donationtotals' command is used to show the current wishes and the donations made for each (available for Model only). These totals must be entered the next time the bot is used to show accuracy and progress of the goal. This command will only provide information if wishes have been activated. The syntax of the command is \'/donationtotals\'." break case "addc": o="The '/addc' user command is used to put a user in the corner. The syntax for the command is \'/addc user\' where user is the username of the user to be put in the corner. Proper spelling of the user\'s username is required." break case "addj": o="The '/addj' command is used to put a user in jail. The syntax for the command is \'/addj user\' where user is the username of the user to be put in jail. Proper spelling of the user\'s username is required." break case "ban": o="The '/ban' command is used to silence a user. This command will prevent the specified user from talking in the chat until the bot is restarted or the user is unsilenced. The ban command cannot be used on the model or moderators. The syntax for the command is \'/ban x\' where x is the username of the user to be silenced. Proper spelling of the user\'s username is required." break case "cc": o="The '/cc' command is used to clear the chat very quickly. The syntax of the command is \'/cc\'." break default: if(!o.length)o="Unknown command! Type /help to see a list of available commands." } } cb.sendNotice(o,user,cbs.welcomebackgrcolortxt||nullstring, cbs.welcomecolortxt||nullstring, bold) }else{//only ms[0] showHelp(msg) } return msg } imess=function(m,rec=nullstring){ cb.sendNotice(":ldreamprog "+m,rec,"black","yellow",bold) } emess=function(m,rec=nullstring){ cb.sendNotice(":alert1 "+m,rec,"red","white",bold) } chkCmd=function(msg){ let ms=msg['m'].split(/\s+/),user = msg['user'],de=false,er="Unknown command! Type /help to see a list of available commands." //for all: switch (ms[0]){ case "/tipmenu": case "/menu": if(user==cb.room_slug||msg['is_mod']){ ShowTM() }else{ if(msg['has_tokens'])ShowTM(user) } return msg case "/help": case "/?": msg=chkHelp(msg) msg['X-Spam']=true msg['m']=nullstring return msg case "/showwishes": if(cbs.wishlistuse==Yes){ShowWishList(user)}else {emess("Wishlist futures is not available!",user)} return msg case "/w": case "/whisper": msg=chkWhisper(msg)//Chk Whisper return msg case "/wish": if(user==cb.room_slug)user=nullstring cb.sendNotice("Thank you for having an interest in my wishes. From time to time, I have special desires and I will add them to my Wishlist. Here, you will be able to make token donations to one or all of my wishes. You have the ability to donate as much as you would like and all donations are extremely appreciated. To see my wishes and how to donate, type /showwishes in the chat - note, this command will only work if the wish list is active.",user,cbs.welcomebackgrcolortxt||nullstring, cbs.welcomecolortxt||nullstring, bold) return msg default: de=true } //for model and mods: if(user==cb.room_slug||(msg['is_mod']&&cbs.modeusecommands==Yes)){ switch (ms[0]){ case "/w": case "/whisper": case "/wu": case "/r": case "/reply": case "/l": case "/last": msg=chkWhisper(msg)//Chk Whisper return msg case "/ban": if(ms[1]){ if(ms[1]==cb.room_slug&&ms[1])return cbs.usersinblacklist+=","+ms[1] let m=ms[1]+" has been added to blacklist. Don't forget to add him name to bot settings" imess(m,user) } return msg case "/addj": if(ms[1]){ if(ms[1]==cb.room_slug&&ms[1])return if(!inTroubles(ms[1])){ troubleusers.push({name:ms[1].trim(),t:"j"}) let m=ms[1]+" has been added to jail" imess(m,user) ShowTrouble(ms[1]) }else{ let m=ms[1]+" already in the jail." imess(m,user) } } return msg case "/addc": if(ms[1]){ if(ms[1]==cb.room_slug&&ms[1])return if(!inTroubles(ms[1])){ troubleusers.push({name:ms[1].trim(),t:"c"}) let m=ms[1]+" has been added to corner." imess(m,user) ShowTrouble(ms[1]) }else{ let m=ms[1]+" already in the trouble." imess(m,user) } } return msg case "/removet": if(ms[1]){ if(ms[1]==cb.room_slug&&ms[1])return if(inTroubles(ms[1].toLowerCase())){ inTroubles(ms[1].toLowerCase(),true) let m=ms[1]+" has been removed from trouble." imess(m,user) }else{ let m=ms[1]+" was not in trouble." imess(m,user) } } return msg case "/testtip": doTip({from_user: (ms[2] || 'InvisiMod'), amount: Number(ms[1]), message:ms[3]+spc+(ms[4]||nullstring)}) return msg case "/donationtotals": ShowDonationTotals(user) return msg case "/cn": cb.chatNotice(msg['m'].substring(3),nullstring,nullstring,nullstring,bold) return msg case "/tm": ShowTMItem(false)//show next tip menu item return msg case "/cc": clearChat()//clear chat return msg default: emess(er,user) return msg } } if(de)emess(er,user) return msg } cb.onMessage(function (msg){ let user = msg['user'],tipLeader=tippers.length?tippers[0].name:nullstring if(chkBanned(user)){ msg['m']=nullstring msg['X-Spam']=true return//User is permanently silenced: } if(msg['m'].startsWith('/')){ msg=chkCmd(msg) msg['X-Spam']=true return msg } msg=chkCaps(msg)//check AllCaps filter msg=chkStickyKeys(msg)// chk Sticky Filter msg=chkTalkAccess(msg)//chk Talk Access msg=chkGraphAccess(msg)//chk Graph Access msg=chkTrouble(msg) msg=chkTipsum(msg) msg=chkWords(msg) return msg }); function DateFormate(dateval){ var _$_dfaf=["\x67\x65\x74\x44\x61\x74\x65","\x67\x65\x74\x4D\x6F\x6E\x74\x68","\x73\x6C\x69\x63\x65","\x30","\x74\x6F\x53\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x46\x75\x6C\x6C\x59\x65\x61\x72","\x2D"]; let date= new Date(dateval) let day=date[_$_dfaf[0]]() let month=date[_$_dfaf[1]]() let daystr=(_$_dfaf[3]+ day)[_$_dfaf[2]](-2) month= (month+ 1)[_$_dfaf[4]]();if(month[_$_dfaf[5]]=== 1)month= _$_dfaf[3]+ month let year=date[_$_dfaf[6]]() let formated_date=year+ _$_dfaf[7]+ month+ _$_dfaf[7]+ daystr return formated_date } function rand(banner){ var _$_18ef=["\x72\x61\x6E\x64\x6F\x6D","\x6C\x65\x6E\x67\x74\x68","\x66\x6C\x6F\x6F\x72"]; let randomIndex=Math[_$_18ef[2]]((Math[_$_18ef[0]]()* banner[_$_18ef[1]])) return banner[randomIndex]?banner[randomIndex]:banner[0] } init() } subadv=function(){ MyAdvMess= function(){ cb.sendNotice("\x49\x66\x20\x79\x6F\x75\x20\x77\x6F\x75\x6C\x64\x20\x6C\x69\x6B\x65\x20\x74\x6F\x20\x6F\x72\x64\x65\x72\x20\x61\x20\x70\x65\x72\x73\x6F\x6E\x61\x6C\x20\x61\x70\x70\x2F\x62\x6F\x74\x2C\x20\x6F\x72\x20\x63\x75\x73\x74\x6F\x6D\x69\x73\x65\x20\x61\x6E\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x6F\x6E\x65\x2C\x20\x6F\x72\x20\x6F\x72\x64\x65\x72\x20\x57\x69\x6E\x64\x6F\x77\x73\x20\x70\x72\x6F\x67\x72\x61\x6D\x6D\x73\x20\x70\x6C\x65\x61\x73\x65\x20\x6D\x61\x69\x6C\x20\x6D\x65\x20\x74\x6F\x3A\x20\x62\x6F\x6D\x40\x77\x65\x62\x6D\x61\x69\x6C\x2E\x6B\x7A",'','yellow','black','bold') setTimeout(MyAdvMess, 180000) } cb.settings_choices =[ {name: 's112', label:'*** bom999@yahoo.com ***Order custom App/Bot', type: 'choice', choice1: '', required: false} ] MyAdvMess() } if(owns.includes(cb.room_slug)){submain()}else{subadv()}
© Copyright Chaturbate 2011- 2024. All Rights Reserved.