SRL Archive - Help

Progress report.


Laimonas171

2009-08-29 15:39:47

Can anyone show good and easy tut about progress reports. or show simple how to do. I quick understood it. don't need very intermediate example.

code for exampe.


program FM;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Firemaking.scar}
{.include SRL/SRL/misc/Reports.scar}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := 'Yxxxx'; //Username
Players[0].Pass := 'ssss'; //Password
Players[0].Nick := 'xxxx'; //sern
Players[0].Active := true; //leave it
Players[0].BoxRewards := ['XP', 'ostume', 'oins', 're']; //reward from randoms
end;

Procedure forExampleBankFind;
var x, y: integer;
begin
if FindSymbol(x, y, 'bank') then
begin
Mouse(X, Y, 5, 5, True);
FFlag(0)
end;
end;

Procedure Proggy;
begin
ClearDebug;
WriteLn('Bank symbols finds: ' + bankfinds); // or something like that.
WriteLn('Worked for: ' + Hours + ':' + Minutes + ':' + Seconds + '.')
end;
Procedure MainLoop;
begin
ForexampleBankFind;
Proggy;
end;
Begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
ClearDebug;
MainLoop;
end.


Rich

2009-08-29 15:46:16

procedure Proggy;
begin
ClearDebug;
WriteLn('//////////////////////////|\\\\\\\\\\\\\\\\\\\\\\\\\\');
WriteLn('Laimonas171''s Bank Symbol Finder');
WriteLn('Found ' + IntToStr(BankFinds) + ' bank symbols');
WriteLn('Worked for ' + TimeRunning);
end;

Something like that?

Richard.

Sir R. M8gic1an

2009-08-29 15:46:28

Tutorial Island -> Newly Added to SRL -> Reports.scar

~RM

Laimonas171

2009-08-29 15:47:16

From: R1ch
procedure Proggy;
begin
ClearDebug;
WriteLn('//////////////////////////|\\\\\\\\\\\\\\\\\\\\\\\\\\');
WriteLn('Laimonas171''s Bank Symbol Finder');
WriteLn('Found ' + IntToStr(BankFinds) + ' bank symbols');
WriteLn('Worked for ' + TimeRunning);
end;

Something like that?

Richard.

Yes just i dont know how to increase numbers.

EDIT: i am sure what need to make variables and add then after procedures then use them on proggy somehow. can you edit my code in first post and add simple time and symbols finds ?

Rich

2009-08-29 15:53:23

Ok, have a variable called BankFinds
var
BankFinds : Integer;

When it finds a bank symbol, you want to increase that by one. There are two ways of doing this.

procedure ForExampleBankFind;
var
X, Y : Integer;

begin
if FindSymbol(X, Y, 'bank') then
begin
BankFinds:= BankFinds + 1; //This is the first way
Mouse(X, Y, 5, 5, True);
FFlag(3);
end;
end;

Or this:

procedure ForExampleBankFind;
var
X, Y : Integer;

begin
if FindSymbol(X, Y, 'bank') then
begin
Inc(BankFinds); //And this is the seconds way of increasing BankFinds by 1
Mouse(X, Y, 5, 5, True);
FFlag(3);
end;
end;

Hope I helped,
Richard

Laimonas171

2009-08-29 15:58:26

yes you do ty vm. Rep++ :)

Rich

2009-08-29 15:59:18

Oooo, thanks. If you need any more help with anything, feel free to PM me and I'll see what I can do.