• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Word Filter

Status
Not open for further replies.
Level 2
Joined
Jul 29, 2010
Messages
16
Hello
I've been playing a lot of Warcraft III lately, especially DotA maps. Because I'm also making a DotA like map, 2 teams vs eachother in a battleground, I'd like to know how to implement a word filter for a map.
Basically, if you've ever played DotA, or in fact any map on WarIII I believe, you know that flames are being thrown around like there's no tomorrow. Honestly I don't know any game that is less newbie-unfriendly.
Now, what I'd like to do is check the chat for messages and block out words like: ffs, fuck, shit, newb, noob, dumbfuck, shithead, etc. Maybe an endless list but I'd like to give it a shot. It would certainly increase game experience in my opinion. I'd also like to implement a mute, or kick for the people with foul mouths.
However, looking at the WE I have only encountered Player - Chat Message event, not just chat message or the event for a player group. This would be extremely hard if you would want to accomplish this with just this one trigger event.

I've tried searching the forum but to no avail.
Thanks for reading
 
You will first of all need this system: http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=51307 or https://www.hiveworkshop.com/forums/spells-569/chat-system-v1-1-0-gui-153944/

Then, you will use an event of chat message (Player - Chat message), that matches <Empty String> as a Substring.
A condition will check if the (Entered chat string) contains the words you want, then, you will run a loop to check where in the sentence this word lies and you will replace it with **** for example. Use those tutorials as a guide.
 
If you want to "kick" the f@#$% flammer, you can do this
  • Actions
    • Unit Group - Pick every player in FlamingUnit and do (Actions)
      • Loop - Actions
        • Game - Defeat (Picked player) with the message: FUCK YOU FLAMMER!!!...
OR something like this...

LOL, ok eh other than that, I just can't seem to make the trigger, I know I can have a string with the entered chat message, but how can you search that string for words? I tried searching those two links for answers but either I'm blind or stupid.
 
Status
Not open for further replies.
Back
Top