Skip to content

Commit 074f3c7

Browse files
committed
Added GetLevel Functions for every Orb
Helpful functions that get used frequently. Also did a little code clean up of my other commit to follow with project norms.
1 parent fa802ee commit 074f3c7

File tree

1 file changed

+67
-4
lines changed

1 file changed

+67
-4
lines changed

osrs/interfaces/minimap.simba

Lines changed: 67 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,73 @@ begin
451451
Result := Self.GetLevel(orb) > level;
452452
end;
453453

454+
(*
455+
## Minimap.GetRunEnergy
456+
```pascal
457+
function TRSMinimap.GetRunEnergy(): Integer;
458+
```
459+
Returns the remaining run energy.
460+
461+
Example:
462+
```pascal
463+
WriteLn Minimap.GetRunEnergy();
464+
```
465+
*)
466+
function TRSMinimap.GetRunEnergy(): Integer;
467+
begin
468+
Result := Self.GetLevel(ERSMinimapOrb.ENERGY);
469+
end;
470+
471+
(*
472+
## Minimap.GetHPLevel
473+
```pascal
474+
function TRSMinimap.GetHPLevel(): Integer;
475+
```
476+
Returns the remaining hitpoints.
477+
478+
Example:
479+
```pascal
480+
WriteLn Minimap.GetHPLevel();
481+
```
482+
*)
483+
function TRSMinimap.GetHPLevel(): Integer;
484+
begin
485+
Result := Self.GetLevel(ERSMinimapOrb.HITPOINTS);
486+
end;
487+
488+
(*
489+
## Minimap.GetPrayerLevel
490+
```pascal
491+
function TRSMinimap.GetPrayerLevel(): Integer;
492+
```
493+
Returns the remaining prayer points.
494+
495+
Example:
496+
```pascal
497+
WriteLn Minimap.GetPrayerLevel();
498+
```
499+
*)
500+
function TRSMinimap.GetPrayerLevel(): Integer;
501+
begin
502+
Result := Self.GetLevel(ERSMinimapOrb.PRAYER);
503+
end;
504+
505+
(*
506+
## Minimap.GetSpecLevel
507+
```pascal
508+
function TRSMinimap.GetSpecLevel(): Integer;
509+
```
510+
Returns the remaining special attack level.
511+
512+
Example:
513+
```pascal
514+
WriteLn Minimap.GetSpecLevel();
515+
```
516+
*)
517+
function TRSMinimap.GetSpecLevel(): Integer;
518+
begin
519+
Result := Self.GetLevel(ERSMinimapOrb.SPECIAL);
520+
end;
454521

455522
(*
456523
## Minimap Orbs Statuses and States
@@ -655,7 +722,6 @@ begin
655722
Result := Round(((tpa[High(TPA)].Y-tpa[0].Y)/25)*100);
656723
end;
657724

658-
659725
(*
660726
## Minimap.GetHPPercent
661727
```pascal
@@ -668,8 +734,6 @@ Example:
668734
WriteLn Minimap.GetHPPercent();
669735
```
670736
*)
671-
672-
673737
function TRSMinimap.GetHPPercent(): Integer;
674738
begin
675739
Result := Self.GetPercent(ERSMinimapOrb.HITPOINTS);
@@ -687,7 +751,6 @@ Example:
687751
WriteLn Minimap.GetPrayerPercent();
688752
```
689753
*)
690-
691754
function TRSMinimap.GetPrayerPercent(): Integer;
692755
begin
693756
Result := Self.GetPercent(ERSMinimapOrb.PRAYER);

0 commit comments

Comments
 (0)