Achievements¶
This page is dedicated to the achievements game tab and methods to interact with it.

ERSAchievementTab¶
ERSAchievementTab = enum(SUMMARY, QUESTS, DIARIES);
An enum representing each of the Achievements gametab tabs.
ERSAchievementDiary¶
ERSAchievementDiary = enum(
ARDOUGNE,
DESERT,
FALADOR,
FREMENNIK,
KANDARIN,
KARAMJA,
KOUREND_AND_KEBOS,
LUMBRIDGE_AND_DRAYNOR,
MORYTANIA,
VARROCK,
WESTERN_PROVINCES,
WILDERNESS
);
An enum representing each of the achievement diaries available.
TRSAchievementsSummary¶
Helper record used to interact with the {ref]Achievements
gametab “Summary” tab:

TRSAchievementsSummary.SetupGameTab¶
procedure TRSAchievementsSummary.SetupGameTab();
Internal method used to setup {ref]TRSAchievementsSummary
coordinates.
This is automatically called for you on the Achievements.Summary variable
.
TRSQuestList¶
Helper record used to interact with the {ref]Achievements
gametab “Quests” tab:

TRSQuestList.SetupGameTab¶
procedure TRSQuestList.SetupGameTab();
Internal method used to setup {ref]TRSQuestList
coordinates.
This is automatically called for you on the Achievements.Quests variable
.
TRSDiarySlot¶
Helper record used to interact with a TRSDiaryList slot.
TRSDiaryList¶
Helper record used to interact with the {ref]Achievements
gametab “Diaries” tab:

TRSDiaryList.SetupGameTab¶
procedure TRSDiaryList.SetupGameTab();
Internal method used to setup {ref]TRSDiaryList
coordinates.
This is automatically called for you on the Achievements.Diaries variable
.
TRSDiaryList.GetSlots¶
function TRSDiaryList.GetSlots(): array of TRSDiarySlot;
Returns the slots available in the diary tab as an array of TRSDiarySlot.
Example:
img := Target.GetImage();
for slot in Achievements.Diaries.GetSlots() do
begin
img.DrawColor := $FFFFFF;
img.DrawBox(slot.Bounds);
img.DrawColor := $00FFFF;
img.DrawBox(slot.Name);
img.DrawColor := $FF00FF;
img.DrawBox(slot.Number);
img.DrawColor := $FFFF00;
img.DrawBoxArray(slot.Levels, False);
end;
img.Show();
img.Free();

TRSDiaryList.GetSlot¶
function TRSDiaryList.GetSlot(diary: ERSAchievementDiary): TRSDiarySlot;
Returns the slot of the specified diary
as a TRSDiarySlot.
Example:
img := Target.GetImage();
slot := Achievements.Diaries.GetSlot(ERSAchievementDiary.FREMENNIK);
img.DrawColor := $FFFFFF;
img.DrawBox(slot.Bounds);
img.DrawColor := $00FFFF;
img.DrawBox(slot.Name);
img.DrawColor := $FF00FF;
img.DrawBox(slot.Number);
img.DrawColor := $FFFF00;
img.DrawBoxArray(slot.Levels, False);
img.Show();
img.Free();

TRSDiaryList.ScrollTo¶
procedure TRSDiaryList.ScrollTo(diary : ERSAchievementDiary);
Scrolls to the specified diary
.
Example:
Achievements.Diaries.ScrollTo(ERSAchievementDiary.MORYTANIA);
TRSAchievements¶
Main record used to interact with the {ref]Achievements
gametab.
Each tab has it’s own specific variable:
TRSAchievements.Summary: TRSAchievementsSummary
TRSAchievements.Quests: TRSQuestList
TRSAchievements.Diaries: TRSDiaryList
So if you want to use TRSDiaryList.GetLevel for example you would do this:
WriteLn Achievements.Diaries.GetLevel(ERSAchievementDiary.ARDOUGNE);
Achievements.SetupGameTab();¶
procedure TRSAchievements.SetupGameTab();
Internal method used to setup the TRSAchievements coordinates.
This is automatically called for you on the Achievements variable.
Achievements.IsOpen¶
function TRSAchievements.IsOpen(): Boolean;
Returns true/false if the inventory is open.
Example:
WriteLn Achievements.IsOpen();
Achievements.Open¶
function TRSAchievements.Open(): Boolean;
Attempts to open the inventory gametab.
Example:
WriteLn Achievements.Open();
Achievements Tabs¶
The Achievements tabs are dynamic as one of them can be hidden away on certain types of accounts:
To handle this, you have the 2 following methods, they are used automatically for you on the
Achievements variable.
Achievements.CountTabs¶
function TRSAchievements.CountTabs(): Integer;
Internal method used to count the available tabs on the Achievements gametab.
Achievements.SetupTabs¶
procedure TRSAchievements.SetupTabs();
Internal method used to update the coordinates of the tabs on the Achievements gametab.
This is automatically used for you.
Achievements.GetTab¶
function TRSAchievements.GetTab(): ERSAchievementTab;
Returns the currently active ERSAchievementTab.
Example:
WriteLn Achievements.GetTab();
Achievements.OpenTab¶
function TRSAchievements.OpenTab(tab: ERSAchievementTab): Boolean;
Attempts to open the specified tab
ERSAchievementTab.
Example:
WriteLn Achievements.OpenTab( ERSAchievementTab.DIARIES);
Achievements variable¶
Global TRSAchievements variable.
TRSDiaryList.GetLevel¶
function TRSDiaryList.GetLevel(diary: ERSAchievementDiary): Integer;
Returns the current completion level of the specified diary
.
The level will be between -1 and 4. -1 is returned if we fail.
Example:
WriteLn Achievements.Diaries.GetLevel(ERSAchievementDiary.MORYTANIA);