Guest User

Untitled

a guest
May 2nd, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var rarities = [ItemRarity.COMMON, ItemRarity.UNCOMMON, ItemRarity.RARE, ItemRarity.EPIC, ItemRarity.LEGENDARY];
  2.  
  3. var autoSell = setInterval(function(){
  4.   game.inventory.slots.forEach(function(i,x){
  5.     if (i != null) {
  6.       var equipped = game.equipment.slots.filter(function(e){return e != null && e.type == i.type})[0];
  7.       if (equipped == null || i.maxDamage > equipped.maxDamage || (i.maxDamage == equipped.maxDamage && i.goldGain > equipped.goldGain) || (i.maxDamage == equipped.maxDamage && i.goldGain == equipped.goldGain && i.itemRarity > equipped.itemRarity) || (i.maxDamage == equipped.maxDamage && i.goldGain == equipped.goldGain && i.itemRarity == equipped.itemRarity && i.sellValue > equipped.sellValue)) {
  8.         game.equipment.equipItem(i, x);
  9.       } else {
  10.         game.inventory.sellItem(x);
  11.       }
  12.     }
  13.   });
  14. },0);
  15.  
  16. var autoFight = setInterval(function() {
  17.   if (game.player.health * 2 >= game.player.getMaxHealth()) {
  18.     attackButtonClick();
  19.   }
  20. },0);
Advertisement
Add Comment
Please, Sign In to add comment