SRL Archive - Help

Antiban problem!


ffcfoo

2010-07-03 15:13:13

Hello, first take a look at my script:

program foozyfletcher;
{$Define SMART}
{$i SRL/SRL.scar}

var LogDTM, LongBowDTM: Integer;

const
SMART_WORLD = 152; // World to load
SMART_MEMBERS_WORLD = True; // True = Members world

procedure DeclarePlayers;
begin
NumberOfPlayers(1);

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
LampSkill := 'fletching';
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;
end;

procedure LoadDTMs;
begin
LogDTM := DTMFromString('78DA63CC636660C8626440068E56220CFC401' +
'A26CA580B545382AA86818109220753930C549349404D3A504D0D' +
'0135E54035A9F8D5000038480519');

LongBowDTM := DTMFromString('78DA6394606160C861644006B326E833F0036' +
'990E87F20605406AAA94655C3C0C0042661A28C5C40358904D488' +
'01D5A4E157030024440790');
end;

procedure FreeDTMs;
begin
FreeDTM(LogDTM);
FreeDTM(LongBowDTM);
end;


function OutOfLogs: Boolean;
var x, y: Integer;
begin
if (not FindDtm(LogDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then begin
Result := True;
end else begin
Result := False;
end;
end;

function OutOfBows: Boolean;
var x, y: Integer;
begin
if (not FindDtm(LongBowDTM, x, y, MIX1, MIY1, MIX2, MIY2))then begin
Result := True;
end else begin
Result := False;
end;
end;

procedure Antiban;
begin
case Random(100) of
10: BoredHuman;
20: HoverSkill('random', False);
30: HoverSkill('fletching', False);
40: PickUpMouse;
50: RandomRClick;
60: RandomMovement;
70: SleepAndMoveMouse(200 + Random(50));
90: ExamineInv;
end;
end;

procedure Banking;
begin
OpenBankFast('veb'); // Opens Bank
Wait(300+Random(300));
MouseBox(53, 102, 57, 113, 2);
Wait(300+Random(300));
ChooseOption('All');
Wait(300+Random(300));
CloseBank;
end;

procedure Cutting;
var x, y: Integer;
begin
InvMouse(1,1);
Wait(300+Random(100));
if (FindDTM(LogDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then begin
Mouse(x, y, 3, 3, True);
Wait(900+Random(900));
MouseBox(264, 408, 274, 419, 2);
Wait(800+Random(800));
ChooseOption('X');
Wait(300+Random(300));
TypeSend(IntToStr(RandomRange(27, 99)));
Wait(700+Random(700));
end;
repeat
FindNormalRandoms;
until(OutOfLogs);
end;

procedure Signature;
begin
ClearDebug;
Writeln('FOOZY FLETCHER!');
Wait(100);
Writeln('BY: FOOSMEELS!');
end;

procedure PutInBank;
var x, y: Integer;
begin
OpenBankFast('veb');
Wait(300+Random(300));
if (FindDTM(LongBowDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
Mouse(x, y, 3, 3, False);
Wait(300+Random(300));
ChooseOption('All');
end;

begin
Smart_Server := SMART_WORLD;
Smart_Members := SMART_MEMBERS_WORLD;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LogInPlayer;
LoadDTMs;
Antiban;
Signature;
repeat
Banking;
Cutting;
PutInBank;
until(False);
FreeDTMs;
end.

Okay so I got antiban procedure but I do not know how to input it into the script. While it's cutting in the cutting procedure I put something to activate the Antiban procedure while it is cutting until it runs out of logs and has to repeat the script all over again.

i luffs yeww

2010-07-03 15:19:55


procedure DoAntiBan;
begin
while not OutOfLogs do
begin
AntiBan;
Wait(1000 + Random(2000));
end;
end;

Then call that in Cutting;.


repeat
FindNormalRandoms;
DoAntiban;
until(OutOfLogs);

I think that should work.

ffcfoo

2010-07-03 15:22:48

From: i luffs yeww

procedure DoAntiBan;
begin
while not OutOfLogs do
begin
AntiBan;
Wait(1000 + Random(2000));
end;
end;

Then call that in Cutting;.


repeat
FindNormalRandoms;
DoAntiban;
until(OutOfLogs);

I think that should work.


OH! Now I finally get that! I saw that once in a tutorial and I didn't understand it untill you put OutOfLogs in there. Thanks xD

EDIT: [Error] (107:3): Unknown identifier 'DoAntiBan' at line 106
Compiling failed.

I put it in the main line?

program foozyfletcher;
{$Define SMART}
{$i SRL/SRL.scar}

var LogDTM, LongBowDTM: Integer;

const
SMART_WORLD = 152; // World to load
SMART_MEMBERS_WORLD = True; // True = Members world

procedure DeclarePlayers;
begin
NumberOfPlayers(1);

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
LampSkill := 'fletching';
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;
end;

procedure LoadDTMs;
begin
LogDTM := DTMFromString('78DA63CC636660C8626440068E56220CFC401' +
'A26CA580B545382AA86818109220753930C549349404D3A504D0D' +
'0135E54035A9F8D5000038480519');

LongBowDTM := DTMFromString('78DA6394606160C861644006B326E833F0036' +
'990E87F20605406AAA94655C3C0C0042661A28C5C40358904D488' +
'01D5A4E157030024440790');
end;

procedure FreeDTMs;
begin
FreeDTM(LogDTM);
FreeDTM(LongBowDTM);
end;


function OutOfLogs: Boolean;
var x, y: Integer;
begin
if (not FindDtm(LogDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then begin
Result := True;
end else begin
Result := False;
end;
end;

function OutOfBows: Boolean;
var x, y: Integer;
begin
if (not FindDtm(LongBowDTM, x, y, MIX1, MIY1, MIX2, MIY2))then begin
Result := True;
end else begin
Result := False;
end;
end;

procedure Antiban;
begin
case Random(100) of
10: BoredHuman;
20: HoverSkill('random', False);
30: HoverSkill('fletching', False);
40: PickUpMouse;
50: RandomRClick;
60: RandomMovement;
70: SleepAndMoveMouse(200 + Random(50));
90: ExamineInv;
end;
end;

procedure Banking;
begin
OpenBankFast('veb'); // Opens Bank
Wait(300+Random(300));
MouseBox(53, 102, 57, 113, 2);
Wait(300+Random(300));
ChooseOption('All');
Wait(300+Random(300));
CloseBank;
end;

procedure Cutting;
var x, y: Integer;
begin
InvMouse(1,1);
Wait(300+Random(100));
if (FindDTM(LogDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then begin
Mouse(x, y, 3, 3, True);
Wait(900+Random(900));
MouseBox(264, 408, 274, 419, 2);
Wait(800+Random(800));
ChooseOption('X');
Wait(300+Random(300));
TypeSend(IntToStr(RandomRange(27, 99)));
Wait(700+Random(700));
end;
repeat
FindNormalRandoms;
DoAntiBan;
until(OutOfLogs);
end;

procedure Signature;
begin
ClearDebug;
Writeln('FOOZY FLETCHER!');
Wait(100);
Writeln('BY: FOOSMEELS!');
end;

procedure PutInBank;
var x, y: Integer;
begin
OpenBankFast('veb');
Wait(300+Random(300));
if (FindDTM(LongBowDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
Mouse(x, y, 3, 3, False);
Wait(300+Random(300));
ChooseOption('All');
end;

procedure DoAntiBan;
begin
while not OutOfLogs do
begin
AntiBan;
Wait(1000 + Random(2000));
end;
end;

begin
Smart_Server := SMART_WORLD;
Smart_Members := SMART_MEMBERS_WORLD;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LogInPlayer;
LoadDTMs;
DoAntiBan;
Antiban;
Signature;
repeat
Banking;
Cutting;
PutInBank;
until(False);
FreeDTMs;
end.

i luffs yeww

2010-07-03 15:36:00

Put the procedure before where it's called.

ffcfoo

2010-07-03 15:37:39

From: i luffs yeww
Put the procedure before where it's called.


Oh. I didn't no I had to do that.

EDIT: In the antiban it looks at the stats then after that it goes to the bank and deposits the bows when it is not even done cutting all of the wood? Hmm.

i luffs yeww

2010-07-03 15:46:28

Because that's the way you have your OutOfLogs procedure. Add GameTab(Tab_Inv); right after the begin in OutOfLogs.

ffcfoo

2010-07-03 15:52:25

From: i luffs yeww
Because that's the way you have your OutOfLogs procedure. Add GameTab(Tab_Inv); right after the begin in OutOfLogs.


Ahh thanks, Works good!

i luffs yeww

2010-07-03 16:01:50

Yup. But we can just talk on Steam.. :p It'd be faster.