SRL Archive - First Scripts

Msn responder


austin2162

2009-07-10 02:06:48

this is a simple msn responder only works with Vista atm.

in near future
Msn responer on XP

Coh3n

2009-07-10 03:10:03

I commented in all my comments. I think for a first script it isn't bad, but you really need to work on you standards. I also fixed them in the below script. Having good standards makes your script much easier to read and follow, and goes a long way in an SRL Members application.

I think you should read some more tutorials, learn SRL, and keep it up. :) You'll get a hand of it in no time.

{---------this is self explained really-----------------}
{---------it will respond to any thing really-----------}
{---------the message is in line 61---------------------}
{---------if you want to change it----------------------}
{--------thanks to cyrosism for bit map tut-------------}
{-------and every one esle that helped------------------}
{-------planing a release for XP users also-------------}

program New;
{.include SRL/SRL.scar}

procedure MSNResponder;
var
x, y, g, b, h, MSN1, MSN3 : Integer;//Try to keep 1 letter variables local (inside the procedure they're being used).

begin
Disguise('msn responder');//You missed a lot of ';' after your procedures.
Wait(500);
Disguise('Loading bitmap...');
MSN1 := BitmapFromString(26, 22, 'beNo90nlTk0ccwPGXEJ6r0zfQ' +
'/7TOdDoKoZALlUOQM5HT0gIqCMhlgSSIkISgJiEcOSAngQAhIfdB7gPqhWMdU' +
'aylFZW2Ih1R0VpxqN0nVnc+s/Ob/eM7OzvbhkUiVr932uedAvxevd+HC3gnAz' +
'590DcR9E+E/BNhvy4c0EWCwHg0NB4LamMh7WJYuxhSX46ogCtR1dWo4tqC0uM' +
'cdzu1HqfG49LOuzRelxrn1vhcKp9b5feoAm5l0KMMzitD8wog7B0LexUR/1jU' +
'Nxrzjy4G5IsB2eWg9HJIdiUkdVhGHdZRp0XutMoAl03utkrdNpnHJo2TzAN2i' +
'dc+4rOP+B3DQMAxFHQOhRyDYedgxCmOusQx18CCS7TgFs1NiwHzjNgyPWCeAU' +
'TWONuMqF8uqeCPp3dNMzga9qCkRyIq4w/lcYY/KOcPcSTCeWNfwMQP4nghE29' +
'a0zet4c2oeTMankHLBYy4Xu6guEkdnLryyHHvebv1bh5nhGkKL2+8fP9xgRmc' +
'9Az2e3SseR3Lq2P5dZ06GQ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j5ARJnIySIKckjFEJChpBSSOo0wiCREgYN5AEDRChwWRcVQGdxnUOxR' +
'6znT83mZZLxn5M4di/7jCdohcpyAQlJUFFTdDQcLqDhIk4/SGc7BsIkKdAoyn' +
'QWCqkIOGUZKiWQad0G4HUrjki05DINNYX0/WHE3DpBH0GYTqTMJNFMBwhGLMJ' +
'phzC3FGclgprafB4Gqw7CE8chCcPwfr0uAx4KhOezoJnsmFDDjybCxuPwqZce' +
'C4fniuAzEWQpQiyMiB7MeQowblKIXdZguHIZ4Ys1HAENWSjszno7FHUmIvOFS' +
'CAuRCx0hErA7EVI/YSxFGKOMoQRwXiPI64K3Ge75H5GsRXg/hP4gK1iKv8C3v' +
'h57YCzF6IOYpQBwN1HEOdJairFHOVYe4KzPMt5q3EvN9hvirMX4MLnEQDp9DQ' +
'aTRUj0bOoNEmNNqCxlqwhf8ApT159w==');
Disguise('bitmap loaded.');
Wait(500);
Disguise('Finding msn chat');
repeat
FindBitmap(MSN1, x, y);
until FindBitmap(MSN1, x, y);
Mouse(x, y, 0, 0, True);
b : = b + 1;
b : = h;
Disguise('Bitmap found!');
Disguise('Times found = '+ IntToStr(h));
Wait(500);
Wait(1000);
SendKeys('User is AFK. Msn responder' + Chr(13));
Wait(500);
Disguise('Responded');
Disguise('loading bitmap...');
MSN3 := BitmapFromString(95, 25, 'beNrt129oG2UcB/C+krySIip9' +
'YSUv+iIIahhsBkfHOTcppZ3n1HltVwmVuaAO00lpLNTFus6rjnlTLMHpOIrKO' +
'co4Rh1XGXq12/psUHe1Fs8/padu7a22620FrWMv/N09eZ48d8GYNQUVc3xelC' +
'e/5/uk3yTX5sQ8mv9D/uT4jTW6To6eW6uo06p645+7BmV5bO63w98sP/T4zgs' +
'L11Xr9xJBz7v3vz15eXlNot7Y9bRjGJacwWzFxyFWbp7DCMTisxykC1zsrQuL' +
'UM7DTc9AOYq5VCL956tQztSVtYnyykGWLFE2w2Gs3AzHjwb6DtJz5Wx8rAVeq' +
'YGpKyX6cm4l3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R39vUePHRy9tPvTn4' +
'Rj321XzNWBz+a6XQcGp+xVJ7BRe2s3mKoCT9WV4HUsySOQchlpj8ibQCqO6M5' +
'nN6azORAIsV6+oMPfdLjRiWL7ztb20fnG4QX4vyJS39TdPzAwZsKXvlK+Xj24' +
'58D47PXSv6aBFBdzv5UrcpZKaLIN9CwHEcbfIZM2Itu9KAgk4QpS5Ew6Df8B7' +
'h/6qmFoduOJ+RfOLL127tdHDw1G4501jfF/CXhj50TDAhXLiXNEXXHIvMAxOS' +
'QZTknGovuebT00MvW8fhmawZ44tZg6fxXuP3B//j+DBqAHaIM2U1ZWVlZWVvZ' +
'f9SfE+kir');
Disguise('Bitmap loaded!');
Disguise('finding bitmap');
FindBitmap(MSN3, x, y);
Disguise('bitmap found!');
Mouse(x + 18, y + 5, 0, 0, True);
Disguise('Successfully ran');
Disguise('times looked for = ' + IntToStr(g));
Disguise('times found = ' + IntToStr(h));
end;

begin
SetupSRL;
ClearDebug;
repeat
MSNResponder;
until False;
end.

I hope I helped you out. :)

Cheers.

austin2162

2009-07-10 07:01:35

Thanks for the help i have also gotten dtms down this one is kinda a bad script but is my first. question what does the ';' do? why is it important?

Coh3n

2009-07-10 07:07:51

From: austin2162
Thanks for the help i have also gotten dtms down this one is kinda a bad script but is my first. question what does the ';' do? why is it important?


There's no such thing as a bad script. :) As long as it works is a good script. There's basic and advanced scripts, in my opinion.

The ';' tells SCAR that it's the end of your procedure. Without it, SCAR wont do what you want it to do. I tried compiling your script without the ';' and it still compiled. To be honest, I don't know why, usually you'd get a "Semicolon expected…" error. If someone else reads this and knows, I'm interested. :)

Also, everyone has to start somewhere. As long as you work on it, you'll learn faster than you think. :)

austin2162

2009-07-10 07:12:46

i always like triple check my scripts to make sure they compile and work.

Coh3n

2009-07-10 07:15:23

From: austin2162
i always like triple check my scripts to make sure they compile and work.


That's a good habit to get in to, just make sure you save it every time before you run it. I've written like 100 lines before, then ran it without saving, and SCAR crashed. It randomly does that sometimes, not really sure why.

austin2162

2009-07-10 07:20:48

i've had that happend and it sucks but i gotten my self into saving right now im writing scripts that really have nothing to do with rs because of the uptext things being off i was just going to post my wc script but then this new font came out and my script went outta wack… so now i just wait for a new dev and try to make a temp patch

austin2162

2009-07-10 07:24:04

right now im getting started on reformating my msn script for xp i might use dtms? whats your advice?

Coh3n

2009-07-10 07:29:37

From: austin2162
i've had that happend and it sucks but i gotten my self into saving right now im writing scripts that really have nothing to do with rs because of the uptext things being off i was just going to post my wc script but then this new font came out and my script went outta wack… so now i just wait for a new dev and try to make a temp patch


Yeah both my Wcers are broken as well, I'm just waiting for Rev 36, and I'll worry about fixing them.

From: austin2162
right now im getting started on reformating my msn script for xp i might use dtms? whats your advice?


Well apparently Bitmaps are now faster than DTMs, so for your final script you should stick with Bitmaps (I'm thinking about switching out all my DTMs for Bitmaps in my Wcers). However, if you've never make DTMs before, I would, just for the practice. You could also test both, and see which one you think works better. :)

austin2162

2009-07-10 07:33:14

i have made a dtm script for a totaly different game but i think for my msn responder im gonna stick with bmps

austin2162

2009-07-10 07:35:22

i made a dark swords loginer and fighter but i still has bugs but i uses like 10-15 dtms just to say alot of them, but im still working out bugs with it.

Coh3n

2009-07-10 07:43:59

From: austin2162
i made a dark swords loginer and fighter but i still has bugs but i uses like 10-15 dtms just to say alot of them, but im still working out bugs with it.


It's good to know you're working hard. :) I have no idea what Dark Swords is, but I'm sure you can get SCAR to work with it. :p

Also, try not to double post, it's frowned upon, just edit your first post. :)