died

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
innominabile
Adept Poster
Posts: 85
Joined: Wed Aug 30, 2006 5:24 pm

died

Post by innominabile »

I wanted to do that a character died do not see other characters and npc (except the one can ress him).

I have thinked to hook packet 0x20 and 0xD2

Code: Select all

//Packet ID: 0x20
//Packet Name: Draw Game Player
//Packet Size: 19 bytes
//Sent By: Server
//Submitted: MuadDib
//
//Packet Breakdown
//BYTE cmd
//BYTE[4] creature id
//BYTE[2] bodyType
//BYTE[1] unknown1 (0)
//BYTE[2] skin color / hue
//BYTE[1] flag byte
//BYTE[2] xLoc
//BYTE[2] yLoc
//BYTE[2] unknown2 (0)
//BYTE[1] direction
//BYTE[1] zLoc
//
//Notes
//Only used with the character being played by the client.

Packet 0x20
{
  Length 19
  SendFunction    Hook-CharacterTran:SendCharacter
}

//Packet ID: 0xD2
//Packet Name: Extended 0x20
//Packet Size: 25 Bytes
//Sent By: Server
//Submitted: MuadDib
//
//Packet Breakdown
//BYTE[1] cmd
//Preamble: Exactly like 0x20
//BYTE[2] unknown 1
//BYTE[2] unknown 2
//BYTE[2] unknown 3

Packet 0xD2
{
  Length 25
  SendFunction    Hook-CharacterTran:SendCharacter
}
and code:

Code: Select all


program program_Hook_CharacterTransmission()
  print("Hooking Character Transmission...");
  return 1; // enable hook
endprogram

exported function SendCharacter(who, byref packet)
  if (who.dead)
    return 1;  //do not allow packet
  endif
  return 0; //allow packet
endfunction

but it is not functional.... I hooked wrong packet?

And for npc I see in game screen somenone know what is the packet in which server say client existence?
Post Reply