Ir para conteúdo

Featured Replies

Postado
  • Autor

Não. Olha, calculei alguns valores e reorganizei as tags, veja se te agrada:

 

Pode informar as tags do seu channels.xml (data/XML)?

<?xml version="1.0" encoding="UTF-8"?>
<channels>
	<channel id="2" name="Tutor" script="tutor.lua" />
	<channel id="3" name="World Chat" public="1" log="yes" script="worldchat.lua" />
	<channel id="4" name="English Chat" public="1" script="englishchat.lua" />
	<channel id="5" name="Advertising" public="1" log="yes" script="advertising.lua" />
	<channel id="6" name="Advertising-Rookgaard" public="1" log="yes" script="advertising-rook.lua" />
	<channel id="7" name="Help" public="1" log="yes" script="help.lua" />
	<channel id="8" name="Gamemaster" script="gamemaster.lua" />
</channels>

 

qual erro deu?

 

vai em talk action/script e crie um arquivo muted.lua e add isso:

local CHANNEL_HELP = 7

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

function onSay(cid, words, param, channel)
	if words == "/mute" then
		local t = string.explode(string.lower(param), ",")
		local player = Player(cid)
		if not player:getGroup():getAccess() then
			return true
		end
		if (param == nil) or (param == '') or (not param) then
			player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Enter the name of the player")
		return true	
		end
		if (Player(t[1])) then
					if(getCreatureCondition(Player(t[1]), CONDITION_CHANNELMUTEDTICKS)) then
						player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"The player "..getPlayerName (t [1]) .." is already mutated.")		
					return true
					end
			doAddCondition(Player(t[1]), muted)
			Player(t[1]):sendTextMessage(MESSAGE_STATUS_DEFAULT,"You have been muted by the "..getPlayerName (cid) .." with "..tempo / 1000 .." seconds.")
			player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"The player "..getPlayerName (t [1]) .." has been mutated by "..tempo / 1000 .." seconds.")		
		return true
			elseif (not Player(t[1])) then
				player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"A player with that name is not online.")
			return true
		end
	end
	if words == "/unmute" then
		local t = string.explode(string.lower(param), ",")
		local player = Player(cid)
		if not player:getGroup():getAccess() then
			return true
		end
		if (param == nil) or (param == '') or (not param) then
			player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Enter the name of the player")
		return true	
		end
		if (Player(t[1])) then
			if(getCreatureCondition(Player(t[1]), CONDITION_CHANNELMUTEDTICKS)) then
				doRemoveCondition(Player(t[1]), CONDITION_CHANNELMUTEDTICKS)
				Player(t[1]):sendTextMessage(MESSAGE_STATUS_DEFAULT,"You have been desmuted by the "..getPlayerName (cid) ..".")
				player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"The player "..getPlayerName(t[1]).." has been desmutated.")
			return true
			else
				player:sendCancelMessage("The player "..getPlayerName(t[1]).." is not muted")
			return true
			end
		else
			Player(cid):sendCancelMessage("A player with that name is not online.")
		return true
		end
	end
end

depois no talkaction.xml add isso:

	<talkaction words="/mute" separator=" " script="muted.lua" />
	<talkaction words="/unmute" separator=" " script="muted.lua" />

vou tentar, qqr coisa aviso.

  • Respostas 31
  • Visualizações 2.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • A "mensagem" vermelha dá ss, eu tenho uma talkaction no meu ot, dx eu entrar no pc e passo pra ti. As outras coisas eu tenho uma ideia de como podem ser feitas. Qnd eu entrar no pc eu dou uma olhada

  • ue cara, vc pode fazer uma função pra mostrar a posicao       tipo: function onSay(cid) doCreatureSay(cid, "X: "..getCreaturePosition(cid).x, 1) doCreatureSay(cid, "Y: "..getCreaturePosition(cid

  • pode me ajudar via PM? N ignore pf

Postado

action/script e crie um arquivo muted.lua e add isso:

 

depois no talkaction.xml add isso:

	<talkaction words="/mute" separator=" " script="muted.lua" />
	<talkaction words="/unmute" separator=" " script="muted.lua" />

Criar um arquivo com callback onSay em actions e adicionar a tag em talkactions?

Não vai dar certo.

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

The corrupt fear us.

The honest support us.

The heroic join us.

Postado

Criar um arquivo com callback onSay em actions e adicionar a tag em talkactions?

Não vai dar certo.

Amigo, ele não quer uma talkaction que adicione a condição muted à um creature ID. Ele quer condição automática de muted após falar no Help channel.

 

eu uso no meu servidor e nao da problema

 

Quero saber se há algum script para que o tutor possa cuidar melhor do help channel. Um comando que possa mutar o player por 5 minutos mais ou menos.

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

Te ajudei? Então Rep + ;)

Postado

eu uso no meu servidor e nao da problema

 

Você usa um script com callback onSay em actions, coloca a tag em talkactions, e não tem problemas?

Nossa, que distro é esse? Amigo, você apenas mandou ele colocar o script da talkaction no diretório incorreto, desse modo não vai executar o arquivo e resultará em alguns erros de localização do mesmo.

 

Quero saber se há algum script para que o tutor possa cuidar melhor do help channel. Um comando que possa mutar o player por 5 minutos mais ou menos.

Enquanto a esse detalhe, peguei pra ajudar a partir das tentativas falhas de outros membros e não li bem o post principal.

Eu errei mesmo, por falta de atenção.

Corrigi meu post anterior.

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

The corrupt fear us.

The honest support us.

The heroic join us.

Postado

consertei um erro na declaraçao de variavel,

 

 

estou usando tfs 1.0 deste topico: http://www.tibiaking.com/forum/topic/36403-global-full-1053-tfs-10-full-oramond-completo-atualiza%C3%A7%C3%A3o-v5/

 

Baixe e teste, o erro mostre aqui

Te ajudei? Então Rep + ;)

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