elliottdehn Posted April 26, 2015 Share Posted April 26, 2015 am I just stupid? how do I cast npc contact using the magic api? i don't quite understand how I obtain a MagicSpell object. Thanks. Quote Link to comment Share on other sites More sharing options...
moore Posted April 26, 2015 Share Posted April 26, 2015 Magic magic = new Magic(); magic.castSpellOnEntity(Spells.LunarSpells.STAT_SPY, ENTITY); Quote Link to comment Share on other sites More sharing options...
Twin Posted April 26, 2015 Share Posted April 26, 2015 You could also use widgets to do it, that's what i do at least. allows you to add timing varriations in between clicking and all of that. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted April 26, 2015 Share Posted April 26, 2015 getMagic().castSpell(Spells.LunarSpells.NPC_CONTACT); Magic magic = new Magic(); magic.castSpellOnEntity(Spells.LunarSpells.STAT_SPY, ENTITY); You cannot create new instances of classes that extend API / MethodProvider like that. If you want to create new API instances, you have to do an exchangeContext on it first, in order to exchange your current Bot/MethodProvider with it. 1 Quote Link to comment Share on other sites More sharing options...
moore Posted April 26, 2015 Share Posted April 26, 2015 getMagic().castSpell(Spells.LunarSpells.NPC_CONTACT); You cannot create new instances of classes that extend API / MethodProvider like that. If you want to create new API instances, you have to do an exchangeContext on it first, in order to exchange your current Bot/MethodProvider with it. Yeah sorry, I didn't really pay attention to it, so I did it so fast and didn't understand it. Thanks for noticing me this I've never even done a spell casting thingy Quote Link to comment Share on other sites More sharing options...
liverare Posted April 26, 2015 Share Posted April 26, 2015 Checking to see if you have the runes to cast: getMagic().canCast(LunarSpells.NPC_CONTACT) Casting the spell: getMagic().castSpell(LunarSpells.NPC_CONTACT) Quote Link to comment Share on other sites More sharing options...
elliottdehn Posted April 26, 2015 Author Share Posted April 26, 2015 Thank you all for the kind and helpful replies! Quote Link to comment Share on other sites More sharing options...