ByteFoolish

Joined 10 January 2021
Auto pick correct slayer tier
mNo edit summary
(Auto pick correct slayer tier)
Line 4: Line 4:


  <nowiki>
  <nowiki>
var count = 30;
var tier = -1;
var costCoins = 0;
var monsID = 10;
var monsID = 10;
var count = 30;
while(count > 1 && combatManager.slayerTask.monster.id != monsID) {
while(count > 1 && combatManager.slayerTask.monster.id != monsID) {
     // selectTask(tier, costCoins, render, fromClick)
     if (MONSTERS[monsID] && MONSTERS[monsID].canSlayer) {
     combatManager.slayerTask.selectTask(0,0,true,true);
        for (i in CONSTANTS.slayerTier) {
            if (combatManager.slayerTask.getMonsterSelection(CONSTANTS.slayerTier[i]).some(e => e.id === monsID)) {
                tier = CONSTANTS.slayerTier[i]
            }
        }
        if (tier == -1) {
            console.log("Unable to find correct slayer tier.");
            break;
        }
    } else {
        console.log("Not a slayer monster.");
        break;
    }
 
     combatManager.slayerTask.selectTask(tier,costCoins,true,true);
     console.log(count);
     console.log(count);
     count = count - 1;
     count = count - 1;
285

edits