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

Adding item to depot locker - help

Nekiro

Legendary OT User
TFS Developer
Joined
Sep 7, 2015
Messages
2,759
Solutions
127
Reaction score
2,279
Hello, I'm not familiar with c++ and source edit, so I need a little help. I want to insert specific item to depot of every player, something like "depot" in locker in dp. It should not be movable only usable.

How do I do that?

TFS 0.4.

Thank you for your answers!
 
you want a item like market? into locker? its a container? or only a items to "use"? need more info, to add this into your locker whe the player open it, need edit sources.
depotlocker.cpp
 
you want a item like market? into locker? its a container? or only a items to "use"? need more info, to add this into your locker whe the player open it, need edit sources.
depotlocker.cpp
I know it need source edit. Exacly as you think I need item in depot just like market, only to use.
 
okay well..
first find your
depotlocker.cpp
then find

Code:
DepotLocker::DepotLocker(uint16_t _type) :
    Container(_type)
{
    depotId = 0;
    maxSize = 3;

change ( maxSize = 3; )
for = ( maxSize = 4 );
 
now go to player.cpp
and find
Code:
DepotLocker* depotLocker = new DepotLocker(ITEM_LOCKER1);
    depotLocker->setDepotId(depotId);
    depotLocker->internalAddThing(Item::CreateItem(ITEM_MARKET));
    depotLocker->internalAddThing(inbox);
    depotLocker->internalAddThing(getDepotChest(depotId, true));
    depotLockerMap[depotId] = depotLocker;
    return depotLocker;

add

depotLocker->internalAddThing(Item::CreateItem(ID OF ITEM <<<<));

add before
depotLocker->internalAddThing(inbox);
 
Back
Top