Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Help] Killer system not working 99.62T

Junior Spellweaver
Joined
Oct 27, 2012
Messages
156
Reaction score
1
Hello ragezone, I took the source code from these files:
http://forum.ragezone.com/f197/files-0-99-60t-chs-1094548/
Trying to make a similiar "Killer" system for my castle siege server.
The killer system sends a message to the target and to the killer that he kills (or died).
(The only difference is that instead of sending the message to each of them it will posted as global message and shows the "kill log")
The problem is that it's not working. Please check my code:

PHP:
void GCDiePlayerSend_Hook(OBJECTSTRUCT* lpObj, int TargetIndex, unsigned char skill, int KillerIndex)
{
	SYSTEMTIME t;
	GetLocalTime(&t);

	if(gObj(TargetIndex)->Type == 1 && gObj(KillerIndex)->Type == 1)
	{
		if(TargetIndex != KillerIndex)
		{
			char Msg[70];
			sprintf(Msg, "[%d:%d:%d] %s killed %s", t.wHour, t.wMinute, t.wSecond, gObj(KillerIndex)->Name, gObj(TargetIndex)->Name);
			for (int i = OBJECT_MIN; i < OBJECT_MAX; i++)
			{
				OutYellowMSG2("", Msg, i);
			}


		}
	}

	GCDiePlayerSend(lpObj, TargetIndex, skill, KillerIndex);
}

func.HookThis((DWORD)&GCDiePlayerSend_Hook,0x00401082);
#define GCDiePlayerSend ((void(*)(OBJECTSTRUCT* lpObj, int TargetIndex, BYTE skill, int KillerIndex)) 0x0043EA00) // OK

Thanks.
 
Last edited:
Junior Spellweaver
Joined
Oct 27, 2012
Messages
156
Reaction score
1
this?
#define GCDiePlayerSend ((void(*)(LPOBJ lpObj, int TargetIndex, BYTE skill, int KillerIndex)) 0x00425BB0)



or

00401091 > $ |E9 0A2A0400 JMP GameServ.00443AA0 ; GCDiePlayerSend

I need for Castle-Siege
 
Upvote 0
Back
Top