I just started developing a QuickChat include section that will hopefully help the next development. So far it has taken me about 5 minutes to create this so I need you all to go out and test it and bring me make suggestions, opinions, comments, etc. so that I can improve it.
Ideas:
- Make the Option: TStringArray so that you may only enter a valid option (not sure how to do this yet) --> idea by Dusk412
Download is at the bottom. Here is the Script if you prefer copy/paste:
SCAR Code:
//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- ยป QuickChat Routines --//
//-----------------------------------------------------------------//
// * procedure TypeText(Text: string); // * by SKy Scripter * edited by Dusk412
// * function QuickChat(Regular: Boolean; Option: TStringArray); // * by Dusk412
{*******************************************************************************
procedure TypeText(Text: string);
By: SKy Scripter
Edited By: Dusk412
Description: Types but does not send human like text
*******************************************************************************}
procedure TypeText(Text: string);
var
S: string;
I: Integer;
C: Byte;
Shift: Boolean;
begin
S:= 'ABCDEFGHIJKLMNOPQRSTUVWXZ' + '~!@#$%^&*()_+{}|:"<>?';
for I:= 1 to Length(Text) do
begin
Shift:= (Pos(Text[i], S) > 0);
if(Shift)then
begin
KeyDown(VK_SHIFT) Wait(40 + Random(40));
while(Pos(Text[i], S) > 0)and(I <= Length(Text))do
begin
C := GetKeyCode(StrGet(Text, I));
TypeByte(c);
I:= I + 1;
if(I > Length(Text))then Break;
end;
end;
if(Shift)then
KeyUp(VK_SHIFT);
Wait(40 + Random(40));
if(I <= Length(Text))then
begin
C:= GetKeyCode(StrGet(Text, I));
TypeByte(C);
Wait(40 + Random(40));
end;
end;
end;
{*******************************************************************************
procedure QuickChat(Regular: Boolean; Option: TStringArray);
by: Dusk412
Description: Uses QuickChat
Variables:
- Regular: Boolean - True for Public, False for Clan
- Option: TStringArray - Array Of Letters For Option (ie. ['g', 'r', '1'])
*******************************************************************************}
procedure QuickChat(Regular: Boolean; Option: TStringArray);
var
i, n : Integer;
begin
n := Length(Option) - 1;
Wait(300+random(50));
if (Regular = True) then
begin
case Random(2) of
0: begin
Mouse(81, 465, 1, 1, False);
Wait(150+random(50));
ChooseOption('ubl');
end;
1: TypeByte(GetKeyCode(Chr(13)));
end;
end;
if (Regular = False) then
begin
if(GetColor(81, 465) = 14474460) then
begin
Mouse(81, 465, 1, 1, False);
Wait(150+random(50));
ChooseOption('lan');
end;
end;
for i := 0 to n do
begin
TypeText(Option[i]);
Wait(500+random(125));
end;
end;