SRL Archive - OSR Help

Familiars


jSherz

2012-02-19 09:06:35

What's the best way of selecting a familiar? Colour detection with find text?

Also, how do I make sure that I only select my own familiar? Is that possible?

Brandon

2012-02-19 09:08:09

Use the minimap icon

jSherz

2012-02-19 09:16:28

How do I go from minimap icon to clicking the object?

EDIT: Also, familiars do not show up on the minimap.

Flight

2012-02-19 09:44:06

summoning.simba:

//-----------------------------------------------------------------//
//-- 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,11192179,695,130,720,155,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:
-'' : 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;

Narcle

2012-02-19 09:49:43

@ Flight
I looked at that awhile ago, I might add it to SRL skills. So be aware it might get added.

jSherz

2012-02-19 09:49:49

Thank you very much!

Flight

2012-02-19 10:45:18

From: Narcle
@ Flight
I looked at that awhile ago, I might add it to SRL skills. So be aware it might get added.


Will surely keep an eye out for it. That'd be handy.