SRL Archive - Help

Calling antiban


Le Jingle

2012-03-13 04:05:33

If I have a function antiban, then I don't need to call it in my main loop which is listed towards the end of my script, correct?

Ex. of my current antiban that is stated after the procedures and before the final loop:

function Antiban (Rate:integer;SKillName:string):Boolean;
begin

if(not(LoggedIn)) then
Exit;

Result:=True;
case random(Rate) of
0..200: RandomMovement;
201..500: RandomRClick;
501..1000: begin
HoverSkill('Magic', False);
Result := True;
end;

else Result:= False;
end;
end;

Is this correct or should I try to change it to a procedure and include it into my main loop..? (Any help welcomed as I'm new :P )

davis_junior

2012-03-13 07:10:08

To use it, you must have it called somewhere.

If you want to use it, you must put it somewhere where it will be called, such as in your main loop.

KeepBotting

2012-03-13 07:32:07

It won't do anything unless you call it from somewhere else in your script.
Try calling it from within one of your other procedures, or in your main loop.

eska

2012-03-13 07:56:59

You need to call your AntiBan function/procedure somewhere else if you want it to be executed.

This could be in the main program, in the main loop, in another function/procedure or at more than one place.


For example

procedure RetardedProcedure;
var x: integer;
begin
x:= 0;

repeat
WriteLn('Im a retard, hurr durr');
AntiBan;
inc(x);
until (x > 5)

WriteLn('Hurr, I might be a retard but I called AntiBan 6 time, umad?');
end;

Sex

2012-03-13 08:25:23

srl_Procs[srl_AntiBan] := @Antiban;
Put that after SetupSRL; and your procedure will be called during various SRL functions :).

I must add though, your procedure can not have any parameters, so you'd have to set the rate/skill name as constants or something (if you decide to do it this way).