SHOW:
|
|
- or go back to the newest paste.
| 1 | var rarities = [ItemRarity.COMMON, ItemRarity.UNCOMMON, ItemRarity.RARE, ItemRarity.EPIC, ItemRarity.LEGENDARY]; | |
| 2 | - | |
| 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)) {
|
| 5 | + | if (i != null) {
|
| 6 | - | game.inventory.sellItem(x); |
| 6 | + | var equipped = game.equipment.slots.filter(function(e){return e != null && e.type == i.type})[0];
|
| 7 | if (equipped != null && (rarities.indexOf(i.rarity) < rarities.indexOf(equipped.rarity) && i.level < equipped.level)) {
| |
| 8 | game.inventory.sellItem(x); | |
| 9 | } | |
| 10 | - | |
| 10 | + | |
| 11 | }); | |
| 12 | },0); | |
| 13 | - | game.attack(); |
| 13 | + | |
| 14 | var autoFight = setInterval(function() {
| |
| 15 | if (game.player.health * 2 >= game.player.getMaxHealth()) {
| |
| 16 | attackButtonClick(); | |
| 17 | } | |
| 18 | },0); |