Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • Casting spells with Magic class, Error?


    TheSoulless

    Recommended Posts

    Hey, I was making a script that uses the Magic class and run into a possible error.

    Not sure if I'm doing this correctly but with " getMagic().castSpellOn(Ancient.ICE_BARRAGE, ExampleEntity); " the method tries to cast home teleport instead of barrage. So my guess is that the the spell constants don't match up for some reason with the actual game spells.

    So is this an Error or my lack of understanding?

    Link to comment
    Share on other sites

    This may be an error, yes. If you are able to give me access to the account I can fix all of the widgets. At some point RS changed it so that you have to actually have the spellbook selected to see the widget data of them.

    I don't have an account with the ancients spell book.

    Link to comment
    Share on other sites

    Don't really have an account atm to share, but I got my script working with these and did some testing that might help.

    With the constants atm (22.5. -19)  in the Ancient spell book they cast the following:

    CONSTANT -> SPELL CASTED 

    getMagic().castSpell(Ancient.BLOOD_RUSH);        -> Ice burst
    getMagic().castSpell(Ancient.BLOOD_BURST);        -> Blood rush
    getMagic().castSpell(Ancient.BLOOD_BLITZ);        -> Ice barrage
    getMagic().castSpell(Ancient.BLOOD_BARRAGE);        -> Blood blitz
    getMagic().castSpell(Ancient.ICE_RUSH);            -> Home tele
    getMagic().castSpell(Ancient.ICE_BURST);        -> Ice rush
    getMagic().castSpell(Ancient.ICE_BLITZ);        -> Home tele
    getMagic().castSpell(Ancient.ICE_BARRAGE);        -> Ice blitz
    getMagic().castSpell(Ancient.SHADOW_RUSH);        -> Smoke burst
    getMagic().castSpell(Ancient.SHADOW_BURST);        -> Shadow rush
    getMagic().castSpell(Ancient.SHADOW_BLITZ);        -> Smoke barrage
    getMagic().castSpell(Ancient.SHADOW_BARRAGE);        -> Shadow blitz
    getMagic().castSpell(Ancient.SMOKE_RUSH);        -> Blood burst
    getMagic().castSpell(Ancient.SMOKE_BURST);         -> Smoke rush
    getMagic().castSpell(Ancient.SMOKE_BLITZ);         -> Blood barrage
    getMagic().castSpell(Ancient.SMOKE_BARRAGE);         -> Smoke blitz

    getMagic().castSpell(Ancient.PADEWWA_TELEPORT);     -> Shadow burst
    getMagic().castSpell(Ancient.SENNTISTEN_TELEPORT);    -> Shadow barrage
    getMagic().castSpell(Ancient.KHARYRLL_TELEPORT);    -> Padewwa tele
    getMagic().castSpell(Ancient.LASSAR_TELEPORT);        -> Senntisten tele
    getMagic().castSpell(Ancient.DAREEYAK_TELEPORT);    -> Kharyrll tele
    getMagic().castSpell(Ancient.CARRALLANGAR_TELEPORT);    -> Lassar tele
    getMagic().castSpell(Ancient.ANNAKARL_TELEPORT);    -> Dareeyak tele
    getMagic().castSpell(Ancient.GHORROCK_TELEPORT);    -> Carrallangar tele
    getMagic().castSpell(Ancient.HOME_TELEPORT);        -> Ghorrock tele

    TLDR:
    -> Spell Constants mixed in the Ancient spell book (22.5. -19)
    -> No Annakarl or Bounty tele, but everything else you can find from the list
    -> Possible problem? API doesn't include the new Bounty hunter target teleport
    -> Important spells:
        Ice blitz -> Use: Ancient.ICE_BARRAGE
        Ice barrage -> Use: Ancient.BLOOD_BLITZ
        Blood blitz -> Use: Ancient.BLOOD_BARRAGE
        Blood barrage -> Use: Ancient.SMOKE_BLITZ

    Link to comment
    Share on other sites

    10 hours ago, TheSoulless said:

    Don't really have an account atm to share, but I got my script working with these and did some testing that might help.

    With the constants atm (22.5. -19)  in the Ancient spell book they cast the following:

    CONSTANT -> SPELL CASTED 

    getMagic().castSpell(Ancient.BLOOD_RUSH);        -> Ice burst
    getMagic().castSpell(Ancient.BLOOD_BURST);        -> Blood rush
    getMagic().castSpell(Ancient.BLOOD_BLITZ);        -> Ice barrage
    getMagic().castSpell(Ancient.BLOOD_BARRAGE);        -> Blood blitz
    getMagic().castSpell(Ancient.ICE_RUSH);            -> Home tele
    getMagic().castSpell(Ancient.ICE_BURST);        -> Ice rush
    getMagic().castSpell(Ancient.ICE_BLITZ);        -> Home tele
    getMagic().castSpell(Ancient.ICE_BARRAGE);        -> Ice blitz
    getMagic().castSpell(Ancient.SHADOW_RUSH);        -> Smoke burst
    getMagic().castSpell(Ancient.SHADOW_BURST);        -> Shadow rush
    getMagic().castSpell(Ancient.SHADOW_BLITZ);        -> Smoke barrage
    getMagic().castSpell(Ancient.SHADOW_BARRAGE);        -> Shadow blitz
    getMagic().castSpell(Ancient.SMOKE_RUSH);        -> Blood burst
    getMagic().castSpell(Ancient.SMOKE_BURST);         -> Smoke rush
    getMagic().castSpell(Ancient.SMOKE_BLITZ);         -> Blood barrage
    getMagic().castSpell(Ancient.SMOKE_BARRAGE);         -> Smoke blitz

    getMagic().castSpell(Ancient.PADEWWA_TELEPORT);     -> Shadow burst
    getMagic().castSpell(Ancient.SENNTISTEN_TELEPORT);    -> Shadow barrage
    getMagic().castSpell(Ancient.KHARYRLL_TELEPORT);    -> Padewwa tele
    getMagic().castSpell(Ancient.LASSAR_TELEPORT);        -> Senntisten tele
    getMagic().castSpell(Ancient.DAREEYAK_TELEPORT);    -> Kharyrll tele
    getMagic().castSpell(Ancient.CARRALLANGAR_TELEPORT);    -> Lassar tele
    getMagic().castSpell(Ancient.ANNAKARL_TELEPORT);    -> Dareeyak tele
    getMagic().castSpell(Ancient.GHORROCK_TELEPORT);    -> Carrallangar tele
    getMagic().castSpell(Ancient.HOME_TELEPORT);        -> Ghorrock tele

    TLDR:
    -> Spell Constants mixed in the Ancient spell book (22.5. -19)
    -> No Annakarl or Bounty tele, but everything else you can find from the list
    -> Possible problem? API doesn't include the new Bounty hunter target teleport
    -> Important spells:
        Ice blitz -> Use: Ancient.ICE_BARRAGE
        Ice barrage -> Use: Ancient.BLOOD_BLITZ
        Blood blitz -> Use: Ancient.BLOOD_BARRAGE
        Blood barrage -> Use: Ancient.SMOKE_BLITZ

    Unfortunately that's not really the information I need, I need to be able to actually see the widget id's, the other spell books follow a pattern but ancient does not (last I had checked) and so each one has its own ID. Especially if I'm going to add in any missing spells.
    If you'd like, I can PM you with instructions on how to get the widget ID's yourself, and you can get them for me. It's not really that complicated.

    Link to comment
    Share on other sites

    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
    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.