roguehippo Posted May 19, 2017 Share Posted May 19, 2017 Hello all, I am trying to incorporate alching into a script but I can not seem to get it. I am currently using the getMagic().castSpellOnEntity(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY, item); method. the "item" is gotten through the inventory like so: Item item = getInventory().getItem("item to alch"); but it says that Item cannot be used as an Entity (even though i looked into the api and it seems like Item extends the Entity class so I thought i would be able to turn an inventory into a useable entity.) can anyone guide me in the right direction? should i not use "CastSpellOnEntity" ? thanks Quote Link to comment Share on other sites More sharing options...
Explv Posted May 19, 2017 Share Posted May 19, 2017 (edited) An Item is not an Entity: Only RS2Objects, Characters, GroundDecoration, GroundItem... etc are What you should be doing instead is calling the castSpell() method, and then interacting with the appropriate inventory item Edited May 19, 2017 by Explv 1 Quote Link to comment Share on other sites More sharing options...
Shudsy Posted May 19, 2017 Share Posted May 19, 2017 if (getMagic().isSpellSelected()) { getInventory().interact("Cast", "Item"); } else { getMagic().castSpell(Spells.NormalSpells._LEVEL_ALCHEMY); } Quote Link to comment Share on other sites More sharing options...
roguehippo Posted May 19, 2017 Author Share Posted May 19, 2017 thanks so much, that cleared up all my problems! Quote Link to comment Share on other sites More sharing options...