Log in

View Full Version : All commands needed to detect randoms for SRL



NxTitle
08-26-2007, 12:54 PM
Hello everyone,
What are the SRL commands needed to detect all of the randoms (talking, fighting, annoyances, etc.) that SRL can detect?

I can implement them myself, but I just want the commands to get a grasp on what to do.

-Nontitle

ShowerThoughts
08-26-2007, 01:26 PM
here wt-fawaki made it

{===============================================]
this function finds randoms by:wt-fawaki
[===============================================}
Function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=1 to 9 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: If FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
9: begin
if FindFight then
begin
RunTo('N',False);
end;
end;
end;

end;
end;

MasterKill
08-26-2007, 02:19 PM
this one is for srl 4.0 and it's a litte more advaced
////////////////////////////////////////////////////////////////////////////////
// THE SRL TEAM
function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i := 1 to 9 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
9: RC;
end;
Wait(1);
end;
end;
////////////////////////////////////////////////////////////////////////////////
procedure Randoms;
begin
if not LoggedIn then Exit;
FindTalk;
//FindATradeByRick; <-- don't use this lol
FindNormalRandoms;
FindFastRandoms;
FindLamp('mining');
SolvePinball;
if FindFight then
begin
RunTo('S', True);
Wait(15000 + random(5000));
RunBack;
end;
end;
////////////////////////////////////////////////////////////////////////////////

rotflmfwao
08-26-2007, 02:43 PM
o.0 cooleo. I'm gonna have to put that in my script when I get home. Thanks MK, I didn't even know about that.