Apps Home
|
Create an App
testnapp
Author:
amberspet
Description
Source Code
Launch App
Current Users
Created by:
Amberspet
var _=_||{};_.offline=!0;_.debugmode=!0;_.tests={};_.settings={drawinterval:1E3,intialized:!1};_.panel={dirty:!0,rows:[]};_.colors={alert:{fore:"#FF0000",back:"",weight:"bold"},shout:{fore:"#000000",back:"",weight:"bold"},say:{fore:"#000000",back:""},whisper:{fore:"#FF00FF",back:""},think:{fore:"#000000",back:"#DDDDDD"},debug:{fore:"#000000",back:"#FFD0DD"}};_.tips=0;_.loopindex=0;_.gameisrunning=!0;_.shortcuts={};_.ranknames=" bedbug mouse monkey donkey lion wolf beast".split(" "); _.rankscores=[0,0,0,500,2E3,1E4,5E4];_.dailyrankscore=[0,0,0,100,200];_.highrank=_.ranknames.length-1;_.rank0=_.ranknames[0];_.rank1=_.ranknames[1];_.rank2=_.ranknames[2];_.rank3=_.ranknames[3];_.rank4=_.ranknames[4];_.rank5=_.ranknames[5];_.rank6=_.ranknames[6];_.rank7=_.ranknames[7];_.rank8=_.ranknames[8]; _.texts={roomrules:"Welcome to my room.\n\nPlease read my bio first. Asking for PM or other requests can be done in a tip note of at least 10 tokens.",tiphints:"Type /tiplist, /game or /board on what can be tipped.",diceprefix:":tdr",showstart:["","This room is blocked for greys","Limit cam show has started.\nOnly available to "+_.rank2+" and higher","Limit cam show has started.\nOnly available to "+_.rank3+" and higher","Limit cam show has started.\nOnly available to "+_.rank4+" and higher","Limit cam show has started.\nOnly available to "+ _.rank5+" and higher","Limit cam show has started.\nOnly available to "+_.rank6+" and higher","Limit cam show has started.\nOnly available to "+_.rank7+" and higher","Private time with my "+_.rank8],showend:"Limit cam show has ended",ticketstart:"The ticket show has started",ticketend:"The ticket show has ended",usernotexists:"User {userid} doesn't exist"};_.choices=function(){var a=[];_.settings.userdata="";a.push({name:"userdata",label:"User data",type:"str",required:!1,defaultValue:""});return a}(); _.offline||(cb.settings_choices=_.choices);_.initialize=function(){_.chat.debug("Loaded settings: ",cb.settings);_.panel.dirty=!0;_.timers.initialize();_.offline||_.foreach(cb.settings_choices,function(a){var c=cb.settings[a.name]||a.defaultValue;switch(a.name){case "userdata":a=_.users.importdata,_.isfunction(a)?a(c):_.settings[a]=c}});_.group.running?_.chat.alert(_.texts.roomrules+"\n"+_.group.camstarttext):_.chat.alert(_.texts.roomrules);_.chat.alert(_.texts.roomrules)}; _.chat=function(){var a=function(){};a.prototype={message:function(a,b,d,f){a=_.colors[a];b=_.isarray(b)?b.join("\n"):""+(b||"");cb.sendNotice(b,d?d.name:"",a.back||"",a.fore||"",a.weight||"",_.groupname(f))},alert:function(a){_.chat.message("alert",a)},shout:function(a){_.chat.message("shout",a)},say:function(a,b){(_.isarray(a)?a:[a]).foreach(function(a){_.chat.message("say",b,"",a)})},whisper:function(a,b){var d=_.isarray(a)?a:[a];_.foreach(d,function(a){_.chat.message("whisper",b,a)})},broadcast:function(a, b){a&&!a.broadcast?_.chat.whisper(a,b):_.chat.shout(b)},think:function(a){_.chat.message("think",a,null,_.mod)},debug:function(){for(var a="",b=0;b<arguments.length;b++)var d=arguments[b],a=a+((b?", ":"")+("object"==typeof d?JSON.stringify(d):d));_.chat.message("debug",a,null,_.mod)}};return new a}(); _.cam=function(){var a=function(){};a.prototype={adduser:function(a){_.isarray(a)||(a=[a]);a.length&&cb.limitCam_addUsers(a)},removeuser:function(a){_.isarray(a)||(a=[a]);cb.limitCam_removeUsers(a)},hasaccess:function(a){return cb.limitCam_userHasAccess(a)},clear:function(){return cb.limitCam_removeAllUsers()},list:function(){cb.limitCam_allUsersWithAccess()},start:function(a){this.running()||cb.limitCam_start(a)},stop:function(a){cb.limitCam_stop(a)},running:function(){return cb.limitCam_isRunning()}}; return new a}(); _.app=function(){var a=function(){};a.prototype={messagefilter:function(a,b,d){if(10>a.amount&&!a.ismod&&!a.isfan)for(a=b.replace(/([\s.,?!])+/g,"|").split("|"),b=0;b<a.length;b++)switch((a[b]||"").toLowerCase()){case "pm":return"pm"}return""},onmessage:function(a,b,d){switch(this.messagefilter(a,b)){case "pm":d["X-Spam"]=!0;return}"/"==b.substr(0,1)&&(_.docommand(a,b.substr(1)),d["X-Spam"]=!0);_.panel.dirty=!0},ontip:function(a,b,d,f){_.tips+=d;_.docommand(a,"roll "+d);_.panel.dirty=!0},onenter:function(a, b){var d=_.group.statustext();d?_.chat.whisper(a,_.texts.roomrules+"\n"+d):_.chat.whisper(a,_.texts.roomrules)},onleave:function(a,b){_.registeruser(a)},tipoptions:function(a){},ondrawpanel:function(a,b){this.ondraw(a);for(var d=0,f={},e=1;3>=e;e++){var h=_.panel.rows[e]||{value:""};h.name&&(f["row"+e+"_label"]=h.name,d=e);f["row"+e+"_value"]=h.value}f.template=["3_rows_11_21_31","3_rows_12_21_31","3_rows_12_22_31","3_rows_of_labels"][d];return f},onloop:function(){_.timers.update();_.group.update()}, ondraw:function(a){_.group.running?(this.panelrow(1,"Amber",_.tips),this.panelrow(2,"Show",_.timers.currentjartime()),this.panelrow(3,"Buyin ")):_.timers.currenttask?(this.panelrow(1,"Amber",_.tips),this.panelrow(2,_.timers.currentname()+": ",_.timers.currentjartime())):(this.panelrow(1,"Amber",_.tips),this.panelrow(2,_.timers.currentname()+": ",_.timers.currentjartime()),this.panelrow(3,"/board: ",_.pricelist.boardcount()+"/"+_.pricelist.prizecount()))},panelrow:function(a,b,d){_.panel.rows[a]={name:b, value:d}}};return new a}();_.hassubcommands=function(a){for(var c in a)if("_"!=c.substr(0,1))return!0;return!1}; _.docommand=function(a,c){var b={text:c||"",pos:0,word:"",commands:[],arg:"",args:null,cur:null,user:a,broadcast:!1},d=_.commands;do b.cur=d,_.getnextword(b,!0),d=d[b.word]||d[_.shortcuts[b.word]];while(d);b.arg=b.word+_.optional(" ",b.text.substr(b.pos));if((d=b.cur)&&_.isfunction(d._value)){b.args=[b];if(d._params)for(var f=_.toarray(d._params),e=0;e<f.length;e++){var h=e==f.length-1?b.word+_.optional(" ",b.text.substr(b.pos)):b.word;if(!h){_.chat.whisper(a,b.text+" failed. arg "+f[e]+" is missing\n"); f=f?_.optional(" {",1<f.length?f.join("} {"):f,"}"):"";_.chat.whisper(a,"Usage: "+b.commands.join(" ")+f);return}b.args.push(h);_.getnextword(b,!1)}a.rights>=(d._rights||0)&&d._value.apply(b,b.args)}};_.getnextword=function(a,c){var b="";c&&a.word&&a.commands.push(a.word);a.word="";for(a.pos;a.pos<a.text.length;a.pos++)switch(b=a.text.charAt(a.pos).toLowerCase(),b){case " ":a.pos+=1;if(a.word)return a;break;default:a.word+=b}return a};_.collection=function(){this.items={};this.map=[]}; _.collection.prototype={add:function(a){var c=this.map.length;a.id=c;this.items[_.lcase$(a.name)]=a;return this.map[c]=a},get:function(a){a&&a.id?a=a.id:a&&a.user&&(a=a.user);a=_.lcase$(a);return this.map[a]||this.items[a]||null},foreach:function(a){_.foreach(this.items,a)}};_.format=function(a,c){return(a||"").replace(/\{(\w*)\}/gi,function(a,d){return c[d]||""})};_.length=function(a){return _.isarray(a)?a.length:a?1:0};_.log=function(a,c){return Math.log(a)/Math.log(c||10)}; _.random=function(a){return Math.floor(Math.random()*a)+1};_.val=function(a){return _.isfunction(a)?a():a};_.isarray=function(a){return!(!a||a.constructor!=Array)};_.isobject=function(a){return!(!a||a.constructor!=Object)};_.isfunction=function(a){return!(!a||a.constructor!=Function)};_["default"]=function(a,c){return null!=a?a:c};_.round=function(a,c){return Number(Math.round(a+"e"+c)+"e-"+c)};_.cint=function(a){return Math.round(a||0)};_.toarray=function(a){return _.isarray(a)?a:a?[a]:null}; _.leftpad=function(a,c,b){a=String(a);return a.length>=b?a:Array(b-a.length+1).join(c)+a};_.lcase$=function(a){return(""+(a||"")).toLowerCase()};_.foreach=function(a,c){if(a)if(_.isarray(a))for(var b=0;b<a.length;b++)c(a[b],b);else for(b in a)c(a[b],b)};_.formattime=function(a){return Math.floor(a/60)+":"+_.leftpad(a%60,"0",2)};_.fillarray=function(a,c,b,d){c=c||0;end=b?a.length:c+b;for(var f=c;f<c+b;f++)a[f]=_.val(d)}; _.sum=function(a,c){var b=0;c=c||a.length;for(var d=0;d<Math.min(a.length,c);d++)b+=a[d];return b};_.shallowclone=function(a){var c=_.isarray(a)?[]:{};_.foreach(a,function(a,d){c[d]=a});return c};_.optional=function(a,c,b){var d="";a&&c&&(d+=a+c);b&&c&&(a||(d+=c),d+=b);return d};_.findrank=function(a,c){for(var b=0,d=0;d<a.length&&!(a[d]>c);d++)b=d;return b}; _.getjsonvalue=function(a,c,b){if(!c)return a;if(a){if(void 0!==a[c])return a[c];b=b||".";c=c.replace("[",".").replace("]","");for(c=c.split(b);0<c.length;)return a[c[0].toLowerCase()];return a}};_.jsonvalues=function(a,c){var b=[],d;for(d in a){var f=a[d][c];f&&b.push(f)}return b};_.randomizearray=function(a){for(var c=0;c<a.length;c++){var b=_.random(a.length)-1,d=a[c];a[c]=a[b];a[b]=d}return a}; _.enumeratecombinations=function(a,c,b){for(var d=0;d<=c;d++)ar[index]=d,1<d&&2<a?_.enumeratecombinations(a-1,d-1,b):b(ar),d--};_.enumeratedicecombinations=function(a,c,b){if(a.length==c)return a;var d=_.sum(a,5);_.enumeratecombinations(bonusdice,c,function(f){for(var e=0,h=_.shallowclone(a),g=d,e=0;e<f.length&&f[e];e++)h[f[e]]=a[c+e],g-=a[c-f[e]],g+=a[c+e];b(h,g)})}; _.dice=function(a,c,b){var d=this;this.roll(a,c);b?this.findspecialroll(b):(this.rolltype="",this.dice=this.sorted.length>a?this.sorted.slice(0,a):this.sorted);this.sum=_.sum(this.dice);this.text="";_.foreach(this.sorted,function(a){d.text+=_.texts.diceprefix+a+" "})}; _.dice.prototype={dice:null,original:null,sorted:null,sum:0,name:"",roll:function(a,c){var b=[];_.fillarray(b,0,(a||0)+(c||0),function(){return _.random(6)});this.original=_.shallowclone(b);this.sorted=b.sort(function(a,c){return c-a});this.dicecount={};_.fillarray(this.dicecount,1,6,0);for(var d=0;d<b.length;d++)this.dicecount[b[d]]++},findhighestset:function(a,c){for(var b=6;1<=b;b--)if(this.dicecount[b]>=a)return b;return 0},matchpattern:function(a){var c=this.sorted,b=0;for(patternindex=a.length- 1;0<=patternindex;patternindex--)for(;;){if(b>=c.length)return!1;if(c[b]==a[patternindex]){b++;break}b++}return!0},findspecialroll:function(a){this.dice=[];(a=this.findhighestset(5))?(_.fillarray(this.dice,0,5,a),this.name="5 of a kind",this.group=0):this.matchpattern([2,3,4,5,6])?(this.dice=[2,3,4,5,6],this.name="high street",this.group=0):this.matchpattern([1,2,3,4,5])?(this.dice=[1,2,3,4,5],this.name="low street",this.group=0):(this.dice=this.sorted.slice(0,5),this.group=_.sum(this.dice),this.name= "regular")}}; _.timers=function(){var a=function(){};a.prototype={paused:!1,auto:!1,taskjar:0,activetask:null,tasks:null,leveljar:0,level:0,templevel:0,templeveljar:0,levels:[{name:"----",jarstart:0,jarend:0,tokenspermin:0},{name:"Topless",onenter:"Topless",onleave:"Topless tip jar is empty",jarstart:500,jarend:0,tokenspermin:15},{name:"Naked",onenter:"Naked",onleave:"Naked tip jar is empty",jarstart:1E3,jarend:500,tokenspermin:15},{name:"Ohmibod",onenter:"Ohmibod",onleave:"Ohmibod tip jar is empty",jarstart:1500, jarend:1E3,tokenspermin:30},{name:"Cumshow",onenter:"Cumshow",onleave:"Cumshow is over",jarstart:3E3,jarend:0,tokenspermin:60}],initialize:function(){var a=null;_.foreach(this.levels,function(b){a&&(a.nextleveljarstart=b.jarstart);a=b});this.clearjar();this.cleartasks()},currentname:function(){return this.activetask?this.activetask.name:this.currentlevel().name},currentjar:function(){return this.activetask?Math.floor(this.taskjar):Math.floor(this.leveljar-this.currentlevel().jarend)},currentjartime:function(){var a= null,b=0;this.activetask?(a=this.activetask,b=this.taskjar):(a=this.currentlevel(),b=this.leveljar-a.jarend);return 0<b&&a.tokenspermin?_.formattime(Math.floor(60*b/a.tokenspermin)):""},nextlevel:function(){return this.level<this.levels.length?this.levels[this.level]:null},nextlevelname:function(){var a=this.nextlevel();return a?a.name:""},nextleveljar:function(){var a=this.nextlevel();return a?Math.floor(a.jarstart-this.leveljar):""},clearjar:function(){this.leveljar=this.level=0;_.panel.dirty=!0}, cleartasks:function(){this.tasks=[];this.activetask&&this.stoptask();_.panel.dirty=!0},addtask:function(a,b,d,f,e){this.tasks.push({name:a,jar:b,tokenspermin:d,foruser:f,action:e});_.chat.think("New task: "+a)},inserttask:function(a,b,d){this.tasks.unshift({name:a,jar:b,tokenspermin:d});_.chat.think("New task: "+a)},starttask:function(){this.paused?_.chat.think("Timers are paused. Use unpause to continue"):this.activetask?_.chat.think("Task "+this.activetask.name+" is still running"):this.tasks.length? (this.activetask=this.tasks.shift(),this.taskjar=_.cint(this.activetask.jar),_.chat.shout("Starting "+this.activetask.name),_.panel.dirty=!0):_.chat.think("No tasks to start")},skiptask:function(){if(this.activetask)this.stoptask();else if(this.tasks.length){var a=this.tasks.shift();_.chat.think("Skipping task "+a.name);this.listtasks(!0)}else _.chat.think("No tasks to skip")},stoptask:function(){this.activetask&&_.chat.think("Task "+this.activetask.name+" is finished");this.activetask=null;this.taskjar= 0;this.listtasks(!0);_.panel.dirty=!0},listtasks:function(a){0==this.tasks.length?_.chat.think("There are no tasks waiting"):(_.chat.think("There are "+this.tasks.length+" tasks waiting"),a?_.chat.think("Next task: "+this.tasks[0].name):_.foreach(this.tasks,function(a,c){_.chat.think("#"+(1+_.cint(c))+": "+a.name)}))},currentlevel:function(){return this.levels[this.level]},update:function(){if(!this.paused&&(this.activetask&&(this.taskjar-=this.activetask.tokenspermin/60,0>=this.taskjar&&(this.stoptask(), this.pause&&this.starttask()),_.panel.dirty=!0),0!=this.level||0!=this.leveljar)){var a=this.currentlevel();0<this.leveljar&&(this.leveljar-=a.tokenspermin/60);this.activetask||(this.leveljar<=a.jarend?0<this.level?(a.onleave&&_.chat.shout(a.onleave),this.level--):this.clearjar():this.leveljar>a.nextleveljarstart&&(this.level++,a=this.currentlevel(),a.onenter&&_.chat.shout(a.onenter)));_.panel.dirty=!0}},filljar:function(a){this.activetask&&(this.taskjar+=_.cint(a));this.leveljar+=_.cint(a)},pause:function(){this.paused= !0;_.chat.think("Pausing tip jar")},unpause:function(){this.paused=!1;_.chat.think("Unpausing tip jar")}};return new a}(); _.boardlayouts={30:[{slot:"5",prizetable:[75,25,0,0,0,0,0]},{slot:"6",prizetable:[75,25,0,0,0,0,0]},{slot:"7",prizetable:[75,25,0,0,0,0,0]},{slot:"8",prizetable:[75,25,0,0,0,0,0]},{slot:"9",prizetable:[75,25,0,0,0,0,0]},{slot:"10",name:"PM"},{slot:"11",prizetable:[50,50,0,0,0,0,0]},{slot:"12",prizetable:[50,50,0,0,0,0,0]},{slot:"13",prizetable:[50,50,0,0,0,0,0]},{slot:"14",prizetable:[50,50,0,0,0,0,0]},{slot:"15",prizetable:[25,50,25,0,0,0,0]},{slot:"16",prizetable:[25,50,25,0,0,0,0]},{slot:"17", prizetable:[20,50,25,5,0,0,0]},{slot:"18",prizetable:[15,50,25,10,0,0,0]},{slot:"19",prizetable:[15,50,25,10,0,0,0]},{slot:"20",name:"roll dice"},{slot:"21",prizetable:[0,50,25,25,0,0,0]},{slot:"22",prizetable:[0,49,25,25,1,0,0]},{slot:"23",prizetable:[0,49,25,25,1,0,0]},{slot:"24",prizetable:[0,49,25,25,1,0,0]},{slot:"25",prizetable:[0,49,25,25,1,0,0]},{slot:"26",prizetable:[0,24,50,25,1,0,0]},{slot:"27",prizetable:[0,20,50,25,5,0,0]},{slot:"28",prizetable:[0,20,50,25,5,0,0]},{slot:"29",prizetable:[0, 15,50,25,10,0,0]},{slot:"30",prizetable:[0,15,50,25,10,0,0]}]};_.board=function(a,c){this.layout=_.boardlayouts[c];this.pricelist=a;this.pricecount=0;var b=this;_.foreach(this.layout,function(a,c){a.prizetable&&(b.prizecount+=1)});this.reset()}; _.board.prototype={layout:null,slots:null,pricelist:null,pricemap:null,priceranks:[15,25,50,100,250,500],rankedprizes:null,rankedprizepointers:null,prizecount:0,woncount:0,boardjar:0,reset:function(){var a=this;this.rankedprizes=[];this.pricemap=[];_.fillarray(this.pricemap,0,500,0);this.rankedprizepointers=[];this.slots={};for(var c=this.woncount=0;c<this.layout.length;c++){var b=this.layout[c];a.pricemap[b.slot]=_.cint(b.slot);this.slots[b.slot]={slot:b.slot,hidden:!0,item:null,prizetable:b.prizetable}}for(c= 0;c<this.priceranks.length;c++)this.rankedprizes[c]=[];_.foreach(this.pricelist.items,function(b){var c=b.price,e=a.slots[c];a.pricemap[c]=_.cint(c);e?e.prizetable||(e.item=b,e.hidden=!1):a.slots[c]={slot:c,hidden:!1,item:b};c=_.findrank(a.priceranks,c);for(e=0;e<(b.maxcount||1);e++)a.rankedprizes[c].push(b)});for(c=0;c<this.rankedprizes.length;c++)this.rankedprizepointers[c]=0,this.rankedprizes[c]=_.randomizearray(this.rankedprizes[c])},randomrank:function(a){for(var c=_.random(100)-1,b=0;b<a.length;b++)if(c-= a[b],0>c)return b},rollprize:function(a){a=this.slots[a];var c=this.randomrank(a.prizetable);this.rankedprizepointers[c]>=this.priceranks[c].length&&(this.rankedprizepointers[c]=0);a.item=this.rankedprizes[c][this.rankedprizepointers[c]];this.rankedprizepointers[c]++;a.hidden=!1;this.woncount+=1;return a},showboard:function(a){var c=["Current board"];_.foreach(this.slots,function(a){5<=a.slot&&30>=a.slot&&c.push(a.slot+": "+(a.hidden?"Hidden":(a.prizetable?"Won: ":"")+a.item.name))});c.push();c.push("Type /game for game description"); _.chat.broadcast(a,c)},findslot:function(a){for(var c=500>=a?a:this.pricemap.length-1;0<c;c--){var b=this.pricemap[c];if(b<=a&&(b=this.slots[b])&&(!b.prizetable||b.hidden))return b}return null}}; _.pricelist=function(){var a=function(){};a.prototype={board:null,items:[{name:"kiss",price:2},{name:"smile",price:3},{name:"show tongue",price:4},{name:"wink",price:5},{name:"lick lips",price:6},{name:"PM",price:10,fixed:!0},{name:"twirl",price:14},{name:"hand bra",price:15},{name:"roll dice",text:"roll dice",action:"dice",dice:5,min:1,price:20,fixed:!0,game:!0},{name:"flash boobs",price:24},{name:"ask question",price:26},{name:"spank ass by hand",action:"amount",min:10,increase:10,max:40,ppa:20, base:11,price:31},{name:"spank boobs",action:"amount",min:5,increase:5,ppa:20,max:20,base:12,price:32},{name:"spank pussy",action:"amount",min:5,increase:5,ppa:20,max:20,base:13,price:33},{name:"lick and suck finger",action:"amount",min:1,ppa:20,max:4,base:14,price:34},{name:"spank ass with whip",action:"amount",min:10,increase:10,max:40,ppa:20,base:15,price:35},{name:"request song",price:36},{name:"pinch nipples",price:37},{name:"flash pussy",price:38},{name:"lick nipples",price:39},{name:"roll dice twice", text:"roll dice twice",action:"dice",dice:5,min:2,price:40},{name:"show feet",action:"duration",min:1,max:10,ppa:30,base:11,price:41},{name:"lick and suck toy",action:"duration",min:1,max:5,ppa:30,base:14,price:44},{name:"naked",action:"duration",min:1,max:10,ppa:30,base:15,price:45},{name:"shake ass",price:47},{name:"roll dice +1",action:"dice",text:"roll dice (+1 bonus dice, best 5 counts)",dice:6,min:1,price:50,game:!0},{name:"spank ass by hand",action:"amount",min:20,increase:10,max:40,ppa:20, base:11,price:51},{name:"spank boobs",action:"amount",min:10,increase:5,ppa:20,max:20,base:12,price:52},{name:"spank pussy",action:"amount",min:10,increase:5,ppa:20,max:20,base:13,price:53},{name:"lick and suck finger",action:"amount",min:2,ppa:20,max:4,base:14,price:54},{name:"spank ass with whip",action:"amount",min:20,increase:10,max:40,ppa:20,base:15,price:55},{name:"ask naughty question",price:25},{name:"show feet",action:"duration",min:2,max:10,ppa:30,base:11,price:71},{name:"show feet in high heels", action:"duration",min:1,max:10,ppa:30,base:43,price:73},{name:"lick and suck toy",action:"duration",min:2,max:5,ppa:30,base:14,price:74},{name:"naked",action:"duration",min:2,max:10,ppa:30,base:15,price:75},{name:"roll dice +2",action:"dice",text:"roll dice (+2 bonus dice, best 5 counts)",dice:7,min:1,price:90,game:!0},{name:"roll dice +1 twice",action:"dice",text:"roll dice twice (+1 bonus dice, best 5 counts)",dice:6,min:2,price:100,game:!0},{name:"spank ass by hand",action:"amount",min:40,increase:10, max:40,ppa:20,base:11,price:91},{name:"spank boobs",action:"amount",min:20,increase:5,ppa:20,max:20,base:12,price:92},{name:"spank pussy",action:"amount",min:20,increase:5,ppa:20,max:20,base:13,price:93},{name:"lick and suck finger",action:"amount",min:4,ppa:20,max:4,base:14,price:94},{name:"spank ass with whip",action:"amount",min:40,increase:10,max:40,ppa:20,base:15,price:95},{name:"show feet in high heels",action:"duration",min:2,max:10,ppa:30,base:43,price:103},{name:"naked",action:"duration", min:3,max:10,ppa:30,base:15,price:105},{name:"all video's",action:"",price:111},{name:"lick and suck toy",action:"duration",min:4,max:5,ppa:30,base:14,price:144},{name:"naked",action:"duration",min:4,max:10,ppa:30,base:15,price:145},{name:"dance",action:"duration",min:4,max:10,ppa:30,base:30,price:150},{name:"striptease",action:"duration",min:4,max:10,ppa:30,base:31,price:151},{name:"tease",action:"duration",min:4,max:10,ppa:30,base:32,price:152},{name:"naked",action:"duration",min:5,max:10,ppa:30, base:15,price:175},{name:"roll dice +2 twice",action:"dice",text:"roll dice twice (+2 bonus dice, best 5 counts)",dice:7,min:2,price:175,game:!0},{name:"become my pet today",price:199},{name:"PM CBT",text:"PM Instruction [CBT]",action:"pm",min:10,base:44,ppa:20,price:244},{name:"PM SPH",text:"PM Instruction [SPH]",action:"pm",min:10,base:45,ppa:20,price:245},{name:"PM EDGE",text:"PM Instruction [EDGE]",action:"pm",min:10,base:46,ppa:20,price:246},{name:"PM RUINED",text:"PM Instruction [RUINED]",action:"pm", min:10,base:47,ppa:20,price:247},{name:"PM JOI",text:"PM Instruction [JOI]",action:"pm",min:10,base:48,ppa:20,price:248},{name:"roll dice +2 three times",action:"dice",text:"roll dice three times (+2 bonus dice, best 5 counts)",min:7,price:250,game:!0},{name:"PM-CAM CBT",text:"PM Instruction [CBT] watching CAM",action:"pm",min:10,base:44,ppa:25,price:294},{name:"PM-CAM SPH",text:"PM Instruction [SPH] watching CAM",action:"pm",min:10,base:45,ppa:25,price:295},{name:"PM-CAM EDGE",text:"PM Instruction [EDGE] watching CAM", action:"pm",min:10,base:46,ppa:25,price:296},{name:"PM-CAM RUINED",text:"PM Instruction [RUINED] watching CAM",action:"pm",min:10,base:47,ppa:25,price:297},{name:"PM-CAM JOI",text:"PM Instruction [JOI] watching CAM",action:"pm",min:10,base:48,ppa:25,price:298},{name:"PM-CAM Fetish",text:"PM Instruction [FETISH] watching CAM",action:"pm",min:10,base:49,ppa:25,price:299},{name:"clear board",action:"clear board",text:"Clear board and add 100 bonus tokens to the jar",price:300,jarbonus:100,game:!0},{name:"CAM CBT", text:"Instruction in Limitcam (C2C) [CBT]",action:"limitcam",min:10,base:50,ppa:45,price:495},{name:"CAM SPH",text:"Instruction in Limitcam (C2C) [SPH]",action:"limitcam",min:10,base:51,ppa:45,price:496},{name:"CAM EDGE",text:"Instruction in Limitcam (C2C) [EDGE]",action:"limitcam",min:10,base:52,ppa:45,price:497},{name:"CAM RUINED",text:"Instruction in Limitcam (C2C) [RUINED]",action:"limitcam",min:10,base:53,ppa:45,price:498},{name:"CAM JOI",text:"Instruction in Limitcam (C2C) [JOI]",action:"limitcam", min:10,base:54,ppa:45,price:499}],describe:function(a){var b=a.text||a.name;switch((a.action||a.name).toLowerCase()){case "text":b+=" for "+a.min+" times";break;case "duration":b+=" for "+a.min+" minutes";break;case "limitcam":b+=" for "+a.min+" minutes"}return b},initialize:function(){this.board=new _.board(this,"30");this.reset();return this},reset:function(){this.board.reset()},showboard:function(a){this.board.showboard(a)},showpricelist:function(a){var b=this,d=[];d.push("Keno board: 5-30 tokens"); _.foreach(this.items,function(a){(30<a.price||a.fixed)&&d.push(b.describe(a)+": "+a.price+" tokens")});_.chat.broadcast(a,d)},buyprize:function(a,b,d,f){var e=!1,h=!1,g=this.board.findslot(b);!(5>b)&&_.gameisrunning&&30>=b&&(g.item?f?e=!0:g.prizetable&&(h=e=!0):(g=this.board.rollprize(g.slot),e=!0));g&&g.item&&!h?(this.doprize(a,g,d,e),b-=g.slot,5<=b&&this.buyprize(a,b,d,f)):e?(_.chat.shout("No prize is won."),_.chat.shout(_.texts.tiphints)):(_.chat.shout("No prize selected. Bonus "+Math.floor(b/ 2)+" tokens are added to the tip jar."),_.chat.shout(_.texts.tiphints),_.timers.filljar(Math.floor(b/2)))},doprize:function(a,b,d,f){var e=b.item,h=this.describe(e),g=(e.action||e.name).toLowerCase();switch(g){default:f?_.chat.shout(a.name+" wins #"+b.slot+": "+h):_.chat.shout(a.name+" tips for "+h)}g=(e.action||e.name).toLowerCase();switch(g){case "duration":case "limitcam":_.timers.addtask(h,e.min*e.ppa,e.ppa,a,g);break;case "dice":for(b=0;b<e.min;){f=new _.dice(5,e.dice-5,this.board);if(20!=f.sum)switch(_.chat.shout(f.text), f.name){case "5 of a kind":break;case "low street":break;case "high street":break;default:this.buyprize(a,f.sum,d,!0)}b++}}this.boardcount()==this.prizecount()&&(_.chat.shout("Board cleared. 250 bonus tokens are added to the tipjar"),_.docommand(a,"filljar 250"),this.reset())},makegameprizelist:function(){},getprice:function(a,b){},createprice:function(a,b){},boardcount:function(){return this.board.woncount},prizecount:function(){return this.board.prizecount}};return(new a).initialize()}(); _.group=function(){var a=function(){};a.prototype={running:!1,rank:3,statustext:function(){if(this.running)return _.texts.showstart[this.rank]},camstarttext:function(){return _.texts.showstart[this.rank]},start:function(a){if(this.running)return _.chat.debug("Camshow is already running"),!1;this.rank=a||this.rank;this.running=!0;_.cam.start(this.camstarttext());this.updateshow();return!0},stop:function(){this.running=!1;_.cam.running()&&_.chat.shout(_.texts.showend);this.rank=3;_.cam.stop();this.clearusers()}, checkuseraccess:function(a){return 8==this.rank?a.ticket:a.rank>=this.rank?!0:!1},updateuser:function(a){if(_.cam.running()){var b=this.checkuseraccess(a);b!=a.inshow&&(b&&!_.cam.hasaccess(a.name)?(_.chat.think(a.name+" has joined the show"),_.cam.adduser(a.name)):_.cam.removeuser(a.name));a.inshow=b}},updateshow:function(){var a=this;_.cam.running()&&_.users.foreach(function(b){a.updateuser(b)})},clearusers:function(){_.users.foreach(function(a){a.inshow=!1});_.cam.clear()},update:function(){this.running&& (_.panel.dirty=!0)}};return new a}();_.users=new _.collection;_.users.hsp=null;_.users.mvp=null;_.users.toprank=null;_.users.topscores=function(a){var c=[];this.foreach(function(a){500<=a.score&&c.push(a)});c=c.sort(function(a,c){return a.score-c.score});return c=c.slice(0,a)};_.users.topdaily=function(a){var c=[];this.foreach(function(a){a.amount&&c.push(a)});c=c.sort(function(a,c){return a.amount-c.amount});return c=c.slice(0,a)}; _.users.topsingle=function(a){var c=[];this.foreach(function(a){a.hightip&&c.push(a)});c=c.sort(function(a,c){return a.hightip-c.hightip});return c=c.slice(0,a)};_.users.exportdata=function(){var a=[];this.foreach(function(c){500<=c.score&&a.push(c.exportdata())});return a.join("|")}; _.users.importdata=function(a){if(!a)return _.chat.debug("No data to import"),!0;try{var c=a.split("|");_.foreach(c,function(a){if(a){var b=a.split(",");(a=_.users.get(b[0]))||(a=_.users.add(new _.user(b[0])));a.name=b[0];a.rank=b[1];a.score=b[2];a.totalamount=b[3];if(b=a.amount){a.amount=0;var c=a.lasttip;a.addtip(b);a.lasttip=c}a.update()}});_.chat.debug("Data import succesful");return!0}catch(b){return _.chat.debug("Error in data import"),!1}};_.grey=0;_.pay0=1;_.pay1=2;_.pay2=4;_.pay3=8; _.fan=16;_.mod=32;_.admin=64;_.uber=128;_.rankname=function(a){return _.ranknames[a]||"rank "+a};_.user=function(a){this.name=a}; _.user.prototype={name:"",amount:0,hightip:0,lasttip:0,totalamount:0,score:0,whispers:[],rights:0,rank:0,ticket:!1,inshow:!1,ranknames:_.ranknames,rankscore:_.rankscores,active:!1,update:function(){var a=this===_.users.toprank?_.highrank:_.findrank(this.rankscore,this.score);2>=a&&(a=this.rights>=_.fan||0<this.amount?2:0<this.rights?1:0);a!=this.rank&&(this.rank=a);2E3<=this.score&&(!_.users.toprank||this.score>_.users.toprank.score)&&(_.users.toprank=this);if(!_.users.mvp||this.amount>_.users.mvp.amount)_.users.mvp= this;this.lasttip>this.hightip&&(!_.users.hsp||this.lasttip>_.users.hsp.hightip)&&(_.users.hsp=this);_.group.updateuser(this)},addtip:function(a){this.lasttip=a||0;this.amount+=a;this.totalamount+=a;this.score+=a;this.update()},addticket:function(){this.ticket=!0;this.update()},removeticket:function(){this.ticket=!1;this.update()},groupname:function(){return _.groupname(this.rights)},checkrights:function(a){return!!(a&this.rights)},checkminrights:function(a){return a>=this.rights},info:function(){var a= this.name+" #"+this.id+_.optional(" (",this.amount+"/"+this.score+")");2<this.rank&&(a+=" "+_.rankname(this.rank));this.ticket&&(a+=" ticket");return a},exportdata:function(){return this.name+","+this.rank+","+this.score+","+this.totalamount}}; _.registeruser=function(a){var c=a.user||a.from_user;if(!c)return new _.user("unknown");var b=_.users.get(c);b||(b=_.users.add(new _.user(c)),b.name=c,b.amount=0,b.lasttip=0);b.rights=_.userrights(a);b.isadmin=_.isadmin(c);b.isfan=a.in_fanclub;b.ismod=a.is_mod;b.active=!0;b.addtip(a.amount||0);return b};_.finduser=function(a){return a?_.users.get(a)||_.users.get(a.name||a.user||a.from_user):null};_.isadmin=function(a){return cb.room_slug===a}; (function(){var a=new _.user(cb.room_slug);a.isadmin=!0;a.update();_.users.add(a)})();_.userrights=function(a){if(!a)return 0;var c;c=0+(a.has_tokens?_.pay0:0);c+=a.tipped_recently?_.pay1:0;c+=a.tipped_alot_recently?_.pay2:0;c+=a.tipped_tons_recently?_.pay3:0;c+=a.in_fanclub?_.fan:0;c+=a.is_mod?_.mod:0;return c+=_.isadmin(a.user||a.from_user)?_.admin:0}; _.groupname=function(a){switch(a){case _.grey:return"";case _.pay0:return"darkpurple";case _.pay1:return"lightpurple";case _.pay2:return"darkblue";case _.fan:return"green";case _.mod:return"red"}}; _.commands={help:{_params:null,_help:"Show command list",_shortcut:"h",_value:function(a,c){var b=_.getjsonvalue(_.commands,c," "),d=a.user,f=[];b._help&&f.push(b._help);_.hassubcommands(b)&&_.foreach(b,function(a,b){if("_"!=b.substr(0,1)){var c=_.commands[b];if(d.rights>=(c._rights||0)){var k=_.toarray(c._params),k=k?_.optional(" {",1<k.length?k.join("} {"):k,"}"):"";f.push("/"+b+k+" - "+c._help)}}});_.chat.whisper(d,f)}},users:{_shortcut:"u",_rights:_.mod,_help:"Shows user list",_value:function(a){var c= [];_.users.foreach(function(a){c.push(a.info())});_.chat.whisper(a.user,c)}},topscores:{_rights:_.mod,_help:"Shows highest ranked",_value:function(a){var c=[];_.foreach(_.users.topscores(10),function(a,d){c.push("#"+(d+1)+": "+a.name+" ("+a.score+")")});_.chat.whisper(a.user,c)}},topdaily:{_rights:_.mod,_help:"Shows highest tippers",_value:function(a){var c=[];_.foreach(_.users.topdaily(10),function(a,d){c.push("#"+(d+1)+": "+a.name+" ("+a.amount+")")});_.chat.whisper(a.user,c)}},topsingle:{_rights:_.mod, _help:"Shows highest single tippers",_value:function(a){var c=[];_.foreach(_.users.topsingle(10),function(a,d){c.push("#"+(d+1)+": "+a.name+" ("+a.hightip+")")});_.chat.whisper(a.user,c)}},userinfo:{_params:"user",_rights:_.mod,_help:"Shows user details",_value:function(a,c){var b=_.finduser(c);if(!b)return _.chat.whisper(a.user,_.format(_.texts.usernotexists,{userid:c}));_.chat.whisper(a.user,b.info())}},rules:{_help:"Lists the room rules",_value:function(a){_.chat.alert(_.texts.roomrules)}},prizes:{_help:"Shows full tip list", _value:function(a){_.pricelist.showpricelist(a.user)}},roll:{_params:["amount"],_rights:_.settings.debug?_.pay0:_.mod,_help:"Tip amount as user",_value:function(a,c,b){if(0>=c)return _.chat.whisper(a.user,"Tip amount should be at least 1 token");_.pricelist.buyprize(a.user,c,"room");_.timers.filljar(Math.floor(c/2))}},resetboard:{_params:null,_help:"Resets the board",_value:function(a){_.pricelist.reset()}},board:{_params:null,_help:"Show the board",_value:function(a){_.pricelist.showboard(a.user)}}, tasklist:{_rights:_.mod,_help:"List tasks",_value:function(a,c,b){_.timers.listtasks()}},clear:{_rights:_.mod,_help:"Clear all tasks",_value:function(a,c,b){_.timers.cleartasks()}},addtask:{_params:["duration","task"],_rights:_.mod,_help:"Add task",_value:function(a,c,b){if(0>=c)return _.chat.whisper(a.user,"Duration should be at least 1 second");_.timers.addtask(b,b,30)}},next:{_rights:_.mod,_help:"Start next task",_value:function(a){_.timers.stoptask();_.timers.starttask()}},skip:{_rights:_.mod, _help:"Skip next task",_value:function(a){_.timers.skiptask()}},stop:{_rights:_.mod,_help:"Stop current task",_value:function(a,c,b){_.timers.stoptask()}},filljar:{_params:"minutes",_rights:_.mod,_help:"Fills jar with tokens",_value:function(a,c){_.timers.filljar(c)}},pause:{_rights:_.mod,_help:"Pause jar timers",_value:function(a){_.timers.pause()}},unpause:{_rights:_.mod,_help:"Unpause jar timers",_value:function(a){_.timers.unpause()}},auto:{_rights:_.mod,_help:"Turn auto tasks on",_value:function(a){_.timers.auto= !0;!_.timers.paused&&_.timers.activetask&&_.timers.starttask()}},unauto:{_rights:_.mod,_help:"Turn auto tasks off",_value:function(a){_.timers.auto=!1}},shortcuts:{_params:null,_help:"Show shortcut list",_value:function(a){_.foreach(_.shortcuts,function(c,b){a.user.rights>=(c._rights||0)&&_.chat.whisper(a.user,"/"+key+": "+c.name)})}},camstart:{_rights:_.mod,_help:"Start limit cam",_value:function(a){_.group.start()}},camstop:{_rights:_.mod,_help:"Stop limit cam",_value:function(a){_.group.stop()}}, ticketadd:{_params:"user",_rights:_.mod,_help:"Gives user a ticket for next or current show",_value:function(a,c){var b=_.finduser(c);if(!b)return _.chat.whisper(a.user,_.format(_.texts.usernotexists,{userid:c}));b.addticket()}},ticketdel:{_params:"user",_rights:_.mod,_help:"Removes ticket from user",_value:function(a,c){var b=_.finduser(c);if(!b)return _.chat.whisper(a.user,_.format(_.texts.usernotexists,{userid:c}));b.removeticket()}},ticketclear:{_rights:_.mod,_help:"Clear all tickets",_value:function(a){_.users.foreach(function(a){a.removeticket()})}}, ticketstart:{_rights:_.mod,_help:"Start ticket show",_value:function(a){_.group.start(8)}},ticketstop:{_rights:_.mod,_help:"Stop ticket show",_value:function(a){_.group.stop()}},exportdata:{_rights:_.mod,_help:"Export data",_value:function(a){_.chat.debug(_.users.exportdata())}},importdata:{_params:"data",_rights:_.mod,_help:"Export data",_value:function(a,c){_.users.importdata(c)}},debugboard:{_rights:_.mod,_value:function(){_.foreach(_.boardlayouts,function(a,c){var b=0;_.foreach(a,function(a,f){var e= a.prizetable;if(_.isarray(e)){a.total=e[0]/100*7.5+e[1]/100*5+e[2]/100*12.5+e[3]/100*25+e[4]/100*75+e[5]/100*125+e[6]/100*250;for(var h=0,g=0;g<e.length;g++)h+=e[g];100!=h&&_.chat.debug("Board/prize "+c+":"+e.roll+" total prizes "+h)}else a.total=f;b+=a.total});_.chat.debug("Board "+c+": "+Math.round(b)+" tokens worth of prizes on average")})}}}; (function(){cb.onMessage(function(a){var c=_.registeruser(a);_.app.onmessage(c,a.m||"",a)});cb.onTip(function(a){if(_.isadmin(a.to_user)){var c=_.registeruser(a);_.app.ontip(c,a.m||"",a.amount,a)}});cb.onEnter(function(a){_.app.onenter(_.registeruser(a),a)});cb.onLeave(function(a){_.app.onleave(_.registeruser(a),a)});cb.tipOptions(function(){_.app.tipoptions()});cb.onDrawPanel(function(a){return _.app.ondrawpanel(_.registeruser(a),a)});_.programloop=function(a){a==_.loopindex&&(_.initialized||(_.initialize(), _.initialized=!0),cb.setTimeout(function(){_.app.onloop();_.panel.dirty&&cb.drawPanel();_.panel.dirty=!1;_.programloop(a)},_.settings.drawinterval))};_.panel.dirty=!0;_.loopindex++;_.programloop(_.loopindex)})();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.