EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   Funcion to send a sound packet. (https://www.eqemulator.org/forums/showthread.php?t=14999)

cofruben 07-25-2004 09:11 AM

Funcion to send a sound packet.
 
This function,sends an opcode that makes the client to play a sound like 'ding'.You can use this function to give money also.
client.cpp:
Code:

void Client::SendSound(){//-Cofruben:Used for ding sound.
  APPLAYER* outapp = new APPLAYER(0x01a6, 68);
  unsigned char x[68];
  memset(x, 0, 68);
  x[0]=0x22;
  x[4]=0x8003;
  x[8]=0x8624;
  x[12]=0x4A01;
  x[16]=0x05;
  x[28]=0x00;//change this value to give gold to the client(default=0 gold)
  x[40]=0xFFFFFFFFFFFFFFFF;
  x[48]=0xFFFFFFFFFFFFFFFF;
  x[56]=0xFFFFFFFFFFFFFFFF;
  x[64]=0xffffffff;
  outapp->pBuffer=x;
  outapp->priority = 6;
  QueuePacket(outapp);
  DumpPacket(outapp);
  safe_delete(outapp);
//this also can be used to give money to the client.
}



All times are GMT -4. The time now is 10:26 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.