Its a pain to get text from this because it all depends on if they have speech.mul or not and if so, how many tokens from speech.mul they're using. If GetInt8(3) != 0xC0 then its at offset 12 as a Unicode string.
if GetInt8(3) == 0xC0 then...
the number of speech.mul triggers is the last 4 BITS of GetInt8(12) and the first 4 bits of GetInt8(13) the last 4 bits of 13 is 1/3 of the first trigger. Each trigger is 1 1/2 bytes.
Not gonna guarantee this code since I tested it only a little bit but it would be something like...
Code:
var speech := "";
var speechstart := 12;
if (packet.GetInt8(3) == 0xC0)
var triggers := packet.GetInt16(12)/16;
var bytes := CInt(triggers*1.5 + 2);
speechstart := CInt(speechstart + bytes);
var speechlen := packet.GetInt16(1) - 1 - speechstart;
speech := CStr(packet.GetString(speechstart, speechlen));
else
var speechlen := (packet.GetInt16(1) - 13)/2;
speech := CChrZ(packet.GetUnicodeString(speechstart, speechlen));
endif
SendSysMessage(character, speech);