# Combat Methods to interact with the combat tab. - - - ## Combat.Setup ```pascal procedure TRSCombat.Setup; override; ``` Initializes **Combat** variables. ```{note} This is automatically called on the **Combat** variable. ``` - - - ## Combat.SetupAlignment ```pascal procedure TRSCombat.SetupAlignment(Mode: ERSClientMode); override; ``` Setups up the interface aligment for the current client mode. ```{note} This is automatically called on the **TRSClient.ClientModeChanged** function. ``` - - - ## Combat.IsOpen ```pascal function TRSCombat.IsOpen: Boolean; ``` Returns true if the combat tab is open. Example: ```pascal WriteLn Combat.IsOpen; ``` - - - ## Combat.Open ```pascal function TRSCombat.Open: Boolean; ``` Attempts to open the combat tab. Example: ```pascal Combat.Open; ``` - - - ## Combat.GetButtons ```pascal function TRSCombat.GetButtons: TRSButtonArray; ``` Internal function to get the available buttons in the combat tab. - - - ## Combat.GetCombatStyle ```pascal function TRSCombat.GetCombatStyle: String; ``` Get the current attack style. Example: ```pascal WriteLn('The current combat style is: ', Combat.GetCombatStyle); ``` - - - ## Combat.SetCombatStyle ```pascal function TRSCombat.SetCombatStyle(Style: String): Boolean; ``` Set the attack style to the **Style** specified. Example: ```pascal Combat.SetCombatStyle(COMBAT_STYLE_SLASH); ``` - - - ## Combat.GetAutoRetaliate ```pascal function TRSCombat.GetAutoRetaliate(): Boolean; ``` Get the current state of auto retaliate. Example: ```pascal WriteLn Combat.GetAutoRetaliate; ``` - - - ## Combat.SetAutoRetaliate ```pascal function TRSCombat.SetAutoRetaliate(value: Boolean): Boolean; ``` Set the state of auto retaliate on or off. Example: ```pascal Combat.SetAutoRetaliate(True); ``` - - - ## Combat.GetWeapon ```pascal function TRSCombat.GetWeapon: String; ``` Get the name of the current worn weapon. Example: ```pascal WriteLn('The current weapon is: ', Combat.GetWeapon); ``` - - - ## Combat.GetCombatLevel ```pascal function TRSCombat.GetCombatLevel: Int32; ``` Get the current combat level. Example: ```pascal WriteLn('Current combat level is: ', Combat.GetCombatLevel); ``` - - - ## var Combat Global Combat variable.