Results 1 to 11 of 11

Thread: AutoResponder - Works 5/5!

  1. #1
    Join Date
    May 2007
    Location
    Seattle
    Posts
    1,069
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default AutoResponder - Works 5/5!

    I thought the community could use this! It works. Just have it with your randoms procedures! (AutoRespond HAVE FUN!

    Credits: Charmz for core procedures. I standardized most of it and redid everything. You must credit me and charmz!


    SCAR Code:
    {...><> Amazing AutoRespond Procedure <><...}

    {

    Credits:
    - Born2Code - Cleaning up and adding procedures
    - Charmz - Core Procedures

    }




    Function GetChatMessage(Text: String): Boolean;
    Var
    TX, TY: Integer;
    Chat: String;
    Begin
      If(IsTextInAreaEx(40, 415, 130, 415, TX, TY, ':', 0, SmallChars, False, True, 0, 0, 0))then
      Begin
        Chat:= Lowercase(Trim(GetTextAtEx(TX + 8, 415, 0, SmallChars, False, False, 0, 1, 16711680, 40, False, TR_AllChars)));
        If(Pos(Text, Chat) <> 0)then
        Begin
          Result:= True;
        end;
      end;
    end;

    Function GetChatName(Name: String): Boolean;
    Var
    I: Integer;
    Begin
      ChatName:= Lowercase(Trim(GetTextAtEx(21, 415, 0, SmallChars, False, False, 0, 0, 0, 50, False, TR_AllChars)));
      I:= Pos(':', ChatName);
      If(I <> 0)then
      Begin
        Delete(ChatName, I, I);
      end;
      If(Pos(Name, ChatName) <> 0)then
      Begin
        Result:= True;
      end;
    end;

    procedure AutoRespond;
    var
    Responce, Level: String;
    TheReply: Integer;
    begin
      if(GetChatMessage(Players[CurrentPlayer].Name))then
      begin
        AutoRespondCount := AutoRespondCount + 1;
        TheReply := Random(10) + 1;
        case (TheReply) of
          0 : Responce := ('wat');
          1 : Responce := ('what');
          2 : Responce := ('yeah');
          3 : Responce := ('wut');
          4 : Responce := ('what do you want');
          5 : Responce := ('meh?');
          6 : Responce := ('yep?');
          7 : Responce := ('me?');
          8 : Responce := ('what?');
          9 : Responce := ('?');
          10 : Responce := ('??');
        end;
        TypeSend(Responce);
      end;

      if(GetChatMessage('lol'))
      or (GetChatMessage('ha'))
      or (GetChatMessage('haha'))
      or (GetChatMessage('rofl'))
      or (GetChatMessage('lmao'))
      or (GetChatMessage('lmfao'))
      or (GetChatMessage('tehee'))
      or (GetChatMessage('funny'))
      or (GetChatMessage('rotfl')) then
      begin
        AutoRespondCount := AutoRespondCount + 1;
        TheReply := Random(10) + 1;
        case (TheReply) of
          0 : Responce := ('lol');
          1 : Responce := ('haha');
          2 : Responce := ('rofl');
          3 : Responce := ('lmao');
          4 : Responce := ('lolz');
          5 : Responce := ('roflz');
          6 : Responce := ('hehe');
          7 : Responce := ('ha');
          8 : Responce := ('lols');
          9 : Responce := ('rofls');
          10 : Responce := ('funny stuff');
        end;
        TypeSend(Responce);
      end;

       if(GetChatMessage('wc'))
       or (GetChatMessage('woodcutting'))
       or (GetChatMessage('wcing'))
       or (GetChatMessage('cutting'))
       and (GetChatMessage('lvl'))
       or (GetChatMessage('level'))
       or (GetChatMessage('lvls'))
       or (GetChatMessage('lvlz'))
       or (GetChatMessage('stats'))
       or (GetChatMessage('levels'))then
       begin
         AutoRespondCount := AutoRespondCount + 1;
         Level := IntToStr(GetSkillLevel('woodcutting'));
         TheReply:= Random(6) + 1;
         case (TheReply) of
           0,4,5,6 : Responce:= (Level);
           1 : Responce:= ('I''m level ' + Level + ' over here!');
           2 : Responce:= ('Only ' + Level + '... XD');
           3 : Responce:= ('My lvl is ' + Level);
         end;
        TypeSend(Responce);
       end;

       if(GetChatMessage('what'))
       or (GetChatMessage('wut'))
       or (GetChatMessage('wat'))
       and (GetChatMessage('doing'))
       or (GetChatMessage('doin'))
       or (GetChatMessage('up'))
       or (GetChatMessage('happening')) then
       begin
        AutoRespondCount := AutoRespondCount + 1;
        TheReply := Random(5) + 1;
        case (TheReply) of
          0 : Responce := ('hello');
          1 : Responce := ('watz up');
          2 : Responce := ('wat up');
          3 : Responce := ('whats up');
          4 : Responce := ('what up');
          5 : Responce := ('hola');
        end;
        TypeSend(Responce);
      end;


    end;
    FORMERLY BORN2CODE | Play Internet Games
    http://img147.imageshack.us/img147/2084/sigg.png

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    looks nice gratz
    ~Hermen

  3. #3
    Join Date
    Feb 2007
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    =\ not very useful tbh.. cuz auto responders in scripts make the script lag.. so unless you make one for a mercher, its not very useful... but nicely done

  4. #4
    Join Date
    May 2007
    Location
    Seattle
    Posts
    1,069
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Pwnt by Pwnt View Post
    =\ not very useful tbh.. cuz auto responders in scripts make the script lag.. so unless you make one for a mercher, its not very useful... but nicely done
    Doesn't lag my script. Maybe you don't incorporate it right...
    FORMERLY BORN2CODE | Play Internet Games
    http://img147.imageshack.us/img147/2084/sigg.png

  5. #5
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No, its pretty useful pwnt by pwnt, especially for people like me, who are way too lazy to type:

    SCAR Code:
    If (InChat('blah'))Then
     TypeSend('76');
    over and over and over again..

  6. #6
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The auto respond procedure is WAY inefficient
    Auto-responders WONT make your script lag.
    You have GetChatMessage like 20+ times. Thats the lag write there.
    You need to store the GetChatMessage in a string, instead of calling it over and over.

    message := GetChatMessage;
    if message = 'a' or ....

    and for GetChatName, just parse it out of "message", no need to grab it again, also very dangerous, it could change inbetween.

  7. #7
    Join Date
    Aug 2007
    Posts
    282
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    and you have:

    TheReply := Random(5) + 1;

    or random 10, 6... you dont need plus 1 because your cast starts from 0

  8. #8
    Join Date
    May 2007
    Location
    Seattle
    Posts
    1,069
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by dvdcrayola View Post
    and you have:

    TheReply := Random(5) + 1;

    or random 10, 6... you dont need plus 1 because your cast starts from 0
    It is to save me some time when adding everything up. It is to stop confusion which happens often with scripting.

    Best Regards...

    ~Travis
    FORMERLY BORN2CODE | Play Internet Games
    http://img147.imageshack.us/img147/2084/sigg.png

  9. #9
    Join Date
    Aug 2007
    Posts
    282
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by born2code View Post
    It is to save me some time when adding everything up. It is to stop confusion which happens often with scripting.

    Best Regards...

    ~Travis
    wait what? that didnt exactly make sence to me.. because random(5) gives you numbers 0-5(six numbers) and then your case goes from 0-5.. so why are you adding 1 to the random?

  10. #10
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Congrats on members
    The truth finally came out...


  11. #11
    Join Date
    May 2007
    Location
    Seattle
    Posts
    1,069
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by mat_de_b View Post
    Congrats on members
    tysm
    FORMERLY BORN2CODE | Play Internet Games
    http://img147.imageshack.us/img147/2084/sigg.png

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Autoresponder..
    By faster789 in forum OSR Help
    Replies: 14
    Last Post: 04-08-2008, 02:53 AM
  2. Autoresponder
    By TViYH in forum RS3 Outdated / Broken Scripts
    Replies: 1
    Last Post: 05-22-2007, 11:25 PM
  3. AutoResponder...
    By Jason2gs in forum OSR Help
    Replies: 18
    Last Post: 03-02-2007, 03:28 PM
  4. AutoResponder
    By Hey321 in forum News and General
    Replies: 20
    Last Post: 02-11-2007, 09:28 PM

Posting Permissions

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