Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[HOW-TO][Temporal] Make OTCv8 work with the lastest tibia protocol (12.40)
#1
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:
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!
[-] The following 3 users Like Aurelion's post:
  • marcoshps11, royalmichael, Trevor
Reply
#2
where to download it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)