Hey everybody.
I'm sure you won't remember me but I once was a dedicated SRL forums member :P
Well, I've been writing a sort of script that would let people train ON me.
I've got SCAR 3.15 and rev #20. (Yeah old).
But I don't mind that I'm not fully up-to-date.
SCAR Code:
program New;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\Fighting.scar}
var CurrHP, HPLvl : Integer;
Color : string;
const
MinHP = 52; //HP to eat at!
function Eat(uptext: string): Boolean;
var I : Integer;
K : TPoint;
begin
GameTab(4);
I := 1;
repeat
CurrHP := getMMLevels('hp', color);
WriteLn(IntToStr(I));
begin
K := ItemCoords(I);
if (IsUpText(uptext)) then
begin
MoveMouse(K.X, K.Y);
ClickMouse(K.X, K.Y, true);
I := I + 1;
Wait(250);
end else I := I + 1;
end;
until(CurrHP = HPLvl);
Result := true;
end;
function CheckFood: Boolean;
var K, I : Integer;
begin
if (InvCount = 0) then
begin
K := 28 - InvCount;
K := K / 2;
K := round(K);
repeat
SendKeys('::food'+Chr(13));
Wait(10+random(10));
I := I + 1;
until(I = K);
end;
Result := true;
end;
begin
SetupSRL;
ActivateClient;
Wait(1000);
HPLvl := getSkillLevel('hitpoints');
repeat
begin
CurrHP := getMMLevels('hp', color);
if (CurrHP <= MinHP) or (Color = 'orange') then
begin
WriteLn('Your current HP: '+ IntToStr(CurrHP) +', time to eat!');
Eat('ray');
end;
CurrHP := getMMLevels('hp', 'green');
CheckFood;
Wait(1500);
end;
until(IsFKeyDown(1));
end.
Please don't mind the sloppy code.
But it just doesn't do what it needs to do:
Eat the next Manta ray in the inventory when the HP is below 'Maxx'.
If you really want to know, it's not for the official RS.
Thanks.