SRL Archive - News and General

Anti-Randoms


Phlame1

2007-12-30 00:34:01

Hey guys, I have a question.

Does each individual script handle randoms in a unique way, or is there like an central SRL method to handling them?

You see, for many of the scripts I use randoms always kill me or break my axehead, and I do understand why. And for gods sake don't tell me download SRL or SCAR includes because I have!

Please, enlighten me. :)

ZaSz

2007-12-30 00:42:45

Fine i'll be the one to help i'm showing you the basic find random stuff.
procedure FindRandoms;
begin
FindTalk;
FindFastRandoms;
FindNormalRandoms;
FindLamp('Woodcutting');
SolvePinball;
if (FindFight) then
begin
MakeCompass('N');
RunTo('N', True);
Wait(7000 +Random(3000));
end;
end;

Thats usually used in most.

Another.

function FindFastRandoms: Boolean;// credits to fawk? Forgot who...
var
i: Integer;
begin
for i:=1 to 10 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;
10: Respond;
end;
wait(1);
end;
end;

Phlame1

2007-12-30 01:04:51

Oh I see, but why do ents always screw me up?

John Ayy

2007-12-31 06:37:15

It depends on how good the script is, more complex scrips handle more randoms better.

Phlame1

2007-12-31 17:57:05

Oh ok, I understand now.

Santa_Clause

2008-01-01 01:06:42

From: John Ayy
It depends on how good the script is, more complex scrips handle more randoms better.


No…there's only one way to handle randoms in SRL…it just usually screws up if you don't call them enough.

Phlame1

2008-01-01 01:54:18

Oh, so it inst different from script to script! Santa, are you the same santa at fagex?

Twisted

2008-01-01 01:57:45

I thought FindNormalRandoms handles all randoms so you don't have to have that long thing in your script?

Phlame1

2008-01-01 13:06:28

Yeah thats what I thought too, but apparently its not the way it works.

n3ss3s

2008-01-01 13:16:42

/allAbove.overRuled


Only thing you need to do is to place FindNormalRandoms where you feel that you need to check for randoms.

Though fighting you need to handle seperately.