Log in

View Full Version : Need help with the "repeat" function for a game other than RuneScape.



peetu
03-25-2012, 01:00 PM
9mXc3Y_9UXU

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('mggAAAHicY2NgYJjByMCQD8QVQFwMxPOAeB EQv2OA4MdA/AOInwLxRyDeWHyGoXf3eYb7x14xLIo8xHCg9xrDutyTDNxAOWy YEQeGAAC+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('mlwAAAHicY2dgYNjFyMCwG4iPAvEmID4AxN uA+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+C8u cBcT9QPg2IY4A4HYhbgLgDyr8SOpPh464bDDbWNgx381YxPG7c Bua/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.

Gucci
03-25-2012, 04:26 PM
Repeat
ShoeClick;
Until(not(FindDTM(Shoe, x, y........)))

That should work

peetu
03-25-2012, 07:04 PM
Repeat
ShoeClick;
Until(not(FindDTM(Shoe, x, y........)))

That should work

Cheers!