• 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!

Help Anti-Advertsing

Sigoles

Discord: @sigoles
Joined
Nov 20, 2015
Messages
1,209
Solutions
2
Reaction score
154
I was tryed this:

<talkaction words="Allwords" script="antidivulguer.lua" />

Code:
local BlockedChannels = {
{channel = CHANNEL_DEFAULT},
{channel = CHANNEL_HELP, type = TALKTYPE_CHANNEL_Y},
{channel = CHANNEL_GUILD, type = TALKTYPE_CHANNEL_Y}
}

local InvalidWords = {
"whore",
"slut",
"fuck",
"mother~fucker"
}

function onSay(cid, words, param, channel)
local TheWords = words .. param
for i, select in ipairs(BlockedChannels) do
if select.channel == channel then
talkType = select.type
break
elseif select.channel ~= channel and i == #BlockedChannels then
return false
end
end

for i = 1, #InvalidWords do
TheWords = TheWords:gsub("(%a*".. nocase(InvalidWords[i]) .."%a*)", doFixString(InvalidWords[i]))
end

if channel == CHANNEL_DEFAULT then
doCreatureSay(cid, TheWords, TALKTYPE_SAY)
else
doPlayerSendChannelMessage(cid, getCreatureName(cid), TheWords, talkType, channel)
end
return true
end

function doFixString(w)
return ("*"):rep(w:len())
end

function nocase(s)
-- From: Programming in Lua : 20.4
return s:gsub("%a", function(c) return ("[%s%s]"):format(c:lower(), c:upper()) end)
end

but dont working and dont got erros
 
Code:
words="Allwords"

this is one of your errors, I'm sure you must leave it empty , about the script idk, remove "allwords" and test to see if works
 
Code:
words="Allwords"

this is one of your errors, I'm sure you must leave it empty , about the script idk, remove "allwords" and test to see if works

Dont work too, but if I said "Allwords" when I used <talkaction words="Allwords" script="antidivulguer.lua" />

Nothing appears on chat
 
Back
Top