PDA

View Full Version : A couple of scripting questions.



Buckleyindahouse
12-01-2006, 04:29 AM
ok. here we go im a total noob on scripting. im trying to learn as you can see now so help me out.

now for example:>>>if (findcolor(x,y,RockColour,5,6,516,342))then <<< on the x,y right before findcolor, arent you suppose to put cords there or just leave it like that?

what procedure should i use to move the mouse and click the mouse?

do i just do " mousespeed:= 3 to change how fast the mouse moves?

how do i add anti ban stuff and random mouse movenments?

thank you for your help.

Junior
12-01-2006, 05:31 AM
ok. here we go im a total noob on scripting. im trying to learn as you can see now so help me out.

now for example:>>>if (findcolor(x,y,RockColour,5,6,516,342))then <<< on the x,y right before findcolor, arent you suppose to put cords there or just leave it like that?

what procedure should i use to move the mouse and click the mouse?

do i just do " mousespeed:= 3 to change how fast the mouse moves?

how do i add anti ban stuff and random mouse movenments?

thank you for your help.

First please get the newest version of SRL, witch is 3.5, because it is highly reccomended.

Ok
#1- if (findcolor(x,y,RockColour,5,6,516,342))then . The x,y dont have to be changed, they are globals or something like that. you can change them to anything you like but thats for in depth then what you are trying to learn here. The cords go in the 4 spaces where the numbers "5,6,516,342" are. That means it will search for the color in that specified box.
cords can also be:
MMX1, MMY1, MMX2, MMY2 for minimap cords
MSX1, MSY1, MSX2, MSY2 for mainscreen cords
//And
MIX1, MIY1, MIX2, MIY2 for inventory cords

Oh yea, and dont use FindColor, that will only look for the exact color. Use FindColorSpiralTolerance or FindColorTolerance instead. That will look for the color you have chosen with a tolerance added to it, I think it works better. :)


#2- The procedure you should use to move and click the mouse are:
MMouse(x,y,rx,ry); // Move mouse
Mouse(x,y,rx,ry,True/false); //Clicks mouse
Those are undetectable SRL commands.
The x,y are the cords where you want the mouse to move or click, simple. The rx,ry are the random pixles it will move away fom the cords you picked to make it random.
Say if you put
MMouse(x,y,5,5) Or Mouse(x,y,5,5,True);
The five indicates it will pick a random 5 pixles from the x, and a random 5 pixles from the y cordinate.
The True and the False in the command Mouse(); mean that True is left click, False is right click.


#3- This is also simple. MouseSpeed determines the speed of the mouse. You can set to how fast or how slow you want it to move. The lower the number the faster the mouse will move. You can make it pick its own random speed by doing something like this:
MouseSpeed:=8+Random(5);
That will pick a random mouse speed between 8-13.

#4- To add anti ban you are going to need a couple of procedures to call a certain procedure called FindNormalRandoms. For FindNormalRandoms you will need a Declares players procedure, and a NickBMP procedure. You will need SRL to use this.
I will post a link to a post that has answered this question for you.
Random mouse movements I am not sure of, sorry.

EDIT: Heres that link. Look at the second and third post.
http://www.villu-reborn.com/showthread.php?t=4451

Hope this helped.
~jR

Buckleyindahouse
12-01-2006, 06:03 AM
Thank you so much Junior.

Buckleyindahouse
12-01-2006, 06:04 AM
Thank you for your help Junior.