Notify

09/17/2020 07:39 irockalone#1
Hey everyone,
recently i was trying to create a notify appear after every unique kill using the 0x300c Opcode but seems like i am wrong, because on everysingle unique spawn/despawn the message appear, i want the message comes after unique despawn only, any help?
EDIT : after unique despawn, message appear for all online players.
[Only registered and activated users can see links. Click Here To Register...]
09/17/2020 07:42 GameRPoP#2
0x05 byte = spawn
0x06 byte = despawn
09/17/2020 07:45 irockalone#3
Quote:
Originally Posted by GameRPoP View Post
0x05 byte = spawn
0x06 byte = despawn
Thanks for your reply but sorry , i cant understand , i am a new programming student, can you share an example, not a fully solution but just an example.
09/18/2020 01:55 florian0#4
Quote:
Originally Posted by irockalone View Post
can you share an example, not a fully solution but just an example.
You can use HBs release as a reference.
[Only registered and activated users can see links. Click Here To Register...]

You need to read the type first, then read the RefObjId to determine the object, if relevant.

Code:
unsigned short type;

msg >> type;

switch (type) {

  case 0xc05: { /* spawn */
    int refObjId;

    msg >> regObjId;
    
    break;
  }
[Only registered and activated users can see links. Click Here To Register...]

If you're planning to pass the message to the original handler, you have to "rewind" it so the original handler starts at "type" and not after RefObjId.
09/18/2020 06:01 DaxterSoul#5
Quote:
Originally Posted by florian0 View Post
[Only registered and activated users can see links. Click Here To Register...]
Oh, look my packet documentation :D
09/18/2020 09:40 florian0#6
Quote:
Originally Posted by DaxterSoul View Post
Oh, look my packet documentation :D
Uuuuuuuuhhhhhm ... how did that link end up in my post ... I even went to Silkroad Doc to get the link and still failed ... :confused:
09/18/2020 16:51 irockalone#7
Quote:
Originally Posted by florian0 View Post
You can use HBs release as a reference.
[Only registered and activated users can see links. Click Here To Register...]

You need to read the type first, then read the RefObjId to determine the object, if relevant.

Code:
unsigned short type;

msg >> type;

switch (type) {

  case 0xc05: { /* spawn */
    int refObjId;

    msg >> regObjId;
    
    break;
  }
[Only registered and activated users can see links. Click Here To Register...]

If you're planning to pass the message to the original handler, you have to "rewind" it so the original handler starts at "type" and not after RefObjId.

How to read the RefObjID?