it works? i found another, but ain't working
i hadnt compile yetit works? i found another, but ain't working
![]()
TFS 1.X+ - loot channel message is being sent to all players.
Hello I have the 8.6 Nekiero server TFS 1.3. I have found a loot channel script system for tfs 1.3 is working but like i have said before. When a player killS something, the message is being sent to the whole playerbase logged in. can somebody tell me where is the issue ...otland.net
Bestthis will help player use 0.3777 or 0.4
in monsters.cpp![]()
3777/src at main · Fir3element/3777
The Forgotten Server 0.4 (rev 3777) with several improvements and bugfixes - Fir3element/3777github.com
change
C++:std::stringstream ss; ss << "Loot of " << nameDescription << ": " << corpse->getContentDescription() << "."; if(owner->getParty() && message > LOOTMSG_PLAYER) owner->getParty()->broadcastMessage((MessageClasses)g_config.getNumber(ConfigManager::LOOT_MESSAGE_TYPE), ss.str()); else if(message == LOOTMSG_PLAYER || message == LOOTMSG_BOTH) owner->sendTextMessage((MessageClasses)g_config.getNumber(ConfigManager::LOOT_MESSAGE_TYPE), ss.str()); }
for
C++:std::stringstream ss; ss << "Loot of " << nameDescription << ": " << corpse->getContentDescription() << "."; if(owner->getParty()) { owner->getParty()->broadcastPartyLoot(ss.str()); } else { owner->sendChannelMessage("", ss.str(), SPEAK_CHANNEL_Y, uint16_t (12)); // 12 is number for loot channel } }
and in party.cpp add
after
void Party::broadcastMessage(MessageClasses messageClass, const std::string& text, bool sendToInvitations/* = false*/)
add
C++:void Party::broadcastPartyLoot(const std::string& loot) { PlayerVector::iterator it; leader->sendChannelMessage("", loot, SPEAK_CHANNEL_Y, 12); // 12 is number for loot channel if(!memberList.empty()) { for(it = memberList.begin(); it != memberList.end(); ++it) (*it)-> sendChannelMessage("", loot, SPEAK_CHANNEL_Y, 12); } }
and in party.h add
C++:void broadcastPartyLoot(const std::string& loot);
same idea i saw for 1.3 source but i converted it for 0.777 or 0.4
After do this, loot channel works perfectly, but i got this warning every monster killed, on OTCv8:this will help player use 0.3777 or 0.4
in monsters.cpp![]()
3777/src at main · Fir3element/3777
The Forgotten Server 0.4 (rev 3777) with several improvements and bugfixes - Fir3element/3777github.com
change
C++:std::stringstream ss; ss << "Loot of " << nameDescription << ": " << corpse->getContentDescription() << "."; if(owner->getParty() && message > LOOTMSG_PLAYER) owner->getParty()->broadcastMessage((MessageClasses)g_config.getNumber(ConfigManager::LOOT_MESSAGE_TYPE), ss.str()); else if(message == LOOTMSG_PLAYER || message == LOOTMSG_BOTH) owner->sendTextMessage((MessageClasses)g_config.getNumber(ConfigManager::LOOT_MESSAGE_TYPE), ss.str()); }
for
C++:std::stringstream ss; ss << "Loot of " << nameDescription << ": " << corpse->getContentDescription() << "."; if(owner->getParty()) { owner->getParty()->broadcastPartyLoot(ss.str()); } else { owner->sendChannelMessage("", ss.str(), SPEAK_CHANNEL_Y, uint16_t (12)); // 12 is number for loot channel } }
and in party.cpp add
after
void Party::broadcastMessage(MessageClasses messageClass, const std::string& text, bool sendToInvitations/* = false*/)
add
C++:void Party::broadcastPartyLoot(const std::string& loot) { PlayerVector::iterator it; leader->sendChannelMessage("", loot, SPEAK_CHANNEL_Y, 12); // 12 is number for loot channel if(!memberList.empty()) { for(it = memberList.begin(); it != memberList.end(); ++it) (*it)-> sendChannelMessage("", loot, SPEAK_CHANNEL_Y, 12); } }
and in party.h add
C++:void broadcastPartyLoot(const std::string& loot);
same idea i saw for 1.3 source but i converted it for 0.777 or 0.4
On channels.xml sethello, how can i block this channel so i can't post on it?
active="0"
to the loot channelI will tryOn channels.xml setactive="0"
to the loot channel
Tenho a mesma dúvida, gostaria de manter o padrão na tela do monstro, aqui isoladoComo mudar para informações de loot na transmissão verde clássica e no canal de loot?
No clássico 8.60, o loot vai para o serverlog, como mudar para o canal de loot, mas com mensagem verde?
data/chatchannelsHow change to loot info on classic green broadcast and in loot channel?
In classic 8.60 loot go to serverlog, how change to loot channel, but with green message?
<channel id="9" name="Loot" public="1" script="loot.lua" />
function onSpeak(player, type, message)
return false
end
-- Send loot message to player or party
if player then
local text = ("Loot of %s: %s"):format(mType:getNameDescription(), corpse:getContentDescription())
local party = player:getParty()
if party then
-- Broadcast to the party
party:broadcastPartyLoot(text)
else
--player:sendTextMessage(MESSAGE_INFO_DESCR, text)
--sendChannelMessage(9, TALKTYPE_CHANNEL_O, text)
player:sendChannelMessage("", text, TALKTYPE_CHANNEL_O, 9) --9 is the channel ID, yours might be different
if player:getStorageValue(48484848) > 0 then
player:sendTextMessage(MESSAGE_INFO_DESCR, text)
end
end
end