Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* .cpp */
- void SendRemoveParty(int clientid, int mobId)
- {
- int removeparty_addr = 0x00442410;
- _asm
- {
- PUSH mobId
- PUSH clientid
- CALL removeparty_addr
- ADD ESP,0x04
- }
- }
- void SendRemoveMob(int clientid)
- {
- pCL_P1h pRemMob;
- pRemMob.Header.Size = sizeof(pCL_P1h);
- pRemMob.Header.PacketId = 0x165;
- char tmp[1024];
- for(int i = 0; i < 12; i++)
- {
- int masterIndex = clientid * 0x410;
- int memberId = *(WORD*)(masterIndex + 0x015C6D86 + (i * 2));
- if(*(DWORD*)(memberId * 0xC4C + 0x07B318E0) == 0x00)
- {
- if(memberId != 0x0)
- {
- pRemMob.dat1 = DELETE_UNSPAWN;
- pRemMob.Header.ClientId = memberId;
- AddMessage((BYTE*)&pRemMob ,clientid);
- SendRemoveParty(clientid, memberId);
- return;
- }
- }
- }
- }
- /* .h */
- struct pCL_P1h
- {
- PacketHeader Header;
- int dat1;
- };
- void SendRemoveMob(int clientid);
- void SendRemoveParty(int clientid, int mobId);
- #define DELETE_NORMAL 0 // Somente desaparece
- #define DELETE_DEAD 1 // Animacao da morte do spawn
- #define DELETE_DISCONNECT 2 // Efeito de quando o personagem sai do jogo
- #define DELETE_UNSPAWN 3 // Efeito quando os monstros ancts somem
Advertisement
Add Comment
Please, Sign In to add comment