It is actually pretty simple.
For anyone that will look for some answers in the future. TFS 1.4.2, and probably most of 1.X
- Make sure that you have public="1" in chatchannels.xml, just to avoid "Player joined the channel"
XML:
<channel id="9" name="Loot" public="1" script="loot.lua" />
- In order for the message to appear correctly in your loot channel, in data/scripts/eventcallbacks/monster/default_onDropLoot.lua under
LUA:
player:sendTextMessage(MESSAGE_LOOT, text)
put
LUA:
player:sendChannelMessage("", text, TALKTYPE_CHANNEL_O, 9) --9 is the channel ID, yours might be different
You need to do this twice...
What you need to do is to change those lines where loot is sent, mostly at default_onDropLoot.lua, and specify it to be sent to your desired channel. Like Sarah said here
C++ - Loot Channel System (https://otland.net/threads/loot-channel-system.254816/#post-2679854), is just changing this player:sendTextMessage function from loot related scripts.