Ir para conteúdo

Featured Replies

Postado
  • Autor

tem que remover nas sources esse comando não e em lua.

Sabia rs :), e eu que nao tenho as sources, tem algum script que bloqueia esse comando?

é, deve ser mod mesmo

Luan, nao e nas mod porque eu procurei por la e nao consegui achar :(

Isso ta nas sources, mais eu nao tenho preciso de algum script que bloquei um player de falar este comando, e se possivel avisar para remover a guild pelo site.

Alguem ajuda? Obrigado.

 

                                                           

55f6tc.gif                     

  • Respostas 14
  • Visualizações 1.9k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • luanluciano93
    luanluciano93

    Existe esse, porem você terá que modificar suas sources ..  No arquivo talkaction.cpp procure por: Mude para: Compila seu servidor, e agora adicione em talkactions/talkactions.xml a

Postado
  • Solução

Existe esse, porem você terá que modificar suas sources .. 

No arquivo talkaction.cpp procure por:

if(!talkAction || (talkAction->getChannel() != -1 && talkAction->getChannel() != channelId))
return false;



Mude para:

if(!talkAction)
{
for(TalkActionsMap::iterator it = talksMap.begin(); it != talksMap.end(); ++it)
{
if(it->first == "illegalWords")
{
talkAction = it->second;
break;
}
}
if(talkAction && talkAction->isScripted())
return talkAction->executeSay(creature, words, "", channelId);
return false;
}
else if(talkAction->getChannel() != -1 && talkAction->getChannel() != channelId)
return false;

 



Compila seu servidor, e agora adicione em talkactions/talkactions.xml a seguinte linha:

<talkaction words="illegalWords" event="script" value="blocklinks.lua"/>

Crie um arquivo com o nome de blocklinks.lua em talkactions/scripts e cole isso dentro:

function getFixedText(cid, text, replace)
local wrongWords = {"otservlist.org", "ots-list.pl", "google.br", "83.17.165.189", "hopto.org", "no-ip.org", ".com"}
local lowerText = string.lower(text)
local noSpaceText = string.gsub(string.gsub(string.gsub(lowerText, "%s", ""), "%p", ""),"-", "")
for w = 1, #wrongWords do
wordLen = string.len(wrongWords[w])
for p = 1, string.len(text) do
if(string.sub(lowerText, p, p+wordLen-1) == wrongWords[w]) then
text = string.sub(text, 1, p-1) .. string.rep(replace, wordLen) .. string.sub(text, p+wordLen)
end
end
end

if(string.lower(text) == lowerText) then
for c = 1, #wrongWords do
if(string.find(noSpaceText, string.gsub(string.gsub(wrongWords[c], "%p", ""),"-", "")) ~= nil) then
return "I want to post forbidden links.."
end
end
end
return text
end

--[[Channels which are not added to block:
1 - Party Channel
2 - Channel for Staff members
3 - Rule Violation Channel
4 - Channel for Counselors/Tutors
65536 - Private Chat Channel <-- Private Chat cannot be blocked with this script
]]--
local blocked_channels = {5,8,9} --Game-Chat, Real Chat, Help Channel
local trade_channels = {6,7} --All trade channels <- These are also blocked
local replace = "°" --Symbols which are shown instead of forbidden links -> ° 
local delay = {16246,5} -- {empty_storage, lenght of muted}

function onSay(cid, words, param, channel)
local fixedWords = getFixedText(cid, words, replace)

if words ~= fixedWords and getPlayerAccess(cid) == 0 then
if getPlayerStorageValue(cid,delay[1]) > os.time() then
return doPlayerSendCancel(cid,"You are still muted for ".. getPlayerStorageValue(cid,delay[1])-os.time() .." seconds.")
end
setPlayerStorageValue(cid,delay[1],os.time()+delay[2])
if channel == CHANNEL_DEFAULT then 
doCreatureSay(cid, fixedWords, TALKTYPE_SAY)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." is forbidden.")
return true
elseif isInArray(trade_channels, channel) then 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." is forbidden on the trade channel.")
return true
elseif isInArray(blocked_channels, channel) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." is forbidden.")
doPlayerSendChannelMessage(cid, getCreatureName(cid), fixedWords, TALKTYPE_CHANNEL_Y, channel)
return true
end
end
return false
end 



Para configurar basta colocar a palavra em "local wrongWords" e pronto!

Créditos: Gesior.pl e Summ.

Espero ter ajudado.

Postado
  • Autor

Existe esse, porem você terá que modificar suas sources .. 

No arquivo talkaction.cpp procure por:

if(!talkAction || (talkAction->getChannel() != -1 && talkAction->getChannel() != channelId))
return false;

Mude para:

if(!talkAction)
{
for(TalkActionsMap::iterator it = talksMap.begin(); it != talksMap.end(); ++it)
{
if(it->first == "illegalWords")
{
talkAction = it->second;
break;
}
}
if(talkAction && talkAction->isScripted())
return talkAction->executeSay(creature, words, "", channelId);
return false;
}
else if(talkAction->getChannel() != -1 && talkAction->getChannel() != channelId)
return false;

 

Compila seu servidor, e agora adicione em talkactions/talkactions.xml a seguinte linha:

<talkaction words="illegalWords" event="script" value="blocklinks.lua"/>

Crie um arquivo com o nome de blocklinks.lua em talkactions/scripts e cole isso dentro:

function getFixedText(cid, text, replace)
local wrongWords = {"otservlist.org", "ots-list.pl", "google.br", "83.17.165.189", "hopto.org", "no-ip.org", ".com"}
local lowerText = string.lower(text)
local noSpaceText = string.gsub(string.gsub(string.gsub(lowerText, "%s", ""), "%p", ""),"-", "")
for w = 1, #wrongWords do
wordLen = string.len(wrongWords[w])
for p = 1, string.len(text) do
if(string.sub(lowerText, p, p+wordLen-1) == wrongWords[w]) then
text = string.sub(text, 1, p-1) .. string.rep(replace, wordLen) .. string.sub(text, p+wordLen)
end
end
end

if(string.lower(text) == lowerText) then
for c = 1, #wrongWords do
if(string.find(noSpaceText, string.gsub(string.gsub(wrongWords[c], "%p", ""),"-", "")) ~= nil) then
return "I want to post forbidden links.."
end
end
end
return text
end

--[[Channels which are not added to block:
1 - Party Channel
2 - Channel for Staff members
3 - Rule Violation Channel
4 - Channel for Counselors/Tutors
65536 - Private Chat Channel <-- Private Chat cannot be blocked with this script
]]--
local blocked_channels = {5,8,9} --Game-Chat, Real Chat, Help Channel
local trade_channels = {6,7} --All trade channels <- These are also blocked
local replace = "°" --Symbols which are shown instead of forbidden links -> ° 
local delay = {16246,5} -- {empty_storage, lenght of muted}

function onSay(cid, words, param, channel)
local fixedWords = getFixedText(cid, words, replace)

if words ~= fixedWords and getPlayerAccess(cid) == 0 then
if getPlayerStorageValue(cid,delay[1]) > os.time() then
return doPlayerSendCancel(cid,"You are still muted for ".. getPlayerStorageValue(cid,delay[1])-os.time() .." seconds.")
end
setPlayerStorageValue(cid,delay[1],os.time()+delay[2])
if channel == CHANNEL_DEFAULT then 
doCreatureSay(cid, fixedWords, TALKTYPE_SAY)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." is forbidden.")
return true
elseif isInArray(trade_channels, channel) then 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." is forbidden on the trade channel.")
return true
elseif isInArray(blocked_channels, channel) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." is forbidden.")
doPlayerSendChannelMessage(cid, getCreatureName(cid), fixedWords, TALKTYPE_CHANNEL_Y, channel)
return true
end
end
return false
end 

Para configurar basta colocar a palavra em "local wrongWords" e pronto!

Créditos: Gesior.pl e Summ.

Espero ter ajudado.

Obrigado luan, mais eu consegui com ajuda de Nogard, com um script que bloqueia um player de falar !disband, mesmo assim obrigado.

Isso ajudara para quem tem as sources, que nao meu caso eu nao tinha, mais quem vai ajdua bastante, Obrigado REP + .

 

                                                           

55f6tc.gif                     

  • 8 months later...
  • 1 year later...

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo