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 TypeMethodDescriptionboolean
eat
(int percent, int... foods) Eats at the desired HP %.boolean
Eat
(int percent, int... foods) Deprecated.int
Gets the attack mode.int
Gets the current player's health as a percentage of full health.int
Gets the current player's life points.int
Gets the current player's prayer points.int
Gets the special bar energy amount.int
Returns the damage we're taking from venomint
Gets the current Wilderness Level.boolean
isAttacking
(RSNPC npc) Checks if your character is interacting with an Npc.boolean
Returns whether the auto-retaliate option is enabled.boolean
Checks whether the desired Npc is dead.boolean
Returns whether we're envenomedboolean
Returns whether we're poisoned.boolean
Returns whether the special-attack option is enabled.void
setAutoRetaliate
(boolean enable) Turns auto-retaliate on or off in the combat tab.boolean
setFightMode
(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:
true
once 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:
true
once 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
-true
to enable;false
to disable.
-
isAutoRetaliateEnabled
public boolean isAutoRetaliateEnabled()Returns whether the auto-retaliate option is enabled.- Returns:
true
if 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:
true
if 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:
true
if poisoned; otherwisefalse
.
-
isEnvenomed
public boolean isEnvenomed()Returns whether we're envenomed- Returns:
true
if 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:
true
if 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:
true
if interacting; otherwisefalse
.
-
isDead
Checks whether the desired Npc is dead.- Parameters:
npc
- The RSNPC to check.- Returns:
true
if the Npc is dead or dying; otherwisefalse
.
-