/* sample packet implementation */
/* cmd 0xf3 - it is a client-server existent id, for clif_parse_GlobalMessage */
/* in this sample we do nothing and simply redirect */
void sample_packet0f3(int fd) {
struct map_session_data *sd = session[fd]->session_data;
ShowInfo("sample_packet008c: Hello World! received 0xf3 for '%s', redirecting!\n",sd->status.name);
clif->pGlobalMessage(fd,sd);
}
...
plugin_init() {
/* map-server interfaces */
clif = GET_SYMBOL("clif");
/* session[] */
session = GET_SYMBOL("session");
HPMi->addPacket(0xf3,-1,sample_packet0f3,hpClif_Parse,HPMi->pid);
}