Achievements

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

../../images/achievements.png

EAchievementTab

EAchievementTab = enum(SUMMARY, QUESTS, DIARIES);

An enum representing each of the Achievements gametab tabs.


EAchievementDiary

EAchievementDiary = 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.


TAchievementsSummary

Helper record used to interact with the {ref]Achievements gametab “Summary” tab:

../../images/achievements.png

TAchievementsSummary.SetupGameTab

procedure TAchievementsSummary.SetupGameTab();

Internal method used to setup {ref]TAchievementsSummary coordinates.

This is automatically called for you on the Achievements.Summary variable.


TQuestList

Helper record used to interact with the {ref]Achievements gametab “Quests” tab:

../../images/achievements_quests.png

TQuestList.SetupGameTab

procedure TQuestList.SetupGameTab();

Internal method used to setup {ref]TQuestList coordinates.

This is automatically called for you on the Achievements.Quests variable.


TDiarySlot

Helper record used to interact with a TDiaryList slot.


TDiaryList

Helper record used to interact with the {ref]Achievements gametab “Diaries” tab:

../../images/achievements_diaries.png

TDiaryList.SetupGameTab

procedure TDiaryList.SetupGameTab();

Internal method used to setup {ref]TDiaryList coordinates.

This is automatically called for you on the Achievements.Diaries variable.


TDiaryList.GetSlots

function TDiaryList.GetSlots(): array of TDiarySlot;

Returns the slots available in the diary tab as an array of TDiarySlot.

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();
../../images/diary_slots.png

TDiaryList.GetSlot

function TDiaryList.GetSlot(diary: EAchievementDiary): TDiarySlot;

Returns the slot of the specified diary as a TDiarySlot.

Example:

img := Target.GetImage();
slot := Achievements.Diaries.GetSlot(EAchievementDiary.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();
../../images/diary_slot.png

TDiaryList.ScrollTo

procedure TDiaryList.ScrollTo(diary : EAchievementDiary);

Scrolls to the specified diary.

Example:

Achievements.Diaries.ScrollTo(EAchievementDiary.MORYTANIA);

TAchievements

Main record used to interact with the {ref]Achievements gametab.

Each tab has it’s own specific variable:

  • TAchievements.Summary: TAchievementsSummary

  • TAchievements.Quests: TQuestList

  • TAchievements.Diaries: TDiaryList

So if you want to use TDiaryList.GetLevel for example you would do this:

WriteLn Achievements.Diaries.GetLevel(EAchievementDiary.ARDOUGNE);

Achievements.SetupGameTab();

procedure TAchievements.SetupGameTab();

Internal method used to setup the TAchievements coordinates.

This is automatically called for you on the Achievements variable.


Achievements.IsOpen

function TAchievements.IsOpen(): Boolean;

Returns true/false if the inventory is open.

Example:

WriteLn Achievements.IsOpen();

Achievements.Open

function TAchievements.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: 3 tabs 4 tabs To handle this, you have the 2 following methods, they are used automatically for you on the Achievements variable.


Achievements.CountTabs

function TAchievements.CountTabs(): Integer;

Internal method used to count the available tabs on the Achievements gametab.


Achievements.SetupTabs

procedure TAchievements.SetupTabs();

Internal method used to update the coordinates of the tabs on the Achievements gametab.

This is automatically used for you.


Achievements.GetTab

function TAchievements.GetTab():  EAchievementTab;

Returns the currently active EAchievementTab.

Example:

WriteLn Achievements.GetTab();

Achievements.OpenTab

function TAchievements.OpenTab(tab:  EAchievementTab): Boolean;

Attempts to open the specified tab EAchievementTab.

Example:

WriteLn Achievements.OpenTab(EAchievementTab.DIARIES);

Achievements variable

Global TAchievements variable.


TDiaryList.GetLevel

function TDiaryList.GetLevel(diary: EAchievementDiary): 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(EAchievementDiary.MORYTANIA);