SRL Archive - General Botting Help

FindBitmap not working


Alligaattor

2014-03-11 11:12:16

Okay so I've tried the following and none worked :(

FindBitmap (no chance… there is color changes each time the screen appears)

FindBitmapToleranceIn (had to rise the tolerance up to 525 until simba found the bitmap.. but at that tolerance it finds the bitmap even if it's not in the screen)

FindDeformedBitmapToleranceIn (used paint selection tool around a letter, painted the background black but didn't work)


What should I do?

program new;
{$i SRL-6/SRL.simba}

var
bmp,x,y,i,z,u : integer;

procedure bmps;
begin
Bmp := BitmapFromString(25, 40, 'meJzdlstPE0EYwK+W0u5CImF3tg' +
'1oTLcHo3+Mhz14KIlHPEEMGBIwkaJ9bAvbtJTtRnxcTIyPeJBEYlS' +
'iFw+1nIwXERNDfVGNAgFa/Potu52+ty1e3Pwy+TLz9bcz881O2uvW' +
'et1aj0vrJpqd1xxE63EXW4grsHHzNi6BQQJiO5+ycfFjXEynm59jh' +
'YRTSDoFjRE01gWtaieQr5Z74FfzXXwSAA8GarWKIYqDxBwkybqSxw' +
'dVXkz1iyon3uC9t4j3Du+9icHtYo+4CK0xCv2L/ZjMDoBcAZWTzJp' +
'IQ4/TmexBK0+hcDA2teKgJJ2oxq+8dDZTQVo+X2jM/n5hbPJFY9Xe' +
'Xn7906+3q1mT9OoXgO4pdmayF4aXnCSK1Fb92Ny+OLpc8a7qPUGiD' +
'B8EWlJRzjk7rxhmmI+MtKOC0neVVDWwrqpD9OhUkSNVHZayQ5VeR4' +
'YPgU0aepTObHSgCiBgC0u+B9ZUEWNbZGNRMp6ugGmTfPdN1WZuZ3T' +
'iORETRIwjpUDwKMQTgxiCvhNzjBDFRUVMD8SS76Gpgg/n88bvd++/' +
'N2bS/2rw9IK+1dSsQvSsLD7xVPrUWVVfLKUK/CMV3DBbW7uwYxTbC' +
'N2zE1benDyzUF7BShVWcEkvFhTXOHuyvsPYGcIec7TurHRVMY2XMV' +
'nG5DCkoUrGSkVxNKi/opkqgJ4IHrzDNEoV0eXV1FEFaQ+lqjHUTFU' +
'JpaqLZZVcb12tqqzwX6pYzs/wMx2owmY1UXWtWgWf26WJZZdntiGK' +
'4In1DZiXHniuI2Uq+DPw9duftY+5hvz8sJYbHnlCTXKG5a6CrY1LB' +
'i6Qy1PPKA+s0Q+t5LvXiYrlpvWdh4mdO3935fW6cS9ZAqozMv6U2i' +
'u/vsC2T1HVrKbNUrYJ5y+pqIPRBn8BCoZx7Q==');
end;

procedure check;
begin
if FindBitmapToleranceIn(bmp,x,y,680,529,775,606,525) then
begin
writeln('bitmap found');
i:=i+1;
end else
begin
writeln('did not find bitmap');
z:=z+1;
end
end;

begin
i:=0;
z:=0;
u:=0;
bmps;
repeat
check;
u:=u+1;
until(u=100);
Writeln('did not find ' + tostr (z) + ' times.');
Writeln('did find ' + tostr (i) + ' times.');
end.

Sjoe

2014-03-11 11:22:11

finddeformedbitmaptolerancein should be your best shot.

tolerance around 20 or something

if accuracy > 0.70 then
writeln('found');

example:

if FindDeformedBitmapToleranceIn(BMP, x, y, 158, 474, 444, 562, 20, 0, true, acc) then
Result := (acc >= 0.8);

Alligaattor

2014-03-11 12:48:19

Can't get it to find it at all..

here's the full screen..

and here's the bitmap I'm trying to find



program new;
{$i SRL-6/SRL.simba}

var
Bmp,x,y,i,z,u : integer;
acc:extended;

procedure bmps;
begin
Bmp := BitmapFromString(22, 39, 'meJzt1UkKACAIBdDuf2WnOoCFAy' +
'4SP+3CB4XiWt0injBLqXBuifh9EPkmAFDyH8LlI4xQJOS72phSQR1' +
'81yvC5SOM0FhQF6JLMKZo+/+bDcUF77k=');
end;

procedure check;
begin
if FindDeformedBitmapToleranceIn(Bmp, x, y, 700, 541, 795, 599, 20, 0, true, acc) then
begin
writeln('bitmap found');
i:=i+1;
end else
begin
writeln('did not find bitmap');
z:=z+1;
end
end;

begin
i:=0;
z:=0;
u:=0;
bmps;
repeat
check;
u:=u+1;
until(u=100);
Writeln('did not find ' + tostr (z) + ' times.');
Writeln('did find ' + tostr (i) + ' times.');
FreeBitmap(bmp);
end.

Kevin

2014-03-11 12:58:33

I think you made the bitmap wrong. I'm pretty sure there's no way a 22x39 bitmap is as small a string as "meJzt1UkKACAIBdDuf2WnOoCFAy4SP+3CB4XiWt0injBLqXBuifh9EPkmAFDyH8LlI4xQJOS72phSQR181yvC5SOM0FhQF6JLMKZo+/+bDcUF77k="

Sjoe

2014-03-11 13:07:35

you're not using acc


begin
if FindDeformedBitmapToleranceIn(Bmp, x, y, 700, 541, 795, 599, 20, 0, true, acc) then
begin
writeln(acc);
if acc > 0.7 then
begin
writeln('bitmap found');
i:=i+1;
end else
begin
writeln('found bitmap, but accuracy was lower than 0.7');
z:=z+1;
end;
end else
begin
z:=z+1;
writeln('did not find bitmap');
end;
end;

Olly

2014-03-11 13:29:36

Try taking the edges of teh X on your bitmap, I think your including the semi transparent edge points.

Alligaattor

2014-03-11 14:14:54

From: Kevin
I think you made the bitmap wrong. I'm pretty sure there's no way a 22x39 bitmap is as small a string as "meJzt1UkKACAIBdDuf2WnOoCFAy4SP+3CB4XiWt0injBLqXBuifh9EPkmAFDyH8LlI4xQJOS72phSQR181yvC5SOM0FhQF6JLMKZo+/+bDcUF77k="


Nope, there's only white, different colors of gray and black in the bitmap so the string isn't really long.
But I did take new picture of the letter X.

From: Sjoe
you're not using acc


begin
if FindDeformedBitmapToleranceIn(Bmp, x, y, 700, 541, 795, 599, 20, 0, true, acc) then
begin
writeln(acc);
if acc > 0.7 then
begin
writeln('bitmap found');
i:=i+1;
end else
begin
writeln('found bitmap, but accuracy was lower than 0.7');
z:=z+1;
end;
end else
begin
z:=z+1;
writeln('did not find bitmap');
end;
end;


Still can't find it. Even if I rise the tolerance up to 200 … and above 400 it says found even if there's no shape like in the bitmap in the defined area.


From: Olly
Try taking the edges of teh X on your bitmap, I think your including the semi transparent edge points.


Tried taking the shadows from the X but it didn't help :/


Here is the bitmap I tried using this time (no shadows and only solid white color from the letter)

and here's the script
program new;
{$i SRL-6/SRL.simba}

var
Bmp,x,y,i,z,u : integer;
acc:extended;

procedure bmps;
begin
Bmp := BitmapFromString(31, 39, 'meJzt1cEOgCAMA1D+/6c18bADcd' +
'C16wHjbiT0zeDEMf7a1/WUKcjheIrwSxHfZgLH5ZLve0f0aCFZBV/' +
'HRXmLK/LC1x87c7rkV60XDzCqUZ7wXnnyz8KtxxKmaVSypY4veomy' +
'6fPPkC682heXrbjSXQ8SPh6x4tbNBI7LJZ8bAPDCpEfX9x/5Xt3VtnKc');
end;

procedure check;
begin
if FindDeformedBitmapToleranceIn(Bmp, x, y, 700, 541, 795, 615, 50, 0, true, acc) then
begin
writeln(acc);
if acc > 0.7 then
begin
writeln('bitmap found');
i:=i+1;
end else
begin
writeln('found bitmap, but accuracy was lower than 0.7');
z:=z+1;
end;
end else
begin
z:=z+1;
writeln('did not find bitmap');
end;
end;

begin
i:=0;
z:=0;
u:=0;
bmps;
repeat
check;
u:=u+1;
until(u=100);
Writeln('did not find ' + tostr (z) + ' times.');
Writeln('did find ' + tostr (i) + ' times.');
FreeBitmap(bmp);
end.

Thank you very much for trying to help..
Have to use hard coded functions until I get the bitmap to work.. :/

Olly

2014-03-11 14:47:05

Can Simba even read colours from that game? try debugbitmap(bitmapfromclient(0, 0, 500, 500)); and see if it looks fine?

Alligaattor

2014-03-11 14:57:53

From: Olly
Can Simba even read colours from that game? try debugbitmap(bitmapfromclient(0, 0, 500, 500)); and see if it looks fine?


Ah so that's the problem..


I guess there's nothing to be done then.. have to use hard coded functions.. :S

Olly

2014-03-11 15:26:00

From: Alligaattor
Ah so that's the problem..


I guess there's nothing to be done then.. have to use hard coded functions.. :S


Can try ask @Brandon about his OpenGL plugin

Brandon

2014-03-11 20:40:39

From: Olly
Can try ask @Brandon about his OpenGL plugin




What game is it though Bro-san? Both OpenGL and DirectX plugins can be loaded by any game. Direct-X doesn't need to be loaded anymore though (unless using Smart) because apparently Simba can now read colours from Direct-X games even in the browser :o

That game might be using OpenGL. @OP, try loading the plugin with that game. Place it in the game's folder or tell me what game.