Results 1 to 5 of 5

Thread: QuickChat Include

  1. #1
    Join Date
    Nov 2007
    Posts
    437
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default QuickChat Include

    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;

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Maybe use Cases

    SCAR Code:
    {*******************************************************************************
    procedure QuickChat()
    by: Dusk412 Edit by NAQ
    Description: Uses QuickChat
    Variables:
      - Regular: Boolean - True for Public, False for Clan
      - Option: TStringArray - Array Of Letters For Option (ie. ['g', 't'])
    *******************************************************************************}


    procedure QuickChat(Regular: Boolean; Option: TStringArray);
    var
      i, n : Integer;
    begin
      n := Length(Option) - 1;
      Mouse(64, 466, 3, 3, False); //Randomness?
      Case Regular Of

        True : ChooseOption('ubl');

        False : ChooseOption('lan');

      end;

      for i := 0 to n do
      begin
        TypeText(Option[i]);
        Wait(500+random(125));
      end;
    end;


    Looks Nice BTW.

  3. #3
    Join Date
    Nov 2007
    Posts
    437
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I thought of cases for that part but then i realized it would probably end up looking worse because I plan on adding more after that true false thing so you would end up with one MASSIVE case statement. Thanks for the feedback.

    Edit: I updated it - added a little random timing, antiban, you know...

  4. #4
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    We already got one in the members forum, but this one is nice also

  5. #5
    Join Date
    Nov 2007
    Posts
    437
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Zytex! View Post
    We already got one in the members forum, but this one is nice also
    Well, see, that's why I gotta hurry up and become a member lol. I am workin on my script that I will apply with right now . It's getting there.... lol

    Edit: Thanks for telling me members had one btw lol. I shall now stop bothering because you guys got it under control...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •