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

[Q] How remove soul points limitation in client?

Exedion

Active Member
Joined
Jun 11, 2007
Messages
628
Reaction score
30
I want to make some promotions with more uses with soul point, but the client never show more soul point than 255, i want remove that limitation and get show 999 soul point max, how i can do that?
 
That would involve either sideband communications: i.e. writing a lua module for the client, and a module server side to communicate this between each other via something like luasockets; or altering the protocol of both the client and server, meaning your players could no longer use Cip's client.
 
Server is sending soul as byte:
//Protocolgame.cpp
[cpp] msg->AddByte(player->getPlayerInfo(PLAYERINFO_SOUL)); [/cpp]
so you need to change that to: msg->AddU32



In OTC sources you need to adjust:
//Protocolgameparse.cpp
[cpp] double soul = msg->getU8();[/cpp]
to:
[cpp] double soul = msg->getU32();[/cpp]
 
That would involve either sideband communications: i.e. writing a lua module for the client, and a module server side to communicate this between each other via something like luasockets; or altering the protocol of both the client and server, meaning your players could no longer use Cip's client.

You can always detect whether player is connected with otclient or Cipsoft's client and then send either uint8 or uint32 :p
 
You can always detect whether player is connected with otclient or Cipsoft's client and then send either uint8 or uint32 :p

True, but that's more non-trivial then the simple change Summ posted. And really? U32? For soul? That reminds me of this.

~/src/otclient/src/otclient/protocolgameparse.cpp
Code:
-double soul = msg->getU8();
+double soul = msg->getU16();

~/src/trunk.r####/protocolgame.cpp
Code:
-    msg->put<char>(player->getPlayerInfo(PLAYERINFO_SOUL));
+    if(player->isUsingOtclient())
+        msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_SOUL));
+    else
+        msg->put<char>(player->getPlayerInfo(PLAYERINFO_SOUL));

~/src/trunk.r####/ > patch -Np1 < ./../src/otclient/tools/tfs_extendedopcode.patch
 
True, but that's more non-trivial then the simple change Summ posted. And really? U32? For soul? That reminds me of this.

~/src/otclient/src/otclient/protocolgameparse.cpp
Code:
-double soul = msg->getU8();
+double soul = msg->getU16();

~/src/trunk.r####/protocolgame.cpp
Code:
-    msg->put<char>(player->getPlayerInfo(PLAYERINFO_SOUL));
+    if(player->isUsingOtclient())
+        msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_SOUL));
+    else
+        msg->put<char>(player->getPlayerInfo(PLAYERINFO_SOUL));

~/src/trunk.r####/ > patch -Np1 < ./../src/otclient/tools/tfs_extendedopcode.patch

Having much soul is never a bad thing.
Gogo U32!
 
Back
Top