SRL Archive - SRL Archives

Procedure RSUpdate;


IEatJ00erBaybees

2007-07-01 10:23:37

I hope I did this right, it's pretty nooby :(, and it's my first procedure xD.

First you will have to go to Line 266 in Login.scar under your SRL. Type in


rsuResult := True


Now, go to the variables of the procedure on line ~107ish. Type in:

rsuResult : Boolean;


Now, here are the bitmaps.

Procedure DeclareBMP;
var PlayRunescape, LowDetail, FreeWorld: Integer;
begin
PlayRunescape := BitmapFromString(45, 2, 'z78DA7550D10EC4' +
'2008FBA58D22C8233AEFFF3FE98CEC1216772F8DC152DA4270102' +
'110D4E9102B8E719D4DB5EFD87B839ABBB114ADA22C183092D845' +
'0311F38132277DA2F7EA1F95ACC00C270FCE0369E9ACADD079C14' +
'A63FADC383E6C7AC9578AB1A304B3802B4AFE0DFEED3374A2817C' +
'2BAEAC74EAE27C67FFD74CEEA792128F471BEBBDF3739668E0EEE' +
'784903D1C46F6DD619AEC491B59979F5AD2F46B36D05E1A4B6D7C' +
'017D4275AD');

LowDetail := BitmapFromString(35, 2, 'z78DA55504B0E052108BB' +
'92FC0496887AFF233D6770312F24A6695A5A144306E5098A34C4D' +
'C748F3916EDF54CC333000AD49CECC19DD8D1BB82B488DE5570E3' +
'C8E41DAB4FBBEFEB2D972819094633205230E8953535775E65E6E' +
'0C8F21AEB50BE898C0EFEED237646587110D5CEE2BB7030DF866F' +
'B7C21B720C2F4D2502B6D9A4EE6241032B255A8306DA08D097477' +
'8FC757B310BE5C9EDE7C79C3B3A4AB90AA7C472BE4A2347BD1B5E' +
'BE6EAF5C2707D3EFFEE2CF65C99CDB3DA07A56B71FD64C5E75');

FreeWorld := BitmapFromString(53, 2, '3A332B35302AB1ADA1B3A' +
'D97B2AB98343027312D2A332E28322E252E2E222E2E22302C2330' +
'2C232E3023ADAE9EB5AE9CB5AC9B3834293A362B423A2FA39A8BB' +
'1A996B2AA97807969312D223232282E2C20B4AB9AB3AB96B4B095' +
'323019362C223B3229333327303024363227373125332C22312A2' +
'0332A25B2A9A0B2AA95B3AD972725162B2D20313423343225382F' +
'28392E28352D22302C202E2B222F2C25382D2B342F29AFAB9FB1A' +
'996B3AB982421182F2E292C27212E2A212D2A2129291F2F2A2427' +
'291C1A280FA9B39AB5AA98BAAA9D393327363428342D25544E42A' +
'5A08DB3AD97B2AA95605949302D262D2A23B3AC9AADAC8E9EA883' +
'A9B390B2AB99B4AB9CB1AC99AFAC99B0AB98B0AB98A7A28E352F1' +
'F393029B2A9A2B3AB98B4AC95B1AA97AEAE96A1AB88ADB493B1A8' +
'99B8AA9FB0AA94B0AB97302C21312C28');
end;

And here is the procedure. Please give constructive criticism and feedback on how to make it better!

Procedure RSUpdate;
var Tries, Tries2: Integer;
begin
DeclareBMP;
if(rsuResult := True)then
begin
GetPage('http://www.runescape.com');
Wait(5000);
repeat
if(FindBitmap(PlayRunescape, x, y))then
MMouse(x, y, 0, 0);
Wait(500);
Mouse(x, y, 0, 0, true);
Tries := Tries+1;
Wait(5000);
if(Tries>20)then
TerminateScript;
FreeBitmap(PlayRunescape);
until(Tries>20);
end;
repeat
if(FindBitmap(LowDetail, x, y))then
MMouse(x, y, 0, 0);
Wait(500);
Mouse(x, y, 0, 0, true);
Tries2 := Tries2+1;
Wait(5000);
if(Tries2>20)then
TerminateScript;
FreeBitmap(LowDetail);
until(Tries>20);
repeat
if(FindBitmap(FreeWorld, x, y))then
MMouse(x, y, 0, 0);
Wait(500);
Mouse(x, y, 0, 0, true);
Wait(30000);
if(FindText(tx, ty, 'unescape', upchars, 240, 180, 530, 240))then
LoginPlayer;
until(WelcomeToRuneScape := True);
FreeBitmap(FreeWorld);
end;

LordGregGreg

2007-07-01 10:28:21

Oh , is this so like yu can auto stright for over a wekk :). Ok, i dont know if you have tried this, but when you start scar, you drag the little cursor thing over the rs window.
The problem is, if you ever move away from that page, it will screw up the cordinats until you drag the cursor again, So although your method may work, i dont think its possible to implement it.

IEatJ00erBaybees

2007-07-01 10:33:53

OMG! I have an idea! Doubt it'll work though :p, but I g2g right now.

Thanks for quick feedback.

JAD

2007-07-01 10:37:56

if(rsuResult := True)then

Pretty sure that would cause an error.

You use a ":" before your "=" when you are changing the variable, like making it true or false or making it = 562….etc.

You use just a "=" if you are checking if that's what it ='s. like if(ThisVar = 58)then or if(rsuResult = True)then

So I think you need to change that or you will get an error..

Boreas

2007-07-01 10:39:51

You can use the find rs client function to take care of the dragging crosshairs.

But that's a moot point. The last couple updates screwed up loggedin and banking. Stuff like that is why SRL doesn't have this. After each update you have to check if anything has changed, and if not, you can manually restart your script. If it has, you don't auto until it's fixed. So nice effort, but bad idea.

LordGregGreg

2007-07-01 10:43:22

From: Boreas
You can use the find rs client function to take care of the dragging crosshairs.

But that's a moot point. The last couple updates screwed up loggedin and banking. Stuff like that is why SRL doesn't have this. After each update you have to check if anything has changed, and if not, you can manually restart your script. If it has, you don't auto until it's fixed. So nice effort, but bad idea.

OOoooooo cool. And Ooooooo good point. Thanks :)

Abyssal

2007-07-01 14:10:38

Yea I made one of these once, worked with Vista, XP and classic. But then Boreas stepped in :D

IEatJ00erBaybees

2007-07-01 18:54:06

From: Boreas
You can use the find rs client function to take care of the dragging crosshairs.

But that's a moot point. The last couple updates screwed up loggedin and banking. Stuff like that is why SRL doesn't have this. After each update you have to check if anything has changed, and if not, you can manually restart your script. If it has, you don't auto until it's fixed. So nice effort, but bad idea.


Good point, Boreas. Thanks :)

Bobarkinator

2007-07-01 18:55:33

Won't this not work because it's just using getpage instead of OpenWebPage?

Abyssal

2007-07-01 22:17:42

Heh, that is true.

IEatJ00erBaybees

2007-07-01 23:45:37

From: bobarkinator
Won't this not work because it's just using getpage instead of OpenWebPage?


Oops :p

Abyssal

2007-07-02 08:42:51

From: IEatJ00erBaybees
Oops :p



It's fine, we all make mistakes.
Sometimes even in huge scripts, people make dumb mistakes like not adding an end, or forgetting begin, or a colon… Lol. *hides in corner*

Bobarkinator

2007-07-02 09:19:47

When I finish a script and make a few changes all always forget to try to compile it so their winds up being an error :redface: