SRL Archive - OSR Help

Need help with the "repeat" function for a game other that is not Runescape.


peetu

2012-03-25 09:01:50

[YOUTUBE]9mXc3Y_9UXU[/YOUTUBE]

I am making the bot for this game.

I got this so far.

program GoSuBotti;
{$i srl/srl.simba}

var
Counter:Integer;
Counter2:Integer;
Counter3:Integer;

procedure ShoeClick;
var
x, y:Integer;
Shoe:Integer;

begin
Shoe := DTMFromString('mggAAAHicY2NgYJjByMCQD8QVQFwMxPOAeBEQv2OA4MdA/AOInwLxRyDeWHyGoXf3eYb7x14xLIo8xHCg9xrDutyTDNxAOWyYEQeGAAC+4RVu');
if FindDTM(Shoe, x, y, 356, 16, 732, 425) then
begin
Mouse(x, y, 0, 0, true);
end;
FreeDTM(Shoe);
end;

//////////////////////////////////////////////////////////////////////


procedure ShoeClick2;

var
x, y:Integer;
Shoe:Integer;

begin

Shoe := DTMFromString('mlwAAAHicY2dgYNjFyMCwG4iPAvEmID4AxNuA+CAQrwLK1wFxOxB3APEWIN4ExCuBeGPxGYabu54xbKk8y1C7+giD9aFdDMviD4H53EB5XJgRD4YCAMyzF5M=');
if FindDTM(Shoe, x, y, 354, 18, 736, 422) then
begin
Mouse(x, y, 0, 0, true);
end;
FreeDTM(Shoe);
end;

//////////////////////////////////////////////////////////////////

procedure PantClick;

var
x, y:Integer;
Pant:Integer;

begin

Pant := DTMFromString('mlwAAAHicY2dgYJjByMDQC8TTgXgxEC+C8ucBcT9QPg2IY4A4HYhbgLgDyr8SOpPh464bDDbWNgx381YxPG7cBua/mXKYgRsojwsz4sFQAADEWxV8');

if FindDTM(Pant, x, y, 354, 18, 736, 422) then
begin
mouse(x, y, 0, 0, true);
end;
FreeDTM(Pant);
end;

/////////////////////////////////////////////////////////////////






begin
SetUpSRL
repeat
ShoeClick
wait(1000);
Inc(Counter);
until counter >=6;
repeat
ShoeClick2
wait(1000);
Inc(Counter);
until counter2>=6;
repeat
PantClick
wait(1000);
Inc(Counter);
until counter3>=6;
end.


So far the bot clicks all possible combination of the "Shoe" circles in the game, and a few possible combinations of the "Pants" icons.

I am asking that how could I set up a loop to click a specific icon for as long as there are still clickable icons in the game? After that it would move to clicking the second set of icons.

Help please?

P.S. I know that the current main loop is horrendous and doesn't fill its purpose.

Abu

2012-03-25 09:11:30

repeat
//the procedure
until False;

I think…

peetu

2012-03-25 09:13:40

From: abu_jwka
repeat
//the procedure
until False;

I think…


No, that repeats it infinitely.

Runescape Pro

2012-03-25 10:33:35

Make shoeclick a function. Function shoeclick: boolean; if it finds the dtm, do begin click it and result:=true. End else result:= false. Repeat shoeclick until shoeclick = false.

Edit: srl is a runescape specific include: not needed im pretty sure.