PDA

View Full Version : Progress Reports!



skilld u
05-01-2008, 12:54 AM
Lets start with how to declare integers.


var
Clicked: integer;

var

This stands for variable, all the different types of variables go here, but the only kind that we will be using is integer.

Clicked: integer;

This declares clicked as an integer. You can name it whatever you choose.


Now we can move on to adding values to the integer.


procedure ClickTheMouse;
begin
ClickMouse(5, 5, true);
Clicked := Clicked + 1;
end;


ClickMouse will click the mouse.

Clicked := Clicked + 1; adds 1 to the value of Clicked and every time you call that it will add 1 to the value of clicked.


Making a Progress Report!


procedure Report;
begin
WriteLn('[-----tut-----]');
WriteLn('[-----clicked ' + IntToStr(Clicked) + ' times-----]');
WriteLn('[-----Ran for ' + TimeRunning + '-----]');
WriteLn('[-----tut-----]');
end;


WriteLn('');

This will add whatever is in the '' to the debug box.

+ IntToStr(Clicked)

Changes the integer Clicked to a string so that it can be included in the writeLn.

TimeRunning

Records the time running. You don't need to do any thing to set this up to work.


If you tried to run that progress report then you would notice that it doesn't look very nice, the end of each line is different.

Next I will show you how to use Padr.

Padr is a very useful function that makes each line line up with the one above it. Like so:


=============== skilld Spam Botter ================
|| Talked: 8 ||
|| Switched Players: 0 ||
|| AntiBan: 8 ||
|| Ran For: 3 Minutes and 0 Seconds ||
|| Reported: 0 ||
=============== skilld Spam Botter ================

As you can see the end of each line is the same as the one above it, this is the code you would use for it:

WriteLn('=============== skilld Spam Botter ================');
WriteLn(Padr('|| Talked: ' + IntToStr(Talked), 49) + '||');
WriteLn(Padr('|| Switched Players: ' + IntToStr(Playas), 49) + '||');
WriteLn(Padr('|| AntiBan: ' + IntToStr(AntiBanz), 49) + '||');
WriteLn(Padr('|| Ran For: ' + TimeRunning, 49) + '||');
WriteLn(Padr('|| Reported: ' + IntToStr(Reported), 49) + '||');
WriteLn('========================================= ==========');

As you know, WriteLn adds what is in the '' to the debug box.
Padr('text to add', number of spaces)

How you would use it:

WriteLn('[-----tut-----]');
WriteLn(Padr('[-----clicked ' + IntToStr(Clicked) + ' times', 10) + '-----]');
WriteLn(Padr'[-----Ran for ' + TimeRunning, 10) + '-----]');
WriteLn('[-----tut-----]');


rep ++

Iron Man
05-01-2008, 12:56 AM
Nice.

Maybe add what the fenced part of the proggy means/how to make it fence properly.

Also, you could add just the normal WriteLn method.

P1nky
05-01-2008, 12:57 AM
ty helped me :0

well not much but for the report thing always have wondered and wa slazy to see other scriptslol

sirlaughsalot
05-01-2008, 01:17 AM
ClearDebug;
SRLRandomsReport;
WriteLn('=============== skilld Spam Botter ================');
WriteLn(Padr('|| Talked: ' + IntToStr(Talked), 49) + '||');
WriteLn(Padr('|| Switched Players: ' + IntToStr(Playas), 49) + '||');
WriteLn(Padr('|| AntiBan: ' + IntToStr(AntiBanz), 49) + '||');
WriteLn(Padr('|| Ran For: ' + TimeRunning, 49) + '||');
WriteLn(Padr('|| Reported: ' + IntToStr(Reported), 49) + '||');
WriteLn('========================================= ==========');
WriteLn('');


What do the "49"s mean? and arent "talked" "playas" "antibanz" and "reported" all what you were talking about below with the adding to the integer?


To increase the value of a certain integer use this:


Reported := Reported + 1;


That will add one to the Reported integer every time you call that.

And im assuming you put that in the procedure?

Naike
05-01-2008, 02:29 PM
Its smarter to do
SRLRandomsReport;
ClearDebug;
WriteLn('=============== skilld Spam Botter ================');
WriteLn(Padr('|| Talked: ' + IntToStr(Talked), 49) + '||');
WriteLn(Padr('|| Switched Players: ' + IntToStr(Playas), 49) + '||');
WriteLn(Padr('|| AntiBan: ' + IntToStr(AntiBanz), 49) + '||');
WriteLn(Padr('|| Ran For: ' + TimeRunning, 49) + '||');
WriteLn(Padr('|| Reported: ' + IntToStr(Reported), 49) + '||');
WriteLn('========================================= ==========');
WriteLn('');

EvilChicken!
05-01-2008, 07:43 PM
You should start from scratch by telling about integer variables and how you include them in procedures.. Then - go over to telling how to use those variables in the progress report.

Make a simple proggy showing TimeRunning and those vars, THEN add padr and everything else.

Nice tut, keep 'em coming. I like your tut(s).

skilld u
05-01-2008, 08:14 PM
working on new version atm. :D

Akamaru
05-10-2008, 06:15 AM
Nice goin gto add to my ess running script

ShowerThoughts
05-10-2008, 08:56 AM
Those 3 things are instant variables in srl. you can use timerunning etc and it gives you the time running.

Immaminor
05-17-2008, 03:14 AM
Thanks a bunch, getting ready to start my new script. Needed a progress report ;)

Baked0420
05-17-2008, 04:25 AM
TimeRunning doesn't work for me, it says unknown identifier, I don't know why.