So I'm just posting this because I couldn't find it in Otland (probably just my bad research skills and because it's so basic). I found it here: http://www.tibiaking.com/forum/topic/52973-commands-para-tfs-11/
For those who don't want to register on another website just to read some code:
This goes in data>talkactions>talkactions.xml
This goes in data>talkactions>scripts>commands.lua
Cheers.
For those who don't want to register on another website just to read some code:
This goes in data>talkactions>talkactions.xml
Code:
<talkaction words="!commands" script="commands.lua"/>
This goes in data>talkactions>scripts>commands.lua
Code:
function onSay(cid, words, param)
local p = Player(cid)
local file = io.open("data/talkactions/talkactions.xml", "r+")
local str = ""
local text = ""
for line in (file:lines()) do
str = str.."\n"..line
end
file:close()
for a in string.gmatch(str, '<talkaction words="(.-)"') do
text = text..'\n'..a
end
p:showTextDialog(2160, text)
return true
end
Cheers.