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

Fix/Patch xxgoosexx Loot Channel

llamavani

Trinitium Rubidia Style!
Joined
Sep 17, 2009
Messages
173
Reaction score
3
Location
Guadalajara, Mexico
Hello, today I was patching my server with some C++ codes and I found a Loot channel code(http://otland.net/f35/loot-channel-22638/)but) then I tried to compile but it marked an error.
To FIX the error just follow my step:

talkactions.cpp change:
Code:
bool TalkAction::showLoot(Player* player, const std::string& cmd, const std::string& param)
{
    player->switchGetLoot();

    char buffer[90];
    sprintf(buffer, "You have %s the loot channel.", (player->getLoot() ? "enabled" : "disabled"));
    player->sendTextMessage(MSG_INFO_DESCR, buffer);

    char channel[90];
    sprintf(channel, "The loot channel has been %s.", (player->getLoot () ? "activated" : "deactivated"));
    player->sendChannelMessage("", channel, SPEAK_CHANNEL_R1, CHANNEL_LOOT);

    return true;
}

for:
Code:
bool TalkAction::showLoot(Creature* creature, const std::string& cmd, const std::string& param)
{
    Player* player = creature->getPlayer();
    player->switchGetLoot();

    char buffer[90];
    sprintf(buffer, "You have %s the loot channel.", (player->getLoot() ? "enabled" : "disabled"));
    player->sendTextMessage(MSG_INFO_DESCR, buffer);

    char channel[90];
    sprintf(channel, "The loot channel has been %s.", (player->getLoot () ? "activated" : "deactivated"));
    player->sendChannelMessage("", channel, SPEAK_CHANNEL_R1, CHANNEL_LOOT);

    return true;
}

and well... that's it

If I helped you Pls Rep++
 
and change bool TalkAction::showLoot(Creature* creature, const std::string& cmd, const std::string& param)

if not this won't function
 
Only added Player* player = creature->getPlayer(); ;]

dont criticism other ones codes Nottinghster he just wanted to share this code for someone who got the same problem

please stay by your own codes then you maybe see that u thiefed it from ferrus!

kind regards
 
I can't find it in talkaction.cpp lol... tfs 0.3
 
Back
Top