Results 1 to 5 of 5

Thread: Best Way To Make A Responder?

  1. #1
    Join Date
    Oct 2006
    Location
    Texas
    Posts
    1,450
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default Best Way To Make A Responder?

    Well, I noticed alot of people use different functions for looking for text in the chat box. Like :
    SCAR Code:
    IsChatMessage; InChat;
    I think there are more but I don't know. I would look into scar for help but I didn't find an include for those functions. Any help? Kinda wanna make a responder for a script of mines.

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

    Default

    Most efficient way would probably to store GetChatMessage in a string, then search that string for certain text. That way, you don't have to do 100's InChat's (which slow things down because of their use of bitmaps, for those who don't know)

    I'm not exactly sure how to best search for text in a string; my best guess is pos.

    SCAR Code:
    if(pos('hey',chat)<>0)then...
    Interested in C# and Electrical Engineering? This might interest you.

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

    Default

    Not really sure what you're asking here.

    You want to know the best procedure is for grabbing the last chat message?

    I do believe they all do the same thing.

    If you want to get text from anywhere in the chat box (eg. username) I would suggest using a simple IsTextAt/IsTextAtEx

    Here's what I used for my responder:

    SCAR Code:
    if(FindText(x, y, Players[CurrentPlayer].nick, SmallChars, 9, 412, 113, 433))then
     begin
      Exit;
     end
    else

    Edit:

    Oooh, nice idea there, Smartz

    I guess I should probably update our autoresponder then... (Yes, I know. I haven't touched it for a while. [It is weird to look a script I made a long time ago. Boy, I didn't know much back then ])

  4. #4
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Look on my autoresponder,
    It does like Smartzkid said....

  5. #5
    Join Date
    Oct 2006
    Location
    Texas
    Posts
    1,450
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Ok guys thnx for the help.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. how to make auto responder?
    By firefoxx in forum OSR Help
    Replies: 5
    Last Post: 08-20-2008, 01:12 PM
  2. How can i make an auto responder?
    By yanix in forum OSR Help
    Replies: 4
    Last Post: 11-24-2007, 05:08 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
  •