GameTabs¶
Methods to interact with the gametab buttons.
By default it will attempt to use “F-Keys” to open gametabs.
You can turn this off by setting TGameTabs.KeybindsEnabled to False.
The way keybindings work in WaspLib is that it will try a random “F-Key” everytime you want to open a gametab. Because it uses a random “F-Key”, it will probably not open the gametab you want but whatever opens, gets cached and mapped to the random “F-Key” used.
Next time you want to open a gametab that has already been mapped, it will use the correct “F-Key”.
EGameTab enum¶
EGameTab = enum(
COMBAT, STATS, ACHIEVEMENTS, INVENTORY, EQUIPMENT, PRAYER, MAGIC,
CLAN, FRIENDS, ACCOUNT, LOGOUT, OPTIONS, EMOTES, MUSIC, NONE
);
TGameTabs type¶
Main record responsible for handling the gametabs.
GameTabs.SetupInterface¶
procedure TGameTabs.SetupInterface();
Internal method responsible for setting up coordinates for the TGameTabs type.
This is automatically called for you on the GameTabs variable.
GameTabs.GetCurrent¶
function TGameTabs.GetCurrent(): EGametab;
Get the currently active EGameTab.
Example:
ShowOnTarget(GameTabs.Tabs[GameTabs.GetCurrent()]);
GameTabs.IsOpen¶
function TGameTabs.IsOpen(tab: EGameTab): Boolean;
Returns true/false if the specified tab is currently open.
Example:
WriteLn GameTabs.IsOpen(EGameTab.INVENTORY);
GameTabs.WaitOpen¶
function TGameTabs.WaitOpen(
tab: EGameTab; time: Integer = TICK; interval: Integer = -1
): Boolean;
Returns true/false if the specified tab opens within the specified time.
Example:
Mouse.Click(GameTabs.Get(EGameTab.INVENTORY), EMouseButton.LEFT);
WriteLn GameTabs.WaitOpen(EGameTab.INVENTORY);
GameTabs.FKeyOpen¶
function TGameTabs.FKeyOpen(tab: EGameTab): Boolean;
Attempts to open the specified tab gametab with an FKey.
This works by randomly using FKeys that haven’t been tried yet and slowly
caching which gametabs they open. At first most times this is used it won’t
open the tab specified, but as more EKeyCode/EGameTab pairs get mapped
this starts getting them right.
Example:
WriteLn GameTabs.FKeyOpen(EGameTab.INVENTORY);
GameTabs.Open¶
function TGameTabs.Open(tab: EGameTab; fkeyProbability: Single = -1): Boolean;
Attempts to open the specified tab gametab.
If TGameTabs.KeybindsEnabled is true, we might attempt to open the tab
with GameTabs.FKeyOpen, subject to fkeyProbability.
Example:
WriteLn GameTabs.Open(EGameTab.INVENTORY);
GameTabs variable¶
Global TGameTabs type variable.
GameTab¶
Gametabs interfaces core. Whenever you want to use gametab coordinates that are not unique to a specific tab you should use this.
Check TInterface to see what coordinates it has available.
TGameTab type¶
The TGameTab type that holds the core coordinates of a gametab.
GameTab.SetupInterface¶
procedure TGameTab.SetupInterface();
Internal method used to setup the TGameTab type coordinates.
This is automatically called for you on the GameTab variable.
GameTab variable¶
Global TGameTab type variable.