Log in

View Full Version : Auto Alerter (antiban) =(



Brandon
04-12-2011, 05:57 AM
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.

SetChat('Filter', 0); //sets game filter.
SetChat('Off', 2); // sets private off.


During Runtime. (Plays sound when someone talks or says whatever..)

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;

Sex
04-12-2011, 06:48 AM
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.

Rich
04-12-2011, 09:00 AM
And refer to the name of the person as well. If it's the same name and same text, don't reply.

footballjds
04-12-2011, 02:43 PM
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