Event swear/word control?

Abrondino

Member
Mar 20, 2020
34
3
8
59
I have a user that is turning the chat into a sailor's parlor. That caused people to feel comfortable with creating teleport locations with political statements with swear words in them. I'd like to have an event created where if a player uses a swear word, it takes some health away while randomly breaking their arm, leg or such.

I saw these beautiful choices of harm in a jail event created by Njinir

bc-givebuff {2} buffEncumberedInv
bc-givebuff {2} buffNearDeathTrauma
bc-givebuff {2} buffLegBroken
bc-givebuff {2} buffArmBroken

Can someone point me in the right direction to craft an event such as this?
Thank you,

-Dino
 
Last edited:
You'd make an event for each word you want to trigger on, it would be an ON PUBLIC CHAT event.

Then you'd have something like this as the conditionals: CONTAINS:YOURWORD
then in the script, whatever you'd want to do to them for using the word, such as the debuffs you've listed above, or whatever else you want to do to them.

If you want to do the same action for a list of words, then you can make your conditionals section like:

CONTAINS:WORD1||CONTAINS:WORD2||CONTAINS:WORD3

Just replace the word1, word2 and word3 with whatever word you want to trigger on.
 
I tried testing this. Seems that it works as

CONTAINS:WORD1

not with multiple. Is there a different separator. Or is it seeing it as must also include?

CONTAINS:WORD1||CONTAINS:WORD2||CONTAINS:WORD3

Originally, I thought maybe it was looking at it as an AND rather than OR situation. Meaning your phrase has to contain WORD1, WORD2 & WORD3

However, including all phrases did not trigger the event
 
Well, that SHOULD work... it might not as I haven't done it myself, but... if it doesn't work its a bug that needs fixing, but no idea if I'll get to it. Otherwise you'd have to create an event for each word, which while annoying (I totally get that), would work for now.