SRL Archive - Research & Development Lounge

[Function] RsUpdate


Xendyke

2011-11-17 21:31:26

OK, becasue I have not found this function from SRL, I decided to create the function.

Like we all know that rs is updating everyday multiple times.


Returns true, if "RuneScape Has Been Updated" note is visible on screen.


function RsUpdated : boolean;
var
x,y,UpdateText : Integer;
begin
UpdateText := BitmapFromString(34, 12, 'beNq9U1sKgDAM640EHfrh1' +
'T2M/17CQiCETtzGpiMfJXRJH1uatjQM+zYDAzUd13n842Jm9WV85' +
'6IJasrYA0LHoryLYEqaGRgVpCljBDi8joAkMiFLkquhQtGlhgyNP' +
'yb0u6D+0GCTy7p0NRieR95yWF9xODlJHqUCJidsHwyTA/9CannF1' +
'+76RPPPugFRCGcb');

result := FindBitmap(x,y,UpdateText);
FreeBitmap(UpdateText);
end;

noidea

2011-11-17 21:50:14

Good work :) However, I believe there is already a function in login.scar that tells us this.

Tips:
If(FindBitmap(x,y,UpdateText)) then Result:= True;

can be shortened to

result := FindBitmap(x,y,UpdateText);

Xendyke

2011-11-17 21:54:06

From: noidea
Good work :) However, I believe there is already a function in login.scar that tells us this.

Tips:
If(FindBitmap(x,y,UpdateText)) then Result:= True;

can be shortened to

result := FindBitmap(x,y,UpdateText);



Thanks, you re right. I just edited. :)

Harry

2011-11-17 21:55:56

If you (CountColor(12378347, 260, 140, 510, 400)) on the login screen and it returns 732, the "RS has updated" message is open. Much easier and faster than messing with bitmaps. <– this is all in login.simba include by the way.

Just curious what you plan to do with this information when you find RS is updated? If you're trying to make a RS refresher or something, modifying login.simba would be a lot easier IMO.