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

TFS 1.X+ Reward Chest TFS 1.5

Extrodus

|| Blazera.net ||
Premium User
Joined
Dec 22, 2008
Messages
2,724
Solutions
7
Reaction score
534
Location
Canada
Hurro; quick question guys!

Would the following system be safe to implement on TFS 1.5 [Downgrade 8.6] with changed container/reward itemID's or would it be safer to update/optimize the system first before adding it? As I see a few suggested edits in the comments.

Reward Chest System:
Seems there is also a Loot Issue Patch Here:
 
Last edited:
Managed to get the system to compile on TFS 1.5; however it seems in monsters.cpp createLoot has been moved to lua; so I am unable to add:

Code:
    if (isRewardBoss) {
        auto timestamp = time(nullptr);
        Item* rewardContainer = Item::CreateItem(ITEM_REWARD_CONTAINER);
        rewardContainer->setIntAttr(ITEM_ATTRIBUTE_DATE, timestamp);    
        corpse->setIntAttr(ITEM_ATTRIBUTE_DATE, timestamp);
        corpse->internalAddThing(rewardContainer);
        corpse->setRewardCorpse();
        corpse->startDecaying();
        return;
    }

Does anyone have ideas how to convert this to LUA?
 
data/scripts/eventcallbacks/monster/default_onDropLoot.lua
Lua:
    local mType = self:getType()
    if mType:isRewardBoss() then
        local timestamp = os.time()
        local rewardContainer = Game.createItem(ITEM_REWARD_CONTAINER)
        rewardContainer:setAttribute(ITEM_ATTRIBUTE_DATE, timestamp)
        corpse:setAttribute(ITEM_ATTRIBUTE_DATE, timestamp)
        corpse:addItemEx(rewardContainer)
        corpse:setAttribute(ITEM_ATTRIBUTE_CORPSEOWNER, 0xFFFFFFFF)
        corpse:decay()
        return
    end
 
Hurro; quick question guys!

Would the following system be safe to implement on TFS 1.5 [Downgrade 8.6] with changed container/reward itemID's or would it be safer to update/optimize the system first before adding it? As I see a few suggested edits in the comments.

Reward Chest System:
Seems there is also a Loot Issue Patch Here:
How did you manage to get this system into TFS 1.5? provide a tutorial?
 
Back
Top