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.
TRSLamp¶
Main record to interact with the Lamp interface.
Lamp.SetupInterface¶
procedure TRSLamp.SetupInterface();
Initializes Lamp variables.
Note
This is automatically called on the Lamp variable.
Lamp.IsOpen¶
function TRSLamp.IsOpen(): Boolean;
Returns true if the Lamp interface is open.
Example:
WriteLn Lamp.IsOpen();
Lamp.WaitOpen¶
function TRSLamp.WaitOpen(time: Integer; interval: Integer = -1): Boolean;
Returns true if the Lamp is open within time
milliseconds.
Example:¶
WriteLn Lamp.WaitOpen();
Lamp.Open¶
function TRSLamp.Open(item: TRSItem = '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 TRSLamp.Close(escape: Boolean): Boolean;
function TRSLamp.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 TRSLamp.GetSelected(): ERSSkill;
Returns the selected skill if there’s any.
ERSSkill.TOTAL
is returned if no skill is selected.
Example:
{$I WaspLib/osrs.simba}
var
selected: ERSSkill;
begin
selected := Lamp.GetSelected();
WriteLn selected;
ShowOnTarget(Lamp.Slots[selected]);
end.

Lamp.Enable¶
function TRSLamp.Enable(skill: ERSSkill): Boolean;
Enabled a skill in the lamp interface.
Example:
{$I WaspLib/osrs.simba}
begin
Lamp.Enable(ERSSkill.HERBLORE);
end.

Lamp.Confirm¶
function TRSLamp.Confirm(): Boolean;
Clicks the confirm button in the lamp interface.
Example:
{$I WaspLib/osrs.simba}
begin
Lamp.Select(ERSSkill.HERBLORE);
end.

Lamp.Select¶
function TRSLamp.Select(skill: ERSSkill): Boolean;
Selects a skill in the lamp interface and clicks confirm.
Example:
{$I WaspLib/osrs.simba}
begin
Lamp.Select(ERSSkill.HERBLORE);
end.

Lamp variable¶
Global TRSLamp variable.