Skip to content

Commit 7d1ce60

Browse files
authored
Merge pull request #108 from jacz24/main
Added GetHPPercent and GetPrayerPercent to Minimap
2 parents d8c7780 + 074f3c7 commit 7d1ce60

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed

osrs/interfaces/minimap.simba

Lines changed: 100 additions & 0 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,6 +722,39 @@ begin
655722
Result := Round(((tpa[High(TPA)].Y-tpa[0].Y)/25)*100);
656723
end;
657724

725+
(*
726+
## Minimap.GetHPPercent
727+
```pascal
728+
function TRSMinimap.GetHPPercent(): Integer;
729+
```
730+
Returns the percent remaining of hp.
731+
732+
Example:
733+
```pascal
734+
WriteLn Minimap.GetHPPercent();
735+
```
736+
*)
737+
function TRSMinimap.GetHPPercent(): Integer;
738+
begin
739+
Result := Self.GetPercent(ERSMinimapOrb.HITPOINTS);
740+
end;
741+
742+
(*
743+
## Minimap.GetPrayerPercent
744+
```pascal
745+
function TRSMinimap.GetHPPercent(): Integer;
746+
```
747+
Returns the percent remaining of prayer.
748+
749+
Example:
750+
```pascal
751+
WriteLn Minimap.GetPrayerPercent();
752+
```
753+
*)
754+
function TRSMinimap.GetPrayerPercent(): Integer;
755+
begin
756+
Result := Self.GetPercent(ERSMinimapOrb.PRAYER);
757+
end;
658758

659759
(*
660760
## Minimap.Toggle

0 commit comments

Comments
 (0)