Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Casting a lunar spell using the magic api?

Featured Replies

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.


Magic magic = new Magic();

magic.castSpellOnEntity(Spells.LunarSpells.STAT_SPY, ENTITY);

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.

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.
 

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

Checking to see if you have the runes to cast:

getMagic().canCast(LunarSpells.NPC_CONTACT)

Casting the spell:

getMagic().castSpell(LunarSpells.NPC_CONTACT)

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.