SRL Archive - First Scripts

My first script! (not for RS)


philowns

2007-07-30 09:21:16

Could someone have a look over it and tell me what i could do to improve it?
(if you can understand it, its messy)

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

Var
Oak: Integer;
OakLong: Integer;

Procedure LoadOak;
begin;
Oak := DTMFromString('78DA639CCBC0C050C180022615BA806946289' +
'F712990286040038CA86A5601896A026A40E63410503307483413' +
'50339908353D40A296809A5E4CBF63A801854F3E0356005303006' +
'D020B24');
end;

Procedure LoadOakLong;
begin
OakLong := DTMFromString('78DA633CC9C4C0B08B910119CCAC1502D3305' +
'1C69D4035EB50D5C064E16A7601D5AC25A0E61050CD46026ACE00' +
'D51C24A0E60250CD4922D41CC5AF0600CFA80BD1');
end;

Procedure WithdrawOaks;
begin
if (FindDTM(Oak,x,y,56, 49,474, 310)) then
begin
Mouse(x,y,0,0,false);
ChooseOption(x, y, 'All');
end;
end;


Procedure CloseTheBank;
begin
Mouse(459,41,0,0,true);
Wait(400);
end;

Procedure Fletch;
begin
Mouse(585,229,0,0,true);
Wait(150);
Mouse(625,228,0,0,true);
Wait(200);
Mouse(375,414,0,0,false);
ChooseOption(x, y, 'X,');
If(FindDTM(OakLong, 688, 421,736, 468)) then
end;


Procedure BankLongBows;
begin
If(FindDTM(OakLong,688, 421,736, 468)); then
begin
Mouse(x,y,0,0,false);
Wait(500);
ChooseOption(x,y, 'All');
end;
end;






begin
LoadOak;
LoadOakLong;
Repeat
OpenBank;
WithdrawOaks;
CloseTheBank;
Fletch;
OpenBank;
BankLongBows;
Until(false);
end.



Thanks! :)

Sp0rky

2007-07-30 09:41:19

How could this possibly be not for rs? =P

philowns

2007-07-30 09:48:13

Private server

exppo

2007-07-30 10:01:41

Who would make a fletcher auto for a private server, Only if had the newb point scheme.. :D

philowns

2007-07-30 11:10:18

From: exppo
Who would make a fletcher auto for a private server, Only if had the newb point scheme.. :D




Why not?

I didnt ask you to judge me, only the script:cartman:

itSchRis917

2007-07-30 14:55:09

Well, first of all, for the Loading of the DTM's, put them both in one procedure.. And your standards are a bit off, i fixed them for you :D You don't need to make a procedure called CloseTheBank, seeing as how SRL has one.

CloseBank

As for your fletching procedure, i suppose its all right, seeing as how its not for RS, as long as you know that this would NEVER suffice for Runescape.. That being said, you also, click on the option to 'Make X', but you never type in how many you want to make. ;) And after it is typed in, you should add a repeat function so it repeats waiting until it finds the DTM in the last inventory spot, or a failsafe is reached(which i have included in version below) Fixed in the edited version below!

There were a few small compiling errors also.. Such as:

Line 41: [Error] (14492:24): Variable Expected in script
Failed when compiling
Line 47: [Error] (14498:20): Variable Expected in script
Failed when compiling
Line 47: [Error] (14498:46): 'THEN' expected in script

For the first two, you need to include Variables in the FindDTM function, i think someone answered your thread about this, but not sure, so i added it anyway.. And the last error, you can not put a semicolon directly after an If statement, because you need to place the "Then" there. So you do not want to do this:

If(FindDTM(OakLong, x, y, 688, 421,736, 468)); then

You want to do this:

If(FindDTM(OakLong, x, y, 688, 421,736, 468))Then

And here is the totally edited version:


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

Var
Oak, OakLong : Integer;

Procedure LoadOak;
Begin
Oak := DTMFromString('78DA639CCBC0C050C180022615BA806946289' +
'F712990286040038CA86A5601896A026A40E63410503307483413' +
'50339908353D40A296809A5E4CBF63A801854F3E0356005303006' +
'D020B24');
OakLong := DTMFromString('78DA633CC9C4C0B08B910119CCAC1502D3305' +
'1C69D4035EB50D5C064E16A7601D5AC25A0E61050CD46026ACE00' +
'D51C24A0E60250CD4922D41CC5AF0600CFA80BD1');
End;

Procedure WithdrawOaks;
Begin
If (FindDTM(Oak,x,y,56, 49,474, 310))Then
Begin
Mouse(x,y,0,0,false);
ChooseOption(x, y, 'All');
End;
End;

Procedure Fletch;
Var
FletchMark : Integer;
Begin
MarkTime(FletchMark);
Mouse(585,229,0,0,true);
Wait(150);
Mouse(625,228,0,0,true);
Wait(200);
Mouse(375,414,0,0,false);
ChooseOption(x, y, 'X,');
TypeSend('27');
Repeat
Wait(100);
Until(FindDTM(OakLong, x, y, 688, 421,736, 468)) OR (TimeFromMark(FletchMark) >= 180000);
End;


Procedure BankLongBows;
Begin
If(FindDTM(OakLong, x, y, 688, 421,736, 468))Then
Begin
Mouse(x,y,0,0,false);
Wait(500);
ChooseOption(x,y, 'All');
End;
End;






begin
LoadOak;
Repeat
OpenBank;
WithdrawOaks;
CloseBank;
Fletch;
OpenBank;
BankLongBows;
Until(false);
end.

REMEMBER! ALL OF MY CRITICISM IS CONSTRUCTIVE!

philowns

2007-07-30 15:01:01

Hmm i look an idiot now with all those mistakes:duh:


Nah im kidding, i take it all as CC, thanks alot :D

itSchRis917

2007-07-30 15:06:47

No problem Phil. :)

Haxor

2007-07-31 06:10:07

so what do we use this on??????

haxor

Zeta

2007-08-01 01:07:39

it's for a private server

del_signo

2007-08-01 01:33:04

actually private servers are good to test scripts on because if it gets stuck in a loop or somthing you wont really lose anything

Tails111

2007-08-09 20:56:54

Hey Phil if you ever do plan on adapting that to actually work on the official runescape servers, what ever you do, do NOT use coords. Mainly because they are very easily detechted and become very unreliable after 4 minutes of running.

Nice first attempt tho!