User:ByteFoolish: Difference between revisions

From Melvor Idle
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
In-game Functions
In-game Functions


combatManager.slayerTask.selectTask(0,0,true,true)
game.combat.slayerTask.killsLeft = 99999


combatManager.slayerTask.killsLeft = 9999
<nowiki>
var count = 30;
var tier = -1;
var costCoins = 0;
var monsID = game.combat.enemy.monster._localID;
while(count > 1 && game.combat.slayerTask.monster._localID != monsID) {
    if (game.combat.enemy.monster.canSlayer) {
        for (const i in SlayerTierID) {
            if (isNaN(i)) continue;
            if (game.combat.slayerTask.getMonsterSelection(i).some(e => e._localID === monsID)) {
                tier = i
            }
        }
        if (tier == -1) {
            console.log("Unable to find correct slayer tier.");
            break;
        }
    } else {
        console.log("Not a slayer monster.");
        break;
    }


var count = 10
    game.combat.slayerTask.selectTask(tier,costCoins,true,true);
while(count > 0 && combatManager.slayerTask.monster.id != 69) {
     console.log(count);
    combatManager.slayerTask.selectTask(0,0,true,true);
     console.log(count)
     count = count - 1;
     count = count - 1;
     var now = new Date().getTime();
 
     while(new Date().getTime() < now + 3500){ /* Do nothing */ }
     var now = new Date().getTime();  
     if (game.combat.slayerTask.monster._localID === monsID) {
        console.log("Found monster!");
        game.combat.slayerTask.jumpToTaskOnClick();
    } else {
        while(new Date().getTime() < now + 1500){ /* Do nothing */ }
    }
}
}
</nowiki>

Latest revision as of 03:48, 2 December 2022

In-game Functions

game.combat.slayerTask.killsLeft = 99999

var count = 30;
var tier = -1;
var costCoins = 0;
var monsID = game.combat.enemy.monster._localID;
while(count > 1 && game.combat.slayerTask.monster._localID != monsID) {
    if (game.combat.enemy.monster.canSlayer) {
        for (const i in SlayerTierID) {
            if (isNaN(i)) continue;
            if (game.combat.slayerTask.getMonsterSelection(i).some(e => e._localID === monsID)) {
                tier = i
            }
        }
        if (tier == -1) {
            console.log("Unable to find correct slayer tier.");
            break;
        }
    } else {
        console.log("Not a slayer monster.");
        break;
    }

    game.combat.slayerTask.selectTask(tier,costCoins,true,true);
    console.log(count);
    count = count - 1;

    var now = new Date().getTime();    
    if (game.combat.slayerTask.monster._localID === monsID) {
        console.log("Found monster!");
        game.combat.slayerTask.jumpToTaskOnClick();
    } else {
        while(new Date().getTime() < now + 1500){ /* Do nothing */ }
    }
}