Results 1 to 19 of 19

Thread: AutoResponder...

  1. #1
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default AutoResponder...

    I think I know how to do a good amount of stuff in SCAR, but I can't seem to be able to get my AutoResponder to work...

    I see nothing wrong with it, but it's not working

    No matter what I do, I can't get it to ignore the current player's messages.

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

       procedure DeclarePlayers;
        begin

         HowManyPlayers:=1;
         NumberOfPlayers(1);
         CurrentPlayer:=0;

         Players[0].Name :='Username';
         Players[0].Pass :='***********';
         Players[0].Nick :='ubypk';
         Players[0].Active:=True;

        end;

       procedure AutoResponder;
        begin
       
          Wait(2000 + Random(2000));
       
         if(InChat(Players[CurrentPlayer].Name))then
          begin
           Exit;
          end
         
         if(InChat('hi')) or (InChat('hey')) or (InChat('hello'))then
          begin
           Wait(1000 + Random(2000));
            case Random(3) of
            0: TypeSend('hey');
            1: TypeSend('sup');
            2: TypeSend('what''s up?');
            end;
          end;
        end;
       
    begin
    SetupSRL;
    DeclarePlayers;
    LoginPlayer;
     repeat
      AutoResponder;
     until(false)
    end.

  2. #2
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    First off, the Nickname should be a 2-4 letter segment of the person's name...

    I'll take a look at it in a couple mins

    Also, I wouldn't recommend leaving your username in there, Jagex'll pick it up and ban it
    Interested in C# and Electrical Engineering? This might interest you.

  3. #3
    Join Date
    Mar 2006
    Location
    United States, -7:00 GMT
    Posts
    1,790
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Hm..I remember having a big problem with doing something like this, the InChat, I am pretty sure it works, but maybe try IsChatMessage because I'm positive that works, if its anything else, I don't spot it. :\

    hakuna matata ;)

  4. #4
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Alright, thanks you guys.

  5. #5
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Also, though it's not a problem here, it's a good habit to put:

    SCAR Code:
    HowManyPlayers:=1;
         NumberOfPlayers(HowManyPlayers);
         CurrentPlayer:=0;

    instead of:

    SCAR Code:
    HowManyPlayers:=1;
         NumberOfPlayers(1);
         CurrentPlayer:=0;
    Interested in C# and Electrical Engineering? This might interest you.

  6. #6
    Join Date
    Sep 2006
    Location
    West U.S.
    Posts
    2,172
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    wont it sometimes loop itself since it will respond to hey even when you say hey
    yourself

    They are sisters...
    Runescape Classic

  7. #7
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    That's what I want to fix,

    SCAR Code:
    if(InChat(Players[CurrentPlayer].Name))then
          begin
           Exit;
          end

    With that. But it's not really working

  8. #8
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm pretty sure you don't need the begin exit end. I think, because in scripts they do something like:
    SCAR Code:
    if(not(LoggedIn))then
    Exit
    so you don't need the begin and end. it should work like this though:
    SCAR Code:
    if(InChat(Players[CurrentPlayer].Name))then
    Exit;
    not sure if thats the problem, but I think thats how it would be written.

  9. #9
    Join Date
    Mar 2006
    Location
    United States, -7:00 GMT
    Posts
    1,790
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    I told u, it MIGHT respond to itself, thats why you go look at Fawki's potato responder.

    hakuna matata ;)

  10. #10
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    I took a look at Fakawi's potato responder.

    It just seemed like my way was so much simpler

  11. #11
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    maybe instead of searching for the username in the chat, search for the nickname? I doubt it'll fix it, but it might speed it up a bit...

    EDIT:

    Yes! That's it! If you don't capitalize the first digit of your username in declareplayers, the script won't find it, cause its searching for the whole username with a lowercase first digit, but RS automatically capitalizes it.


    \/\/ That will work. It's in core/text.scar\/\/
    function Capitalize(S: String): String;
    By: RSN/StarBlaster
    Description:
    Will Capitalize strings as Runescape i are noob = I Are Noob
    Interested in C# and Electrical Engineering? This might interest you.

  12. #12
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    You got it to work Smartz? It doesn't really make sense though. The charset has both Lowercase and Uppercase letters.

    I'll try it out, though.

    I did get it to ignore my messages when I said my name in with "hey"

    Perhaps it doesn't check that set of Chars or something...

  13. #13
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well instead of inchat use findchattext, it looks in the whole chat box.
    Inchat looks at the last word typed.

  14. #14
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    And try searching for the player's nick
    Interested in C# and Electrical Engineering? This might interest you.

  15. #15
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    IT WORKS!!!

    Thanks you so much guys

  16. #16
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Jason2gs View Post
    IT WORKS!!!

    Thanks you so much guys
    All because of my idea!
    Last edited by Mr. Doctor; 10-11-2012 at 09:44 PM.

  17. #17
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    One script down...

    Now the team prepares to take on their next one...

    TO INFINITY AND BEYOND!!!!

    *inside joke*
    Interested in C# and Electrical Engineering? This might interest you.

  18. #18
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Heh

  19. #19
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Jason2gs
    Yesterday, 10:25 PM
    Someone's up late
    Interested in C# and Electrical Engineering? This might interest you.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Autoresponder
    By nielsie95 in forum OSR Help
    Replies: 10
    Last Post: 09-15-2007, 08:27 AM
  2. AutoResponder...
    By yanix in forum RS3 Outdated / Broken Scripts
    Replies: 8
    Last Post: 09-15-2007, 08:12 AM
  3. Autoresponder
    By TViYH in forum RS3 Outdated / Broken Scripts
    Replies: 1
    Last Post: 05-22-2007, 11:25 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
  •