Jump to content

How to preselect spell?


ECH0

Recommended Posts

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?

Link to comment
Share on other sites

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 
        }

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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