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

Problem after adding market/inbox

3alola1

I don't have time
Premium User
Joined
Sep 2, 2010
Messages
735
Solutions
7
Reaction score
299
Location
Middle Earth
Hello otland I was trying to add the market system to my server from tfs 1.4.2 to tfs 1.5 everything worked perfect except getting this error into these files my server is tfs 1.5 nekiro downgrade 8.6
inbox.cpp
1737250642420.webp

1737250670897.webp


what is the reason for this two errors?
 
Last edited:
Solution
make market work for 8.6?
Only with OTCv8 market module and modified code on server side. Market added on RL Tibia in 9.44 did one big change in RL Tibia Client. Since this version Tibia.dat file contains item names, categories (armor, helmet etc.) and information, if they are tradeable on market at all. Without that infomation - with 8.6 Tibia.dat file - OTC has to receive list of items and their names, whenever client opens market.
Code modification proposed by OTCv8 (for old protocols) expects server to send that list of items information from server, when client 'open market' (it sends packet to server to get basic market information)...
make market work for 8.6?
Only with OTCv8 market module and modified code on server side. Market added on RL Tibia in 9.44 did one big change in RL Tibia Client. Since this version Tibia.dat file contains item names, categories (armor, helmet etc.) and information, if they are tradeable on market at all. Without that infomation - with 8.6 Tibia.dat file - OTC has to receive list of items and their names, whenever client opens market.
Code modification proposed by OTCv8 (for old protocols) expects server to send that list of items information from server, when client 'open market' (it sends packet to server to get basic market information):

I added TFS 1.4.2 market code to Nekiro TFS 1.5 8.6 market downgrade and added items information required for market to OTCv8 game_market module (to do not waste a lot of transfer and server CPU every time some player opens market). It required changes in OTCv8 market module and TFS 1.4.2 market code, as it was not compatible with items.otb of 8.6.
On new protocols with market information in Tibia.dat, some part of that infomation is passed to OTS items.otb file by dat/otb editors, so server knows which items can be traded on market. With 8.6 items.otb, you will have to list tradeable items somewhere in C++ code of server or add it as attribute to items.xml.

EDIT:
About inbox.cpp error. Downgrade 8.6 Container::Container is:
C++:
Container::Container(uint16_t type, uint16_t size) : Item(type), maxSize(size) {}
TFS 1.4 constructor is:
C++:
Container::Container(uint16_t type, uint16_t size, bool unlocked /*= true*/, bool pagination /*= false*/) :
	Item(type),
	maxSize(size),
	unlocked(unlocked),
	pagination(pagination)
{}
there are 2 extra parameters: unlocked and pagination. Both not supported by 8.6 protocol, so this line in your code:
C++:
Inbox::Inbox(uint16_t type) : Container(type, 30, false, true) {}
should be:
C++:
Inbox::Inbox(uint16_t type) : Container(type, 30) {}
Same for Store Inbox, if you decide to add it. As I remember it's part of Game Store, not Market, so it's not needed to use Market and normal Inbox.
 
Last edited:
Solution
Only with OTCv8 market module and modified code on server side. Market added on RL Tibia in 9.44 did one big change in RL Tibia Client. Since this version Tibia.dat file contains item names, categories (armor, helmet etc.) and information, if they are tradeable on market at all. Without that infomation - with 8.6 Tibia.dat file - OTC has to receive list of items and their names, whenever client opens market.
Code modification proposed by OTCv8 (for old protocols) expects server to send that list of items information from server, when client 'open market' (it sends packet to server to get basic market information):

I added TFS 1.4.2 market code to Nekiro TFS 1.5 8.6 market downgrade and added items information required for market to OTCv8 game_market module (to do not waste a lot of transfer and server CPU every time some player opens market). It required changes in OTCv8 market module and TFS 1.4.2 market code, as it was not compatible with items.otb of 8.6.
On new protocols with market information in Tibia.dat, some part of that infomation is passed to OTS items.otb file by dat/otb editors, so server knows which items can be traded on market. With 8.6 items.otb, you will have to list tradeable items somewhere in C++ code of server or add it as attribute to items.xml.

EDIT:
About inbox.cpp error. Downgrade 8.6 Container::Container is:
C++:
Container::Container(uint16_t type, uint16_t size) : Item(type), maxSize(size) {}
TFS 1.4 constructor is:
C++:
Container::Container(uint16_t type, uint16_t size, bool unlocked /*= true*/, bool pagination /*= false*/) :
    Item(type),
    maxSize(size),
    unlocked(unlocked),
    pagination(pagination)
{}
there are 2 extra parameters: unlocked and pagination. Both not supported by 8.6 protocol, so this line in your code:
C++:
Inbox::Inbox(uint16_t type) : Container(type, 30, false, true) {}
should be:
C++:
Inbox::Inbox(uint16_t type) : Container(type, 30) {}
Same for Store Inbox, if you decide to add it. As I remember it's part of Game Store, not Market, so it's not needed to use Market and normal Inbox.
Yes it worked and compiled fine but with your words you mean storeinbox isn't necessary? i can only add market and inbox?
 
i can only add market and inbox?
Yes.
Also, if you decide to use 1.4.2 code for market, its for 10.98, so you must make OTC think your client version is 10.98 in market module.
You will have to replace every g_game.getClientVersion() and g_game.getProtocolVersion() with 1098 in:

Make this IF always true:
and add code to send list of item IDs and names from server, or define list of items on client side inside this IF (instead of reading list from server).
 
Yes.
Also, if you decide to use 1.4.2 code for market, its for 10.98, so you must make OTC think your client version is 10.98 in market module.
You will have to replace every g_game.getClientVersion() and g_game.getProtocolVersion() with 1098 in:

Make this IF always true:
and add code to send list of item IDs and names from server, or define list of items on client side inside this IF (instead of reading list from server).
This is the only system I found from 1.4.2 ,what do you advice me insted of 1.4.2? because I've been searching and didn't found any 8.6 market/inbox system :D? and it would be great if you gaved me the commits and best regards!
 
what do you advice me insted of 1.4.2?
There is probably no OTS with 8.6 market code published.
TFS 1.4.2 market code is stable (no crashes, no problems with math [some old market codes cloned money!]), verified by multiple servers and works with OTClient for sure. It just needs some little changes to fill missing data from Tibia.dat (MarketAttributes) and items.otb (wareId) in C++ of server and Lua of OTClient.
Sadly, it wasn't implemented as 1 commit into TFS 1.x as it was added in Tibia 9.72 times and then multiple times updated up to 10.98 version, so now you got to find all related functions and IFs in TFS code yourself :(
 
There is probably no OTS with 8.6 market code published.
TFS 1.4.2 market code is stable (no crashes, no problems with math [some old market codes cloned money!]), verified by multiple servers and works with OTClient for sure. It just needs some little changes to fill missing data from Tibia.dat (MarketAttributes) and items.otb (wareId) in C++ of server and Lua of OTClient.
Sadly, it wasn't implemented as 1 commit into TFS 1.x as it was added in Tibia 9.72 times and then multiple times updated up to 10.98 version, so now you got to find all related functions and IFs in TFS code yourself :(
Thank you any way I will try to find out everything now as you said and I may also add a commit later for people whom wish to add this system in tfs 1.5 so it would be easy for every one to add it :D

Best regards!
 
Thank you any way I will try to find out everything now as you said and I may also add a commit later for people whom wish to add this system in tfs 1.5 so it would be easy for every one to add it :D

Best regards!
Why does tfs 1.5 not work?
 
I implemented it by myself but soon I will post commits for what i done because i want to make sure it is 100% working with no bugs
Ok, I'll wait, I think this commit is the most anticipated in recent times, because many tried and few succeeded :(
 
There is probably no OTS with 8.6 market code published.
TFS 1.4.2 market code is stable (no crashes, no problems with math [some old market codes cloned money!]), verified by multiple servers and works with OTClient for sure. It just needs some little changes to fill missing data from Tibia.dat (MarketAttributes) and items.otb (wareId) in C++ of server and Lua of OTClient.
Sadly, it wasn't implemented as 1 commit into TFS 1.x as it was added in Tibia 9.72 times and then multiple times updated up to 10.98 version, so now you got to find all related functions and IFs in TFS code yourself :(
Actually, you're right. It needs to be the Object Builder program if it has the "market" option, which allows you to edit the sprite, such as the market name to make it commercial. Then, compile the sprite, open the item editor, and if there is a "wareid" option, allow it in the same way and save it. After that, open TFS, and the market should appear correctly, with everything working fine.


market.webpitem editor.webp
1741651532122.webp
 
Actually, you're right. It needs to be the Object Builder program if it has the "market" option, which allows you to edit the sprite, such as the market name to make it commercial. Then, compile the sprite, open the item editor, and if there is a "wareid" option, allow it in the same way and save it. After that, open TFS, and the market should appear correctly, with everything working fine.


View attachment 90897View attachment 90898
View attachment 90899
I really didn't expect this at all I didn't try to figure this out latley was too busy with other things but thanks for telling.
 
Thank you all, below is the complete system for the addition!

HTML:
https://otland.net/threads/tfs-1-5-downgrades-market-system.291345/
 
Back
Top