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

Solved Global Depots TFS 1.3

monkeyy

Member
Joined
Aug 20, 2011
Messages
153
Reaction score
9
Hello all,

As you can see here > https://snag.gy/7hWB6J.jpg there are no containers in the depot lockers.
I would like to have them!
Does anyone knows how to insert them ?

Thanks in advance!
 
Last edited:
I don't really know if its exactly the same sources codes but heres a good start ;p
go to your depotlocker.cpp
Code:
DepotLocker::DepotLocker(uint16_t _type) :
    Container(_type)
{
    depotId = 0;
    maxSize = 3;

change maxSize to the size that you need :p
Then go to your 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;


and add this line :
depotLocker->internalAddThing(Item::CreateItem(ID OF YOUR DEPOT));
before internalAddthing(inbox)
and repeat this step to add every box for every cities,
note that it will add the box directly in the locker.
Recompile after you modified the source and test if it workS:!
 
I don't really know if its exactly the same sources codes but heres a good start ;p
go to your depotlocker.cpp
Code:
DepotLocker::DepotLocker(uint16_t _type) :
    Container(_type)
{
    depotId = 0;
    maxSize = 3;

change maxSize to the size that you need :p
Then go to your 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;


and add this line :
depotLocker->internalAddThing(Item::CreateItem(ID OF YOUR DEPOT));
before internalAddthing(inbox)
and repeat this step to add every box for every cities,
note that it will add the box directly in the locker.
Recompile after you modified the source and test if it workS:!

Have to go to the university, in 15 minutes :(
Can't wait to try it when im back, ill let you know Danick!

Btw you said ''Recompile after you modified the source and test if it workS:!''
What does recompile mean and how do I do it ?
Also I remembered following a tutorial which instructed me to delete the SRC folder, since it was to difficult. First I removed it, but since a few days ago I noticed that I is required to have the src folder otherwise its not possible to enter(for example) the depotlocker.cpp file.

So do I have to ''upload'' it to phpmyadmin before I should make any changes into it ? Because I have a feeling that if I change things in the src folder nothing will change.

Summary: Installed OT > Deleted src map> imported database to phpmyadmin> few days later: added src map again

Hope you understand what I wrote.

Thanks again( cant thank you enough ;P)
 


Danick10 instructed me to to the following:
and add this line :
depotLocker->internalAddThing(Item::CreateItem(ID OF YOUR DEPOT));
before internalAddthing(inbox)

How do i know the ID of my depot and could someone show me a sample of a correct line?
https://snag.gy/6dMAkq.jpg* < This is how it looks like now, however I do not know the ID of a depot. Is it just as simple as looking up a depot chest ID ?

*In the picture you can see it says something like fatal error, however I just fixed that , ignore it please)
 
Last edited:
saaap another update = 3, i change the player.cpp and now looks like this

C-like:
    DepotChest* depotChest = new DepotChest(ITEM_DEPOT);
        depotChest->setDepotId(depotId);
    depotChest->incrementReferenceCounter();
       depotChest->internalAddThing(Item::CreateItem(25469));
       depotChest->internalAddThing(Item::CreateItem(25468));
       depotChest->internalAddThing(Item::CreateItem(25467));
       depotChest->internalAddThing(Item::CreateItem(25466));
       depotChest->internalAddThing(Item::CreateItem(25465));
      depotChest->internalAddThing(Item::CreateItem(25464));
       depotChest->internalAddThing(Item::CreateItem(25463));
      depotChest->internalAddThing(Item::CreateItem(25462));
      depotChest->internalAddThing(Item::CreateItem(25461));
      depotChest->internalAddThing(Item::CreateItem(25460));
      depotChest->internalAddThing(Item::CreateItem(25459));
      depotChest->internalAddThing(Item::CreateItem(25458));
      depotChest->internalAddThing(Item::CreateItem(25457));
      depotChest->internalAddThing(Item::CreateItem(25456));
      depotChest->internalAddThing(Item::CreateItem(25455));
        depotChest->internalAddThing(Item::CreateItem(25454));
        depotChest->internalAddThing(Item::CreateItem(25453));
    depotChest->setMaxDepotItems(getMaxDepotItems());
    depotChests[depotId] = depotChest;
    return depotChest;
}

but when the player click on the box whit the number in the depot first box, the client chrashes U.U tank u for reading = 3
 
saaap another update = 3, i change the player.cpp and now looks like this

C-like:
    DepotChest* depotChest = new DepotChest(ITEM_DEPOT);
        depotChest->setDepotId(depotId);
    depotChest->incrementReferenceCounter();
       depotChest->internalAddThing(Item::CreateItem(25469));
       depotChest->internalAddThing(Item::CreateItem(25468));
       depotChest->internalAddThing(Item::CreateItem(25467));
       depotChest->internalAddThing(Item::CreateItem(25466));
       depotChest->internalAddThing(Item::CreateItem(25465));
      depotChest->internalAddThing(Item::CreateItem(25464));
       depotChest->internalAddThing(Item::CreateItem(25463));
      depotChest->internalAddThing(Item::CreateItem(25462));
      depotChest->internalAddThing(Item::CreateItem(25461));
      depotChest->internalAddThing(Item::CreateItem(25460));
      depotChest->internalAddThing(Item::CreateItem(25459));
      depotChest->internalAddThing(Item::CreateItem(25458));
      depotChest->internalAddThing(Item::CreateItem(25457));
      depotChest->internalAddThing(Item::CreateItem(25456));
      depotChest->internalAddThing(Item::CreateItem(25455));
        depotChest->internalAddThing(Item::CreateItem(25454));
        depotChest->internalAddThing(Item::CreateItem(25453));
    depotChest->setMaxDepotItems(getMaxDepotItems());
    depotChests[depotId] = depotChest;
    return depotChest;
}

but when the player click on the box whit the number in the depot first box, the client chrashes U.U tank u for reading = 3
currently 2020 with newest TFS compiled, i need this also please
 
Back
Top