Guest User

Untitled

a guest
May 1st, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  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 && rarities.indexOf(i.rarity) < rarities.indexOf(game.equipment.slots.filter(function(e){return e != null && e.type == i.type})[0].rarity)) {
  6. game.inventory.sellItem(x);
  7. }
  8. });
  9. },0);
  10.  
  11. var autoFight = setInterval(function() {
  12. if (game.player.health * 2 >= game.player.getMaxHealth()) {
  13. game.attack();
  14. }
  15. },0);
Advertisement
Add Comment
Please, Sign In to add comment