Talkactions

PirulitoLegal
em Scripts

PirulitoLegal

Joquem Wodbo: huntdbo.no-ip.org
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/09/13Posts: 12

Pessoal Queria uma talkactions Que O Pleyer Falase /commands ou !commands e mostra os comandos, Meu Servidor e Um Wodbo 8.0

 

 

Grato,Pirulito Legal!!

GustavoCastilho

Soberano!
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 21/07/13Posts: 143

Quais comandos? Faça a listagem dos mesmos..

Work hard to be successful!

 

SkyDarkyes

avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 28/01/13Posts: 1685Gênero: Masculino

Acho que o comando é igual !Spells,não precisa configurar ¬¬'

48EnrrM.png

 

PirulitoLegal

Joquem Wodbo: huntdbo.no-ip.org
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/09/13Posts: 12
!buyhouse

!online

!tradehouse

!frags


Esta aki Gustavo Castilho!

WillOliveira

One Being
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 16/09/12Posts: 88

A lista de comandos vai aparecer quando você digitar !commands ou /commands, se você estiver com o god vai aparecer todos os comandos incluindo os do god, mas se você estiver com um player normal vai aparecer só os comandos que um player pode usar.

 

Tag talkactions.xml:

<talkaction words="/commands;!commands" event="script" value="commands.lua"/>

Script talkactions/scripts/commands.lua

local config = {
	guildTalksEnabled = getBooleanFromString(getConfigValue('ingameGuildManagement'))
}

function onSay(cid, words, param, channel)
	local playerAccess, t = getPlayerAccess(cid), {}
	for i, talk in ipairs(getTalkActionList()) do
		if(not talk.hide and playerAccess >= talk.access) then
			local tmp = talk.words:sub(1, 1):trim()
			if((guildTalksEnabled or (talk.words ~= "!joinguild" and talk.words ~= "!createguild")) and (tmp == "!" or tmp == "/")) then
				table.insert(t, talk)
			end
		end
	end

	table.sort(t, function(a, b) return a.access > b.access end)
	local lastAccess, str = -1, ""
	for i, talk in ipairs(t) do
		local line = ""
		if(lastAccess ~= talk.access) then
			if(i ~= 1) then
				line = "\n"
			end
			lastAccess = talk.access
		end
		str = str .. line .. talk.words .. "\n"
	end

	doShowTextDialog(cid, 1948, str)
	return true
end

PirulitoLegal

Joquem Wodbo: huntdbo.no-ip.org
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/09/13Posts: 12

Lol Funfo REP+