I noticed in the 'skill' branch of SRL we don't have anything for Summoning, so thinking of a couple functions that people might find useful I made one. It's nothing major or advanced, but it follows the basic SRL format. I also saved it as a Simba file rather than Scar file.
Code:
// * Function UsingFamiliar: Boolean;
// * Function GetSummonPoints: Integer;
// * Function InteractFamiliar: Boolean;
// * procedure SetupSummoning;
Simba Code:
//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- Summoning routines --//
//-----------------------------------------------------------------//
// * Function UsingFamiliar: Boolean;
// * Function GetSummonPoints: Integer;
// * Function InteractFamiliar: Boolean;
// * procedure SetupSummoning;
{*******************************************************************************
Function UsingFamiliar: Boolean;
By: Flight
Description: Returns if we currently have a Summoning familiar.
*******************************************************************************}
Function UsingFamiliar: Boolean;
Var
X,Y: Integer;
begin
Result := FindColorTolerance(X,Y,11521955,695,130,720,150,20);
end;
{*******************************************************************************
Function GetSummonPoints: Integer;
By: Flight
Description: Returns our current number of Summoning points remaining.
*******************************************************************************}
Function GetSummonPoints: Integer;
Var
Color: String;
begin
Result := Round(GetMMLevels('summon',Color));
end;
{*******************************************************************************
Function InteractFamiliar: Boolean;
By: Flight
Description: Handles all interactions between our familiar,
returns true if successful.
Options:
-'' (nothing) : Will left click on interaction tab
-'Attack','Cast','Interact,'Renew','Take','Dismiss','Call','Details','Select'
*******************************************************************************}
Function InteractFamiliar(Option:String): Boolean;
begin
if (not LoggedIn) then exit;
if UsingFamiliar then
begin
if (Option = '') then
begin
MouseBox(695,140,740,155,1);
Result := True;
end else
begin
MouseBox(695,140,740,155,2);
if ChooseOption(Option) then
Result := True
else
srl_Warn('InteractFamiliar', 'Incorrect option', warn_AllVersions);
end;
end else
srl_Warn('InteractFamiliar', 'No familiar present!', warn_AllVersions);
Wait(100 + Random(50));
end;
{*******************************************************************************
procedure SetupSummoning;
By: SRL
Description: Declares Global Bitmaps.
*******************************************************************************}
procedure SetupSummoning;
begin
end;
Like I said, it's nothing unique, but it's not like we'd be taking a step back by adding this in. We can only progress from it.