Item1; //0278 ZItem Item2; //02AC __int32 CurrentWeapon; //02E0 char unknown3[20]; char LastMovementName[12]; //02F8 char unknown4[32]; ZCharacter2* LastAttacker; //0324 char unknown5[32]; char NameDirty[32]; //0348 char ClanNameDirty[16]; //0368 char unknown6[44]; __int32 Kills; //03A4 __int32 Deaths; //03A8 char unknown7[36]; char Name[32]; //03D0 char ClanName[16]; //03F0 D3DXVECTOR3& Position(){ return *(D3DXVECTOR3*)(*(DWORD*)(PositionFind->Base + PositionFind->Offset *0x4)); } bool IsTeam(ZCharacter2* pChar) { return ((bool (__thiscall*)(ZCharacter2*, ZCharacter2*))0x00473630) (this, pChar); } void SetHP(int a) { _asm { mov ecx,this push a call ZCharacter2__SetHPSigAddress } } void SetAP(int a) { _asm { mov ecx,this push a mov eax, 0x00473760 call eax } } int GetHP() { int r; _asm { mov ecx,this mov eax, 0x00473730 call eax mov r,eax } return(r); } int GetAP() { int r; _asm { mov ecx,this mov eax, 0x00473740 call eax mov r,eax } return(r); } }; struct ZCharacter2Manager { ZCharacter2* Find(MUID& uidPlayer) { /*unsigned long firstID = uidPlayer.firstID; unsigned long secondID = uidPlayer.secondID; ZCharacter2* pChar; _asm { mov ecx,this push secondID push firstID mov eax, 0x0047A660 // ZCharacter2Manager::Find call eax mov pChar,eax } return pChar;*/ return ((ZCharacter2* (__thiscall*)(LPVOID, MUID))0x0047A660) (this, uidPlayer); } static ZCharacter2Manager* GetInstance() { return ((ZCharacter2Manager* (__cdecl*)())0x0049E870) (); } }; #define Find(uidChar) ZCharacter2Manager::GetInstance()->Find(uidChar) struct ZGameClient { char unknown0[88]; char Unknown1[32]; char unknown2[288]; MUID ServerMUID; MUID MyMUID; MUID ChannelMUID; MUID StageMUID; char ServerName[64]; char ServerIP[32]; char unknown3[744]; char CurrentChannel[128]; char Unknown4[128]; char Unknown5[128]; char CurrentGame[128]; char CurrentChat[64]; unsigned int RoomNumber; int CurrentCursor; bool ClanWar; int ChannelType; char szKickText[128]; DWORD m_nPrevClockRequestAttribute; int BridgePeerCount; DWORD LastBridgePeer; int Countdown; DWORD LastCountdown; int RequestID; MUID uidRequestPlayer; static ZGameClient* GetInstance() { return ((ZGameClient* (__cdecl*)())0x004ABCC0)(); } }; #define GetMe() ZGameClient::GetInstance()->MyMUID #include "CDetour.h" void MuidManagerClearer(); DWORD MAddSharedCommandTableAddress = 0x0051D6D0; CDetour MAddSharedCommandTableDet; void __cdecl MAddSharedCommandTableHook (MCommand2Manager* pCommandManager, int nSharedType) { /* MUID Victim; float Position[3]; int DamageType; int WeaponType; float Damage; float PiercingRatio; int MeleeType; */ MCommand2Desc* shotPacket = new MCommand2Desc(0xD3D9, "Lead.Info", "anti-lead", 64); shotPacket->AddParamDesc(new MCommand2ParameterDesc(MPT_INT, "Victim")); shotPacket->AddParamDesc(new MCommand2ParameterDesc(MPT_FLOAT, "X")); shotPacket->AddParamDesc(new MCommand2ParameterDesc(MPT_FLOAT, "Y")); shotPacket->AddParamDesc(new MCommand2ParameterDesc(MPT_FLOAT, "Z")); shotPacket->AddParamDesc(new MCommand2ParameterDesc(MPT_INT, "DamageType")); shotPacket->AddParamDesc(new MCommand2ParameterDesc(MPT_INT, "WeaponType")); shotPacket->AddParamDesc(new MCommand2ParameterDesc(MPT_FLOAT, "Damage")); shotPacket->AddParamDesc(new MCommand2ParameterDesc(MPT_FLOAT, "PiercingRatio")); shotPacket->AddParamDesc(new MCommand2ParameterDesc(MPT_INT, "MeleeType")); pCommandManager->AddCommandDesc(shotPacket); CreateThread(0, 0, (LPTHREAD_START_ROUTINE)MuidManagerClearer,0,0,0); //printf("Added packet.\n"); } struct MSTAGE_SETTING_NODE { int x1; int x2; char mapName[32]; int x3; unsigned int type; unsigned int rounds; unsigned int minutes; unsigned int gap; char players; bool mode1; bool mode2; bool mode3; bool friendlyFire; bool mode4; bool lateJoin; bool teamBalance; }; MUID players[30]; MSTAGE_SETTING_NODE* pStageNode; int MaxPlayers; CDetour ZCharacter2__OnDamagedDetour; DWORD ZCharacter2__OnDamagedAddress = 0x00477BF0; void __stdcall ZCharacter2__OnDamagedHook(ZCharacter2* pAttacker,D3DXVECTOR3 srcPos,int ZDAMAGETYPE,int WeaponType,float fDamage,float fPiercingRation,int nMeleeType) { ZCharacter2* pVictim = (ZCharacter2*)ZCharacter2__OnDamagedDetour.GetThisPtr(); ZCharacter2__OnDamagedDetour.Ret(false); if (pAttacker == Find(GetMe()) && pVictim != Find(GetMe())) { //zCPrint("Player: %s attemtped to do %f damage(%f p.ratio) to %s using item: %i", pAttacker->Name, fDamage,fPiercingRation, pVictim->Name, WeaponType); MUID *uid = new MUID(); uid->firstID = 0; uid->secondID = 0; for (int i = 0; i < 31; ++i) { if (Find(players[i]) == pVictim) { uid->secondID = players[i].secondID; } } MCommand2* pCmd = MCommand2::Create(0xD3D9); pCmd->AddParameter(new MCommand2ParameterInt(uid->secondID)); pCmd->AddParameter(new MCommand2ParameterFloat(srcPos.x)); pCmd->AddParameter(new MCommand2ParameterFloat(srcPos.y)); pCmd->AddParameter(new MCommand2ParameterFloat(srcPos.z)); pCmd->AddParameter(new MCommand2ParameterInt(ZDAMAGETYPE)); pCmd->AddParameter(new MCommand2ParameterInt(WeaponType)); pCmd->AddParameter(new MCommand2ParameterFloat(fDamage)); pCmd->AddParameter(new MCommand2ParameterFloat(fPiercingRation)); pCmd->AddParameter(new MCommand2ParameterInt(nMeleeType)); MCommand2::Post(pCmd); } else ZCharacter2__OnDamagedDetour.Ret(true); if (ZDAMAGETYPE == 1) { ZCharacter2__OnDamagedDetour.Ret(true); fDamage = 0; } } struct MTD_CharInfo{ char szName[0x20]; char szClanName[0x10]; int nClanGrade; unsigned short nClanContPoint; char nCharNum; unsigned