I have a simple question which would be appreciated and repped if answered.
Can someone make a little thing which finds out if run is 100% or not...?
Thanks.
I have a simple question which would be appreciated and repped if answered.
Can someone make a little thing which finds out if run is 100% or not...?
Thanks.






SRL has a niftly little function called GetMMLevels which returns the level of the 3 Minimap level displays: HP, Prayer and Energy. So:
SCAR Code:function IsEnergy100: Boolean;
var
Colour: string; Level: Integer;
begin
Level := GetMMLevels('energy', Colour);
Result := Level = 100;
end;
Something like that should work.
Thanks Rep++
So if I wanted it to check if the rune is over 75% i do this?
and are you sure that the string is energy and not run? and where did "level" come from did you make that up or did you get it from the actual function..and one last thing can you tell me where you find these "little functions"?SCAR Code:function IsEnergy100: Boolean;
var
Colour: string; Level: Integer;
begin
Level := GetMMLevels('energy', Colour);
if Result := Level > 75 then
Blah blah?
end;![]()
In SRL folder...And to set run you can do SetRun(True) You could also do this to set it if it gets higher
SCAR Code:Procedure AutoSetRun;
var
Colour : string; Level: Integer;
begin
Level := GetMMLevels('energy', Colour);
if Level >= 75 then
SetRun(True);
end;
if you want to simply just check then you dont need the if then statement around the result ... Level is the var stored as a integer for GetMMLevels since that function returns an integer...
your result is comparing Level to the integer you tell it to...like
Result := Level = 100; will return true if its 100 and false for anything else and dont use ( := ) that is setting it equal to something ( = ) compares it
Result := Level > 75; will return true if its greater than but not equal to 75
Result := Level >= 75; will return true if its greater than or equal to 75
Result := Level < 75; will do the opposite of ^
Result := Level <= 75;
SCAR Code:function IsEnergy100: Boolean;
var
Colour: string;
Level: Integer;
begin
Level := GetMMLevels('energy', Colour);
Result := Level > 75;
end;
you can find these 'little functions' in the SRL Manual
open scar -> help -> SRL Manual
or by simply just knowing what is in SRL and knowing what happens in each update and looking through the files...
"Failure is the opportunity to begin again more intelligently" (Henry Ford)
Thanks a LOt Rep+! And does this mean I dont need SetRun(true) and the "if" and "then"? So if i put this:
SCAR Code:function IsEnergy100: Boolean;
var
Colour: string;
Level: Integer;
begin
Level := GetMMLevels('energy', Colour);
Result := Level > 75;
end;
it will set rune to true if it is greater than 75%? If not, what else do I add?
SCAR Code:function IsEnergy75: Boolean;
var
Colour: string;
Level: Integer;
begin
Level := GetMMLevels('energy', Colour);
Result := Level > 75;
end;
{in your code then do}
if IsEnergy75 then SetRun(True);
that will check and if the run/energy is greater than 75 it will set run on and if its 75 or less it will just not set run...
and there are many ways of doing this but that is the simplest right now, if you need more help you can add my msn since ive been replying to you threads a bit...if you have more questions...off to bed right now tho have midterm 2morrow
"Failure is the opportunity to begin again more intelligently" (Henry Ford)
nice zeph , i didnt know that ty
Blank!
i cant get any of the special commands to work such as SetRun
or GetMMLevel
it says that they are unknown identifies
please help or show me somewhere that can help cuz ive been at this for hours trying to figure it out on my own
You need to download SRL.
There are currently 1 users browsing this thread. (0 members and 1 guests)