SRL Archive - Help and Support

Question about Bitmaps and Progress Reports


w4ffl3z

2006-07-03 00:19:14

Alrighty, here is what I would like to do. I have a bitmap and it is a bitmap of a level up text (not for rs). So I want to do if find this bitmap add to progress report as +1.

ex. Number of Levels Gained: Countbitmaps(number of times bitmap has been found)

Is there something I can use along those lines? Thanks,

-w4ffl3z

realrune

2006-07-03 00:43:29

Something Like This?

Program New;

Var
Bitmap, TimesFound, X, Y : integer;

begin
Bitmap := 'Your Bitmap Here';
repeat
if(FindBitmapToleranceIn(x, y, Bitmap, 1, 1, 2, 2, 10))then
begin
TimesFound := TimesFound + 1;

// Whatever else you want to do here...

end;
Wait(100);
until(False);
end.

w4ffl3z

2006-07-03 01:13:02

Yes this is along the lines of what I was thinking. But how would I integrate it into a progress report. And also, how can I make that into my FindBitmaps procedure ( I already have used end else). I am not sure how to do this now. Thanks,

-w4ffl3z

WhiteShadow

2006-07-03 02:30:17

From: w4ffl3z
Yes this is along the lines of what I was thinking. But how would I integrate it into a progress report. And also, how can I make that into my FindBitmaps procedure ( I already have used end else). I am not sure how to do this now. Thanks,

-w4ffl3z

[PHP]
program New;

var
x, y, BmpName, FoundTimes : Integer;

procedure LoadPl0x; //Load once
begin
BmpName:= BitmapFromString(11, 8, 'z78DA73731B05A300010035FB9061');
//a random bmp of mine. xD replace yours with it.
end;

procedure TrackLvl;
begin
if(FindBitmap(BmpName, x, y))then
FoundTimes:= FoundTimes + 1 //+1 to variable Found Times;
end;

procedure Report;
begin
Writeln('<<——————————>>');
Writeln(' Lvled '+IntToStr(FoundTimes)+' time');//Writes FoundTimes in Debug. IntToStr converts integers to strings;
Writeln('<<——————————>>');
end;

begin
LoadPl0x; //bitmap is loaded
TrackLvl; //if found foundtimes is added by one
Report;
end.

//remember variables always start with 0. :P[/PHP]

w4ffl3z

2006-07-03 15:13:11

Thanks WhiteShadow and Realrune. I appreciate the help! It works great!

-w4ffl3z

Flat Line

2006-07-05 13:04:39

my problem was somewhat similar, both u guys helped me out a bit