Derlexy
Intermediate OT User
- Joined
- Jun 29, 2011
- Messages
- 219
- Reaction score
- 101
Hello guys. How can i send a message to a player on a specific channel? I have a bestiary system in my server, but i want to send all the messages related to it on a new channel ive created...
Im using the Nostalrius distro, its a TFS 1.2 server.
channels.xml
scripts/bestiary.lua
what i want to do (but in the channel ive created):
Can someone help me?
Im using the Nostalrius distro, its a TFS 1.2 server.
GitHub - Ezzz-dev/Nostalrius: Nostalrius is a 7.7 Tibia Clone Project based on The Forgotten Server 1.2 and CipSoft files.
Nostalrius is a 7.7 Tibia Clone Project based on The Forgotten Server 1.2 and CipSoft files. - Ezzz-dev/Nostalrius
github.com
channels.xml
XML:
<?xml version="1.0" encoding="UTF-8"?>
<channels>
<channel id="2" name="Rule Violations" script="ruleviolations.lua" />
<channel id="3" name="Tutor" script="tutor.lua" />
<channel id="4" name="Game Chat" public="1" script="worldchat.lua" />
<channel id="5" name="Real Chat" public="1" script="englishchat.lua" />
<channel id="6" name="Trade" public="1" script="trade.lua" />
<channel id="7" name="Help" public="1" script="help.lua" />
<channel id="8" name="Gamemaster" script="gamemaster.lua" />
<channel id="9" name="Bestiary" script="bestiary.lua" />
</channels>
scripts/bestiary.lua
Lua:
function onSpeak(player, type, message)
player:sendCancelMessage("You cannot send messages on this channel.")
return true
end
what i want to do (but in the channel ive created):
Lua:
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "[Bestiary]: You already killed " .. bestiaryGetPlayerTotalKills(player, monsterName) .. " " .. bestiaryGetPlural(monsterName) .. ". Kill a total of " .. bestiaryGetPlayerNeededKills(player, monsterName) .. " to achieve the " .. bestiaryGetNextRank(player, monsterName) .. " rank.")
Can someone help me?