- Joined
- Oct 12, 2015
- Messages
- 3,781
- Thread Author
- #1
Current available methods are:
InterfaceWindows.getInventory()
..getEquipment()
..getMagic()
..getPrayer()
Should really be a getCombatOptions()/getCombat() to open the following menu:
@Vaped
Further to that, there should also be an option to perform a special attack.
Special attack button: Interfaces.getAt(593, 30)
Special attack % text: Interfaces.getAt(593, 34)
My method to parse spec percentage:
Method to determine if spec is selected:
InterfaceWindows.getInventory()
..getEquipment()
..getMagic()
..getPrayer()
Should really be a getCombatOptions()/getCombat() to open the following menu:

@Vaped
Further to that, there should also be an option to perform a special attack.
Special attack button: Interfaces.getAt(593, 30)
Special attack % text: Interfaces.getAt(593, 34)
My method to parse spec percentage:
Code:
public void parseSpecPercentage() {
String full;
if (specValue != null) {
full = Interfaces.getAt(593, 34).getText().replace("Special Attack: ", ""); //Label "Special Attack: x%"
specPercentage = Integer.valueOf(full.replace("%", ""));
}
}
Method to determine if spec is selected:
Code:
if (!Equipment.containsAnyOf(specWeapon.getItemNames())) {
if (Inventory.containsAnyOf(specWeapon.getItemNames())) {
SpriteItem weapon = Inventory.newQuery().names(specWeapon.getItemNames()).results().first();
if (weapon != null) weapon.interact("Wield");
Log.info("Equipping spec weapon");
}
} else if (specButton != null) {
if (specButton.isVisible() && specButton.getTextColor().equals(new Color(0, 0, 16))) {
specButton.interact("Use Special Attack");
} else if(!specButton.isVisible()){
InterfaceComponent component = Interfaces.getAt(161,44);
if(component != null) component.interact("Combat Options");
}
}