• 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!

Loot channel

Elgenady

Veteran OT User
Joined
Aug 5, 2011
Messages
1,637
Solutions
35
Reaction score
351
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
 
i have never understood why the syntax between distro and tfs versions(0.4 1.1 1.3)
changes , could someone explain it pls?
 
i have never understood why the syntax between distro and tfs versions(0.4 1.1 1.3)
changes , could someone explain it pls?
maybe some one can explain it better than me because i not good enough with 1.x
 
i have never understood why the syntax between distro and tfs versions(0.4 1.1 1.3)
changes , could someone explain it pls?
And i never understood why peopole using outdated stuff and then living in shit and complain "that nothing work, looking for something that does exist etc"
 
Just a tip, remember to set active = 0 otherwise players will be able to chat on the channel

XML:
<channel id="12" name="Loot" active="0"/>
 
Just a tip, remember to set active = 0 otherwise players will be able to chat on the channel

XML:
<channel id="12" name="Loot" active="0"/>
yes
and add in lib/000-constant/CHANNEL_LOOT = 12
 
what is full code?


give me link for otx 2 source and i will try to make it for u i don't try in this source before
Where you have full code, to loot channel?
I must change only party and monster cpp/h ? (Sry for my ENG)...
 
change SPEAK_CHANNEL_Y for MSG_CHANNEL_HIGHLIGHT or choose what u want in const.h
how i set what be the loot channel? on my server and on sources?
Post automatically merged:

dude its work awesome thanks!!!!!!!!
 
Last edited:
And i never understood why peopole using outdated stuff and then living in shit and complain "that nothing work, looking for something that does exist etc"
if that goes to me. i must tell you that i'm using tfs 1.3 lol
 
how to change the c++ syntax of that system to the new nekiro's downgraded to be used on 8.6? 1.3
 
this for 1.3+
 
Back
Top