SRL Archive - OSR Help

SRL_Procs?


Dgby714

2010-03-03 22:03:36

I seen this in Globals.scar and im wonderin how to use srl_AntiBan?

{ const SRL_Procs Constants;
Description: Constants for SRL_Procs. }
const
srl_AntiBan = 0; //Your AntiBan procedure to be called during various SRL functions and procedures. (Flag, FFlag)
srl_OnFindMod = 1; //After a player or Jagex mod is detected talking in the chat box.
srl_OnFindDead = 2; //After the text 'Oh dear you are dead' is detected.
srl_OnFindFight = 3; //After detecting a fighting random.
srl_OnFindTrade = 4; //After the trade has been attempted (either success or failure).
srl_OnNextPlayer = 5; //While the players are logged out and before CurrentPlayer changes.
srl_OnSendStats = 6; //After SRL Script Stats are sent to the server.
srl_OnRandomCall = 7; //Called in FindNormalRandoms, FindInventoryRandoms, FindNonInventoryRandoms. (NOT ONLY WHEN RANDOMS ARE DETECTED).
srl_OnFindRandom = 8; //After a random event is detected. (FNR, FIR, FNIR, FT)
srl_OnLogOut = 9; //Just before the player is logged out.
srl_InNextPlayerLoop = 10; //During the infinite loop in NextPlayer when all players are inactive.
srl_OnCustomRC = 11; //When custom RC trigger has been given.

{ var SRL_Procs: array [0..11] of procedure();
Description: Varibles to store user-defined procs to be called in SRL. }
var
SRL_Procs: array [0..11] of procedure();

would i do like

SRL_Procs[srl_AntiBan] := MyAntiBan();

Sex

2010-03-03 22:26:05

SRL_Procs[srl_AntiBan] := @MyAntiBan;

Dgby714

2010-03-03 22:43:08

From: Sex
SRL_Procs[srl_AntiBan] := @MyAntiBan;


Thanks =)

Sex

2010-03-03 22:48:01

No problem :).