SRL Archive - Help and Support

Could someone help me a tiny bit? hihi :)


z92

2007-03-31 05:39:00

Well I could use a little help now and then - So if anyone could add me on MSN: [email]christianj@tdcspace.dk[/email] I would be very happy… Its mostly narby things I need help with. Scripting releated help, ofcourse! :)

YoHoJo

2007-03-31 05:58:59

Why not just ask a specific question here.
Thatswhat this forum is for, and you will get lots more insight from many different brains.

Whats your question?

z92

2007-03-31 09:32:33

Well id rather have a smartiepants who I could always message for some help.

Oh well I guess ill post my little thingy here which I need to have help with. I havent been scripting for awhile due to my little accident (…boy hits car…)

So here it is:




program haxmobile;
var x,y:integer;
begin
repeat
if(findcolorTolerance(x,y,4295073,454,269,454,269,25))then
begin
MoveMouse(398,445);
clickmouse(398,445,true);
wait(10+random(100));
Movemouse(811,512);
clickmouse(811,512,true);
wait(100+random(500));
clickmouse(673,389,true);
wait(10+random(100));
clickmouse(666,452,true);
wait(40+random(50));
clickmouse(666,319,true);
wait(100+random(500));
clickmouse(791,503,true)
clickmouse(673,389,true);
wait(10+random(100));
clickmouse(666,452,true);
wait(40+random(50));
clickmouse(666,319,true);
wait(50+random(50));
wait(100+random(50));
clickmouse(790,507,true);
wait(50+random(50));
clickmouse(792,502,true);
wait(20+random(300));
clickmouse(791,502,true);
wait(150+random(300));
clickmouse(791,502,true);
wait(2000+random(350));
[COLOR="Red"] *here needs to be a 'find colour 255 and click it ONCE, wait 500ms, search again and click, wait 500 ms, search again and click and go back to start of the script thingy. Its basically a game where i have to hit 3 red splashes that comes with a little delay after another. 3 of these splashes occur ;) '[/COLOR]

wait(5000)
end;
until(false)
end.


Im sure its easy enough, but I really have gone a bit untalented over those months of not scripting much. Also i know the script is very plain and not very advanced.. thats because it doesent need to be; its not for runescape :P

Hey321

2007-03-31 11:27:33

[php]
program haxmobile;
var x,y:integer;
begin
repeat
if(findcolorTolerance(x,y,4295073,454,269,454,269,25))then
begin
MoveMouse(398,445);
clickmouse(398,445,true);
wait(10+random(100));
Movemouse(811,512);
clickmouse(811,512,true);
wait(100+random(500));
clickmouse(673,389,true);
wait(10+random(100));
clickmouse(666,452,true);
wait(40+random(50));
clickmouse(666,319,true);
wait(100+random(500));
clickmouse(791,503,true)
clickmouse(673,389,true);
wait(10+random(100));
clickmouse(666,452,true);
wait(40+random(50));
clickmouse(666,319,true);
wait(50+random(50));
wait(100+random(50));
clickmouse(790,507,true);
wait(50+random(50));
clickmouse(792,502,true);
wait(20+random(300));
clickmouse(791,502,true);
wait(150+random(300));
clickmouse(791,502,true);
wait(2000+random(350));
if(findcolorTolerance(x,y,255,454,269,454,269,1))then
Begin
Repeat
if(findcolorTolerance(x,y,255,454,269,454,269,1))then
ClickMouse(x, y, True)
Until(Not(findcolorTolerance(x,y,255,454,269,454,269,1)))
End;


wait(5000)
end;
until(false)
end.[/php]

Would that work?

z92

2007-03-31 12:40:22

Thanks alot! My script looks like this now:


program haxmobile;
{.include SRL/SRL.scar}
var xy,yy:integer;
begin
repeat
if(findcolorTolerance(xy,yy,4295073,454,269,454,269,25))then
begin
MouseSpeed:=15
Mouse(398,445,2,2,true);
wait(250+random(100));
Mouse(811,512,5,5,true);
wait(100+random(500));
[COLOR="Red"]Mouse(673,389,5,5,true);[/COLOR]
wait(250+random(100));
[COLOR="red"]Mouse(666,452,5,5,true);[/COLOR]
wait(250+random(250));
[COLOR="red"]Mouse(666,319,5,5,true);[/COLOR]
wait(200+random(500));
Mouse(791,503,2,2,true);
wait(125+random(250));
[COLOR="red"] Mouse(673,389,5,5,true);[/COLOR]
wait(250+random(100));
[COLOR="red"] Mouse(666,452,5,5,true);[/COLOR]
wait(250+random(50));
[COLOR="red"] Mouse(666,319,5,5,true);[/COLOR]
wait(150+random(50));
wait(100+random(50));
Mouse(790,507,2,2,true);
wait(500+random(50));
Mouse(792,502,2,2,true);
wait(200+random(300));
Mouse(791,502,2,2,true);
wait(350+random(300));
Mouse(791,502,2,2,true);
wait(1500+random(350));
if(findcolorTolerance(x,y,255,494,296,678,483,25))then
Begin
Repeat
if(findcolorTolerance(x,y,255,494,296,678,483,25))then
Mouse(x,y,3,3,true);
wait(300+random(500))
Until(Not(findcolorTolerance(x,y,790800,581,314,604,330,25)))
End;


wait(200+random(1000))
end;
until(false)
end.

I were wondering… the lines i marked red are clicks that hit 3 buttons. How could you make it random which one of these 3 buttons it hit? Say, first time it might hit it in this order: red,blue,yellow.. now if i want it be random, and next time it might be.. blue,yellow,red ?

Hey321

2007-03-31 12:59:35

Do a procedure.

[php]
Procedure RandomOf3;
Begin
Case Random Of
1 : Mouse(666,319,5,5,true);
2 : Mouse(666,452,5,5,true);
3 : Mouse(673,389,5,5,true);
end;
end;[/php]

z92

2007-04-02 10:44:07

Gives me an error: Line 7: [Error] (13788:13): Invalid number of parameters in script

when i add it like this:



program haxmobile;
{.include SRL/SRL.scar}
var xy,yy:integer;

Procedure RandomOf3;
Begin
Case Random Of
1 : Mouse(666,319,5,5,true);
2 : Mouse(666,452,5,5,true);
3 : Mouse(673,389,5,5,true);
end;
end;


begin
repeat
if(findcolorTolerance(xy,yy,4295073,454,269,454,269,25))then
begin
MouseSpeed:=15
Mouse(398,445,2,2,true);
wait(250+random(100));
Mouse(811,512,5,5,true);
wait(100+random(500));
Mouse(673,389,5,5,true);
wait(250+random(100));
Mouse(666,452,5,5,true);
wait(250+random(250));
Mouse(666,319,5,5,true);
wait(200+random(500));
Mouse(791,503,2,2,true);
wait(125+random(250));
Mouse(673,389,5,5,true);
wait(250+random(100));
Mouse(666,452,5,5,true);
wait(250+random(50));
Mouse(666,319,5,5,true);
wait(150+random(50));
wait(100+random(50));
Mouse(790,507,2,2,true);
wait(500+random(50));
Mouse(792,502,2,2,true);
wait(200+random(300));
Mouse(791,502,2,2,true);
wait(350+random(300));
Mouse(791,502,2,2,true);
wait(1500+random(350));
if(findcolorTolerance(x,y,255,494,296,678,483,25))then
Begin
Repeat
if(findcolorTolerance(x,y,255,494,296,678,483,25))then
Mouse(x,y,3,3,true);
wait(300+random(500))
Until(Not(findcolorTolerance(x,y,790800,581,314,604,330,25)))
End;


wait(200+random(1000))
end;
until(false)
end.



What am i doing wrong?