SRL Archive - OSR Help

Bitmap Trouble


BigRedJapan

2013-02-23 15:23:38

So this is my code!
I found the banker and it right clicked but after that it just executes the script.

A little Help!

program Testbitmap;

{$I SRL/SRL.Simba}
{$I P07Include.Simba}

var
Bank:integer;


Procedure OpenB;
var
X,Y:Integer;

begin
if FindColorTolerance(X, Y, 7763583, 215, 97, 320, 121, 5) then
begin
WriteLn('Found Banker');
mmouse(x, y, 1, 1);
wait(250);
ClickMouse(X, Y, mouse_Right)
wait(450);
if FindBitmapToleranceIn(Bank, X, Y, 217, 91, 357, 200, 80) then
begin
WriteLn('Found Bitmap');
mmouse(x, y, 1, 1);
wait(250);
ClickMouse(X, Y, mouse_Left);
end;
end;
end;



Begin
MouseSpeed := 15;
Bank := BitmapFromString(77, 8, 'meJytVFsOwCAI43a7wH53/2Mwo5n' +
'hVUQz4gepFdvBZGYiuu6He4x8dy3PUtv9CDLfXcdnWQT18HhI9ng7' +
'a3Arby5xkcQR39tM+CE43UmFnOLeEfpWgTytcIE7R+G3qhSZw2YGz' +
'zTOcKZNiSOP+dD6RofKFR7OgysumaHN3A7K0cQWlSw5xQn3XR4KKx' +
'aKOXK6YaGWw8kHXUa/VT60y/zsCTqwnDxZiqxDaYu2dvO82o8X5UV' +
'eNAQrtg==');
OpenB;
FreeBitmap(Bank);
end.


No Errors Found by Compiler

BigRedJapan

2013-02-27 02:03:04

NO one can tell me whats wrong with my code?

Smidqe

2013-02-27 02:28:00

From: Rules of Joe
NO one can tell me whats wrong with my code?


If the script didn't tell that the bitmap was found, then the problem is the bitmap itself. Try redoing the bitmap and make it smaller (large ones tend to not work on mainscreen IIRC).

BigRedJapan

2013-02-27 03:59:00

iv done it like 5 times before i posted!

Smidqe

2013-02-27 04:14:46

From: Rules of Joe
iv done it like 5 times before i posted!


Then you might want to increase the tolerance. If that doesn't work then I'm out of ideas.

BigRedJapan

2013-02-27 12:08:41

Well thanks! But idk what to try Im try looking at some more advance guides!