Por BaiakZik, 27 de jan. de 2012 em Actions e Talkactions
info
Grupo: Cavaleiro
Registrado: 20/10/11
Posts: 182
Reputação: +85
Char no Tibia: Eu
Iae xtibia
iae xtibia trago um script q vc digita !comandos e aparece todos os comandos do ot ;D
Entao vamos ao o script
Primeiro va em data/talkactions/talkactions.xml e add essa tag la
<talkaction words="!comandos" event="script" value="commands.lua"/>
dps va em data/talkactions/scripts/e crie um arquivo.lua chamado commands.lua dps la dentro ponha isso
---- By Baiakzik ----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, 2160, str) return true end
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
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"
lastAccess = talk.access
str = str .. line .. talk.words .. "\n"
doShowTextDialog(cid, 2160, str)
return true
Gosto + rep
Editado Janeiro 27 por Baiakzik
info
Grupo: Cavaleiro
Registrado: 20/10/11
Posts: 182
Reputação: +85
Char no Tibia: Eu
Iae xtibia
iae xtibia trago um script q vc digita !comandos e aparece todos os comandos do ot ;D
Entao vamos ao o script
Primeiro va em data/talkactions/talkactions.xml e add essa tag la
dps va em data/talkactions/scripts/e crie um arquivo.lua chamado commands.lua dps la dentro ponha isso
Gosto + rep
Editado Janeiro 27 por Baiakzik