I have to give some credit to , he had the idea at first, the link to his thread.
Supports:
Support the usage of staffs. For example: So if your using an air staff, and it's checking to see if you have the required runes, and amount of rune. It will neglect the air runes.
This Snippet contain almost all spells. The spells that aren't supported are:
The one that require a different staff that arent in the enum "Staffs". Example: Magic Dart
The ones that require an item in your inventory. Example: Charge orb, Teleport to ape Atoll
The Lumbridge home teleport.
And any other spell outside of the normal spell book.
if i get much love, ill add in more methods such as: interact with spell, interact wtih spell on invetory item, or interact with spell on entity. Or even support the spells that are supported atm.
Change Log:
Snippet:
How to initialize it:
First create a new RuneManager variable. The on the onStart() you make the new variable equal the RuneManager Constructor.
private RuneManager manager;
@Override
public void onStart() {
manager = new RuneManager(this);
}
How to use it:
if (manager.containsSuppliesFor(MagicSpell.WIND_BOLT, Staff.AIR)) {
/stuff
}