Magic
Methods to interact with the magic tab.
Magic.Setup
procedure TRSMagic.Setup; override;
Initializes Magic variables.
Note
This is automatically called on the Magic variable.
Magic.SetupAlignment
procedure TRSMagic.SetupAlignment(Mode: ERSClientMode); override;
Setups up the interface aligment for the current client mode.
Note
This is automatically called on the TRSClient.ClientModeChanged function.
Magic.IsOpen
function TRSMagic.IsOpen: Boolean;
Returns true if the Magic tab is open.
Example
WriteLn Magic.IsOpen;
Magic.Open
function TRSMagic.Open: Boolean;
Attempts to open the magic tab.
Example
Magic.Open;
Magic.GetSpellBook
function TRSMagic.GetSpellBook: ERSSpellBook;
Returns the current spell book.
Example
WriteLn Magic.GetSpellBook;
Magic.IsSpellBook
function TRSMagic.IsSpellBook(SpellBook: ERSSpellBook): Boolean;
Returns true if we are using the specified spell book.
Example
WriteLn Magic.IsSpellBook(ERSSpellBook.LUNAR);
Magic.GetSpellBoxes
function TRSMagic.GetSpellBoxes(out Spellbook: ERSSpellBook): TBoxArray;
Internal function to get the bounds of the spells of the current spell book.
Magic.GetSpellBox
function TRSMagic.GetSpellBox(Spell: ERSSpell; out Box: TBox): Boolean;
Internal function to get the specified spell bounds.
Magic.MouseSpell
function TRSMagic.MouseSpell(Spell: ERSSpell; Button: Int32 = MOUSE_MOVE): Boolean;
Used to interact with the specified spell.
Example
Magic.MouseSpell(ERSSpell.HIGH_LEVEL_ALCHEMY, MOUSE_LEFT);
Magic.CanActivate
function TRSMagic.CanActivate(Spell: ERSSpell): Boolean;
Returns true if we can activate the spell (we have runes, level and the spell unlocked).
Example
Magic.CanActivate(ERSSpell.HIGH_LEVEL_ALCHEMY);
Magic.IsSpellSelected
function TRSMagic.IsSpellSelected(Spell: ERSSpell): Boolean;
Returns true if the specified spell is currently active (with white outline).
Example
Magic.IsSpellSelected(ERSSpell.ICE_BARRAGE);
Magic.GetSelectedSpell
function TRSMagic.GetSelectedSpell: ERSSpell;
Returns the currently selected spell.
Example
WriteLn Magic.GetSelectedSpell;
Magic.CastSpell
function TRSMagic.CastSpell(Spell: ERSSpell): Boolean;
Attempts to cast the specified spell.
Example
Magic.CastSpell(ERSSpell.LOW_LEVEL_ALCHEMY);
var Magic
Global Magic variable.