• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Looking for /commands *LIST* TALKACTION!

Mr. Anas

New Member
Joined
Mar 18, 2012
Messages
35
Reaction score
0
Hello,
My server is working perfectly, But I have a problem!
When a player says !commands, nothing does!
I need to make a new talkaction for it!
I know its easy, could someone gimme it?
 
LUA:
<talkaction words="!commands;/commands" event="script" value="commands.lua"/>
In talkactions.xml

In scripts file :

LUA:
local config = {
	ingameGuilds = getBooleanFromString(getConfigValue('ingameGuildManagement'))
}

function onSay(cid, words, param, channel)
	local playerAccess, t = getPlayerAccess(cid), {}
	for i, talk in ipairs(getTalkActionList()) do
		if(not talk.hidden and playerAccess >= talk.access) then
			if(config.ingameGuilds or (talk.functionName ~= "guildjoin" and talk.functionName ~= "guildcreate")) 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, 2160, str)
	return true
end
 
Back
Top