SRL Archive - First Scripts

First Script. Little Alcher


Benzh

2012-04-06 15:25:02

Just made my first script. Ok its nothing major just a little alching script for a private server. Very please with it, works perfectly and hopefully its the first of many.

Time to work on my first proper script.




program Benzhs_Alcher;
begin

Writeln('Script Made By Benzh');

Repeat

MoveMouse(743,188);
wait(randomrange(500, 800));
ClickMouse(743,188,mouse_Left)
wait(randomrange(500, 800));

MoveMouse(714,339)
wait(randomrange(500, 800));
ClickMouse(714,339,mouse_Left)
wait(randomrange(500, 800));

MoveMouse(580,230);
wait(randomrange(500, 800));
ClickMouse(580,230,mouse_Left)
wait(randomrange(2000, 3000));


until(false);
end.


Benzh

bam92992

2012-04-06 20:51:18

nice. next i would convert the movemouse(743,188) to movemouse(x,y) with maybe a dtm that finds the coordinates of the alch so it will be a little more stable than point/click/wait. also the use of GameTab(tab_Magic) could be a failsafe somehow. it simply just goes to the magic tab.

also MouseItem(x,1) will move the mouse to a certain inventory slot and click, where x (1-28) is the inventory slot.

Benzh

2012-04-07 07:27:32

From: bam92992
nice. next i would convert the movemouse(743,188) to movemouse(x,y) with maybe a dtm that finds the coordinates of the alch so it will be a little more stable than point/click/wait. also the use of GameTab(tab_Magic) could be a failsafe somehow. it simply just goes to the magic tab.

also MouseItem(x,1) will move the mouse to a certain inventory slot and click, where x (1-28) is the inventory slot.


Ok mate :) Working on my thieving script now so ill defiantly take your advice into a count. Really enjoying this so far, although i have only done 2 very very basic scripts its awesome, hope to make decent ones in the future for both Pservers and runescape.

NKN

2012-04-07 10:36:46

Try to not use static points.
Could look through SRL functions, might be helpful.

Sir Ducksworthy

2012-04-07 11:44:43

Good on you for your effort!,
NKN is right but change Try to Never Use static coordinates they are guaranteed to get you and others banned! XD

Their is two function's you should be using, MMouse() and Mouse()
They include an added randomness to how long the mouse stay's at the location before, during and after clicking and also you can add randomness to coordinates going Down and Right.

It would look something like this:
program Benzhs_Alcher;
begin
Writeln('Script Made By Benzh');

Repeat
MMouse(743, 188, 10, 10); {<------- 10 Coordinate Down and Right Randomness}
wait(randomrange(500, 800));
Mouse(743, 188, 10, 10, True)
wait(randomrange(500, 800));

MMouse(714, 339, 10, 10)
wait(randomrange(500, 800));
Mouse(714, 339, 10, 10, True)
wait(randomrange(500, 800));

MMouse(580, 230, 10, 10);
wait(randomrange(500, 800));
Mouse(580, 230, 10, 10, True);
wait(randomrange(2000, 3000));
until(false);
end.

Although this wouldn't work so well because it would click 2 different coordinates randomly on each symbol so to stop this we use GetmousePos()

Example:
Program Benzhs_Alcher;
Var
x, y:Integer; //<------- Integer Variables for GetMousePos to put its Coordinates

begin
Writeln('Script Made By Benzh');

Repeat
MMouse(743, 188, 10, 10); {<------- 10 Coordinate Down and Right Randomness}
GetMousePos(x, y);
wait(randomrange(500, 800));
Mouse(x, y, 0, 0, True)
wait(randomrange(500, 800));

MMouse(714, 339, 10, 10) //<------- Moves mouse to coord's
GetMousePos(x, y); //<------- Get's coord's the mouse has moved to and stores them in x and y integer's.
wait(randomrange(500, 800));
Mouse(x, y, 0, 0, True); //<------- Click's the Stored Coordinates with no randomness because we don't want the mouse to move 2 times on the same thing we wanted to Click
wait(randomrange(500, 800));

MMouse(580, 230, 10, 10);
GetMousePos(x, y);
wait(randomrange(500, 800));
Mouse(x, y, 0, 0, True);
wait(randomrange(2000, 3000));
until(false);
end.

Benzh

2012-04-07 19:40:46

From: leetsxc
Good on you for your effort!,
NKN is right but change Try to Never Use static coordinates they are guaranteed to get you and others banned! XD

Their is two function's you should be using, MMouse() and Mouse()
They include an added randomness to how long the mouse stay's at the location before, during and after clicking and also you can add randomness to coordinates going Down and Right.

It would look something like this:
program Benzhs_Alcher;
begin
Writeln('Script Made By Benzh');

Repeat
MMouse(743, 188, 10, 10); {<------- 10 Coordinate Down and Right Randomness}
wait(randomrange(500, 800));
Mouse(743, 188, 10, 10, True)
wait(randomrange(500, 800));

MMouse(714, 339, 10, 10)
wait(randomrange(500, 800));
Mouse(714, 339, 10, 10, True)
wait(randomrange(500, 800));

MMouse(580, 230, 10, 10);
wait(randomrange(500, 800));
Mouse(580, 230, 10, 10, True);
wait(randomrange(2000, 3000));
until(false);
end.

Although this wouldn't work so well because it would click 2 different coordinates randomly on each symbol so to stop this we use GetmousePos()

Example:
Program Benzhs_Alcher;
Var
x, y:Integer; //<------- Integer Variables for GetMousePos to put its Coordinates

begin
Writeln('Script Made By Benzh');

Repeat
MMouse(743, 188, 10, 10); {<------- 10 Coordinate Down and Right Randomness}
GetMousePos(x, y);
wait(randomrange(500, 800));
Mouse(x, y, 0, 0, True)
wait(randomrange(500, 800));

MMouse(714, 339, 10, 10) //<------- Moves mouse to coord's
GetMousePos(x, y); //<------- Get's coord's the mouse has moved to and stores them in x and y integer's.
wait(randomrange(500, 800));
Mouse(x, y, 0, 0, True); //<------- Click's the Stored Coordinates with no randomness because we don't want the mouse to move 2 times on the same thing we wanted to Click
wait(randomrange(500, 800));

MMouse(580, 230, 10, 10);
GetMousePos(x, y);
wait(randomrange(500, 800));
Mouse(x, y, 0, 0, True);
wait(randomrange(2000, 3000));
until(false);
end.


Appreciate the help mate! Writing a new thieving script, tried use your method of MMouse(xx, xx, x, x); But for what ever reason it is showing as an error. Any ideas why?