Ir para conteúdo

Featured Replies

Postado
Segue o arquivo da pasta chatchannel/help.php
 
Não consigo botar exuasted no help-channel.
 
Noobszinhos ficam spamiando.... Me ajudemm..
 
local CHANNEL_HELP = 7

local muted = createConditionObject(CONDITION_CHANNELMUTEDTICKS)
setConditionParam(muted, CONDITION_PARAM_SUBID, CHANNEL_HELP)
setConditionParam(muted, CONDITION_PARAM_TICKS, 3600000)

function onSpeak(cid, type, message)
        local playerAccountType = Player(cid):getAccountType()
        if(Player(cid):getLevel() == 1 and playerAccountType == ACCOUNT_TYPE_NORMAL) then
                Player(cid):sendCancelMessage("You may not speak into channels as long as you are on level 1.")
                return false
        end

        if(getCreatureCondition(cid, CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP)) then
                Player(cid):sendCancelMessage("You are muted from the Help channel for using it inappropriately.")
                return false
        end

        if(playerAccountType >= ACCOUNT_TYPE_TUTOR) then
                if(string.sub(message, 1, 6) == "!mute ") then
                        local targetName = string.sub(message, 7)
                        local target = Player(name):getId(targetName) 
                        if(target ~= false) then
                                if(playerAccountType > target:getAccountType()) then 
                                        if(not getCreatureCondition(target, CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP)) then
                                                doAddCondition(target, muted)
                                                sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, getPlayerName(target) .. " has been muted by " .. getPlayerName(cid) .. " for using Help Channel inappropriately.")
                                        else
                                                Player(cid):sendCancelMessage("That player is already muted.")
                                        end
                                else
                                        Player(cid):sendCancelMessage("You are not authorized to mute that player.")
                                end
                        else
                                Player(cid):sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE)
                        end
                        return false
                elseif(string.sub(message, 1, 8) == "!unmute ") then
                        local targetName = string.sub(message, 9)
                        local target = Player(name):getId(targetName)
                        if(target ~= false) then
                                if(playerAccountType > getPlayerAccountType(target)) then
                                        if(getCreatureCondition(target, CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP)) then
                                                doRemoveCondition(target, CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP)
                                                sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, getPlayerName(target) .. " has been unmuted by " .. getPlayerName(cid) .. ".")
                                        else
                                                Player(cid):sendCancelMessage("That player is not muted.")
                                        end
                                else
                                        Player(cid):sendCancelMessage("You are not authorized to unmute that player.")
                                end
                        else
                                Player(cid):sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE)
                        end
                        return false
                end
        end

        if(type == TALKTYPE_CHANNEL_Y) then
                if(playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(cid, PlayerFlag_TalkOrangeHelpChannel)) then
                        type = TALKTYPE_CHANNEL_O
                end
        elseif(type == TALKTYPE_CHANNEL_O) then
                if(playerAccountType < ACCOUNT_TYPE_TUTOR and not getPlayerFlagValue(cid, PlayerFlag_TalkOrangeHelpChannel)) then
                        type = TALKTYPE_CHANNEL_Y
                end
        elseif(type == TALKTYPE_CHANNEL_R1) then
                if(playerAccountType < ACCOUNT_TYPE_GAMEMASTER and not getPlayerFlagValue(cid, PlayerFlag_CanTalkRedChannel)) then
                        if(playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(cid, PlayerFlag_TalkOrangeHelpChannel)) then
                                type = TALKTYPE_CHANNEL_O
                        else
                                type = TALKTYPE_CHANNEL_Y
                        end
                end
        end
        return type
end

 

"Antes de morrer, viva!"

 


 
http://fast-baiak.com
BAIAK 8.60 MAIS COMPLETO DA ATUALIDADE!

Se leu eh viado!

 

 

  • 2 months later...
  • Respostas 5
  • Visualizações 960
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Sim, não digo que você está errado... também lembro de ter viso um servidor com esse arquivo, mas se não me falha a memoria o mesmo não funcionava ou funcionava e eu não sei... kkk Mas provavelmente

Postado
  Em 13/08/2014 em 03:23, douglasscherner disse:
Não consigo botar exuasted no help-channel.

Para configurar o exhausted das mensagens no Help, procure e abra o arquivo channels.xml (data/XML).

Nele, veja qual a tag do seu Help Channel e procure por:

muted="

Em seguida, coloque um valor de tempo que será o exhausted de cada mensagem no canal.

Não uso TFS 1.0, mas creio que seja também desse modo, ao menos já usei um que era esse tipo de configuração básica.

Editado por Suicide (veja o histórico de edições)

The corrupt fear us.

The honest support us.

The heroic join us.

Postado
  Em 20/10/2014 em 04:26, Suicide disse:

Para configurar o exhausted das mensagens no Help, procure e abra o arquivo channels.xml (data/XML).

Nele, veja qual a tag do seu Help Channel e procure por:

muted="

Em seguida, coloque um valor de tempo em milissegundos (1 segundo = 1000 milissegundos) que será o exhausted de cada mensagem no canal.

Não uso TFS 1.0, mas creio que seja também desse modo, ao menos já usei um que era esse tipo de configuração básica. Corrijam-me se eu estiver errado.

 

 

Esta versão não possui data/xml/channels.xml  :(

 

 

Aqui substitua seu help.lua por este;

local CHANNEL_HELP = 7

local muted = createConditionObject(CONDITION_CHANNELMUTEDTICKS)
setConditionParam(muted, CONDITION_PARAM_SUBID, CHANNEL_HELP)
setConditionParam(muted, CONDITION_PARAM_TICKS, 30000)

local exhausted = createConditionObject(CONDITION_CHANNELMUTEDTICKS)
setConditionParam(exhausted, CONDITION_PARAM_SUBID, CHANNEL_HELP)
setConditionParam(exhausted, CONDITION_PARAM_TICKS, 30000)

function onSpeak(cid, type, message)
        local playerAccountType = Player(cid):getAccountType()
        if(Player(cid):getLevel() == 1 and playerAccountType == ACCOUNT_TYPE_NORMAL) then
                Player(cid):sendCancelMessage("You may not speak into channels as long as you are on level 1.")
                return false
        end

        if(getCreatureCondition(cid, CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP)) then
                Player(cid):sendCancelMessage("You may only ask a question once every 30 seconds.")
                return false
        end
       
        if(playerAccountType < ACCOUNT_TYPE_TUTOR) then   
        doAddCondition(cid, exhausted)
        end

        if(type == TALKTYPE_CHANNEL_Y) then
                if(playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(cid, PlayerFlag_TalkOrangeHelpChannel)) then
                        type = TALKTYPE_CHANNEL_O
                end
        elseif(type == TALKTYPE_CHANNEL_O) then
                if(playerAccountType < ACCOUNT_TYPE_TUTOR and not getPlayerFlagValue(cid, PlayerFlag_TalkOrangeHelpChannel)) then
                        type = TALKTYPE_CHANNEL_Y
                end
        elseif(type == TALKTYPE_CHANNEL_R1) then
                if(playerAccountType < ACCOUNT_TYPE_GAMEMASTER and not getPlayerFlagValue(cid, PlayerFlag_CanTalkRedChannel)) then
                        if(playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(cid, PlayerFlag_TalkOrangeHelpChannel)) then
                                type = TALKTYPE_CHANNEL_O
                        else
                                type = TALKTYPE_CHANNEL_Y
                        end
                end
        end
        return type
end

Puis 30 segundos de exausted, caso queira alterar é só mudar estas linhas;

 

setConditionParam(exhausted, CONDITION_PARAM_TICKS, 30000)

setConditionParam(muted, CONDITION_PARAM_TICKS, 30000)
 
diga me se funcionou :)

Editado por login12 (veja o histórico de edições)

 

@This life is filled with hurt

When happiness doesn't work

Trust me and take my hand

When the lights go out you will understand

Postado

  Em 20/10/2014 em 04:36, login12 disse:
Está versão não possui data/xml/channels.xml

Já usei uma versão do TheForgottenServer 1.0 que havia sim esse arquivo XML, possivelmente adaptado. Mas, certo então.

The corrupt fear us.

The honest support us.

The heroic join us.

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo