285
edits
ByteFoolish (talk | contribs) mNo edit summary |
ByteFoolish (talk | contribs) (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; | ||
while(count > 1 && combatManager.slayerTask.monster.id != monsID) { | while(count > 1 && combatManager.slayerTask.monster.id != monsID) { | ||
if (MONSTERS[monsID] && MONSTERS[monsID].canSlayer) { | |||
combatManager.slayerTask.selectTask( | 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; |
edits