Postado Fevereiro 19, 2016 9 anos Autor Em 18/02/2016 em 20:34, Pandawan. disse: Amigo, tente esse.. Mostrar conteúdo oculto Mostrar conteúdo oculto local CHANNEL_HELP = 7 local muted = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT) muted:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP) muted:setParameter(CONDITION_PARAM_TICKS, 3600000) function onSpeak(player, type, message) local playerAccountType = player:getAccountType() if player:getLevel() == 1 and playerAccountType == ACCOUNT_TYPE_NORMAL then player:sendCancelMessage("You may not speak into channels as long as you are on level 1.") return false end if player:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then player:sendCancelMessage("You are muted from the Help channel for using it inappropriately.") return false end if player:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then player:sendCancelMessage("You may only place one ask in one minute.") return false end player:addCondition(muted) if playerAccountType >= ACCOUNT_TYPE_TUTOR then if string.sub(message, 1, 6) == "!mute " then local targetName = string.sub(message, 7) local target = Player(targetName) if target ~= nil then if playerAccountType > target:getAccountType() then if not target:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then target:addCondition(muted) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been muted by " .. player:getName() .. " for using Help Channel inappropriately.") else player:sendCancelMessage("That player is already muted.") end else player:sendCancelMessage("You are not authorized to mute that player.") end else player:sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE) end return false elseif string.sub(message, 1, 8) == "!unmute " then local targetName = string.sub(message, 9) local target = Player(targetName) if target ~= nil then if playerAccountType > target:getAccountType() then if target:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then target:removeCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been unmuted by " .. player:getName() .. ".") else player:sendCancelMessage("That player is not muted.") end else player:sendCancelMessage("You are not authorized to unmute that player.") end else player:sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE) end return false end end if type == TALKTYPE_CHANNEL_Y then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O end elseif type == TALKTYPE_CHANNEL_O then if playerAccountType < ACCOUNT_TYPE_TUTOR and not getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_Y end elseif type == TALKTYPE_CHANNEL_R1 then if playerAccountType < ACCOUNT_TYPE_GAMEMASTER and not getPlayerFlagValue(player, PlayerFlag_CanTalkRedChannel) then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O else type = TALKTYPE_CHANNEL_Y end end end return type end cara esse aqui o player manda uma mensagem e depois fica bloquiado, como se estivesse tomado o comando !mute, inclusive tutor.. Em 18/02/2016 em 20:38, vankk disse: @Pandawan >> if player:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_ADVERTISING) then >>> CHANNEL_ADVERTISING >>>> ADVERTISING ??? Queremos checar a condição do muted no channel help e não adversiting. - tópico. local CHANNEL_HELP = 7 local muted = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT) muted:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP) muted:setParameter(CONDITION_PARAM_TICKS, 120000) function onSpeak(player, type, message) local playerAccountType = player:getAccountType() if player:getLevel() == 1 and playerAccountType == ACCOUNT_TYPE_NORMAL then player:sendCancelMessage("You may not speak into channels as long as you are on level 1.") return false end -- muted por tempo if player:getCondition(CONDITION_CHANNELEXAUSTTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then player:sendCancelMessage("You may only ask a question once every two minutes.") return false end if playerAccountType < ACCOUNT_TYPE_TUTOR then player:addCondition(muted) end if type == TALKTYPE_CHANNEL_Y then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O end elseif type == TALKTYPE_CHANNEL_O then if playerAccountType < ACCOUNT_TYPE_TUTOR and not getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_Y end elseif type == TALKTYPE_CHANNEL_R1 then if playerAccountType < ACCOUNT_TYPE_GAMEMASTER and not getPlayerFlagValue(player, PlayerFlag_CanTalkRedChannel) then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O else type = TALKTYPE_CHANNEL_Y end end end return type end Não funcionou, da pra falar sem parar do mesmo jeito
Postado Fevereiro 19, 2016 9 anos Você está testando com uma conta de GOD ou até mesmo com o god? Se sim, já achamos o problema, se não, eu removi a condição para adicionar o muted. local CHANNEL_HELP = 7 local muted = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT) muted:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP) muted:setParameter(CONDITION_PARAM_TICKS, 120000) function onSpeak(player, type, message) local playerAccountType = player:getAccountType() if player:getLevel() == 1 and playerAccountType == ACCOUNT_TYPE_NORMAL then player:sendCancelMessage("You may not speak into channels as long as you are on level 1.") return false end -- muted por tempo if player:getCondition(CONDITION_CHANNELEXAUSTTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then player:sendCancelMessage("You may only ask a question once every two minutes.") return false end player:addCondition(muted) if type == TALKTYPE_CHANNEL_Y then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O end elseif type == TALKTYPE_CHANNEL_O then if playerAccountType < ACCOUNT_TYPE_TUTOR and not getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_Y end elseif type == TALKTYPE_CHANNEL_R1 then if playerAccountType < ACCOUNT_TYPE_GAMEMASTER and not getPlayerFlagValue(player, PlayerFlag_CanTalkRedChannel) then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O else type = TALKTYPE_CHANNEL_Y end end end return type end
Postado Fevereiro 19, 2016 9 anos Mostrar conteúdo oculto local CHANNEL_HELP = 7 local muted = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT) muted:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP) muted:setParameter(CONDITION_PARAM_TICKS, 3600000) local exhausted = createConditionObject(CONDITION_CHANNELMUTEDTICKS) setConditionParam(exhausted, CONDITION_PARAM_SUBID, CHANNEL_HELP) setConditionParam(exhausted, CONDITION_PARAM_TICKS, 10000) function onSpeak(player, type, message) local playerAccountType = player:getAccountType() if player:getLevel() == 1 and playerAccountType == ACCOUNT_TYPE_NORMAL then player:sendCancelMessage("You may not speak into channels as long as you are on level 1.") return false end if(getCreatureCondition(player, CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP)) then player:sendCancelMessage("You may only ask a question once every 10 seconds.") return false end if getPlayerGroupId(player) <= 1 then doAddCondition(player, exhausted) end if player:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then player: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(targetName) if target ~= nil then if playerAccountType > target:getAccountType() then if not target:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then target:addCondition(muted) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been muted by " .. player:getName() .. " for using Help Channel inappropriately.") else player:sendCancelMessage("That player is already muted.") end else player:sendCancelMessage("You are not authorized to mute that player.") end else player:sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE) end return false elseif string.sub(message, 1, 8) == "!unmute " then local targetName = string.sub(message, 9) local target = Player(targetName) if target ~= nil then if playerAccountType > target:getAccountType() then if target:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then target:removeCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been unmuted by " .. player:getName() .. ".") else player:sendCancelMessage("That player is not muted.") end else player:sendCancelMessage("You are not authorized to unmute that player.") end else player:sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE) end return false end end if type == TALKTYPE_CHANNEL_Y then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O end elseif type == TALKTYPE_CHANNEL_O then if playerAccountType < ACCOUNT_TYPE_TUTOR and not getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_Y end elseif type == TALKTYPE_CHANNEL_R1 then if playerAccountType < ACCOUNT_TYPE_GAMEMASTER and not getPlayerFlagValue(player, PlayerFlag_CanTalkRedChannel) then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O else type = TALKTYPE_CHANNEL_Y end end end return type end Veja agora, meu caro... @77mateus77
Postado Fevereiro 19, 2016 9 anos Autor Em 19/02/2016 em 00:58, vankk disse: Você está testando com uma conta de GOD ou até mesmo com o god? Se sim, já achamos o problema, se não, eu removi a condição para adicionar o muted. local CHANNEL_HELP = 7 local muted = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT) muted:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP) muted:setParameter(CONDITION_PARAM_TICKS, 120000) function onSpeak(player, type, message) local playerAccountType = player:getAccountType() if player:getLevel() == 1 and playerAccountType == ACCOUNT_TYPE_NORMAL then player:sendCancelMessage("You may not speak into channels as long as you are on level 1.") return false end -- muted por tempo if player:getCondition(CONDITION_CHANNELEXAUSTTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then player:sendCancelMessage("You may only ask a question once every two minutes.") return false end player:addCondition(muted) if type == TALKTYPE_CHANNEL_Y then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O end elseif type == TALKTYPE_CHANNEL_O then if playerAccountType < ACCOUNT_TYPE_TUTOR and not getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_Y end elseif type == TALKTYPE_CHANNEL_R1 then if playerAccountType < ACCOUNT_TYPE_GAMEMASTER and not getPlayerFlagValue(player, PlayerFlag_CanTalkRedChannel) then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O else type = TALKTYPE_CHANNEL_Y end end end return type end Não, estava testando com player normal mesmo Em 19/02/2016 em 01:06, Pandawan. disse: Mostrar conteúdo oculto Mostrar conteúdo oculto local CHANNEL_HELP = 7 local muted = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT) muted:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP) muted:setParameter(CONDITION_PARAM_TICKS, 3600000) local exhausted = createConditionObject(CONDITION_CHANNELMUTEDTICKS) setConditionParam(exhausted, CONDITION_PARAM_SUBID, CHANNEL_HELP) setConditionParam(exhausted, CONDITION_PARAM_TICKS, 10000) function onSpeak(player, type, message) local playerAccountType = player:getAccountType() if player:getLevel() == 1 and playerAccountType == ACCOUNT_TYPE_NORMAL then player:sendCancelMessage("You may not speak into channels as long as you are on level 1.") return false end if(getCreatureCondition(player, CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP)) then player:sendCancelMessage("You may only ask a question once every 10 seconds.") return false end if getPlayerGroupId(player) <= 1 then doAddCondition(player, exhausted) end if player:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then player: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(targetName) if target ~= nil then if playerAccountType > target:getAccountType() then if not target:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then target:addCondition(muted) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been muted by " .. player:getName() .. " for using Help Channel inappropriately.") else player:sendCancelMessage("That player is already muted.") end else player:sendCancelMessage("You are not authorized to mute that player.") end else player:sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE) end return false elseif string.sub(message, 1, 8) == "!unmute " then local targetName = string.sub(message, 9) local target = Player(targetName) if target ~= nil then if playerAccountType > target:getAccountType() then if target:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then target:removeCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been unmuted by " .. player:getName() .. ".") else player:sendCancelMessage("That player is not muted.") end else player:sendCancelMessage("You are not authorized to unmute that player.") end else player:sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE) end return false end end if type == TALKTYPE_CHANNEL_Y then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O end elseif type == TALKTYPE_CHANNEL_O then if playerAccountType < ACCOUNT_TYPE_TUTOR and not getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_Y end elseif type == TALKTYPE_CHANNEL_R1 then if playerAccountType < ACCOUNT_TYPE_GAMEMASTER and not getPlayerFlagValue(player, PlayerFlag_CanTalkRedChannel) then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O else type = TALKTYPE_CHANNEL_Y end end end return type end Veja agora, meu caro... @77mateus77 Cara ficou perfeito, so gostaria de aumentar o tempo para 2 minutos,mas tem um probleminha, o tutor tbm ta sendo bloquiado a cada 10 segundos, gostaria que o tutor pudesse envia normal
Postado Fevereiro 19, 2016 9 anos Em relação ao tutor é um pouco mais complicado, visto que a partir do TFS 1 os account type são somente 1; 2; 3... Vou dar uma olhada direitinho e tento te dar uma resposta o mais breve possível, isso dai é só a correção do tempo para 2 minutos. Mostrar conteúdo oculto local CHANNEL_HELP = 7 local muted = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT) muted:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP) muted:setParameter(CONDITION_PARAM_TICKS, 3600000) local exhausted = createConditionObject(CONDITION_CHANNELMUTEDTICKS) setConditionParam(exhausted, CONDITION_PARAM_SUBID, CHANNEL_HELP) setConditionParam(exhausted, CONDITION_PARAM_TICKS, 120000) function onSpeak(player, type, message) local playerAccountType = player:getAccountType() if player:getLevel() == 1 and playerAccountType == ACCOUNT_TYPE_NORMAL then player:sendCancelMessage("You may not speak into channels as long as you are on level 1.") return false end if(getCreatureCondition(player, CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP)) then player:sendCancelMessage("You may only ask a question once every 2 minuts.") return false end if getPlayerGroupId(player) <= 1 then doAddCondition(player, exhausted) end if player:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then player: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(targetName) if target ~= nil then if playerAccountType > target:getAccountType() then if not target:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then target:addCondition(muted) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been muted by " .. player:getName() .. " for using Help Channel inappropriately.") else player:sendCancelMessage("That player is already muted.") end else player:sendCancelMessage("You are not authorized to mute that player.") end else player:sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE) end return false elseif string.sub(message, 1, 8) == "!unmute " then local targetName = string.sub(message, 9) local target = Player(targetName) if target ~= nil then if playerAccountType > target:getAccountType() then if target:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then target:removeCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been unmuted by " .. player:getName() .. ".") else player:sendCancelMessage("That player is not muted.") end else player:sendCancelMessage("You are not authorized to unmute that player.") end else player:sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE) end return false end end if type == TALKTYPE_CHANNEL_Y then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O end elseif type == TALKTYPE_CHANNEL_O then if playerAccountType < ACCOUNT_TYPE_TUTOR and not getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_Y end elseif type == TALKTYPE_CHANNEL_R1 then if playerAccountType < ACCOUNT_TYPE_GAMEMASTER and not getPlayerFlagValue(player, PlayerFlag_CanTalkRedChannel) then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O else type = TALKTYPE_CHANNEL_Y end end end return type end ___________________________________________________________________________________________________________ Editando com a correção do exhausted tutor, porém, não tenho como testar. Logo, está abaixo a tentativa de corrigir: Mostrar conteúdo oculto local CHANNEL_HELP = 7 local muted = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT) muted:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP) muted:setParameter(CONDITION_PARAM_TICKS, 3600000) local exhausted = createConditionObject(CONDITION_CHANNELMUTEDTICKS) setConditionParam(exhausted, CONDITION_PARAM_SUBID, CHANNEL_HELP) setConditionParam(exhausted, CONDITION_PARAM_TICKS, 120000) function onSpeak(player, type, message) local playerAccountType = player:getAccountType() if player:getLevel() == 1 and playerAccountType == ACCOUNT_TYPE_NORMAL then player:sendCancelMessage("You may not speak into channels as long as you are on level 1.") return false end if(getCreatureCondition(player, CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP)) then player:sendCancelMessage("You may only ask a question once every 2 minuts.") return false end if getPlayerGroupId(player) <= 1 and playerAccountType < ACCOUNT_TYPE_TUTOR then doAddCondition(player, exhausted) end if player:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then player: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(targetName) if target ~= nil then if playerAccountType > target:getAccountType() then if not target:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then target:addCondition(muted) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been muted by " .. player:getName() .. " for using Help Channel inappropriately.") else player:sendCancelMessage("That player is already muted.") end else player:sendCancelMessage("You are not authorized to mute that player.") end else player:sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE) end return false elseif string.sub(message, 1, 8) == "!unmute " then local targetName = string.sub(message, 9) local target = Player(targetName) if target ~= nil then if playerAccountType > target:getAccountType() then if target:getCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) then target:removeCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP) sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been unmuted by " .. player:getName() .. ".") else player:sendCancelMessage("That player is not muted.") end else player:sendCancelMessage("You are not authorized to unmute that player.") end else player:sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE) end return false end end if type == TALKTYPE_CHANNEL_Y then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O end elseif type == TALKTYPE_CHANNEL_O then if playerAccountType < ACCOUNT_TYPE_TUTOR and not getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_Y end elseif type == TALKTYPE_CHANNEL_R1 then if playerAccountType < ACCOUNT_TYPE_GAMEMASTER and not getPlayerFlagValue(player, PlayerFlag_CanTalkRedChannel) then if playerAccountType >= ACCOUNT_TYPE_TUTOR or getPlayerFlagValue(player, PlayerFlag_TalkOrangeHelpChannel) then type = TALKTYPE_CHANNEL_O else type = TALKTYPE_CHANNEL_Y end end end return type end Qualquer coisa estou a disposição, abraço! Editado Fevereiro 19, 2016 9 anos por Pandawan. (veja o histórico de edições)
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.