• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction [TFS] Filter of "bad" words

babalow

Nobody o/
Joined
Nov 7, 2007
Messages
393
Reaction score
1
Location
Brazil
well.. i don't found some script for do it then i modif one to work on tfs.. Don't know who do it ..
it filter "bad" words of players with GroupId < 3.. you can modif it if you want...

add this in data/talkactions/talkactions.xml
Code:
    <talkaction words="fuck" script="filter.lua" />
    <talkaction words="dick" script="filter.lua" />
    <talkaction words="bitch" script="filter.lua" />
goto data/talkactions/scripts/
create a file filter.lua
Code:
function onSay(cid, words, param)    
 if getPlayerGroupId(cid) < 3 then    
    local text = {'I love you!','i\'m a fag.','You are so nice!'}
    local chance = math.random(1, table.getn(text))
 doCreatureSay(cid, text[chance] ,1)
else
return TRUE
end
end

^_^
 
Last edited:
An swear filter has already been released but thank you for sharing this one with us to!
 
But what if I type fuck you? ^.-

erm.. i don't make this script for filter...
i done it only for players don't use some custom spells..
ex if the player try use "run" and him don't have groupid < 3 it will makesay for him the word "run" and he don't will cast it ;p
 
Why is dick a bad word?

Dick can be a name?
And its only a penis..

Many poeple have a dick.
 
Nice idea but... Someone can just say Fuck or fucK... Maybe sometime in the future there will be a way to fix this :p
 
Hmm, is there any way to put all the bad words inside the script file instead of making a talkaction of every word? :S
 
13:54 Test Char [1000]: i'm a fag.
13:54 Test Char [1000]: dick

My character said that both...

TFS 0.3 beta
 
Back
Top