SRL Archive - SRL Archives

New ClickHereToPlay Function


-chaos-

2006-06-14 19:30:13

function ClickHereToPlay : Boolean;
var C, RedSquare, RedLine, RedSquare2 : Integer;
begin
C := BitmapFromString(6, 10, 'z78DA33304000370C60804316977A' +
'4C5DF84D18FC6A88F1BB011161080044EB50E9');
[COLOR="lime"]The "C" from "Click Here To Play"[/COLOR]
RedSquare := BitmapFromString(2, 2, '5506015A15083B03004802' +
'00');
[COLOR="lime"] A 2 x 2 bitmap of the background[/COLOR]
RedLine := BitmapFromString(33, 1, 'z78DA658CC10D80300C0357' +
'72521CCA9322D87FA456751E91F858967D3A12013B3A1CE0EECAF' +
'36BEE5EF7A0AD1AAF2F446FEEC31E5CCABF47BBF834ECAC4EBD6D' +
'A001E2791BD1932FE6EAA9FE09BBEC28B3');
[COLOR="lime"]A 33 x 1 bitmap of the background[/COLOR]
RedSqaure2 := BitmapFromString(4, 4, '5506015A15086B1C096E2' +
'0153B03004802004802005506016B1C096B1C096B1C095A150855' +
'06016B1C096B1C095A1508');
[COLOR="Lime"]A 4 x 4 bitmap of the background[/COLOR]
if (FindBitmapToleranceIn(C, x, y, 3, 3, 515, 338, 5)) or
(FindBitmapToleranceIn(RedSquare, x, y, 3, 3, 515, 338, 5)) or
(FindBitmapToleranceIn(RedSquare2, x, y, 3, 3, 515, 338, 5)) or
(FindBitmapToleranceIn(RedLine, x, y, 3, 3, 515, 338, 5)) then
WWait (100 + Random(60))
Mouse (x, y, 2, 2, true);
Result:=True
FreeBitmap (C);
FreeBitmap (RedSquare);
FreeBitmap (RedSquare2);
FreeBitmap (RedLine);
end;

You can also just use the bitmap you find works the best and just keep that one :D

shaunthasheep

2006-06-14 19:33:50

You forgot to free the bitmaps

FreeBitmap(bitmap name here);

nice though

-chaos-

2006-06-14 20:52:32

oops ill edit it right now

Cheesehunk

2006-06-14 23:55:01

Not bad, but anyone who actually wants to run scripts before the update should be able to make there own easy BitMaps of this stuff…

In other words, I don't like leachers..:p

Pyro

2006-06-15 00:54:45

THere have been multiple fixes for this. Phantom added his into srl like a minute after the update. But i guess people feel the urge to help out

Krazy_Meerkat

2006-06-15 02:32:01

The background changes sometimes.. I'm not sure how, I was just testing a bitmap of the letter 'C'.
Look in the update forum for mine.

ollie

2006-06-15 06:37:28

all i did to fix it was to click the x and y again that it used for login. it works :) and no bitmaps used


procedure LoginPlayer;
var
tx,ty,c : Integer;
begin

if (not (LoggedIn)) then
begin
ActivateClient;
Wait(1000);
ClickOption('Cancel', 1);
ClickOption('Exist', 1);

if (ClickOption('Username', 1)) then
begin
// SendKeysSilent(Players[CurrentPlayer].Name + chr(13) + Players[CurrentPlayer].Pass)
Writeln ('Username: '+Players[CurrentPlayer].Name);
TypeSend(Players[CurrentPlayer].Name);
Wait(100 + Random(100));
Mouse(327, 272, 0, 0, True);
Writeln('Password: *********');
TypeSend(Players[CurrentPlayer].Pass);
Wait(100 + Random(100));
end;

ClickOption('Login', 1);
Wait(5000+random(2000));
ClickMouse(323, 328,True);
Writeln('--[Login Fixed By Ollie <3]--');

repeat
Wait(1000);
c := c + 1;
ClickMouse(323, 328,True);
until (LoggedIn) or (c >= 600);

end;
if LoggedIn then
begin
PlayerStartTime := (GetSystemTime div 1000); // PlayerStartTime
if NickNameBMP <> 0 then
FreeBitmap(NickNameBMP);
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars); // Screenname
WriteFileString(TheFile,chr(13)+UpperCase(Players[CurrentPlayer].Name) + chr(13)); //* Save NAME to file
end;
FindNormalRandoms;
end;

tarajunky

2006-06-15 15:28:26

From: Pyro
THere have been multiple fixes for this. Phantom added his into srl like a minute after the update. But i guess people feel the urge to help out


Yes, it is easy to fix. I saw the post by Phantom, but why didn't he just post the new fixed login.scar for people? Everybody is trying to make their own workaround because this kills SRL completely until it gets updated.

WT-Fakawi

2006-06-15 16:30:19

You are right Tara: I did it immediatement: SRL 2.31.