• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Cipsoft Client 8.6 - Uint64_t

Forkz

Advanced OT User
Joined
Jun 29, 2020
Messages
586
Solutions
17
Reaction score
159
Hi otlanders,

Does anyone know how to edit the Cipsoft 8.6 client to use more than 32-bit numbers? For example, the maximum recognized gold is 2B.

Has anyone modified anything along these lines and would like to help me?
 
There are two individuals in the community who offer their services for hacking/modifying .dll files for such requirements... I'll see if I can do a quick search and find them and if so I'll update this post with their names, if I don't update this post... well... you get the idea


EDIT: The person who you want to talk to is kor
 
Hi otlanders,

Does anyone know how to edit the Cipsoft 8.6 client to use more than 32-bit numbers? For example, the maximum recognized gold is 2B.

Has anyone modified anything along these lines and would like to help me?
I asked to kor about it a while back, but apparently he has no interest in looking into it any further.
 
i wonder abouut kor dlls he sold it compiled not the sources right? if so i would be willing to invest with others to get dll src and release them
 
i wonder abouut kor dlls he sold it compiled not the sources right? if so i would be willing to invest with others to get dll src and release them
That's not how it works....

There is a reason the type of work he is doing is super niche, it's not so easy and by nature will ring bells on every good anti-virus or anti-malware scanner out there because of what has been done... and that is literally altering an already compiled library's binary to make it do things differently...

Bottom line, they don't have any source code to give because they are not working with source code, they are working with compiled code.
 
That's not how it works....

There is a reason the type of work he is doing is super niche, it's not so easy and by nature will ring bells on every good anti-virus or anti-malware scanner out there because of what has been done... and that is literally altering an already compiled library's binary to make it do things differently...

Bottom line, they don't have any source code to give because they are not working with source code, they are working with compiled code.
so dll is already compiled and they are modifying it?
 
I asked to kor about it a while back, but apparently he has no interest in looking into it any further.
I don't recall anything like this, but anyway, here is my point of view.

To send the monetary value to the trade window (because that's the only place it's displayed in the client), simply change it (on the example OTX engine) here: otxserver/sources/protocolgame.cpp at 536277dd84f89739f3cd30aa1dea4ed9e2a510a1 · mattyx14/otxserver (https://github.com/mattyx14/otxserver/blob/536277dd84f89739f3cd30aa1dea4ed9e2a510a1/sources/protocolgame.cpp#L1984-L1990) to
C++:
uint64_t money = g_game.getMoney(player);
msg->add<uint64_t>(money);

To display a larger value in the client, you should:

The only catch is that while it's relatively easy to "force" the client to store a 64-bit value in memory, displaying it in the trade window is a bit more difficult, and in my opinion, pointless, as these values won't fit in that tiny window anyway.

What I'd suggest is dividing the displayed value by 10 until it falls below the int32 limit, which is 2,147,483,647. For example, if we wanted to "send" 3,000,000,000 gold from the server to the client, we'd display the value 300,000,000, and if we want to "send" 123,456,789,000, we'd display 1,234,567,890 - which doesn't matter anyway, because it's just a label, and the actual validation is on the server anyway. I've attached a DLL file that implements this, along with a video showing how it works, and additional code (in C++ and ASM) for future generations.


C++:
DWORD captureShopGoldValue() {
	DWORDLONG captured1 = NetworkGetU32();
	DWORDLONG captured2 = NetworkGetU32();
	DWORDLONG sum = captured1 + captured2 * 0x100000000;

	while (sum > 0x7FFFFFFF) {
		sum /= 10;
	}

	return static_cast<DWORD>(sum);
}

C++:
extern "C" DWORD __declspec(naked) captureShopGoldValue() {
	__asm {
		call NetworkGetU32
		push eax

		call NetworkGetU32
		mov edx, eax
		pop eax

		mov ecx, 10

	scale_loop:
		test edx, edx
		jnz divide

		cmp eax, 0x7FFFFFFF
		ja divide
		ret

	divide:
		div ecx
		xor edx, edx
		jmp scale_loop
	}
}
 

Attachments

I don't recall anything like this, but anyway, here is my point of view.

To send the monetary value to the trade window (because that's the only place it's displayed in the client), simply change it (on the example OTX engine) here: otxserver/sources/protocolgame.cpp at 536277dd84f89739f3cd30aa1dea4ed9e2a510a1 · mattyx14/otxserver (https://github.com/mattyx14/otxserver/blob/536277dd84f89739f3cd30aa1dea4ed9e2a510a1/sources/protocolgame.cpp#L1984-L1990) to
C++:
uint64_t money = g_game.getMoney(player);
msg->add<uint64_t>(money);

To display a larger value in the client, you should:

The only catch is that while it's relatively easy to "force" the client to store a 64-bit value in memory, displaying it in the trade window is a bit more difficult, and in my opinion, pointless, as these values won't fit in that tiny window anyway.

What I'd suggest is dividing the displayed value by 10 until it falls below the int32 limit, which is 2,147,483,647. For example, if we wanted to "send" 3,000,000,000 gold from the server to the client, we'd display the value 300,000,000, and if we want to "send" 123,456,789,000, we'd display 1,234,567,890 - which doesn't matter anyway, because it's just a label, and the actual validation is on the server anyway. I've attached a DLL file that implements this, along with a video showing how it works, and additional code (in C++ and ASM) for future generations.


C++:
DWORD captureShopGoldValue() {
    DWORDLONG captured1 = NetworkGetU32();
    DWORDLONG captured2 = NetworkGetU32();
    DWORDLONG sum = captured1 + captured2 * 0x100000000;

    while (sum > 0x7FFFFFFF) {
        sum /= 10;
    }

    return static_cast<DWORD>(sum);
}

C++:
extern "C" DWORD __declspec(naked) captureShopGoldValue() {
    __asm {
        call NetworkGetU32
        push eax

        call NetworkGetU32
        mov edx, eax
        pop eax

        mov ecx, 10

    scale_loop:
        test edx, edx
        jnz divide

        cmp eax, 0x7FFFFFFF
        ja divide
        ret

    divide:
        div ecx
        xor edx, edx
        jmp scale_loop
    }
}
For future people who are going to use it, you have to divide the value in the shop into more times because if you have more than 3 stacks of 100kkk it will go into debug mode when you open the trade, otherwise it is working 100%
 
Back
Top