Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var recipes = [["Armor","Wing"],["Weapon","Claw"],["Helmet","Eye"],["Staff","Leg"],["Gloves","Feather"]];
  2.             for(var j=0;j<recipes.length;j++){
  3.                 if(cube.filter(function( obj ) { return (obj.type == recipes[j][0] && obj.tier == "tier-magic") ;}).length &&
  4.                     cube.filter(function( obj ) { return obj.type == "Coal";}).length &&
  5.                     cube.filter(function( obj ) { return obj.type == recipes[j][1];}).length)
  6.                 {
  7.                     var ival = 0;
  8.                     for (var i = 0; i < cube.length; ++i) {
  9.                         if (cube[i].type == recipes[j][0])
  10.                         {
  11.                             var ival = cube[i].val * 4 + rnd(1,lvl);
  12.                         }
  13.                     }
  14.                     var item = new Item(recipes[j][0],ival,"tier-demonic");
  15.                     inv.push(item);
  16.                     log('You\'ve crafted a demonic item!');
  17.                     cube=[];
  18.                    
  19.                     updateEq();
  20.                 }
  21.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement