Jump to content

How to preselect spell?


Recommended Posts

Posted

Hello, how would I preselect spell? I tried this, but it isn't working:

if(getMagic().isSpellSelected() == false) {
    status = "Selecting spell"; 
    log("Selecting spell");
    getMagic().hoverSpell(Spells.NormalSpells.TELEKINETIC_GRAB);
    sleep(random(500, 5000));
}

It just loops it, never selecting.

Also, when using castSpellOnEntity(), a few times the bot selects the cast over and over again, and then it preselects it by himself. Is it supposed to be like that or it's accidental bug/feature?

Posted
14 minutes ago, ECH0 said:

Hello, how would I preselect spell? I tried this, but it isn't working:


if(getMagic().isSpellSelected() == false) {
    status = "Selecting spell"; 
    log("Selecting spell");
    getMagic().hoverSpell(Spells.NormalSpells.TELEKINETIC_GRAB);
    sleep(random(500, 5000));
}

It just loops it, never selecting.

Also, when using castSpellOnEntity(), a few times the bot selects the cast over and over again, and then it preselects it by himself. Is it supposed to be like that or it's accidental bug/feature?

if (!getMagic().isSpellSelected()) {
            if (getMagic().castSpell(Spells.NormalSpells.TELEKINETIC_GRAB)) {
                // sleep
            }
        } else {
            // interact with something 
        }

Posted
3 minutes ago, FuryShark said:

if (!getMagic().isSpellSelected()) {
            if (getMagic().castSpell(Spells.NormalSpells.TELEKINETIC_GRAB)) {
                // sleep
            }
        } else {
            // interact with something 
        }

Wanted to ask:

if (getMagic().castSpell(Spells.NormalSpells.TELEKINETIC_GRAB))

this executes that commands and returns true if it succeeds? Also, maybe you could explain your code a bit?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...