SRL Archive - First Scripts

My first script: Al kahrid smelter


akkida2

2008-08-24 03:29:14

So I got interested in scripting with SCAR and I'm learning it everyday more, and I got 2 month holiday so I have time to learn. :D

So I made my first script.
Havent yet added the repeat. Comments so I can get it better!

program New; 
var
ore1: string;
ore2: string;
furnacex: integer;
furnacey: integer;
bankx: integer;
banky: integer;
booth1: integer;
booth2: integer;
kababx: integer;
kababy: integer;
mithx: integer;
mithy: integer;
coalx: integer;
coaly: integer;

procedure openbank;
begin;
findcolor(booth1,booth2,6060167,0,0,999,999)
clickmouse(booth1,booth2,true);
wait(500);
clickmouse(booth1,booth2,false);
wait(500);
booth2:=(booth2+45);
wait(100);
clickmouse(booth1,booth2,true);
wait(2500);
end;
procedure getmithrel;
begin;
findcolor(mithx,mithy,7359820,0,0,999,999);
wait(2500);
mithx:=(mithx-10);
mithy:=(mithy+10);
movemousesmooth(96,78);
wait(250);
clickmouse(96,78,false);
wait(500);
mithy:=(mithy+89);
movemousesmooth(96,117);
wait(250);
clickmouse(96,117,true);
wait(750);
end;
procedure getcoal;
begin;
findcolor(mithx,mithy,7359820,0,0,999,999);
wait(500);
mithx:=(mithx-10);
mithy:=(mithy+10);
movemousesmooth(143,78);
wait(250);
clickmouse(143,78,false);
wait(500);
mithy:=(mithy+89);
movemousesmooth(143,157);
wait(250);
clickmouse(143,157,true);
wait(750);
end;
procedure gotofurnace;
begin;
wait(1500);
movemousesmooth(486,46);
clickmouse(486,46,true);
wait(5000);
findcolor(kababx,kababy,1349913,0,0,999,999)
movemousesmooth(kababx,kababy);
wait(5000);
clickmouse(kababx,kababy,true);
end;
procedure furnacetwo;
begin;
wait(1500);
findcolor(furnacex,furnacey,1638399,0,0,999,
movemousesmooth(furnacex,furnacey);
wait(5000);
clickmouse(furnacex,furnacey,true);
end;
procedure furnaceclk;
begin;
wait(1500);
movemousesmooth(225,67);
clickmouse(225,67,true);
wait(5000);
movemousesmooth(225,67);
wait(1500);
clickmouse(225,67,true);
wait(1500);
movemousesmooth(360,416);
wait(1500);
clickmouse(360,416,false);
wait(1500);
movemousesmooth(361,452);
wait(10000);
clickmouse(361,452,true);
end;
procedure gobankin;
begin;
findcolor(coalx,coaly,5495791,0,0,999,999);
wait(150);
movemousesmooth(coalx,coaly);
wait(750);
clickmouse(coalx,coaly,true);
wait(150);
end;
begin
ore1:='5' //set varables here
ore2:='23'
openbank;;
wait(750);
getmithrel;
wait(750);
getcoal;
wait(2500);
gotofurnace;
wait(6500);
furnacetwo;
wait(750);
furnaceclk;
wait(750);
gobankin;
wait(150);
end.

Goobs

2008-08-24 03:35:07

For a first script, it's okay. Don't run that over night, though. Alot of the functions you called there are very bannable.

Look up tutorials on using Mouse, Consts, and other things. It will really help…

akkida2

2008-08-24 03:37:36

From: ProphesyOfWolf
For a first script, it's okay. Don't run that over night, though. Alot of the functions you called there are very bannable.

Look up tutorials on using Mouse, Consts, and other things. It will really help…
Thank you, im going to make it better, but now im going to read tutorials. ->

ShowerThoughts

2008-08-24 05:31:14

MY EYES!!!

Please USE:
Standards
WAY LESS COORD CLICKING
DTM's
BItmaps(If Needed).
RRW (RadialRoadWalk)
Search some good tuts ;)

Good Luck ;)

Unohdus

2008-08-24 06:39:18

Yeah you could read some tutorials and make it look little less bottish.

But Good luck!

Naike

2008-08-24 07:24:51

Unohdus, You can use more then one Var on the same line
etc..

ore1, ore2: string;
bankx, banky, booth1, booth2, kababx, kababy, mithx, mithy, coalx, coaly, furnacex, furnacey : Integer;

akkida2

2008-08-24 13:46:07

Okay thanks for the tip. I spent my day reading tutorials and made something little editing for the script may upload it later.

Brianb

2008-08-24 14:13:56

Clickmouuse is very detecable by jagex so use mouse instead of clickmouse.

Brian

Heavenzeyez1

2008-08-24 15:44:11

First of all, you don't have to add semicolons after begins , and standards are .. Ouch .. I fixed them . :) And you should use SRL Functions like OpenBank etc ..
Seems like you haven't added SRL at all , you can read TUT's and see , how powerful SRL really is .

program New;

{.include srl/srl.scar}
var

ore1: string;
ore2: string;
furnacex: integer;
furnacey: integer;
bankx: integer;
banky: integer;
booth1: integer;
booth2: integer;
kababx: integer;
kababy: integer;
mithx: integer;
mithy: integer;
coalx: integer;
coaly: integer;

procedure openbank;
begin
findcolor(booth1, booth2, 6060167, 0, 0, 999, 999)
clickmouse(booth1, booth2, true);
wait(500);
clickmouse(booth1, booth2, false);
wait(500);
booth2 := (booth2 + 45);
wait(100);
clickmouse(booth1, booth2, true);
wait(2500);
end;

procedure getmithrel;
begin
findcolor(mithx, mithy, 7359820, 0, 0, 999, 999);
wait(2500);
mithx := (mithx - 10);
mithy := (mithy + 10);
movemousesmooth(96, 78);
wait(250);
clickmouse(96, 78, false);
wait(500);
mithy := (mithy + 89);
movemousesmooth(96, 117);
wait(250);
clickmouse(96, 117, true);
wait(750);
end;

procedure getcoal;
begin
findcolor(mithx, mithy, 7359820, 0, 0, 999, 999);
wait(500);
mithx := (mithx - 10);
mithy := (mithy + 10);
movemousesmooth(143, 78);
wait(250);
clickmouse(143, 78, false);
wait(500);
mithy := (mithy + 89);
movemousesmooth(143, 157);
wait(250);
clickmouse(143, 157, true);
wait(750);
end;

procedure gotofurnace;
begin
wait(1500);
movemousesmooth(486, 46);
clickmouse(486, 46, true);
wait(5000);
findcolor(kababx, kababy, 1349913, 0, 0, 999, 999)
movemousesmooth(kababx, kababy);
wait(5000);
clickmouse(kababx, kababy, true);
end;

procedure furnacetwo;
begin
wait(1500);
findcolor(furnacex, furnacey, 1638399, 0, 0, 999,
Mouse(furnacex, furnacey);
wait(5000);
clickmouse(furnacex, furnacey, true);
end;

procedure furnaceclk;
begin
wait(1500);
movemousesmooth(225, 67);
clickmouse(225, 67, true);
wait(5000);
movemousesmooth(225, 67);
wait(1500);
clickmouse(225, 67, true);
wait(1500);
movemousesmooth(360, 416);
wait(1500);
clickmouse(360, 416, false);
wait(1500);
movemousesmooth(361, 452);
wait(10000);
clickmouse(361, 452, true);
end;

procedure gobankin;
begin
findcolor(coalx, coaly, 5495791, 0, 0, 999, 999);
wait(150);
movemousesmooth(coalx, coaly);
wait(750);
clickmouse(coalx, coaly, true);
wait(150);
end;
begin
SetupSRL;
ore1 := '5'; //set varables here
ore2 := '23';
openbank;
wait(750);
getmithrel;
wait(750);
getcoal;
wait(2500);
gotofurnace;
wait(6500);
furnacetwo;
wait(750);
furnaceclk;
wait(750);
gobankin;
wait(150);
end.
Fixed Standards and Showed how to add SRL . :)
GL!
~Eerik~

akkida2

2008-08-25 15:08:37

okay thabnks for all the tips gonna make it better, maybe upload it later. (Only for member zone if I can reach there ^^)