CLEO Help Reading text like this

CLEO related
Status
Not open for further replies.

Valiuks

Active member
Joined
Sep 9, 2018
Messages
25
Reaction score
4
Code:
:IncomingRPC
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if and
0@ == RPC_SCRDISPLAYGAMETEXT // GameText
11@ == 1
29@ == 0
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    //ignore gamtext style and time (8bytes = 64bits)
    0BEB: raknet bit_stream 1@ ignore_bits 64
    //read text length                                   
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT
    //allocate text length + 1 for null terminating char  
    0A8E: 3@ = 2@ + 1
    alloc 4@ = 3@
    //clear buffer, make sure last char is 0
    0C11: memset 4@ value 0 size 3@
    //read to buffer with size
    0BE8: raknet bit_stream 1@ read_array 4@ size 2@
    //chatmsg "GameText: %s" -1 4@
    free 4@
end
0BE0: raknet hook_ret true
 

Jordanas

Member
Joined
Feb 24, 2018
Messages
14
Reaction score
0
Code:
:IncomingRPC
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if and
0@ == RPC_SCRDISPLAYGAMETEXT // GameText
11@ == 1
29@ == 0
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    //ignore gamtext style and time (8bytes = 64bits)
    0BEB: raknet bit_stream 1@ ignore_bits 64
    //read text length                                  
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT
    //allocate text length + 1 for null terminating char 
    0A8E: 3@ = 2@ + 1
    alloc 4@ = 3@
    //clear buffer, make sure last char is 0
    0C11: memset 4@ value 0 size 3@
    //read to buffer with size
    0BE8: raknet bit_stream 1@ read_array 4@ size 2@
    //chatmsg "GameText: %s" -1 4@
    free 4@
end
0BE0: raknet hook_ret true
aciu daletore, much respect and a big thanks
 
Status
Not open for further replies.
Top