Hello guys! I want to release the protocol changes on OpentibiaBR to make the actual OTClient, it's a temporal solution meanwhile the full solution is released by Kondra on OTCv8. To make it clear, this is just a protocol reversion like the project was doing before to have both client working (10 and 12) based on this pull request.
On data/modules/scripts/prey_system/prey.lua, you must find the function Player:sendPreyRerollPrice(), you must modify the next block of code:
For this one:
Also you must find on your source the next, on the function onRecvFirstMessage(NetworkMessage& msg):
And change it for:
Also find the next function ProtocolGame::sendPreyRerollPrice(uint32_t price /*= 0*/, uint8_t wildcard)
And change it for:
Also find the next code on ProtocolGame::sendShop(Npc* npc, const ShopInfoList& itemList):
And change it for:
And on the function ProtocolGame::AddCreature(NetworkMessage& msg, const Creature* creature, bo...
Change it for:
And it should be everything, keep on mind that you will need to login to your server using the following template:
It has been tested using the lastest OTBR with the default otclientv8 and myaac.
Greetings!
On data/modules/scripts/prey_system/prey.lua, you must find the function Player:sendPreyRerollPrice(), you must modify the next block of code:
Code:
-- Feature unavailable
msg:addU32(0)
msg:addU32(0)
msg:addByte(0)
msg:addByte(0)
For this one:
Code:
-- Feature unavailable
local client = self:getClient()
if client.version > 1220 then
msg:addU32(0)
msg:addU32(0)
msg:addByte(0)
msg:addByte(0)
end
Also you must find on your source the next, on the function onRecvFirstMessage(NetworkMessage& msg):
Code:
// In version 12.40.10030 we have 13 extra bytes
if (msg.getLength() - msg.getBufferPosition() == 141) {
msg.skipBytes(13);
}
And change it for:
Code:
if (clientVersion > 1220) {
// In version 12.40.10030 we have 13 extra bytes
if (msg.getLength() - msg.getBufferPosition() == 141) {
msg.skipBytes(13);
}
} else {
// on 1149.6xxx, this was removed later.
// extra byte for "optimise connection stability"
if (msg.getLength() - msg.getBufferPosition() > 128) {
shouldAddExivaRestrictions = true;
msg.skipBytes(1);
}
}
Also find the next function ProtocolGame::sendPreyRerollPrice(uint32_t price /*= 0*/, uint8_t wildcard)
Code:
// Prey Task
msg.add<uint32_t>(0);
msg.add<uint32_t>(0);
msg.addByte(0);
msg.addByte(0);
And change it for:
Code:
if (clientVersion > 1220) {
// Prey Task
msg.add<uint32_t>(0);
msg.add<uint32_t>(0);
msg.addByte(0);
msg.addByte(0);
}
Also find the next code on ProtocolGame::sendShop(Npc* npc, const ShopInfoList& itemList):
Code:
msg.addString(std::string()); // ??
And change it for:
Code:
if (clientVersion > 1220) {
msg.addString(std::string()); // ??
}
And on the function ProtocolGame::AddCreature(NetworkMessage& msg, const Creature* creature, bo...
Code:
msg.addByte(0); // Icons
Change it for:
Code:
if (clientVersion > 1220) {
msg.addByte(0); // Icons
}
And it should be everything, keep on mind that you will need to login to your server using the following template:
Code:
OTClientV8 = "http://127.0.0.1/login.php:1220",
It has been tested using the lastest OTBR with the default otclientv8 and myaac.
Greetings!