hook packet 0xAD

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

hook packet 0xAD

Post by innominabile »

In hook packet

Code: Select all

Packet 0xAD
{
  Length variable
  ReceiveFunction FilterSpeakingHook:HandleReceiveSpeak
}

with const:

Code: Select all

const SPEECH_PKG_OFFSET_MODE := 3;
and script:

Code: Select all

exported function HandleReceiveSpeak(who, byref packet)

  var mode := packet.GetInt8(SPEECH_PKG_OFFSET_MODE);
  if (mode == 0xc0)
    return 0; //continue to core hook functions
  endif
what is 0xc0? What means? Anyone know this?
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

0xC0 is the speech.mul mode. The text comes in a wierd way when speech.mul triggers it.

[quote]
Packet ID: 0xAD
Packet Name: Unicode/Ascii speech request
Packet Size: Variable
Sent By: Client
Submitted: MuadDib

Packet Breakdown
BYTE[1] cmd
BYTE[2] length
BYTE[1] Type
BYTE[2] Color
BYTE[2] Font
BYTE[4] Language (Null Terminated)
· “enu“ - United States English
· “desâ€
innominabile
Adept Poster
Posts: 85
Joined: Wed Aug 30, 2006 5:24 pm

Post by innominabile »

But is a problem to read text when speech.mul is active? what does speech.mul?
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

speech.mul is used to send codes for commonly said trigger words instead of the entire word. One of the biggest problems with doing things with it though are that they are 12-bit codes. You can still parse them and use them in your scripts but its just wierd. But the packet is a bit different when sent with speech.mul vs without it.
innominabile
Adept Poster
Posts: 85
Joined: Wed Aug 30, 2006 5:24 pm

Post by innominabile »

mm speech.mul could be used to send commands to Injection or similar?
It is a problem if I do so:

Code: Select all

  var mode := packet.GetInt8(SPEECH_PKG_OFFSET_MODE);
  if (mode == 0xc0)
    return 1; //stop packet processing
  endif
?
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

no thats not the case. Speech.mul is used in just plain untouched installs of UO for OSI. This is kinda how it works...

Say you say something like:

"I wish to lock this down"

with speech.mul, it will send a small 12-bit number (12 bits is like 1 1/2 characters so its extremely small) which the OSI server uses as an easy serverside processing code for common trigger words. The client also recognizes these phrases in other languages and sends the same exact codes making it even easier for scripts to parse what was said in a multilingual environment.

Speech.mul has never been considered a cheat but its still a bit wierd to try and script out the process because the way the client formats speech.mul into the packet.
Post Reply