SRL Archive - Help

logout; terminate if random


Lilgrimm

2012-02-27 06:45:08

I finally got 95 prayer using Evlin's bot! (thanks man!!) i modified it quite a bit, and now i was wondering if anybody could give me a simple logout then terminate script code when it gets a random. Thanks all

masterBB

2012-02-27 06:49:27

set:


procedure YourLogOutFuntion;
begin
writeln('oh no, a random');
Logout;
TerminateScript;
end;

SRL_Procs[srl_OnRandomCall] := @YourLogOutFuntion;

masterBB

2012-02-27 06:53:55

If you don't want SRL to attempt at all;

function YourFunction(var DoesItHaveToRunRandomCheck:Boolean):Boolean;
begin
DoesItHaveToRunRandomCheck := false;
Result := false;
Logout;
end;

SRL_OnFindRandomCall := @YourFunction;

Nebula

2012-02-27 11:26:07


if (FindNormalRandoms = true) then
begin
writeln('found random event');
Logout;
TerminateScript;
end;

I think that would be what you're looking for.

Lilgrimm

2012-02-27 11:30:06

Thanks guys you're awesome

Lilgrimm

2012-02-27 11:34:52

I waznt sure if I had to write a logout function itself