Log in

View Full Version : Adding a progress report



Esteban
04-28-2007, 10:23 PM
For my autotyper, i want to add a progress report stating how many times it has sent the messages. I am unaware how to, so i provided my script below so you could look at it to decide how i would script a proggy into it.

//|================================================= ======================|
//|Welcome to EZTyper, brough to by Esteban! Please Enjoy. |
//|Remember set the constants with comments after them. |
//|Text Colors: Red: - Green: - White: - Cyan: - Purple: |
//|Text Color Effects: Flash1: - Flash2: - Flash3: - Scroll: - Shake: |
//|Wave: - Wave2: - Slide: - Glow1: - Glow2: - Glow3 |
//|Text Color and Effect Format: Color:Effect:Text |
//|Example: Red:wave:Hello! You would type this in the message1,2, or 3 |
//|================================================= ======================|
program EZTyper;
{.include SRL\SRL.SCAR}
{.include SRL/SRL/Misc/Trade.scar}

const

{================================================= ==============}
{=====================Messages to Auto-Type=====================}
{================================================= ==============}

Message1='Hey';//Type First Message Here
Message2='Whats up?';//Type Second Message Here
Message3='lol';//Type Third Message Here
TalkWait= 4000;//This is How Long (in ms) to Wait Before Typing the Next Message.


AntiBanExtra=True;

{================================================= ==============}
{=====Player Information(Not Sure if This is Needed or Not)=====}
{================================================= ==============}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0;

Players[0].Name :='Enter Here';//Enter your RuneScape Account name here
Players[0].Pass :='Password';//Enter the account's password here
Players[0].Nick :='Nickname';//Enter 3 lower-case letters of your account name
Players[0].Active:=True;
end;

//======================Do not add or delete anything under this, but feel free to use it for your own script.===============

Const

{================================================= ==============}
{============================Credits============== ==============}
{================================================= ==============}

Credits1=' ____ ___ _____ __ ____ ___ ';
Credits2='| / | \ / |__| | |___| ';
Credits3='|--- / | \/ | |--- | \ BY';
Credits4='|____ /__ | / | |____ | \ ';
Credits5='EEEEEEEEE SSSSSSSS TTTTTTTTTT BBBBBBBBB AAAAAAAA NN NN';
Credits6='EE EE SSSSSSSS TT TT TT BB BB AA AA NN N NN';
Credits7='EE EE SS TT BB BB AA AA NN N NN';
Credits8='EEEEEE SSSSSSS TT BBBBBBB AAAAAAAAAA NN N NN';
Credits9='EE EE SS TT BB BB AA AA NN N NN';
Credits10='EE EE SSSSSSSS TT BB BB AA AA NN NN';
Credits11='EEEEEEEEE SSSSSSSS TT BBBBBBBBB AA AA NN NN';
Credits12='With thanks to jarlaxe for guidance from his script';
procedure Nickname;
begin
NickNameBMP := CreateBitmapMaskFromText(Players[0].Nick, UpChars);
end;

procedure Credits;
begin
wait(1000+Random(100));
writeln(Credits1);
wait(500);
writeln(Credits2);
wait(500);
writeln(Credits3);
wait(500);
writeln(Credits4);
wait(500);
writeln(' ');
writeln(Credits5);
wait(500);
writeln(Credits6);
wait(500);
writeln(Credits7);
wait(500);
writeln(credits8);
wait(500);
writeln(credits9);
wait(500);
writeln(credits10);
wait(500);
writeln(credits11);
wait(500);
writeln(' ');
writeln(credits12);
end;

procedure Messages;
begin
TypeSend(Message1+chr(13));
wait(TalkWait+Random(500))

TypeSend(Message2+chr(13));
wait(TalkWait+Random(500))
TypeSend(Message3+chr(13));
wait(TalkWait+Random(500))
end;

begin
SetupSRL;
Credits;

FindNormalRandoms;
DeclarePlayers;
LoginPlayer;
repeat
Messages;
Wait(500+Random(100))
FindNormalRandoms;
Wait(200+Random(100))
until(false)
end.

Smartzkid
04-28-2007, 10:32 PM
your main loop:

begin
SetupSRL;
Credits;

FindNormalRandoms;
DeclarePlayers;
LoginPlayer;
repeat
Messages;
Wait(500+Random(100))
FindNormalRandoms;
Wait(200+Random(100))
until(false)
end.

For a progress report (you'd have to declare 'talked' as an integer):
begin
SetupSRL;
Credits;

FindNormalRandoms;
DeclarePlayers;
LoginPlayer;
repeat
Messages;
Wait(500+Random(100))
FindNormalRandoms;
Wait(200+Random(100))
talked := talked + 1;
until(isfkeydown(12))
writeln('Sent ' + inttostr(talked) +' lines');
end.

omgh4x0rz
04-28-2007, 10:32 PM
add a int variable called messagenum

everytime your script types a message, have the next command be
messagenum:=messagenum+1;

Then for your proggy, just include
writeln('You have sent +inttostr(messagenum)+' messages!');

edit: dam you smartzkid :(

Esteban
04-28-2007, 10:46 PM
I have done what you said Smartzkid, and gotten this

//|================================================= ======================|
//|Welcome to EZTyper, brough to by Esteban! Please Enjoy. |
//|Remember set the constants with comments after them. |
//|Text Colors: Red: - Green: - White: - Cyan: - Purple: |
//|Text Color Effects: Flash1: - Flash2: - Flash3: - Scroll: - Shake: |
//|Wave: - Wave2: - Slide: - Glow1: - Glow2: - Glow3 |
//|Text Color and Effect Format: Color:Effect:Text |
//|Example: Red:wave:Hello! You would type this in the message1,2, or 3 |
//|================================================= ======================|
program EZTyper;
{.include SRL\SRL.SCAR}
{.include SRL/SRL/Misc/Trade.scar}

var

Talked : Interger
const

{================================================= ==============}
{=====================Messages to Auto-Type=====================}
{================================================= ==============}

Message1='Hey';//Type First Message Here
Message2='Whats up?';//Type Second Message Here
Message3='lol';//Type Third Message Here
TalkWait= 4000;//This is How Long (in ms) to Wait Before Typing the Next Message.


AntiBanExtra=True;

{================================================= ==============}
{=====Player Information(Not Sure if This is Needed or Not)=====}
{================================================= ==============}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0;

Players[0].Name :='Enter Here';//Enter your RuneScape Account name here
Players[0].Pass :='Password';//Enter the account's password here
Players[0].Nick :='Nickname';//Enter 3 lower-case letters of your account name
Players[0].Active:=True;
end;

//======================Do not add or delete anything under this, but feel free to use it for your own script.===============

Const

{================================================= ==============}
{============================Credits============== ==============}
{================================================= ==============}

Credits1=' ____ ___ _____ __ ____ ___ ';
Credits2='| / | \ / |__| | |___| ';
Credits3='|--- / | \/ | |--- | \ BY';
Credits4='|____ /__ | / | |____ | \ ';
Credits5='EEEEEEEEE SSSSSSSS TTTTTTTTTT BBBBBBBBB AAAAAAAA NN NN';
Credits6='EE EE SSSSSSSS TT TT TT BB BB AA AA NN N NN';
Credits7='EE EE SS TT BB BB AA AA NN N NN';
Credits8='EEEEEE SSSSSSS TT BBBBBBB AAAAAAAAAA NN N NN';
Credits9='EE EE SS TT BB BB AA AA NN N NN';
Credits10='EE EE SSSSSSSS TT BB BB AA AA NN NN';
Credits11='EEEEEEEEE SSSSSSSS TT BBBBBBBBB AA AA NN NN';
Credits12='With thanks to jarlaxe for guidance from his script';
procedure Nickname;
begin
NickNameBMP := CreateBitmapMaskFromText(Players[0].Nick, UpChars);
end;

procedure Credits;
begin
wait(1000+Random(100));
writeln(Credits1);
wait(500);
writeln(Credits2);
wait(500);
writeln(Credits3);
wait(500);
writeln(Credits4);
wait(500);
writeln(' ');
writeln(Credits5);
wait(500);
writeln(Credits6);
wait(500);
writeln(Credits7);
wait(500);
writeln(credits8);
wait(500);
writeln(credits9);
wait(500);
writeln(credits10);
wait(500);
writeln(credits11);
wait(500);
writeln(' ');
writeln(credits12);
end;

procedure Messages;
begin
TypeSend(Message1+chr(13));
wait(TalkWait+Random(500))

TypeSend(Message2+chr(13));
wait(TalkWait+Random(500))
TypeSend(Message3+chr(13));
wait(TalkWait+Random(500))
end;

begin
SetupSRL;
Credits;

FindNormalRandoms;
DeclarePlayers;
LoginPlayer;
repeat
Messages;
Wait(500+Random(100))
FindNormalRandoms;
Wait(200+Random(100))
Talked :=Talked + 1;
until(isfkeydown(12))
writeln('Sent ' + intostr(Talked)+' lines');
end.

and i get- Line 16: [Error] (18746:10): Unknown type 'Interger' in script C:\Program Files\SCAR 2.03\Scripts\EZTyper V1.0.scar

omgh4x0rz
04-28-2007, 10:55 PM
dude, just take a closer look at the error you posted.

"Unknown type Interger..."

Esteban
04-28-2007, 11:02 PM
ay, a simple spelling error. Thanks for the help omg, help like that is probably the best help, doesn't just say whats wrong, but clues to what's wrong. Thanks the all the help mates.

edit- I have done what smartzkid told me to do, but when i stop the script, it does not create a progress report

omgh4x0rz
04-29-2007, 12:28 AM
np estebab.

Did you press the red stop button?

Pressing the stop button will cut the script off where it is, so it won't get to the command where it is supposed to create the report.

Esteban
04-29-2007, 12:53 AM
yes i did press the stop button. What way should it be stopped so it creates the progress report (i will also add this to the instructions on the script)

Esteban
04-29-2007, 02:59 PM
OK, i kinda got my progress report to work. I have the following-

//|================================================= ======================|
//|Welcome to EZTyper, brough to by Esteban! Please Enjoy. |
//|Remember set the constants with comments after them. |
//|Text Colors: Red: - Green: - White: - Cyan: - Purple: |
//|Text Color Effects: Flash1: - Flash2: - Flash3: - Scroll: - Shake: |
//|Wave: - Wave2: - Slide: - Glow1: - Glow2: - Glow3 |
//|Text Color and Effect Format: Color:Effect: Text |
//|Example: Red:wave: Hello! You would type this in the message1,2, or 3 |
//|================================================= ======================|
program EZTyper;
{.include SRL\SRL.SCAR}
{.include SRL/SRL/Misc/Trade.scar}

var
messagenum : integer;

const

{================================================= ==============}
{=====================Messages to Auto-Type=====================}
{================================================= ==============}

Message1='Hey';//Type First Message Here
Message2='Whats up?';//Type Second Message Here
Message3='lol';//Type Third Message Here
TalkWait= 4000;//This is How Long (in ms) to Wait Before Typing the Next Message.
//Set TalkWait to Zero (0) if you want it to spam messages

AntiBanExtra=True;

//======================Do not add or delete anything under this, but feel free to use it for your own script.===============

Const

{================================================= ==============}
{============================Credits============== ==============}
{================================================= ==============}

Credits1=' ____ ___ _____ __ ____ ___ ';
Credits2='| / | \ / |__| | |___| ';
Credits3='|--- / --- | \/ | |--- | \ BY';
Credits4='|____ /__ | / | |____ | \ ';
Credits5=' ';
Credits6='8888888 888 888';
Credits7='88 888 888';
Credits8='88 888 888';
Credits9='8888 .d8888b 888888 .d88b. 88888b. 8888b. 8888b.';
CreditsA='88 88K 888 d8P Y8b 888 "88b "88b 888 88b';
CreditsB='88 "Y8888b. 888 88888888 888 888 .d888888 888 888';
CreditsC='88 X88 Y88b. Y8b. 888 d88P 888 888 888 888';
CreditsD='8888888 88888P/ "Y888 "Y8888 88888P" "Y888888 888 888';
CreditsD1=' ';
CreditsE='With thanks to jarlaxe for guidance from his script';
CreditsF='Script Beginning in...';
CreditsG='5... (Click on the RuneScape Client Before it Starts!)';
CreditsH='4...';
CreditsI='3...';
CreditsJ='2...';
CreditsK='1...';
CreditsL='Script Starting!';

procedure Nickname;
begin
NickNameBMP := CreateBitmapMaskFromText(Players[0].Nick, UpChars);
end;

procedure Credits;
begin
wait(1000+Random(100));
writeln(Credits1);
wait(500);
writeln(Credits2);
wait(500);
writeln(Credits3);
wait(500);
writeln(Credits4);
wait(500);
writeln(Credits5);
wait(500);
writeln(Credits6);
wait(500);
writeln(Credits7);
wait(500);
writeln(credits8);
wait(500);
writeln(credits9);
wait(500);
writeln(creditsA);
wait(500);
writeln(creditsB);
wait(500);
writeln(creditsC);
wait(500);
writeln(creditsD);
wait(500);
writeln(CreditsD1);
writeln(creditsE);
wait(5000);
ClearDebug;
writeln(creditsF);
wait(1000);
writeln(creditsG);
wait(1000);
writeln(creditsH);
wait(1000);
writeln(creditsI);
wait(1000);
writeln(creditsJ);
wait(1000);
writeln(creditsK);
wait(1000);
writeln(creditsL);
wait(1000);
end;

procedure Messages;
begin
TypeSend(Message1);
messagenum:=messagenum+1
wait(TalkWait+Random(500))
TypeSend(Message2);
messagenum:=messagenum+1
wait(TalkWait+Random(500))
TypeSend(Message3);
messagenum:=messagenum+1
wait(TalkWait+Random(500))
end;

begin
SetupSRL;
ClearDebug
Credits;
ClearDebug
writeln('You have sent '+inttostr(messagenum)+' messages!')
FindNormalRandoms;
repeat
Messages;
Wait(500+Random(100))
FindNormalRandoms;
Wait(200+Random(100))
until(false)
end

But after typing messages, the progress report remains at "You have sent 0 messages!"

?