• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

TFS 1.2 premium bigger loot chance

Lopaskurwa

Well-Known Member
Joined
Oct 6, 2017
Messages
936
Solutions
2
Reaction score
57
How to make premium bonus loot by 35% so if one monster drops item which rate is 5% now for premium it would be 40%
dont know about situation if one item loot rate is 100% so now it would become 135% so maybe it might cause problems i dont know
 
monsters.cpp (TFS 1.2)

function -> void MonsterType::createLoot(Container* corpse)

Use the owner (player) to increase the ConfigManager::RATE_LOOT to your premium RATE.

Tip: owner->isPremium()

Change the function -> getLootRandom() and createLootItem(const LootBlock& lootBlock)
 
Last edited:
monsters.cpp (TFS 1.2)

function -> void MonsterType::createLoot(Container* corpse)

Use the owner (player) to increase the ConfigManager::RATE_LOOT to your premium RATE.

Tip: owner->isPremium()

Change the function -> getLootRandom() and createLootItem(const LootBlock& lootBlock)
Hmm nice is not similar at all doesnt have stuff you are saying
C++:
void Monster::dropLoot(Container* corpse, Creature*)
{
    if (corpse && lootDrop) {
        mType->createLoot(corpse);
    }
}[code]
 
Hmm nice is not similar at all doesnt have stuff you are saying
C++:
void Monster::dropLoot(Container* corpse, Creature*)
{
    if (corpse && lootDrop) {
        mType->createLoot(corpse);
    }
}[code]
You are looking dropLoot function, he told to look createLoot and createLootItem function.
 
You are looking dropLoot function, he told to look createLoot and createLootItem function.
Yea sorry was opening monster.cpp not monster.cpp


You mean something like this? Since your tutorial is not detailed enough for my skills. And it looks stupid what i did doesnt make sense
C++:
    if (!owner || isPremium.getNumber(ConfigManager::RATE_LOOT) == 5) {
        corpse->startDecaying();
        return;
    }
 
Back
Top