SRL Archive - OSR Help

Mod Found Log Out


wister1

2012-02-18 12:28:14

The Mod Log out feature is implemented by the scripter in an anti-ban or is it automatic implemented in any script?

shadowmarkus

2012-02-18 12:33:08

From: wister1
The Mod Log out feature is implemented by the scripter in an anti-ban or is it automatic implemented in any script?


Implemented by a scripter as far as I know.

Runescape Pro

2012-02-18 12:34:08

I believe it is called in antirandoms.

shadowmarkus

2012-02-18 12:39:31

From: Runescape Pro
I believe it is called in antirandoms.


Nope, it's not. I watched my bot ignore a mod the other day ;)

masterBB

2012-02-18 12:41:33

It is in the srl anti randoms… use UseFindMod := True to turn it on, though I believe that is standard.

wister1

2012-02-18 12:42:34

im asking because i wanted to implement in some ocasions but not in all but i dont seem to find this function if it is indeed one

for example, i watched zmi extreme work for a while and sometimes it logs out if a mod talks in chat but not always, which probably means it only happens when a function calls for a check chatbox to look for a sentence with silver/gold crown because sometimes it logs out after like 10 mins a mod talked…

masterBB

2012-02-18 12:46:25

{*******************************************************************************
function FindMod: Boolean;
by: Stupid3ooo
Description: Results True if a mod is found, then it waits 10-20 mins and logs back in
*******************************************************************************}
function FindMod: Boolean;
var
tX, tY: Integer;
begin
if (not UseFindMod) or (not LoggedIn) then exit;
if not SRLBitmapsLoaded then
LoadSRLBitMaps;
if (FindColorTolerance(tX, tY, 14737632, MCX1, MCY1, MCX1 + 40, MCY2, 15)) or
(FindColorTolerance(tX, tY, 589815, MCX1, MCY1, MCX1 + 40, MCY2, 15)) then
if (FindBitmapToleranceIn(bmpMod, tX, tY, MCX1, MCY1, MCX1 + 40, MCY2, 15)) or
(FindBitmapToleranceIn(bmpAdmin, tx, ty, MCX1, MCY1, MCX1 + 40, MCY2, 15)) then
begin
Result := True;
AddToSRLLog('******** FOUND MOD ********');
WriteLn('******** FOUND MOD ********');
TakeScreen('Found mod');
Inc(tmp_RandSolved[rand_Mod]);
SaveToChatLog;
if (SRL_Procs[srl_OnFindMod] <> nil) then
SRL_Procs[srl_OnFindMod]();
if (LogoutOnMod) then
begin
Players[CurrentPlayer].Rand := 'Found Mod';
WaitFunc(@ExitToLobby, 500, 1500);
Wait(60000 + Random(60000));
LoginPlayer;
Players[CurrentPlayer].Rand := '';
end;
end;
end;

This is the function. Things you can do with it:

Use the function:
UseFindMod := true;

To log out when it finds a mod.
LogoutOnMod:= true;

To run your function when its finds one.

procedure YourProcedure;
begin
writeln("Look, a mod!");
end;

SRL_Procs[srl_OnFindMod] := @YouProcedure;

edit:

It's activated when you call FindNormallRandoms; but not with FindNonInventoryRandoms; for some reason. You can manually call it with FindMod;

wister1

2012-02-18 12:59:35

thanks, my question is answered :D