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 - 3777/src at main · 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 - 3777/src at main · 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