SRL Archive - First Scripts

My first autofighter


stefuck

2009-10-16 11:24:20

program AutoFighter;
//By: stefuck also known as widurski16
const
MonsterColor= 10989487;//replace with color of the creature to be fought
MonsterColor2= 9936542;
bmppickcolor= 11712699;
SkyColor= 3478561;
LowHealth= 255;
MedLowHealth= 2070783;
MedHighHealth= 65535;

var
x,y: integer;

procedure Login;
begin
if (findcolortolerance (x, y, SkyColor, 18, 17, 498, 327, 5)) then
begin
clickmouse(381, 183, true)
wait(1000+random(500))
sendkeys('new name')//replace username with your username
wait(1000+random(500))
clickmouse(370, 336, true)
wait(1000+random(500))
sendkeys('new pass')//replace password with your password
wait(1000+random(500))
clickmouse(380, 380, true)
wait(4000+random(500))
movemousesmooth(382, 353)
clickmouse(382, 353, true)
end
else
end;

procedure CheckHealth;
begin
if (findcolortolerance (x, y, MedLowHealth{adjust depending on monster}, 723, 26, 740, 38, 5)) then
begin
if (findcolortolerance (x, y, 5264753{put the food color here}, 558, 210, 730, 460, 5)) then
clickmouse(x, y, true);
end
else
end;

procedure FindAndAttackMonster;
begin
wait(2000+random(1000))
if (findcolortolerance (x, y, MonsterColor, 18, 17, 498, 327, 5)) or
(findcolortolerance (x, y, MonsterColor2, 18, 17, 498, 327, 5)) then
begin
clickmouse (x, y, true);
wait(7000+random(2000))//adjust the times as needed
sendarrowwait(0+random(4), 1150+random(950));
end
else
sendarrowwait(0+random(4), 700+random(850));
writeln('Could not Find')
wait(2000+random(1000))
findcolor(x, y, bmppickcolor, 577, 35, 693, 150);
end;

begin
Login;
wait(5000+random(1750))
repeat
CheckHealth;
FindAndAttackMonster;
until false
end.


its work perfect for me i ran it for 4 hours no probs only look out whit randoms. i wont add more stuuf to this script. in my next scripts will be anti randoms and anti ban

post problems pleas

JAD

2009-10-16 11:30:38

Oh no I hope you didn't run this on a good character..

MoveMouseSmooth, MoveMouse, and ClickMouse, SendKeys are all detectable. You are going to want to learn the SRL commands to move + click the mouse.

Mouse(x,y,0,0,true); //Clicks and moves mouse
MMouse(x,y,0,0); //Moves mouse
TypeSend('text'); //Types + presses enter key
0,0 are the randomness parameters on where to move the mouse for less detectability.




Edit:

On line 32 there is no reason for that else. You can just take that out.


Why do you look for the color in login if you don't use the x,y variables where it found the color at? You would want to do Mouse(x,y,0,0,true); instead of like Mouse(200,320,0,0,true);


You should try to learn proper standards to make your code more readable:

procedure Login;
begin
if (findcolortolerance (x, y, SkyColor, 18, 17, 498, 327, 5)) then
begin
clickmouse(381, 183, true)
wait(1000+random(500))
sendkeys('new name')//replace username with your username
wait(1000+random(500))
clickmouse(370, 336, true)
wait(1000+random(500))
sendkeys('new pass')//replace password with your password
wait(1000+random(500))
clickmouse(380, 380, true)
wait(4000+random(500))
movemousesmooth(382, 353)
clickmouse(382, 353, true)
end
else
end;

For example, should be like this:

procedure Login;
begin
if (findcolortolerance (x, y, SkyColor, 18, 17, 498, 327, 5)) then
begin
clickmouse(381, 183, true)
wait(1000+random(500))
sendkeys('new name')//replace username with your username
wait(1000+random(500))
clickmouse(370, 336, true)
wait(1000+random(500))
sendkeys('new pass')//replace password with your password
wait(1000+random(500))
clickmouse(380, 380, true)
wait(4000+random(500))
movemousesmooth(382, 353)
clickmouse(382, 353, true)
end
end;

So pretty much all standards are is:
[php]
-2 spaces for all code after a begin
-2 spaces for all code after a repeat
-ends and code that follows it goes 2 spaces back
-untils and code that follows it goes 2 spaces back
[/php]


I suggest you read some more tutorials on learning SRL commands as your next step. Good job :) If you need any personal help, feel free to add my msn: [email]runescapemacro@hotmail.com[/email]

Cheers,
~JAD

stefuck

2009-10-16 11:32:53

From: JAD
Oh no I hope you didn't run this on a good character..

MoveMouseSmooth, MoveMouse, and ClickMouse are all detectable. You are going to want to learn the SRL commands to move + click the mouse.

Mouse(x,y,0,0,true); //Clicks and moves mouse
MMouse(x,y,0,0); //Moves mouse

0,0 are the randomness parameters on where to move the mouse for less detectability.

May edit with more info in a few minutes.


oke thanky ou for saying me i wont use it anymore then:P

when i have some time il read some tuts and make a good non-detacteble script

stefuck

2009-10-16 14:25:49

From: JAD
Oh no I hope you didn't run this on a good character..

MoveMouseSmooth, MoveMouse, and ClickMouse, SendKeys are all detectable. You are going to want to learn the SRL commands to move + click the mouse.

Mouse(x,y,0,0,true); //Clicks and moves mouse
MMouse(x,y,0,0); //Moves mouse
TypeSend('text'); //Types + presses enter key
0,0 are the randomness parameters on where to move the mouse for less detectability.




Edit:

On line 32 there is no reason for that else. You can just take that out.


Why do you look for the color in login if you don't use the x,y variables where it found the color at? You would want to do Mouse(x,y,0,0,true); instead of like Mouse(200,320,0,0,true);


You should try to learn proper standards to make your code more readable:

procedure Login;
begin
if (findcolortolerance (x, y, SkyColor, 18, 17, 498, 327, 5)) then
begin
clickmouse(381, 183, true)
wait(1000+random(500))
sendkeys('new name')//replace username with your username
wait(1000+random(500))
clickmouse(370, 336, true)
wait(1000+random(500))
sendkeys('new pass')//replace password with your password
wait(1000+random(500))
clickmouse(380, 380, true)
wait(4000+random(500))
movemousesmooth(382, 353)
clickmouse(382, 353, true)
end
else
end;

For example, should be like this:

procedure Login;
begin
if (findcolortolerance (x, y, SkyColor, 18, 17, 498, 327, 5)) then
begin
clickmouse(381, 183, true)
wait(1000+random(500))
sendkeys('new name')//replace username with your username
wait(1000+random(500))
clickmouse(370, 336, true)
wait(1000+random(500))
sendkeys('new pass')//replace password with your password
wait(1000+random(500))
clickmouse(380, 380, true)
wait(4000+random(500))
movemousesmooth(382, 353)
clickmouse(382, 353, true)
end
end;

So pretty much all standards are is:
[php]
-2 spaces for all code after a begin
-2 spaces for all code after a repeat
-ends and code that follows it goes 2 spaces back
-untils and code that follows it goes 2 spaces back
[/php]


I suggest you read some more tutorials on learning SRL commands as your next step. Good job :) If you need any personal help, feel free to add my msn: [email]runescapemacro@hotmail.com[/email]

Cheers,
~JAD


oke thank you very much il ad it in my next script i guess ^^