Package rsb.methods
Class Combat
java.lang.Object
rsb.methods.MethodProvider
rsb.methods.Combat
Combat related operations.
-
Field Summary
Fields inherited from class rsb.methods.MethodProvider
methods -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaneat(int percent, int... foods) Eats at the desired HP %.booleanEat(int percent, int... foods) Deprecated.intGets the attack mode.intGets the current player's health as a percentage of full health.intGets the current player's life points.intGets the current player's prayer points.intGets the special bar energy amount.intReturns the damage we're taking from venomintGets the current Wilderness Level.booleanisAttacking(RSNPC npc) Checks if your character is interacting with an Npc.booleanReturns whether the auto-retaliate option is enabled.booleanChecks whether the desired Npc is dead.booleanReturns whether we're envenomedbooleanReturns whether we're poisoned.booleanReturns whether the special-attack option is enabled.voidsetAutoRetaliate(boolean enable) Turns auto-retaliate on or off in the combat tab.booleansetFightMode(int fightMode) Sets the attack mode.
-
Constructor Details
-
Combat
-
-
Method Details
-
Eat
Deprecated.Eats at the desired HP %.- Parameters:
percent- The health percentage to eat at; 10%-90%foods- Array of Foods we can eat.- Returns:
trueonce we eaten to the health % (percent); otherwisefalse.
-
eat
public boolean eat(int percent, int... foods) Eats at the desired HP %.- Parameters:
percent- The health percentage to eat at; 10%-90%foods- Array of Foods we can eat.- Returns:
trueonce we eaten to the health % (percent); otherwisefalse.
-
setAutoRetaliate
public void setAutoRetaliate(boolean enable) Turns auto-retaliate on or off in the combat tab.- Parameters:
enable-trueto enable;falseto disable.
-
isAutoRetaliateEnabled
public boolean isAutoRetaliateEnabled()Returns whether the auto-retaliate option is enabled.- Returns:
trueif retaliate is enabled; otherwisefalse.
-
getFightMode
public int getFightMode()Gets the attack mode.- Returns:
- The current fight mode setting.
-
setFightMode
public boolean setFightMode(int fightMode) Sets the attack mode.- Parameters:
fightMode- The fight mode to set it to. From 0-3 corresponding to the 4 attacking modes; Else if there is only 3 attacking modes then, from 0-2 corresponding to the 3 attacking modes- Returns:
trueif the interface was clicked; otherwisefalse.- See Also:
-
getWildernessLevel
public int getWildernessLevel()Gets the current Wilderness Level.- Returns:
- The current wilderness level otherwise, 0.
-
getLifePoints
public int getLifePoints()Gets the current player's life points.- Returns:
- The current life points if the interface is valid; otherwise 0.
-
isPoisoned
public boolean isPoisoned()Returns whether we're poisoned.- Returns:
trueif poisoned; otherwisefalse.
-
isEnvenomed
public boolean isEnvenomed()Returns whether we're envenomed- Returns:
trueif the local player is envenomed; otherwisefalse
-
getVenomDamage
public int getVenomDamage()Returns the damage we're taking from venom- Returns:
- the venom damage if envenomed; otherwise 0;
-
isSpecialEnabled
public boolean isSpecialEnabled()Returns whether the special-attack option is enabled.- Returns:
trueif special is enabled; otherwisefalse.
-
getSpecialBarEnergy
public int getSpecialBarEnergy()Gets the special bar energy amount.- Returns:
- The current spec energy.
-
getPrayerPoints
public int getPrayerPoints()Gets the current player's prayer points.- Returns:
- The current prayer points if the interface is valid; otherwise 0.
-
getHealth
public int getHealth()Gets the current player's health as a percentage of full health.- Returns:
- The current percentage health remaining.
-
isAttacking
Checks if your character is interacting with an Npc.- Parameters:
npc- The Npc we want to fight.- Returns:
trueif interacting; otherwisefalse.
-
isDead
Checks whether the desired Npc is dead.- Parameters:
npc- The RSNPC to check.- Returns:
trueif the Npc is dead or dying; otherwisefalse.
-