SRL Archive - First Scripts

My First Script(Text, Move Anti-Afk)


leech4life

2008-10-19 16:16:29

Enjoy

program AntiAfk;
//By Leech4Life
//I think this might actually work, but you have to spec RS window size put something small if you don't know
var
i, x, y, a : Integer;
const
AfkTime = 5; //Time to be afk in Minutes
RSSizex = 1024; //X screen size
RSSizey = 1280; //Y screen size
Click = TRUE; //click places { ONLY ONE, CANT BE BOTH
Text = FALSE; //say texts }
text1 = 'bored';
text2 = 'Someday Ill be lvl 99';
text3 = '';
text4 = '';
begin

if (Click = TRUE) then
begin
repeat
x := random(RSSizex);
y := random(RSSizey);
MoveMouseSmoothEx(x,y,20,40,45,25,20);
ClickMouse(x,y,true);
Sleep(29)
i := i+1;
until i*2 = AfkTime
end;


if (Text = TRUE) then
begin
repeat
a := random(4);
if(a=1) then
SendKeys(text1+chr(13));
sleep(29);
if(a=2) then
SendKeys(text2+chr(13));
sleep(29);
if(a=3) then
SendKeys(text3+chr(13));
sleep(29);
if(a=4) then
SendKeys(text4+chr(13));
sleep(29);
until i*2 = AfkTime
end;

end.



Boreas: I'm in a good mood so I took the liberty of putting your posts together. I suggest you learn to use the edit button, as my good moods are very rare.

Edit1:
Enjoy everyone, this was my first SCAR script. It was actually kind of hard coming off of Java.

Edit 2:
By the way, if there are any problems with it just reply or something? I think it works pretty well for a noob script.

Edit 3:
By the way, is there a way to make a GUI using SCAR? like forms or something. For later scripts so I wont be a leecher

jakeyboy29

2008-10-19 16:54:51

triple post? dude, edit ur posts.

anonymity

2008-10-19 17:00:42

From: jakeyboy29
triple post? dude, edit ur posts.


Seriously… There is no need to get your first ten posts on the same thread… all in a row…. on the same page….

But, maybe you didn't know… there is an edit button… using them is worthwhile…

://welcome to SRL Forums.

BlackThursday

2008-10-19 17:19:17

Its a decent start. But use cases like this:

You have:
if (Text = TRUE) then
begin
repeat
a := random(4);
if(a=1) then
SendKeys(text1+chr(13));
sleep(29);
if(a=2) then
SendKeys(text2+chr(13));
sleep(29);
if(a=3) then
SendKeys(text3+chr(13));
sleep(29);
if(a=4) then
SendKeys(text4+chr(13));
sleep(29);
until i*2 = AfkTime
end;

Which works, however, let's clean it up a bit, shall we?

Try this:
if (Text = TRUE) then
begin
repeat
case Random(3) of
0:SendKeys(text1+chr(13));
sleep(29);
1:SendKeys(text2+chr(13));
sleep(29);
2:SendKeys(text3+chr(13));
sleep(29);
3:SendKeys(text4+chr(13));
sleep(29);
end;
until i*2 = AfkTime
end;

That should clean things up a bit. Keep it up.

guyver

2008-10-21 02:40:27

not bad leech4life but I believe using MoveMouse and ClickMouse are detectable. Try using

Mouse(x,y,1,1,True);
Flag;

and

MMouse(x,y,5,5);

If expanding further, make sure u use Random Checking!!
Hope this helps and keep up the scripting!!!:spongebob:

joelster134

2008-10-21 19:45:47

Mind saying what the script does?? also add in anti ban + randoms :D