Apps Home
|
Create an App
Hidden Cam Tip Jar LWish
Author:
ladywish
Description
Source Code
Launch App
Current Users
Created by:
Ladywish
(function(c){var b={G:-1,V:1,e:!1,q:12E3,i:0,m:0,A:"",a:0,d:0,r:0,f:0,w:["No","Slightly","Moderately","Much"],s:!1},a=k(c),d={D:function(){a.p.onDrawPanel(this.l.drawPanel);a.p.onMessage(this.l.message);a.p.onTip(this.l.F);a.b.k("tokenrate","Minimum tokens per minute/hour","5 / 300;10 / 600;20 / 1200;30 / 1800;50 / 3000;75 / 4500;100 / 6000;125 / 7500;150 / 9000".split(";"),"30 / 1800");a.b.k("graduated","Tip jar empties faster when more full",b.w,"No");a.b.k("grace","First __ minutes are free to allow tip jar to start filling", "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15".split(" "),"5");a.b.B("mods","Mods can always see the cam",!1);a.c.setTimeout(d.u,3E3);return this},u:function(){a.b.j("tokenrate")?(b.f=1*a.b.j("tokenrate").substr(0,3).trim(),b.d=1*a.b.j("grace"),b.i=b.q/6E4*b.f,b.r=b.w.indexOf(a.b.j("graduated")),b.s="Yes"===a.b.j("mods"),b.P=1/Math.log(6),a.n.t([a.c.C()]),b.e=!0,b.d?(a.c.setTimeout(d.v,6E4),d.h(!0)):d.h(!1),a.drawPanel()):a.c.setTimeout(d.u,3E3)},v:function(){b.d--;b.d?(a.o.drawPanel(),a.c.setTimeout(d.v, 6E4)):(d.h(!0),a.c.setTimeout(d.h,b.q))},h:function(e){var c=b.a>=b.f;if(!e&&!b.d&&b.a){if(b.r&&b.a>b.f){var f=b.i*(Math.max(0,Math.log(b.a/b.f)*b.Q-1)*b.r/1.5+1);b.a=Math.max(0,b.a-f)}else b.a=Math.max(0,b.a-b.i);c&&b.a<b.f&&a.o.sendNotice("Tip jar is almost empty! Tip to keep the show going!")}0>=b.a&&b.e&&!b.d?(a.n.start("Tip jar empty! Tip to see the show."),a.c.sendNotice("Tip jar empty! Cam will be hidden until someone tips!"),b.e=!1):b.a>=b.i&&!b.e&&(a.c.sendNotice("Tip jar no longer empty! Let the show resume!"), b.e=!0,a.n.stop(),b.G=-1);e||a.c.setTimeout(d.h,b.q);a.o.drawPanel()},l:{drawPanel:function(){if(!b.i)return new l;var a="Tip to get the show started",d="Empty",c="None yet!";b.d?a="Tip jar starts emptying in "+b.d+" minute"+(1===b.d?"":"s")+".":b.e&&(a="Tip to keep the show going");b.a&&(d=Math.floor(b.a));b.m&&(c=b.A+" ("+b.m+")");return new m(d,c,a)},K:function(){},O:function(){},message:function(d){d.is_mod&&b.s&&a.n.t([d.user])},F:function(a){a.amount>b.m&&(b.m=a.amount,b.A=a.from_user);b.a+= a.amount;d.h(!0)},tipOptions:function(){}}};d.D()})(cb);function l(){this.template="3_rows_11_21_31";this.row1_value="Loading";this.row3_value=this.row2_value=""}function m(c,b,a){this.template="3_rows_12_22_31";this.row1_label="Tip Jar:";this.row1_value=c;this.row2_label="High Tipper:";this.row2_value=b;this.row3_value=a} function k(c){var b={p:c,g:[],o:{U:function(a){c.changeRoomSubject(a)},drawPanel:function(){c.drawPanel()},R:function(a){if(a=b.l.tipOptions(a)){for(var d={label:a.message,options:[]},c=0;c<a.options.length;c++)d.options.push({label:a.options[c]});return d}}},c:{log:function(a){c.log(a)},C:function(){return c.room_slug},sendNotice:function(a,b,e,g,f,h){c.sendNotice(a,b,e,g,f,h)},setTimeout:function(a,b){c.setTimeout(a,b)}},b:{j:function(a){return c.settings[a]},L:function(){return c.settings},H:function(a, d,e,g,f,h){a={name:a,minValue:e||0,maxValue:g||99,type:"int",label:d};!1===h&&(a.required=!1);void 0!==f&&(a.defaultValue=f);b.g.push(a);c.settings_choices=b.g},I:function(a,d,e,g,f,h){a={name:a,minLength:e||1,maxLength:max||255,type:"str",label:d};!1===h&&(a.required=!1);void 0!==f&&(a.defaultValue=f);b.g.push(a);c.settings_choices=b.g},k:function(a,d,e,g,f){a={name:a,defaultValue:g,type:"choice",label:d};for(d=0;d<e.length;d++)a["choice"+(d+1)]=e[d];!1===f&&(a.required=!1);b.g.push(a);c.settings_choices= b.g},B:function(a,d,c,g){b.b.k(a,d,["Yes","No"],c?"Yes":"No",g)}},n:{start:function(a,b){c.limitCam_start(a,b)},stop:function(){c.limitCam_stop()},t:function(a){c.limitCam_addUsers(a)},T:function(a){c.limitCam_removeUsers(a)},S:function(){c.limitCam_removeAllUsers()},M:function(a){return c.limitCam_userHasAccess(a)},J:function(){return c.limitCam_allUsersWithAccess()},N:function(){return c.limitCam_isRunning()}}};return b};
© Copyright Chaturbate 2011- 2026. All Rights Reserved.