About: Cookie Clicker Classic/Script   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

As of 26/10/2015 from function eventFire(el, etype){if (el.fireEvent) { (el.fireEvent('on' + etype)); } else { var evObj = document.createEvent('Events'); evObj.initEvent(etype, true, false); el.dispatchEvent(evObj); } } function l(what) {return document.getElementById(what);} Game=l('game'); Version=0.1251; l('version').innerHTML='running v.'+Version; Loaded=0; function Beautify(what)//turns 9999999 into 9,999,999 { var str=; what=Math.floor(what); what=(what+).split().reverse(); for (var i in what) { if (i%3==0 && i>0) str=','+str; str=what[i]+str; } return str; } //CookieSave='';

AttributesValues
rdfs:label
  • Cookie Clicker Classic/Script
rdfs:comment
  • As of 26/10/2015 from function eventFire(el, etype){if (el.fireEvent) { (el.fireEvent('on' + etype)); } else { var evObj = document.createEvent('Events'); evObj.initEvent(etype, true, false); el.dispatchEvent(evObj); } } function l(what) {return document.getElementById(what);} Game=l('game'); Version=0.1251; l('version').innerHTML='running v.'+Version; Loaded=0; function Beautify(what)//turns 9999999 into 9,999,999 { var str=; what=Math.floor(what); what=(what+).split().reverse(); for (var i in what) { if (i%3==0 && i>0) str=','+str; str=what[i]+str; } return str; } //CookieSave='';
dcterms:subject
abstract
  • As of 26/10/2015 from function eventFire(el, etype){if (el.fireEvent) { (el.fireEvent('on' + etype)); } else { var evObj = document.createEvent('Events'); evObj.initEvent(etype, true, false); el.dispatchEvent(evObj); } } function l(what) {return document.getElementById(what);} Game=l('game'); Version=0.1251; l('version').innerHTML='running v.'+Version; Loaded=0; function Beautify(what)//turns 9999999 into 9,999,999 { var str=; what=Math.floor(what); what=(what+).split().reverse(); for (var i in what) { if (i%3==0 && i>0) str=','+str; str=what[i]+str; } return str; } //CookieSave=''; var str=; var pics=['cursor','grandma','mine','factory','lab','shipment','goldengrandma','grandmaiconinvert','grandmaiconlustful','portal','skellington','kaleigrandma','factorygrandma','minegrandma','shipmentgrandma','portalgrandma','pledgedgrandma','pledgeicon','timemachine','timegrandma']; for (var i in pics) {str+='';} l('hiddenLoader').innerHTML=str; Cookies=0; CookiesDisplay=0; Clicking=0; Hovering=0; T=0; Cursors=0; Grandmas=0; Factories=0; Mines=0; Shipments=0; Labs=0; Portals=0; Times=0; Pledge=0; NumbersOn=1; Flashing=1; StoreToRebuild=0; function ToggleNumbers() { if (NumbersOn) {NumbersOn=0;l('toggleNumbers').innerHTML='Numbers Off';} else if (!NumbersOn) {NumbersOn=1;l('toggleNumbers').innerHTML='Numbers On';} } function ToggleFlash() { if (Flashing) {Flashing=0;l('toggleFlash').innerHTML='Flashing Off';} else if (!Flashing) {Flashing=1;l('toggleFlash').innerHTML='Flashing On';} } importSave=function() { var save=prompt('Please paste in the text that was given to you on save export.',); if (save && save!=) ImportResponse('1|'+save); Save(); } exportSave=function() { var save=prompt('Copypaste this text and keep it somewhere safe! (yes, it\'s easy to edit - but remember : cheated cookies taste terrible!)',MakeSaveString()); } ImportResponse=function(response) { var r=response.split('|'); if (response!='0' && response) { if (r[0]=='1') { Cookies=parseInt(r[2]); Pledge=0; Cursors=Math.min(1000,parseInt(r[3]));Buyables['Cursor'].price=parseInt(r[4]); Grandmas=Math.min(1000,parseInt(r[5]));Buyables['Grandma'].price=parseInt(r[6]); Factories=Math.min(1000,parseInt(r[7]));Buyables['Factory'].price=parseInt(r[8]); Mines=Math.min(1000,parseInt(r[9]));Buyables['Mine'].price=parseInt(r[10]); Shipments=Math.min(1000,parseInt(r[11]));Buyables['Shipment'].price=parseInt(r[12]); Labs=Math.min(1000,parseInt(r[13]));Buyables['Alchemy lab'].price=parseInt(r[14]); if (r[15]) {Portals=Math.min(1000,parseInt(r[15]));Buyables['Portal'].price=parseInt(r[16]);} if (r[17]) {Times=Math.min(1000,parseInt(r[17]));Buyables['Time machine'].price=parseInt(r[18]);} Buyables['Grandma'].func(0); Buyables['Factory'].func(0); Buyables['Mine'].func(0); Buyables['Shipment'].func(0); Buyables['Alchemy lab'].func(0); Buyables['Portal'].func(0); Buyables['Time machine'].func(0); StoreToRebuild=1; } } new Pop('credits','Imported.'); } Reset=function() { if (confirm('Do you REALLY want to start over?')) { document.cookie='CookieClickerSave=0; expires=Fri, 3 Aug 2001 20:47:11 UTC;'; ResetResponse(); } //ajax('backend.php?q=reset',ResetResponse); } ResetResponse=function() { location.reload(true); } MakeSaveString=function() { var str=; str+=Version+'|'+parseInt(Cookies)+'|'+ parseInt(Cursors)+'|'+parseInt(Buyables['Cursor'].price)+'|'+ parseInt(Grandmas)+'|'+parseInt(Buyables['Grandma'].price)+'|'+ parseInt(Factories)+'|'+parseInt(Buyables['Factory'].price)+'|'+ parseInt(Mines)+'|'+parseInt(Buyables['Mine'].price)+'|'+ parseInt(Shipments)+'|'+parseInt(Buyables['Shipment'].price)+'|'+ parseInt(Labs)+'|'+parseInt(Buyables['Alchemy lab'].price)+'|'+ parseInt(Portals)+'|'+parseInt(Buyables['Portal'].price)+'|'+ parseInt(Times)+'|'+parseInt(Buyables['Time machine'].price); return str; } SaveTimer=30*60; Save=function() { var str=MakeSaveString(); //ajax('backend.php?q=save|'+str,SaveResponse); var now=new Date();//we storin dis for 5 years, people now.setFullYear(now.getFullYear()+5);//mmh stale cookies str='CookieClickerSave='+escape(str)+'; expires='+now.toUTCString()+';'; document.cookie=str;//aaand save //alert(document.cookie); if (document.cookie.indexOf('CookieClickerSave')<0) Pop('credits','Error while saving.Export your save instead!'); else Pop('credits','Saved'); SaveTimer=30*60; } SaveResponse=function(response) { var r=response.split('|'); if (r[0]=='1' && parseFloat(r[1])>Version) { l('alert').style.visibility='visible'; l('alert').innerHTML='New version available ('+r[1]+').Please refresh to see it!'; } if (r[0]=='1') new Pop('credits','Saved'); else new Pop('credits','Error while saving'); } Load=function() { var str='0'; if (document.cookie.indexOf('CookieClickerSave')>=0) str='1|'+unescape(document.cookie.split('CookieClickerSave=')[1]);//get cookie here //ajax('backend.php?q=load',LoadResponse); LoadResponse(str); l('comment').innerHTML='Loading cookie...'; //LoadResponse(CookieSave); } LoadResponse=function(response) { var r=response.split('|'); if (response!='0' && response) { if (r[0]=='1') { Cookies=parseInt(r[2]); Pledge=0; Cursors=Math.min(1000,parseInt(r[3]));Buyables['Cursor'].price=parseInt(r[4]); Grandmas=Math.min(1000,parseInt(r[5]));Buyables['Grandma'].price=parseInt(r[6]); Factories=Math.min(1000,parseInt(r[7]));Buyables['Factory'].price=parseInt(r[8]); Mines=Math.min(1000,parseInt(r[9]));Buyables['Mine'].price=parseInt(r[10]); Shipments=Math.min(1000,parseInt(r[11]));Buyables['Shipment'].price=parseInt(r[12]); Labs=Math.min(1000,parseInt(r[13]));Buyables['Alchemy lab'].price=parseInt(r[14]); if (r[15]) {Portals=Math.min(1000,parseInt(r[15]));Buyables['Portal'].price=parseInt(r[16]);} if (r[17]) {Times=Math.min(1000,parseInt(r[17]));Buyables['Time machine'].price=parseInt(r[18]);} Buyables['Grandma'].func(0); Buyables['Factory'].func(0); Buyables['Mine'].func(0); Buyables['Shipment'].func(0); Buyables['Alchemy lab'].func(0); Buyables['Portal'].func(0); Buyables['Time machine'].func(0); StoreToRebuild=1; } } new Pop('credits','Loaded.'); Loaded=1; Main(); } ClickCookie=function() { var howmany=(Pledge>0?Math.ceil(Cursors*1.5):1); Cookies+=howmany; if (Pops.length<260 && NumbersOn) new Pop('cookie','+'+howmany); Clicking=1; } HoverCookie=function() { Hovering=1; } AddCookie=function(howmany,el) { Cookies+=howmany; if (el && Pops.length<250 && NumbersOn) new Pop(el,'+'+howmany); } RebuildStore=function() { var str=; for (var i in Buyables) { var amount=0; if (Buyables[i].name=='Cursor') amount=Cursors; else if (Buyables[i].name=='Grandma') amount=Grandmas; else if (Buyables[i].name=='Factory') amount=Factories; else if (Buyables[i].name=='Mine') amount=Mines; else if (Buyables[i].name=='Shipment') amount=Shipments; else if (Buyables[i].name=='Alchemy lab') amount=Labs; else if (Buyables[i].name=='Portal') amount=Portals; else if (Buyables[i].name=='Time machine') amount=Times; str+=' '; } l('store').innerHTML=str; StoreToRebuild=0; } Buyables=[]; Buyable=function(name,desc,pic,price,func) { this.name=name; this.desc=desc; this.pic=pic; this.price=price; this.func=func; Buyables[name]=this; this.Buy=function() { if (Cookies>=this.price && Loaded) { Cookies-=this.price; this.price=Math.ceil(this.price*1.1); this.func(1); //Buyables[this.name]=0; StoreToRebuild=1; } } StoreToRebuild=1; } Buy=function(what) { Buyables[what].Buy(); } new Buyable('Cursor','Autoclicks every 5 seconds.','cursoricon',15,function(){Cursors++;}); new Buyable('Grandma','A nice grandma to bake more cookies.','grandmaicon',100,function(buy) { if (buy) Grandmas++; var str=; for (var i=0;i'; } l('grandmas').innerHTML=str; }); new Buyable('Factory','Produces large quantities of cookies.','factoryicon',500,function(buy) { if (buy) Factories++; if (buy && Factories==1) Buyables['Grandma'].func(); var str=; for (var i=0;i'; } l('factories').innerHTML=str; }); new Buyable('Mine','Mines out cookie dough and chocolate chips.','mineicon',2000,function(buy) { if (buy) Mines++; if (buy && Mines==1) Buyables['Grandma'].func(); var str=; for (var i=0;i'; } l('mines').innerHTML=str; }); new Buyable('Shipment','Brings in fresh cookies from the cookie planet.','shipmenticon',7000,function(buy) { if (buy) Shipments++; if (buy && Shipments==1) Buyables['Grandma'].func(); var str=; for (var i=0;i'; } l('shipments').innerHTML=str; }); new Buyable('Alchemy lab','Turns gold into cookies!','labicon',50000,function(buy) { if (buy) Labs++; if (buy && Labs==1) Buyables['Grandma'].func(); var str=; for (var i=0;i'; } l('labs').innerHTML=str; }); new Buyable('Portal','Opens a door to the Cookieverse.','portalicon',1000000,function(buy) { if (buy) Portals++; if (buy && Portals==1) Buyables['Grandma'].func(); var str=; for (var i=0;i'; } l('portals').innerHTML=str; }); new Buyable('Time machine','Brings cookies from the past, before they were even eaten.','timemachineicon',123456789,function(buy) { if (buy) Times++; if (buy && Times==1) Buyables['Grandma'].func(); var str=; for (var i=0;i'; } l('times').innerHTML=str; }); new Buyable('Elder Pledge','Puts an end to the Ancients\' wrath, at least for a while.','pledgeicon',666666,function(buy) { if (buy) {Pledge*=2;Pledge+=30*60*10;} if (buy) Buyables['Grandma'].func(); l('buyElder Pledge').style.display='none'; }); Pops=[]; Pop=function(el,str) { this.el=el; this.str=str; this.life=0; this.offx=Math.floor(Math.random()*20-10); this.offy=Math.floor(Math.random()*20-10); Pops.push(this); } Main=function() { var str=; if (StoreToRebuild) { RebuildStore(); StoreToRebuild=0; } for (var i in Pops) { var rect=l(Pops[i].el).getBoundingClientRect(); var x=Math.floor((rect.left+rect.right)/2+Pops[i].offx)-100; var y=Math.floor((rect.top+rect.bottom)/2-Math.pow(Pops[i].life/100,0.5)*100+Pops[i].offy)-10; var opacity=1-(Math.max(Pops[i].life,80)-80)/20; str+=' '+Pops[i].str+''; Pops[i].life+=2; if (Pops[i].life>=100) Pops.splice(i,1); } l('pops').innerHTML=str; var str=; for (var i=0;i'; } l('cookie').innerHTML=str; var grandmaGain=Math.ceil(4+(Factories?1:0)+(Mines?2:0)+(Shipments?3:0)+(Labs?4:0)+(Portals?(Pledge?5+Portals*0.5:5):0)+(Times?6:0)); var cursorGain=(Pledge>0?Math.ceil(Cursors*1.5):1); if (Times && T%Math.ceil(150/Times)==0) AddCookie(123456,'times'); if (Portals && T%Math.ceil(150/Portals)==0) AddCookie(6666,'portals'); if (Labs && T%Math.ceil(150/Labs)==0) AddCookie(500,'labs'); if (Shipments && T%Math.ceil(150/Shipments)==0) AddCookie(100,'shipments'); if (Mines && T%Math.ceil(150/Mines)==0) AddCookie(50,'mines'); if (Factories && T%Math.ceil(150/Factories)==0) AddCookie(20,'factories'); if (Grandmas && T%Math.ceil(150/Grandmas)==0) AddCookie(grandmaGain,'grandmas'); if (Cursors && T%Math.ceil(150/Cursors)==0) eventFire(l('cookie'),'mouseup'); var cps=0; cps+=Times*123456/5; cps+=Portals*6666/5; cps+=Labs*500/5; cps+=Shipments*100/5; cps+=Mines*50/5; cps+=Factories*20/5; cps+=Grandmas*grandmaGain/5; cps+=Cursors*cursorGain/5; var floater=Math.round(cps*10-Math.floor(cps)*10); cps=Beautify(cps)+(floater?('.'+floater):); l('cps').innerHTML='cookies/second : '+cps; for (var i in Buyables) { if (Cookies>=Buyables[i].price) l('buy'+Buyables[i].name).className=; else l('buy'+Buyables[i].name).className='grayed'; } CookiesDisplay+=(Cookies-CookiesDisplay)*0.5; l('money').innerHTML=Beautify(Math.round(CookiesDisplay)); var str=; if (Cookies<5) str='You feel like making cookies.But nobody wants to eat your cookies.'; else if (Cookies<25) str='Your cookies are popularwith your dog.'; else if (Cookies<50) str='Your cookies are popularwith your family.'; else if (Cookies<100) str='Your cookies are popularin the neighborhood.'; else if (Cookies<500) str='Your cookies are renownedin the whole town!'; else if (Cookies<2000) str='Your cookies are wortha lot of money.'; else if (Cookies<5000) str='Your cookies bringall the boys to the yard.'; else if (Cookies<10000) str='People come from very far awayto get a taste of your cookies.'; else if (Cookies<17000) str='Kings and queens from all over the worldare enjoying your cookies.'; else if (Cookies<30000) str='Your cookies have been nameda part of the world wonders.'; else if (Cookies<60000) str='Your cookies have been placedunder government surveillance.'; else if (Cookies<100000) str='The whole planet isenjoying your cookies!'; else if (Cookies<150000) str='Creatures from neighboring planetswish to try your cookies.'; else if (Cookies<250000) str='Elder gods from the whole cosmoshave awoken to taste your cookies.'; else if (Cookies<400000) str='Your cookies have achieved sentience.'; else if (Cookies<1000000) str='The universe has now turned intocookie dough, to the molecular level.'; else if (Cookies<1000000000) str='A local news station runsa 10-minute segment about your cookies. Success!(you win a cookie)'; else str='it\'s time to stop playing(more fun milestones in the next update I promise)'; l('comment').innerHTML=str; if (Pledge>0) Pledge--; if (Cookies>=1000000 && Pledge<=0 && Flashing) { var r=(Cookies-1000000)/2000000; var r2=Math.max(0,(Cookies-100000000)/400000000); var icon='grandmaicon'; if (Cookies>=2000000) { l('buyElder Pledge').style.display='block'; if (Math.random()<0.02) icon='grandmaiconinvert'; else if (Math.random()<0.02) icon='grandmaiconlustful'; } if (Cookies>=10000000 && Math.random()<0.02) icon='skellington'; if (Cookies>=1000000000) l('whole').style.background='url(kaleigrandma.png) '+Math.floor(T*0.2)+'px -'+Math.floor(T*0.1)+'px'; else if (Math.random() if (T%30==0 && Loaded) document.title=Beautify(Cookies)+' cookies - Cookie Clicker'; Clicking=0; Hovering=0; SaveTimer--; if (SaveTimer==0 && Loaded) Save(); T++; setTimeout(Main,1000/30); } Load();
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software