GetItemIndex [Assembly]

06/01/2015 13:47 Anihilat0r#1
Hello, I am trying to make GetItemIndex for a pserver, but I am having some problems.
This is the function:
[Only registered and activated users can see links. Click Here To Register...]

And this is the code I was using for other servers:

Code:
int GetItemIndex(int index)
{
	int value;
	__asm
	{
		mov ecx, [0x6E24A8]
		mov edx, [ecx+ 0x4]
		mov edx, [edx+ 0x40]
		add ecx, 4
		push index
		call edx
		mov value, eax
	}
	return value;
}
But as you can see from the screen, the function is a bit different, so this is my code:

Code:
int GetItemIndex(int index)
{
	int value;
	__asm
	{
		mov ecx, [0x6C4148]
		mov edx, [ecx+0x4]
		add ecx, 4
		push index
		mov eax, [edx+0x40]
		call eax
		mov value, eax
	}
	return value;
}
But it's always returning 0.
Any hints on how to fix this are appreciated, thanks in advance :)
06/01/2015 14:56 BladeTiger12#2
In some M2-Clients you have to do:

"index = (index * 0x100) + 1;"
or
"index = (index * 100) + 1;"

Not sure.
06/01/2015 15:27 Anihilat0r#3
Quote:
Originally Posted by BladeTiger12 View Post
In some M2-Clients you have to do:

"index = (index * 0x100) + 1;"
or
"index = (index * 100) + 1;"

Not sure.
First one, thanks a lot BladeTiger :)
06/01/2015 19:46 Zevion#4
#moved
02/08/2018 10:55 EliteHileKontrol#5
Can you help me , my porblem GetItemIndex
02/10/2018 00:20 _0N#6
Is it for clientside getting the Item on a specified inventory cell? You should give more information about the binary you reverse engineered or upload it.
02/10/2018 07:08 Rayyor90#7
#define ITEM(x) (((x * 257) -x)+1)