Apps Home
|
My Uploads
|
Create an App
cr test
Author:
linkstar2018
Description
Source Code
Launch App
Current Users
Created by:
Linkstar2018
App Images
//**************************************************************************************************************************** //Start of King Tippers //**************************************************************************************************************************** var backgroundImage = '494aaf4f-8d44-44b6-9b95-40f0419b8eff'; var backgroundImage2= '64e02815-b9dc-49c5-a6dc-96e9847b37c0'; var total_tipped = 0; var high_tip_username = null; var high_tip_amount = 0; var last_tip_username = null; var last_tip_amount = 0; var subject_is_set_with_0 = false; var NumOfGoals=1; var fontSizeLabel = 11; var fontSize = 10; var fontStyle="regular"; var fontFamily='"Arial Sans MS", cursive, sans-serif'; var fontWeight="bold"; var labelColor="red"; var valueColor="rgb(220, 85, 0)"; var allTippers = new Object(); var tempH =Array(); var hashtags="#squirt #cum #german #teen #young #roleplay #dance #strip #lush #lovense #tease #natural #cute #stockings #pussy #ass ,"; var leftRoomTitle="Welcome Guys!! "; var rightRoomTitle=""; var hash=''; var hashtagsSplit=Array(); var tempH=Array(); //**************************************************************************************************************************** //end of King Tippers //**************************************************************************************************************************** //**************************************************************************************************************************** //Start of Tip Menu Plus //**************************************************************************************************************************** var HEART = '\u2665'; // ♥ BDIAMOND = '\u2666'; // ♦ BSTAR = '\u2605'; // ★ var tip_amt = 0; var separator_char = "| "; var menuMsg; var menuMAXITEMS=30; var tipmenuprice = []; var tipmenuitem= []; var menuMAXSEP = 9; separators = [ {label:'Hearts',shortcut:':heart2'}, {label:'Glitter',shortcut:':pixelglitter'}, {label:'Flowers',shortcut:':tinyflower2'}, {label:'Bow',shortcut:':bluebow'}, {label:'Hearts2',shortcut:':pixelheart'}, {label:'Smiley',shortcut:':smile'}, {label:'Text Heart',shortcut:HEART}, {label:'Text Diamond',shortcut:BDIAMOND}, {label:'Text Star',shortcut:BSTAR}, ]; //**************************************************************************************************************************** //end of Tip Menu Plus //**************************************************************************************************************************** //**************************************************************************************************************************** //start of rotating not //**************************************************************************************************************************** var i=0; var rotateMAXITEMS=10; //**************************************************************************************************************************** //end of rotating not //**************************************************************************************************************************** cb.settings_choices = [ {name: 'welcomeMessageRules', type: 'choice',choice1: "1", choice2: "0", defaultValue: "0",label: "Enable Welcome Rules 1 for yes 0 for no"}, {name: 'goalMAinApp', type: 'choice',choice1: "1", choice2: "0", defaultValue: "1",label: "Enable Goal Main App 1 for yes 0 for no"}, {name: 'kingTokens', type: 'int', minValue: 1, default: 100, label: "Amount of Tokens for Goal if -1 selected leave it will not be shown"}, {name: 'kingNumberOfGoal', type: 'int', minValue: -1, default: -1, label: "0 is infinity and -1 means no goal"}, {name: 'goal_description', type: 'str', minLength: 1, maxLength: 255,required: false, label: "Goal Description"}, {name: 'extraWelcome', type: 'str', minLength: 1, maxLength: 255,required: false, label: "Users welcome message after Welocme user if there is any"}, {name: 'rules', type: 'str', minLength: 1, maxLength: 255,required: false, label: "write all the rules and seperater for new lines are -- example : rule number 1 : behav!--rule number 2: obey....."}, {name: 'row1', type: 'str', minLength: 1, maxLength: 255,default: "My Lover", label: "app first row label example: my lovers"}, {name: 'row2', type: 'str', minLength: 1, maxLength: 255,default: "In My Cage", label: "app sec row label example: best lover"}, {name: 'row3', type: 'str', minLength: 1, maxLength: 255,default: "Latest Arrival", label: "app third row label example: latest tip"}, //**************************************************************************************************************************************** //hashtags {name: 'hashtag', type: 'choice',choice1: "1", choice2: "0", defaultValue: "1",label: "Use hashtag Changer 1 for yes 0 for no"}, {name: 'leftRoomTitle', type: 'str', minLength: 1, maxLength: 255,required: false,default: leftRoomTitle,label: "Room Title then will show the hashtags next to it"}, {name: 'rightRoomTitle', type: 'str', minLength: 1, maxLength: 255,required: false,default: rightRoomTitle,label: "Room Title then will show the hashtags before it"}, {name: 'hashtagString', type: 'str', minLength: 1, maxLength: 255,label: "Hashtags use it as regualr one line with spaces and will split and changed automatically"}, {name: 'hashtagschunks', type: 'int', minValue: 1,default: 5}, {name: 'hashtagsUpdatePeriod', type: 'int', minValue: 1,default: 300}, //**************************************************************************************************************************************** //**************************************************************************************************************************************** //**************************************************************************************************************************** //tip menu plus {name: 'tipMenuPlus', type: 'choice',choice1: "1", choice2: "0", defaultValue: "1",label: "Enable Tip Menu Plus 1 for yes 0 for no"}, {name: 'tipMenuPredict', type: 'choice',choice1: "1", choice2: "0", defaultValue: "1",label: "to send user the menu when he text for example spank price is when he send spank in chat Use Predict Tip Menu 1 for yes 0 for no"}, {name: 'sepchar', type: 'choice', choice1: 'Vertical Bar', choice2: 'Hearts', choice3:'Glitter',choice4:'Flowers',choice5:'Bow',choice6:'Hearts2',choice7:'Smiley',choice8:'Text Heart', choice9:'Text Diamond', choice10:'Text Star', defaultValue: 'Vertical Bar', label: "Separator character"}, {name:'item1', type:'str', required: false, label:'Item 1 (eg 10--flash tits)',defaultValue: "10--pm"}, {name:'item2', type:'str', required: false, label:'Item 2',defaultValue: "35--watch me stand up & turn around"}, {name:'item3', type:'str', required: false, label:'Item 3',defaultValue: "open ur profile--99"}, {name:'item4', type:'str', required: false, label:'Item 4',defaultValue: "111--fap tax"}, {name:'item5', type:'str', required: false, label:'Item 5',defaultValue: "50--worship my holy feet"}, {name:'item6', type:'str', required: false, label:'Item 6',defaultValue: "95--heels on/off"}, {name:'item7', type:'str', required: false, label:'Item 7',defaultValue: "221--big dick tax"}, {name:'item8', type:'str', required: false, label:'Item 8',defaultValue: "133--oil/cream feet"}, {name:'item9', type:'str', required: false, label:'Item 9',defaultValue: "70--worship my sexy ass (nonude)"}, {name:'item10', type:'str', required: false, label:'Item 10',defaultValue: "480--worship my juicy breast"}, {name:'item11', type:'str', required: false, label:'Item 11',defaultValue: "333--loser tax"}, {name:'item12', type:'str', required: false, label:'Item 12',defaultValue: "700--mixed light session"}, {name:'item13', type:'str', required: false, label:'Item 13',defaultValue: "250--sph / humiliation"}, {name:'item14', type:'str', required: false, label:'Item 14',defaultValue: "450--joi / cei / edging"}, {name:'item15', type:'str', required: false, label:'Item 15',defaultValue: "350--hotwife / cuckold"}, {name:'item16', type:'str', required: false, label:'Item 16',defaultValue: "400--chastity"}, {name:'item17', type:'str', required: false, label:'Item 17',defaultValue: "410--sissy training"}, {name:'item18', type:'str', required: false, label:'Item 18',defaultValue: "750--strapon show"}, {name:'item19', type:'str', required: false, label:'Item 19',defaultValue: "121--small dick tax"}, {name:'item20', type:'str', required: false, label:'Item 20',defaultValue: "11111--Goddess I love u"}, {name:'item21', type:'str', required: false, label:'Item 21',}, {name:'item22', type:'str', required: false, label:'Item 22',}, {name:'item23', type:'str', required: false, label:'Item 23',}, {name:'item24', type:'str', required: false, label:'Item 24',}, {name:'item25', type:'str', required: false, label:'Item 25',}, {name:'item26', type:'str', required: false, label:'Item 26',}, {name:'item27', type:'str', required: false, label:'Item 27',}, {name:'item28', type:'str', required: false, label:'Item 28',}, {name:'item29', type:'str', required: false, label:'Item 29',}, {name:'item30', type:'str', required: false, label:'Item 30',}, {name:'noticecolor', type:'str', label:'Notice color (html code default red #FF0000)', defaultValue: '#FF0000'}, {name: 'menuChat_ad', type:'int', minValue: 1, maxValue: 999, defaultValue: 1, label: 'Delay in minutes between notice being displayed (minimum 1)'}, //**************************************************************************************************************************** // rotating not {name: 'rotatingNot', type: 'choice',choice1: "1", choice2: "0", defaultValue: "1",label: "Enable Rotating Notifier 1 for yes 0 for no"}, {name: 'msgonentry', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display Message 1 privately on entry - set to no for busy rooms"}, {name:'msg1', type:'str', required: true, label:'Message 1',}, {name:'msg2', type:'str', required: false, label:'Message 2',}, {name:'msg3', type:'str', required: false, label:'Message 3',}, {name:'msg4', type:'str', required: false, label:'Message 4',}, {name:'msg5', type:'str', required: false, label:'Message 5',}, {name:'msg6', type:'str', required: false, label:'Message 6',}, {name:'msg7', type:'str', required: false, label:'Message 7',}, {name:'msg8', type:'str', required: false, label:'Message 8',}, {name:'msg9', type:'str', required: false, label:'Message 9',}, {name:'msg10', type:'str', required: false, label:'Message 10',}, {name:'msgcolor', type:'str', label:'Notice color (html code default dark red #9F000F)', defaultValue: '#9F000F'}, {name: 'rotateChat_ad', type:'int', minValue: 1, maxValue: 999, defaultValue: 2, label: 'Delay in minutes between notices being displayed (minimum 1)'}, //**************************************************************************************************************************** //**************************************************************************************************************************** ]; // handlers cb.onTip(function(tip) { if(parseInt(cb.settings.tipMenuPlus)) menuOnTip(tip); if(parseInt(cb.settings.goalMAinApp)) kingTipperOnTip(tip); }); cb.onMessage(function (msg) { if(parseInt(cb.settings.goalMAinApp)) msg=kingTipperOnMessage(msg); //tip menu if(parseInt(cb.settings.tipMenuPlus) && parseInt(cb.settings.tipMenuPredict)) tipperMenuyOnMsg(msg); return msg; }); cb.onEnter(function(user) { if(parseInt(cb.settings.welcomeMessageRules)) welcomeRulesOnEnter(user); if(parseInt(cb.settings.rotatingNot)) rotateOnEnter(user); }); cb.onDrawPanel(function(user) { if(cb.settings.kingNumberOfGoal!="-1") return { 'template': '3_rows_11_21_31', 'row1_value': 'Goal # '+NumOfGoals+' :' + total_tipped + ' / ' + cb.settings.kingTokens + ' ['+(cb.settings.kingTokens-total_tipped)+' to Goal]', 'row2_value': '' , //'row2_label': 'Tip Goal King:', 'row3_value': 'Best Lover : '+format_username(high_tip_username) + ' (' + high_tip_amount + ')', "template": "image_template", "layers": [ {'type': 'image', 'fileID': backgroundImage,left:231}, { 'type': 'text', 'text': 'Goal # '+NumOfGoals+' :' + total_tipped + ' / ' + cb.settings.kingTokens + ' ['+(cb.settings.kingTokens-total_tipped)+' to Goal]', 'top': 5, 'left': 5, 'font-size': fontSizeLabel, 'font-style':fontStyle, 'font-family':fontFamily, 'font-weight':fontWeight, 'color': labelColor, }, { 'type': 'text', 'text': '', 'top': 29, 'left': 5, 'font-size': fontSizeLabel, 'font-style':fontStyle, 'font-family':fontFamily, 'font-weight':fontWeight, 'color': labelColor, }, { 'type': 'text', 'text': cb.settings.row3+' '+format_username(last_tip_username) + ' (' + last_tip_amount + ')', 'top': 52, 'left': 5, 'font-size': fontSizeLabel, 'font-style':fontStyle, 'font-family':fontFamily, 'font-weight':fontWeight, 'color': labelColor, }, ], }; else return { 'template': '3_rows_of_labels', "template": "image_template", "layers": [ //{'type': 'image', 'fileID': backgroundImage2}, {'type': 'image', 'fileID': backgroundImage,left:210}, { 'type': 'text', 'text': cb.settings.row1, 'top': 5, 'left': 5, 'font-size': fontSizeLabel, 'font-style':fontStyle, 'font-family':fontFamily, 'font-weight':fontWeight, 'color': labelColor, }, { 'type': 'text', 'text': cb.settings.row2, 'top': 29, 'left': 5, 'font-size': fontSizeLabel, 'font-style':fontStyle, 'font-family':fontFamily, 'font-weight':fontWeight, 'color': labelColor, }, { 'type': 'text', 'text': cb.settings.row3, 'top': 52, 'left': 5, 'font-size': fontSizeLabel, 'font-style':fontStyle, 'font-family':fontFamily, 'font-weight':fontWeight, 'color': labelColor, }, { 'type': 'text', 'text': Object.keys(allTippers).length, 'top': 5, 'left': 85, 'font-size': fontSize, 'font-style':fontStyle, 'font-family':fontFamily, 'font-weight':fontWeight, 'color': valueColor, }, { 'type': 'text', 'text': getUserTipAmount(), 'top': 29, 'left': 85, 'font-size': fontSize, 'font-style':fontStyle, 'font-family':fontFamily, 'font-weight':fontWeight, 'color': valueColor, }, { 'type': 'text', 'text': format_username(last_tip_username) , 'top': 51, 'left': 85, 'font-size': fontSize, 'font-style':fontStyle, 'font-family':fontFamily, 'font-weight':fontWeight, 'color': valueColor, }, ], }; }); //**************************************************************************************************************************** //Start of King Tippers //**************************************************************************************************************************** // helper functions function update_subject() { if (tips_remaining() == 0) { if (subject_is_set_with_0) { return; } subject_is_set_with_0 = true; } else { subject_is_set_with_0 = false; } var new_subject ="Goal # "+NumOfGoals+" "+cb.settings.goal_description + " [" + tips_remaining() + " tokens remaining]"; cb.log("Changing subject to: " + new_subject); cb.changeRoomSubject(new_subject); } function tips_remaining() { if (total_tipped > cb.settings.kingTokens) { //total_tipped = cb.settings.kingTokens; NumOfGoals=NumOfGoals+Math.floor(total_tipped / cb.settings.kingTokens); total_tipped=parseInt(total_tipped)-(Math.floor(total_tipped / cb.settings.kingTokens)*cb.settings.kingTokens); } else var r = cb.settings.kingTokens - total_tipped; if (r < 0) { return 0; } else { return r; } } function format_username(val) { if (val === null) { return ""; } else { return val; } } function kingTipperOnTip(tip) { if(allTippers[tip['from_user']] !== undefined) allTippers[tip['from_user']]=allTippers[tip['from_user']]+parseInt(tip['amount']); else allTippers[tip['from_user']]=parseInt(tip['amount']); total_tipped += tip['amount'] if (total_tipped > cb.settings.kingTokens) { //total_tipped = cb.settings.kingTokens; NumOfGoals=parseInt(NumOfGoals)+Math.floor(total_tipped / cb.settings.kingTokens); total_tipped=parseInt(total_tipped)-(Math.floor(total_tipped / cb.settings.kingTokens)*cb.settings.kingTokens); } //update_subject(); last_tip_amount = tip['amount'] last_tip_username = tip['from_user'] if (tip['amount'] > high_tip_amount) { high_tip_amount = tip['amount'] high_tip_username = tip['from_user'] } cb.drawPanel(); } function kingTipperOnMessage(msg) { if (msg['user'] == high_tip_username) { msg['background'] = '#9F9'; } return msg; } function getUserTipAmount() { if(Object.keys(allTippers).length==0) return 0; else { max=0; userMax=''; for(var key in allTippers) { cb.log("user :" + key + ' amount : ' + allTippers[key]); if(allTippers[key]>max) { userMax=key; max=allTippers[key]; } } //return userMax + ' ('+max+') '; return userMax; } } //**************************************************************************************************************************** //end of King Tippers //**************************************************************************************************************************** //**************************************************************************************************************************** //Start of welcoem msg rules //**************************************************************************************************************************** function welcomeRulesOnEnter(user) { msg="Welcome " + user['user'] + "! " + cb.settings.extraWelcome+"\n"+"************Here is the Rules************"+"\n"; tempH.forEach(function(rule) { msg=msg+rule+"\n "; }); cb.sendNotice(msg,user['user'],'grey','red','bold'); } //**************************************************************************************************************************** //end of welcoem msg rules //**************************************************************************************************************************** //**************************************************************************************************************************** //Start of tip menu //**************************************************************************************************************************** function menuOnTip(tip) { tip_amt=parseInt(tip['amount']); for (var i = 1; i <= menuMAXITEMS; i++) { if (tip_amt == tipmenuprice[i]) { cb.sendNotice(tip['from_user'] + ' tipped for ' + tipmenuitem[i],'','',cb.settings['noticecolor'],'bold'); break; } } } function menuChatAd() { if (menuMsg!='Tip Menu: ') { cb.sendNotice(menuMsg,'','',cb.settings['noticecolor'],'bold'); } cb.setTimeout(menuChatAd, (cb.settings.menuChat_ad * 60000)); } if(parseInt(cb.settings.tipMenuPlus)) cb.setTimeout(menuChatAd, (cb.settings.menuChat_ad * 60000)); function menuOnInit() { for (i=0;i<=menuMAXSEP-1;i++) { if (cb.settings['sepchar'] == separators[i].label) { separator_char = separators[i].shortcut + ' '; } } menuMsg = 'Tip Menu: '; for (i=1;i<=menuMAXITEMS;i++) { var tmp; tmp=cb.settings['item' + i]; if (tmp) { var arr= tmp.split('--'); if (arr[1]===undefined) { cb.sendNotice('Error-You need two dashes to separate the tip amount and menu item for item no '+ i,'','',cb.settings['noticecolor'],'bold'); } else { var amt=parseInt(arr[0]); if (amt>0) { tipmenuprice[i]=amt; tipmenuitem[i]=arr[1]; if (i>=2) { menuMsg += separator_char; } menuMsg += arr[1] + '(' + amt + ') '; } } } } if (menuMsg!= 'Tip Menu: ') { cb.sendNotice(menuMsg,'','',cb.settings['noticecolor'],'bold'); } else { cb.sendNotice('Error-No menu items found','','',cb.settings['noticecolor'],'bold'); } } function tipperMenuyOnMsg(msg) { var msgString = msg['m'].trim(); /* if (msg['user'] == cb.room_slug || msg['is_mod']) { cb.sendNotice('To send the board to the entire room, use //b or !!b', msg['user'], '#FFCCCC', '#BB2222', 'bold') } */ if (msg['user'] == cb.room_slug || msg['is_mod']) return false; else { for (i=1;i<=menuMAXITEMS;i++) { tmp=cb.settings['item' + i]; if (tmp) { var arr= tmp.split('--'); var amt=parseInt(arr[0]); if(msgString.toLowerCase().indexOf(arr[1].toLowerCase()) !==-1) { cb.sendNotice(' Hey '+msg['user'] + ' :wink '+arr[1]+' Price is : ' + amt,msg['user'],'',cb.settings['noticecolor'],'bold'); break; } } } } //return msg } //**************************************************************************************************************************** //end of of tip menu //**************************************************************************************************************************** //**************************************************************************************************************************** //Start of rotating not //**************************************************************************************************************************** function rotateOnEnter(user) { if (cb.settings['msgonentry'] == 'yes') { cb.sendNotice('Welcome ' + user['user'] + '! ' + cb.settings['msg1'],user['user'],'',cb.settings['msgcolor'],'bold'); } } function rotateChatAd() { var msg; while (cb.settings['msg' + (i + 1)] == 0) { //skip empty messages i++; i %= rotateMAXITEMS; } msg = cb.settings['msg' + (i + 1)]; i++; i %= rotateMAXITEMS; cb.sendNotice(msg,'','',cb.settings['msgcolor'],'bold'); cb.setTimeout(rotateChatAd, (cb.settings.rotateChat_ad * 60000)); } if(parseInt(cb.settings.rotatingNot)) cb.setTimeout(rotateChatAd, (cb.settings.rotateChat_ad * 60000)); //**************************************************************************************************************************** //end of Start of rotating not //**************************************************************************************************************************** //**************************************************************************************************************************************** //**************************************************************************************************************************************** // hashtags changer start function changeHashtags() { var tempStr=" " ; var tmphashtags=""; mainCounter=parseInt(cb.settings.hashtagschunks); if(tempH.length>0 && tempH.length<=parseInt(cb.settings.hashtagschunks)) mainCounter=tempH.length; for (var counter=1;counter<=mainCounter;counter++) { if(tempH.length<=0) { var hash=cb.settings.hashtagString; tempH=String(hash).split("#"); } tempData=tempH.shift().trim(); if(tempData!="") tempStr=tempStr+' #'+tempData; } cb.changeRoomSubject(cb.settings.leftRoomTitle + tempStr + ' ' + cb.settings.rightRoomTitle); cb.setTimeout(changeHashtags, parseInt(cb.settings.hashtagsUpdatePeriod)*1000) } // hashtags changer end //**************************************************************************************************************************************** function init() { //update_subject(); if(parseInt(cb.settings.welcomeMessageRules)) { var rules=cb.settings.rules; rulesSplit=String(rules).split("--"); tempH=rulesSplit; } if(parseInt(cb.settings.tipMenuPlus)) menuOnInit(); //hashtagChanger if(parseInt(cb.settings.hashtag)) cb.setTimeout(changeHashtags, parseInt(cb.settings.hashtagsUpdatePeriod)*1000); } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.