• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Loot channel

johnsamir

Banned User
Joined
Oct 13, 2009
Messages
555
Solutions
5
Reaction score
99
Location
Nowhere

5lave Ots

Active Member
Joined
Oct 2, 2017
Messages
243
Solutions
1
Reaction score
40
Location
Ankrahmun

neravia

Banned User
Joined
May 25, 2022
Messages
75
Reaction score
13
How 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?
 

El Man

«لَا إِلَٰهَ إِلَّا ٱللَّٰهُ»
Joined
Mar 23, 2013
Messages
145
Reaction score
22
Location
EGYPT
this will help player use 0.3777 or 0.4
in monsters.cpp
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
Best
 

potinho

Intermediate OT User
Joined
Oct 11, 2009
Messages
1,252
Solutions
17
Reaction score
104
Location
Brazil
this will help player use 0.3777 or 0.4
in monsters.cpp
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:

"WARNING: message in channel id 12 which is unknown, this is a server bug, relogin if you want to see messages in this channel"

Is it server side? There's a way to fix?
 
Top