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

TFS 1.X+ Reward Chest TFS 1.5

Extrodus

|| Blazera.net ||
Premium User
Joined
Dec 22, 2008
Messages
2,634
Solutions
7
Reaction score
440
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:
OP
OP
Extrodus

Extrodus

|| Blazera.net ||
Premium User
Joined
Dec 22, 2008
Messages
2,634
Solutions
7
Reaction score
440
Location
Canada
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?
 

Sarah Wesker

ค∂vαηcε รүηтαx ❤
Support Team
Joined
Mar 16, 2017
Messages
1,222
Solutions
137
Reaction score
1,512
Location
London
GitHub
MillhioreBT
Twitch
millhiore_bt
YouTube
millhiorebt
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
 

Azerty

Member
Joined
Apr 15, 2022
Messages
137
Solutions
3
Reaction score
10
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?
 
Top