Lamp¶
The Lamp interface is the interface that opens when you click an XP Lamp:
In these you can select a skill to gain a small amount of experience.
TLamp¶
Main record to interact with the Lamp interface.
Lamp.SetupInterface¶
procedure TLamp.SetupInterface();
Initializes Lamp variables.
Note
This is automatically called on the Lamp variable.
Lamp.IsOpen¶
function TLamp.IsOpen(): Boolean;
Returns true if the Lamp interface is open.
Example:
WriteLn Lamp.IsOpen();
Lamp.WaitOpen¶
function TLamp.WaitOpen(time: Integer; interval: Integer = -1): Boolean;
Returns true if the Lamp is open within time milliseconds.
Example:
WriteLn Lamp.WaitOpen();
Lamp.Open¶
function TLamp.Open(item: TItem = 'Lamp'): Boolean;
Attempts to open the Lamp interface.
By default it attempts to open the interface on the “Lamp” item, if you want a different one, e.g. “Antique lamp”, you need to specify that.
Example:
WriteLn Lamp.Open();
Lamp.Close¶
function TLamp.Close(escape: Boolean): Boolean;
function TLamp.Close(escapeProbability: Single = 0): Boolean; overload;
Closes the Lamp interface. Depending on escape or `escapeProbability the function
will either click the button or press escape key.
Example:
WriteLn Lamp.Close();
Lamp.GetSelected¶
function TLamp.GetSelected(): ESkill;
Returns the selected skill if there’s any.
ESkill.TOTAL is returned if no skill is selected.
Example:
{$I WaspLib/main.simba}
var
selected: ESkill;
begin
selected := Lamp.GetSelected();
WriteLn selected;
ShowOnTarget(Lamp.Slots[selected]);
end.
Lamp.Enable¶
function TLamp.Enable(skill: ESkill): Boolean;
Enabled a skill in the lamp interface.
Example:
{$I WaspLib/main.simba}
begin
Lamp.Enable(ESkill.HERBLORE);
end.
Lamp.Confirm¶
function TLamp.Confirm(): Boolean;
Clicks the confirm button in the lamp interface.
Example:
{$I WaspLib/main.simba}
begin
Lamp.Select(ESkill.HERBLORE);
end.
Lamp.Select¶
function TLamp.Select(skill: ESkill): Boolean;
Selects a skill in the lamp interface and clicks confirm.
Example:
{$I WaspLib/main.simba}
begin
Lamp.Select(ESkill.HERBLORE);
end.
Lamp variable¶
Global TLamp variable.