Monday, 20 August 2012

Cheating littlealchemy

If you got stuck and can't find any more combinations and you want to create more, here is a little script that will activate all the elements:

alchemy.history.parents = [];

for(var i=0;i<base.base.length;i++){
if(base.base[i][0] != false){
for(var j=0;j<base.base[i].length;j++){

localStorage.setItem("history", JSON.stringify(alchemy.history));

Just paste this code in the browser's console (F12 for firefox's firebug or google chrome's console) and after just refresh.

If you want a complete list of all the combinations possible run this code:

WARNIGN: this script may take a long time to compile and you may get "stop script" alerts. If you are patient and click continue you will see the full list. The time to finish depends on the pc and the browser (fastest is goole chrome)

var html = [];

var l = base.length;
var s = 0;

for(var ii=s;ii<s+l;ii++){
for(var jj=ii;jj<s+l;jj++){
var r =[ii,jj]);
html.push('<div><img src="img/base/'+(ii+1)+'.png" class="boxImg"> + <img src="img/base/'+(jj+1)+'.png" class="boxImg"> = ');
for(var k=0;k<r.length;k++){
html.push('<img src="img/base/'+(r[k]+1)+'.png" class="boxImg">')
if(k+1<r.length) html.push(' , ')

$('<div>').html('<div style="height:350px;overflow:auto">'+html.join('')+'</div>').dialog({
height: 400,
width: 800,buttons: {
'OK': function () {
},modal: true,
draggable: true,

If there are at least 5 persons that ask me to make a web page where you can see the complete tutorial I will make it so you won't have to use the script every time.