Bots Home
|
Create an App
thunder's_hightipper
Author:
thunder0808
Description
Source Code
Launch Bot
Current Users
Created by:
Thunder0808
var t=function(){function b(a){if(a&&"string"===typeof a){b.hasOwnProperty("log")||(b.log=[]);var f=/(..)(:..)(:..)/.exec(new Date),c=f[1]%12||12;b.log.push((10>c?"0"+c:c)+f[2]+f[3]+" "+(12>f[1]?"A":"P")+"M : "+a);25<b.log.length&&b.log.shift();arguments[0]="King Tipper Bot: "+a;arguments[0]=arguments[0].replace(/\+/g,"\uff0b").replace(/&/g,encodeURIComponent("&"))}b.hasOwnProperty("log")||cb.log.apply(cb,arguments)}function h(a){var b,c=0,d;a&&"string"===typeof a&&("Enable"===cb.settings.multi_line_safe&& (b=a.split(/ *\n */),c=b.length,a=b[0]),arguments[0]=("King Tipper Bot: "+a.replace(/\+/g,"\uff0b")).replace(/&/g,encodeURIComponent("&")));cb.chatNotice.apply(cb,arguments);for(d=1;d<c;d++)arguments[0]=b[d].replace(/\+/g,"\uff0b").replace(/&/g,encodeURIComponent("&")),cb.chatNotice.apply(cb,arguments)}function I(){var a="";"rubzombie"===cb.room_slug&&(a+="Psst! version: 0.16.9\nKing Tipper Bot: Psst! Keep track of your high tip king by adding a crown to the start of their messages ;)\nKing Tipper Bot: "); return a+="Psst! Settings:\n\u00a0\u00a0king: "+(d.length?d:"(un-set)")+"\n\u00a0\u00a0king tip: "+n+"\n\u00a0\u00a0crown: "+r}function J(){return"/tip "+(n+1)+", or more to "+(d.length?"replace '"+d+"' as":"become")+" the new King of High Tips, and wear the "+(r===g.a?r+" crown!":"high tip "+r)}function w(){var a=Math.floor(((new Date).getTime()-x.getTime())/6E4);if(s&&15<=a||15<=s)h(J(),"","#d5ebf8"),x=new Date,s=0;cb.setTimeout(w,6E4)}function q(){b("version: 0.16.9");cb.settings.hasOwnProperty("slot")&& (K="#"+cb.settings.slot);var a=(new Date).getTime();d=(cb.settings.king||"").toLowerCase().trim();n=cb.settings.king_tip||0;r=cb.settings.crown===y.d?g.d:cb.settings.crown===y.b?g.b:g.a;h(I(),cb.room_slug,"#f2f9fd");s=15;x=new Date((new Date).getTime()-9E5);w();q.f=0;q.j=(new Date).getTime();var f=(new Date(2014,0,31)).getTime()-(new Date).getTime();0<f&&(f+=6E4*Math.floor(60*Math.random()),f%=36E5*[1,2,3,5,7,11,13][Math.floor(7*Math.random())],b("kenoCamAd_timeout: "+f),"rubzombie"===cb.room_slug&& (f=1E4),cb.setTimeout(function(){h("Psst! Message from the author:\n"+(A?"":"\u00a0\u00a0Thanks for using my bot :)\n")+"\u00a0\u00a0If you like using Keno apps in chat,\n\u00a0\u00a0and are interested in CB's new Hidden Cam feature,\n\u00a0\u00a0you might enjoy trying out my new KenoCam app.\n\u00a0\u00a0See this bot's Description for a link ;)\nKing Tipper Bot: Psst! End of Message",cb.room_slug,"#7ef37e");A=!0},f));b("init: "+((new Date).getTime()-a)+"ms")}var y={a:"Text",b:"Glyph",d:"Graphic"}, g={a:"HTKing",b:"\u265a",d:":ktb_crown"},F=[/[^\u0000-\u0080\u00ad\u2654\u2655\u265a\u265b]/],G=[],B="dlnws chnskv cht4fr wgwgwg bst4cms lv4prty lvtrffn nd4strp prfllsn bnjknntt pssy4shw vcmsssns wlchstdt 100kstnls chnnmnwhr cmsssnscm grls4prty rgclsngsn sndtdrtch tmrqrllh1 tpgmscrck glsmtrprtl mnhndynmmr schnmnprfl schtglbntr knntjmlgckn wtchmcmgrls chbnnjngsgls dtschmtrprtl fndfrtknshck hrgldtschkrl wsnddglnpmml jckjxshrngnds kstnlsndhnrsk llrdngsnchthr mncmstjtztchn wndmrmnfrrlds dknnmnglbwchsn mprdndstrngtrk n1gnhmpgstfrtg stdnglchnnmnwhr wnnjrktwthmfrfr dsthtdstwchmmrsnd hbknfnnzllnntrssn nrnchbzckmtdntpps schfcktrffnndcmsx fdrstdnglchnnmnwhr llnfssthnmprflvnmr nynwnnjrktwthmfrfr glbdgbtsgrnchtmhrdr snddwskstnlsndglrst wsnddnnnndglndtschn chtrbtknnmndchvrgssn ftzstmgglndbrchtshrt mchvrdrcmllswshrwllt nynhrdrmstfckldrmlfs wrbckhtknnmchdjmlbschn kstnlsdtngprtlndtschlnd wnnjschtnmnprflndkntktrtmchdrt hbthrgntlchdhlfschlgschffthrvlldtn thsmnstrlysnfbtchsllngthmtfhsgrlfrnd dspmmrsndnfchzdmmvnjdmmdwrdnsgbnntndnsnstnflltdchknrfsnbldsnngwrbngrn".split(" "), K=null,A=!1,d=null,n=0,r=null,x=new Date,s=0,u=!0;return{g:q,e:y,h:function(a){var f=(new Date).getTime(),c=a.m,y=RegExp("Hail high tip \\:\\: (\\d+) \\:\\: king ([0-9a-z_]{3,}) (?="+g.a+"|"+g.b+"|"+g.d+"|:ttlb_(?:bronze|gold|silver))","g"),w=RegExp("Hail\\s+high\\s+tip\\s+\\:+\\s+[0-9OlI,\\.]+\\s+\\:+\\s+king\\s+[0-9a-z_]{3,}\\s+("+g.a+"|"+g.b+"|"+g.d+"|:ttlb_(?:bronze|gold|silver))","g"),N=RegExp("(?:"+g.a+"|"+g.b+"|"+g.d+"|:ttlb_(?:bronze|gold|silver)) \\:\\: (\\d+)(?= \\:\\: )","g"),L=RegExp("("+ g.a+"|"+g.b+"|"+g.d+"|:ttlb_(?:bronze|gold|silver))\\s+\\:+\\s+[0-9OlI,\\.]+\\s+\\:+\\s","g"),k,l=a.user,z="rubzombie"===l,v=l===cb.room_slug,p=a.is_mod,C=a.hasOwnProperty("is_pm")&&a.is_pm,M=q.hasOwnProperty("chat_count")&&15>q.f&&q.hasOwnProperty("start_time")&&2E3>f-q.j,D=/\/(kingtipperbot|ktb|#[0-3])?(crown|hail|help|log|\?)/ig,e=!1,m,H=!1,E=0;if(u)if(v||p){if(/\/(sh|sphammer|#[0-3])?(english|enonly|sphammered)/i.test(c)||/\/(sh|sphammer)(help|spam)/i.test(c))u=!1,b("SpamBlockerAd: SpHammer detected"); /\/(ngs|nogreyspammers)(help|spam|\?)/i.test(c)&&(u=!1,b("SpamBlockerAd: No Grey Spammers detected"))}else/<<<( has been SPAM HAMMERED| spHammer hit#)/.test(c)&&"#595959"===a.background&&"#999999"===a.c&&(u=!1,b("SpamBlockerAd: SpHammer detected"));if(!a["X-Spam"]&&"/"===c.trim()[0])for(;null!==(p=D.exec(c));)if(e=!0,m=(p[1]||"ktb").toLowerCase(),"ktb"===m||"kingtipperbot"===m||m===K)switch(a["X-Spam"]=!0,p[2].toLowerCase()){case "log":(v||z)&&b.hasOwnProperty("log")&&h("Log:\n\u00a0\u00a0"+b.log.join("\n\u00a0\u00a0"), l,"#f37ef3");break;case "crown":case "hail":v&&(H=!0);break;case "?":case "help":v||z?h(I()+"\nKing Tipper Bot: Psst! In-chat commands:\n\u00a0\u00a0/crown\n\u00a0\u00a0/hail - hail the current high tip king\n\u00a0\u00a0/?\n\u00a0\u00a0/help - show this message\nTo adjust settings, deactivate & re-launch bot.",l,"#f2f9fd"):h(J(),l,"#f2f9fd")}H&&null!==d&&d.length&&(a.m="Hail high tip :: "+n+" :: king "+d+" "+r,a["X-Spam"]=!1,C||(x=new Date,s=0));a["X-Spam"]||e||C||(s++,q.hasOwnProperty("chat_count")&& q.f++);if(!v&&!a["X-Spam"]&&!C&&u){z=c.replace(/[\W_]/g,"").toLowerCase();D=z.replace(/[aeiou]/g,"");m=!1;e=0;for(p=B.length;!m&&e<p&&!(D.length<B[e].length);e++)(m=-1!==D.indexOf(B[e]))&&b("SpamBlockerAd: simple match ("+e+"): "+B[e]);e=0;for(p=F.length;!m&&e<p;e++)(m=F[e].test(c))&&b("SpamBlockerAd: text match ("+e+"): "+F[e].source);e=0;for(p=G.length;!m&&e<p;e++)(m=G[e].test(z))&&b("SpamBlockerAd: plain match ("+e+"): "+G[e].source);m&&(h("Psst! Message from the author:\n"+(A?"":"\u00a0\u00a0Thanks for using my bot :)\n")+ "\u00a0\u00a0By the way, user "+l+" has just spammed your chat!\n\u00a0\u00a0You might find my spam blocker, No\u00a0Grey\u00a0Spammers, useful ;)\nKing Tipper Bot: Psst! End of Message",cb.room_slug,"#f37e7e"),u=!1,A=!0)}a["X-Spam"]||H||(v&&null!==(k=y.exec(c))&&3===k.length&&M&&(E=parseInt(k[1],10))>n&&(n=E,d=k[2].toLowerCase(),h('Psst! "'+d+'" has just been auto-crowned based on chat history.',cb.room_slug,"#f2f9fd"),b('"'+d+'" has just been auto-crowned based on chat history.')),null!==(k=N.exec(c))&& 2===k.length&&M?(E=parseInt(k[1],10))>n&&(n=E,d=l.toLowerCase(),h('Psst! "'+d+'" has just been auto-crowned based on chat history.',cb.room_slug,"#f2f9fd"),b('"'+d+'" has just been auto-crowned based on chat history.')):null!==(k=c.match(L))?(h('Psst! Sorry, "'+k.join('", and "')+'" '+(1===k.length?"has":"have")+' been removed from your message "'+c+'".',l,"#d5ebf8"),h("Psst! "+(d!==l.toLowerCase()?"Non-":"")+'High Tip King "'+l+'" looks like they might have tried to spoof the "'+g.a+'" label in a message. Type /help or /? if you have any doubt about who the real high tip king is or what the real high tip value is ;)', cb.room_slug,"#f37e7e")):null!==(k=c.match(w))&&(h('Psst! Sorry, "'+k.join('", and "')+'" '+(1===k.length?"has":"have")+' been removed from your message "'+c+'".',l,"#d5ebf8"),h('Psst! "'+l+'" looks like they might have tried to spoof the /hail message. Type /help or /? if you have any doubt about who the real high tip king is or what the real high tip value is ;)',cb.room_slug,"#f37e7e")),a.m=c.replace(L,"").replace(w,""),l.toLowerCase()===d&&(a.m=r+" "+a.m,C||(x=new Date,s=0)));b("onMessage: "+ ((new Date).getTime()-f)+"ms");return a},i:function(a){var f=(new Date).getTime(),c=a.from_user.toLowerCase();a=a.amount;n<a&&(n=a,d!==c&&(d=c,h(c+" has been crowned the new high tip king.\u00a0\u00a0Long Live the King!","","#f2f9fd")));b("onTip: "+((new Date).getTime()-f)+"ms")}}}(); cb.settings_choices=[{choice1:t.e.a,choice2:t.e.b,choice3:t.e.d,defaultValue:t.e.a,label:'What type of "Crown" do you want for King High Tipper?',name:"crown",required:!1,type:"choice"},{label:"Reigning High Tip King (user name)",maxLength:255,minLength:3,name:"king",required:!1,type:"str"},{label:"Reigning High Tip (tokens)",minValue:1,name:"king_tip",required:!1,type:"int"},{choice1:"Enable",choice2:"Disable",defaultValue:"Disable",label:"(Multi-line Safe Mode)",name:"multi_line_safe",required:!1, type:"choice"}];cb.onMessage(function(b){return t.h(b)});cb.onTip(function(b){t.i(b)});t.g();
© Copyright Freesexcam 2011- 2024. All Rights Reserved.