Log in

View Full Version : logout; terminate if random



Lilgrimm
02-27-2012, 11:45 AM
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
02-27-2012, 11:49 AM
set:


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

SRL_Procs[srl_OnRandomCall] := @YourLogOutFuntion;

masterBB
02-27-2012, 11:53 AM
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
02-27-2012, 04:26 PM
if (FindNormalRandoms = true) then
begin
writeln('found random event');
Logout;
TerminateScript;
end;


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

Lilgrimm
02-27-2012, 04:30 PM
Thanks guys you're awesome

Lilgrimm
02-27-2012, 04:34 PM
I waznt sure if I had to write a logout function itself