SRL Archive - RS Scripts

Coin Collecter


Jag024

2006-03-09 11:26:45

Here it is :)

program CoinCollector;
{.include OSi.txt}
var one:integer;two:integer;coin1:integer;coin2:integer;
const
coincolor=1347504; // Coin Color
begin
repeat
if (FindColor(one,two, coincolor, 1, 1, 760, 800))then
MoveMouse(one,two)
wait(1000)
ClickMouse(one,two,false);
wait(500)
if (FindColor(coin1,coin2, 4231423, 1, 1, 760, 800))then
wait(500)
ClickMouse(coin1,coin2,true);
wait(5000)
MoveMouse(1,1)
wait(1000)
until(1=2)
end.

Krazy_Meerkat

2006-03-09 17:18:50

Good start :)

Dankness

2006-03-09 21:20:51

very good start, some tips to help you in being a good scripter.

–> MoveMouse and ClickMouse are Jagex Detectable procedures i suggest using the SRL Mouse commands instead plus its easyer.

–> Add Random Wait times by simply doing this

Wait ( 500 + Random ( 500 ) );
That will wait for 500 miliseconds and a Random from 0-499 Miliseconds.

but otherwise good start ;)

Jagex_Fagex

2006-03-10 04:13:08

do you want me to make that a little mor clear, maybe add some spaces and stuff (scripting standards ;)

Jagex_Fagex

2006-03-10 04:18:59

program CoinCollector;

{.include OSi.txt}

var one:integer;two:integer;coin1:integer;coin2:integer;

const
coincolor=1347504; // Coin Color

begin
repeat
if (FindColor(one,two, coincolor, 1, 1, 760, 800))then
MoveMouse(one,two)
wait(1000)
ClickMouse(one,two,false);
wait(500)
if (FindColor(coin1,coin2, 4231423, 1, 1, 760, 800))then
wait(500)
ClickMouse(coin1,coin2,true);
wait(5000)
MoveMouse(1,1)
wait(1000)
until(1=2)
end.

tell me if u want me to remove ot

Jag024

2006-03-11 11:08:14

No thanks thats fine. Help is always appriated:)

Jagex_Fagex

2006-03-11 18:48:42

yep, np, also you might want to learn procedures now, if you look at big script you see lines like:

Procedure WalkToMine;

thats a procedure, so you could have a script like this:


program miner;

{.Include SRL\Srl.scar}

Procedure WalkToMine;
begin
if(condition)then
begin
dostuff
end;
end;

Procedure WalkToBank;
begin
if(condition)then
begin
dostuff
end;
end;

Procedure Mine;
begin
if(condition)then
begin
dostuff
end;
end;

begin
WalkToMine;
wait(500+random(1000))
Mine;
WalkToBank;
end.

the beauty of these, is that you can call each procedure, over and over as much as you want, with just 1 line of code. Keep Trying and you will get it! :D

Jag024

2006-03-12 18:52:20

Coin spawns, rune spawns (Varrock bank basement), it is really just a script to practice.

Bebe

2006-03-12 19:09:41

program Coincollect;
{.include SRL/SRL.scar}

const
coincolor=1347504;


Procedure Money;
begin
ClickMSColorTol(coincolor,30, true);
if(not(loggedin)then
break;
end;


begin
setupSRL;
repeat
Money;
until(false)
end.

My version. :)

BraK

2006-03-12 19:34:55

you could also clear up the var's by writing it as:

var

one,two,coin1,coin2:integer;

JLewis

2006-03-12 21:04:49

Program CoinCollector;
{.include Srl/SRL.Scar}
//Need SRL Go here www.villavu.com/forums

Const //Constants
CoinColor=3454345;//Color Of Coin
Tolerance=0;//Tolerance Default=0
Time=100;//how Many Times To Run

Var// Variables
a:integer;// A is a integer because it is a number


Procedure Money;// Procedure Name
Begin //begin
Repeat //Repeats below until specified
ClickMSColorTol(CoinColor,Tolerance,True);// Clicks color on main screen
A:=A+1 // the value A is added 1 every time the script repeats
Until(A>=Time);// repeats UNTIL a is greater than or equal to the time you set!
end;//end ;

Begin//Main Loop
SetupSRL; //Sets up SRL
Money; // Call out for procedure
end.// end.


just another version you could use:cool:

JLewis

2006-03-12 21:05:56

Program CoinCollector;
{.include Srl/SRL.Scar}
//Need SRL Go here www.villavu.com/forums

Const //Constants
CoinColor=3454345;//Color Of Coin
Tolerance=0;//Tolerance Default=0
Time=100;//how Many Times To Run

Var// Variables
a:integer;// A is a integer because it is a number


Procedure Money;// Procedure Name
Begin //begin
Repeat //Repeats below until specified
ClickMSColorTol(CoinColor,Tolerance,True);// Clicks color on main screen
A:=A+1 // the value A is added 1 every time the script repeats
Until(A>=Time);// repeats UNTIL a is greater than or equal to the time you set!
end;//end ;

Begin//Main Loop
SetupSRL; //Sets up SRL
Money; // Call out for procedure
end.// end.


Enjoy just another version:cool:

utot na grin

2007-02-08 18:20:29

nice one =)

nice start ;)