Ir para conteúdo
  • Cadastre-se

comando de tutor e de adm


Posts Recomendados

  Em 25/12/2014 em 00:03, Morfeusinho disse:

apareceu o seguinte erro

Lua Script Error: [TalkAction Interface] data/talkactions/scripts/broadcast.lua:onSay

data/talkactions/scripts/broadcast.lua:6: attempt to call field 'explode' (a nil value)

stack traceback: [C]: in function 'explode' data/talkactions/scripts/broadcast.lua:6: in function

Mostrar mais  

Adicione à lib do seu servidor:

string.explode = function (str, sep, limit)
    if(type(sep) ~= 'string' or isInArray({tostring(str):len(), sep:len()}, 0)) then
        return {}
    end

    local i, pos, tmp, t = 0, 1, "", {}
    for s, e in function() return string.find(str, sep, pos) end do
        tmp = str:sub(pos, s - 1):trim()
        table.insert(t, tmp)
        pos = e + 1

        i = i + 1
        if(limit ~= nil and i == limit) then
            break
        end
    end

    tmp = str:sub(pos):trim()
    table.insert(t, tmp)
    return t
end

 

  Em 25/12/2014 em 00:03, Morfeusinho disse:

tem isso para a minha versão do tfs e do tibia? pois pelo que me falaram nesta nova versão só é suportada 3 groups

Mostrar mais  

Se não me engano, no TFS 1.0 são 4 groups com 3 "módulos de acesso". Seriam eles Player (none/0), Tutor (1), Senior Tutor (2) e God (3).

Você pode aplicar as flags/custom flags como te indiquei anteriormente, aos groups de Tutor (2) e Senior Tutor (3), pelo seu groups.xml.

The corrupt fear us.

The honest support us.

The heroic join us.

Link para o post
Compartilhar em outros sites
  • Respostas 31
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

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.   @Edit: Mensagem vermelha pra cm+: adicione essa tag em talkactions.xml: <talkaction log="yes" words="/bc" access="3" event="script" value="broadcastclass.lua"/> Agora va na pasta data/talkactions/scripts e crie um arquivo chamado broadcastclass.lua e coloque isso dentro: function

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).y, 1) doCreatureSay(cid, "Z: "..getCreaturePosition(cid).z, 1) doCreatureSay(cid, "ATUAL!!!!!!!", 1) return true end salva como posicao.lua na pasta talkactions/data ai no talkactions.xml tu poe   <talkaction log="yes" words="/posicao" access="1" event="script" value="posicao.lua"/>   ai

pode me ajudar via PM? N ignore pf

da mensagem em vermelho, tente esse:

function onSay(cid, words, param)
	if not getPlayerFlagValue(cid, PlayerFlag_CanBroadcast) then
		return true
	end

	local player = Player(cid)
	print("> broadcasted: \"" .. param .. "\".")
	for _, pid in ipairs(Game.getPlayers()) do
		pid:sendTextMessage(MESSAGE_STATUS_WARNING, param)
	end
	return false
end

editt

 

 

O comando de mutar, vc quer em todos os canais ou so no help?

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

Te ajudei? Então Rep + ;)

Link para o post
Compartilhar em outros sites
  Em 25/12/2014 em 12:12, Suicide disse:

Adicione à lib do seu servidor:

string.explode = function (str, sep, limit)    if(type(sep) ~= 'string' or isInArray({tostring(str):len(), sep:len()}, 0)) then        return {}    end    local i, pos, tmp, t = 0, 1, "", {}    for s, e in function() return string.find(str, sep, pos) end do        tmp = str:sub(pos, s - 1):trim()        table.insert(t, tmp)        pos = e + 1        i = i + 1        if(limit ~= nil and i == limit) then            break        end    end    tmp = str:sub(pos):trim()    table.insert(t, tmp)    return tend

Se não me engano, no TFS 1.0 são 4 groups com 3 "módulos de acesso". Seriam eles Player (none/0), Tutor (1), Senior Tutor (2) e God (3).

Você pode aplicar as flags/custom flags como te indiquei anteriormente, aos groups de Tutor (2) e Senior Tutor (3), pelo seu groups.xml.

Mostrar mais  

é em customfunctions.lua?

Olhe meu Groups.xml

<?xml version="1.0" encoding="UTF-8"?><groups>	<group id="1" name="Player" flags="0" access="0" maxdepotitems="0" maxvipentries="0" />	<group id="2" name="Tutor" flags="137438953471" access="0" maxdepotitems="0" maxvipentries="200" />	<group id="3" name="Admin" flags="272730398714" access="1" maxdepotitems="0" maxvipentries="200" /></groups>
  Em 25/12/2014 em 18:31, narazaky disse:

da mensagem em vermelho, tente esse:

function onSay(cid, words, param)	if not getPlayerFlagValue(cid, PlayerFlag_CanBroadcast) then		return true	end	local player = Player(cid)	print("> broadcasted: \"" .. param .. "\".")	for _, pid in ipairs(Game.getPlayers()) do		pid:sendTextMessage(MESSAGE_STATUS_WARNING, param)	end	return falseend
editt

O comando de mutar, vc quer em todos os canais ou so no help?

Mostrar mais  
esse script que vc me enviou não pegou tb..

eu quero mute no help.

Editado por Morfeusinho (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  Em 26/12/2014 em 15:12, Morfeusinho disse:

é em customfunctions.lua? Olhe meu Groups.xml

Expand   Mostrar mais  

Não. Olha, calculei alguns valores, veja se te agrada:

<?xml version="1.0" encoding="UTF-8"?>
<groups>
    <group id="1" name="Player" flags="0" access="0" maxdepotitems="0" maxvipentries="0" />
    <group id="2" name="Tutor" flags="137455730688" access="0" maxdepotitems="0" maxvipentries="200" />
    <group id="3" name="Admin" flags="272730398714" access="1" maxdepotitems="0" maxvipentries="200" />
</groups>
Editado por Suicide (veja o histórico de edições)

The corrupt fear us.

The honest support us.

The heroic join us.

Link para o post
Compartilhar em outros sites

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)
local tempo = 300000
setConditionParam(muted, CONDITION_PARAM_SUBID, CHANNEL_HELP)
setConditionParam(muted, CONDITION_PARAM_TICKS, tempo)

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, CHANNEL_HELP)) 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, CHANNEL_HELP)) then
				doRemoveCondition(Player(t[1]), CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP)
				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" />
Editado por narazaky (veja o histórico de edições)

Te ajudei? Então Rep + ;)

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Estatísticas dos Fóruns

    96846
    Tópicos
    519606
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo