Results 1 to 21 of 21

Thread: AutoRespondZor(...); by masterkill

  1. #1
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default AutoResponder(...); by masterkill

    AutoResponder(...);

    heey guys, this is a auto responder i made. i think some 'starting' scripters can use this in there scripts, easy to use.

    The Responder:

    to use the responder you need to place this in your script:
    SCAR Code:
    {*******************************************************************************
    Function AutoResponder(FindText, SayText: TStringArray; LookInLastIntegerLines: integer):Boolean;
    By: MasterKill.
    Description: If Found the FindText then random say one of the SeyTexts
    Use: AutoResponder(['bot','auto','macro'], ['im not an bot!','im not ' +PlayerName,'whats that?'], 2);
    Error: Use 'PlayerName' on own risk! scars GetTextAt is a lil buggy
    *******************************************************************************}

    var
      PlayerName: String;
    Function AutoResponder(FindText, SayText: TStringArray; LookInLastIntegerLines: integer):Boolean;
    var
      textx, texty, Ymod, GetNameTrys, Coordspace, SRT, R: Integer;
      TextSayd, TextFound: String;
    begin
      If (LookInLastIntegerLines > 8) then
      begin
        WriteLn('  auto respond [ERROR] Wrong >LookInLastIntegerLines< not setted up correct:');
        WriteLn('  error in Respond: ' + FindText[0]);
        exit;
      end;
      case LookInLastIntegerLines of
        1: Ymod := 441;
        2: Ymod := 428;
        3: Ymod := 414;
        4: Ymod := 400;
        5: Ymod := 386;
        6: Ymod := 372;
        7: Ymod := 358;
        8: Ymod := 344;
      end;
      For R := 0 To (GetArrayLength(findtext)-1) Do
      begin
        if IsTextInAreaEx(8, Ymod, 291, 461, textx, texty, FindText[R], 12, smallchars, False, True, 0, 1, 16711680) then
        begin
          Coordspace := Texty;
          //writeLn(IntToStr(Coordspace));
          PlayerName := '';
          Repeat
            PlayerName := GetTextAtEx(12, (Coordspace), 0, SmallChars, False, False, 0, 5, 0, 40, False, tr_AllChars)
            If Not (playerName = '') then Break;
            GetNameTrys := GetNameTrys + 1;
          Until not (PlayerName = '') or (GetNameTrys > 5)
          Wait(2000);
          if (Pos(Players[CurrentPlayer].Nick, PlayerName) > 0) then exit;
          Result := True;
          respzz := True;
          SRT := Random(GetArrayLength(SayText));
          TypeSend(SayText[SRT]);
          TextSayd := SayText[SRT];
          TextFound := FindText[R];
          responds := responds + 1;
          WriteLn('  -Auto Respond');
          If (Trim(PlayerName) = '') then
          begin
            PlayerName := 'Anonymous:';
            WriteLn('    not found player name');
          end;
          WriteLn('    ' + Trim(PlayerName) +' ' + TextFound);
          WriteLn('    ' + Players[CurrentPlayer].Name + ': '+ TextSayd);
          WriteLn('  -Auto Respond');
          If (PlayerName = 'Anonymous:') then
          begin
            Case Random(3) Of
              0: PlayerName := 'dude'
              1: PlayerName := 'sir'
              2: PlayerName := 'noob'
            end;
          end;
        end;
        If (Result = True) then exit;
      end;
    end;

    WARNING!

    you CAN NOT have the same 'findtext' as 'saytext'! couse then it would be reacting to it self! so make sure 'findtext' (is not the same / is not a part of) 'seytext'



    Gl and post comments plz!

  2. #2
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    First Post w00t :P
    nice.. though I don't understand everything but I will... Later.. :P

    good job

    [22:20] <[-jesus-]> freddy, go uninstall yourself

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

    Default

    this must be owning nice one
    ~Hermen

  4. #4
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks, i hope this will help some people

  5. #5
    Join Date
    Apr 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Whats ewa lol?
    98% of teens surrond their minds with rap, if your part of the 2% that stayed with rock, put this on your signature
    http://www.stats.srl-forums.com/sigs/661.png

  6. #6
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    some dutch poeple say that (i don't)

  7. #7
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ewo = someting like hello!.

    @masterkill, accactly only kisrten says ewa to everybody. and i mostlenly i say it to here . i rofl about it to see it here .

  8. #8
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    You can use TextCoords.
    Try getting the text once (s := GetTextAtEx), then loop that string through alot of things you'd like to respond on, with (Pos(sometext, s) <> 0).



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

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

    Default

    did i said ewo i said owning thats omthing diff
    ~Hermen

  10. #10
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @ herpie

    he meaned the post of upmar

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  11. #11
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Let it check for it's own name before responding. Do a split at the :, if the text before is players[currentplayer].name then exit; so it cant respond to itself
    I made a new script, check it out!.

  12. #12
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Markus View Post
    Let it check for it's own name before responding. Do a split at the :, if the text before is players[currentplayer].name then exit; so it cant respond to itself
    yes i allready was thinking of a procedure like that, and i think i know how to do that. but first i got some other stuff to do. so i might do that later. this is just a 'simple' and working responder.



    Quote Originally Posted by rikjess View Post
    ewo = someting like hello!.

    @masterkill, accactly only kisrten says ewa to everybody. and i mostlenly i say it to here . i rofl about it to see it here .
    i can't get it out of my head stupid kirsten

  13. #13
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

  14. #14
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    lol thanks it was hard work

  15. #15
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    looks good but hey lol idk??? what to do -.-

    what will it respond too dude and which goes 1st
    function or the responder

  16. #16
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    AutoRespondZor('look for this text', 'random this saytext 1', 'random this say text 2', 'random this say text 3', {look in last ? chat lines (1 - 8)});

  17. #17
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by MasterKill View Post
    AutoRespondZor('look for this text', 'random this saytext 1', 'random this say text 2', 'random this say text 3', {look in last ? chat lines (1 - 8)});
    You should use a array of strings as parameter.. ['random this say text 1','random this say text 2','random this say text 3'] That allows you to say like 10 random texts..
    Verrekte Koekwous

  18. #18
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    yea maybe i'll add that

  19. #19
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    zzz... why isn't any talking functions added to SRL, this one looks nice, altough it may reply if it will see currentplayer name(now fixed?), please, i'll be happy when someone adds something like this to SRL core


    edit: really can't understand anything about smallchars, tradechars, etc...
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  20. #20
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    yea i'll take a look at that soon

    'lan party first '

  21. #21
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    UPDATED.

    hyper version.

    (was allready released for srl members)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Happy B-day Masterkill!
    By Dumpin in forum News and General
    Replies: 1
    Last Post: 11-08-2007, 09:57 AM

Posting Permissions

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