Results 1 to 4 of 4

Thread: Auto Alerter (antiban) =(

  1. #1
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default Auto Alerter (antiban) =(

    So I have the two codes below.. One Fixes chat so that it doesn't constantly show garbage.. like "you have picked herb from patch", etc..

    Problem is that when someone says something, and the text is still in the chat box, the alert will keep going off until the text disappears.. any IDEAS on how to make it only alert about 1-3 times per chatbox text?? Rather than alerting every single time the script loops? And how do I make it find text in the middle of a string?

    Example: Someone talks.. it alerts you like 3 times (the script looped once).. then it stops alerting until another NEW text is found..

    Example2: LOL name... other words here.. It detects name in somewhere in the string and alerts.

    At the start of the script.
    Simba Code:
    SetChat('Filter', 0);  //sets game filter.
      SetChat('Off', 2);    // sets private off.

    During Runtime. (Plays sound when someone talks or says whatever..)
    Simba Code:
    function SomeoneTalked: Boolean;
    begin
      if (ChatBoxTextExists(5, 'name1') or  ChatBoxTextExists(5, 'namepart') or ChatBoxTextExists(5, 'to trade with you')
      or ChatBoxTextExists(5, 'part') or ChatBoxTextExists(5, 'requesting your assistance')
      or ChatBoxTextExists(5, 'assist request has been refused')) then
      begin
        PlaySound(IncludePath+'Reflection/Custom/Sounds/MorseCode.wav');
      end;
    end;
    Last edited by Brandon; 04-12-2011 at 06:03 AM.
    I am Ggzz..
    Hackintosher

  2. #2
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Store the text found. If it is the same then don't alert. I didn't really read everything but that should be what you're looking for.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  3. #3
    Join Date
    May 2007
    Location
    England
    Posts
    4,141
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    And refer to the name of the person as well. If it's the same name and same text, don't reply.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  4. #4
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Quote Originally Posted by Rich View Post
    And refer to the name of the person as well. If it's the same name and same text, don't reply.
    create your own type. i would store the text, the name of the person who said it, and what time it was said. then when you go to alert check if its the same name and the same text only alert if it is new. pretty simple.
    if you don't know how to create your own type. read a tut

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
  •