Reading text like this

y0mike

Well-Known Member
Joined
May 10, 2014
Messages
85
Likes
32
Points
68
10
#2
Thats a game text, if you can hook the function that displays GameText (0x69F2B0) or intercepts the text argument, then you can get the text.
 
Joined
Sep 9, 2018
Messages
17
Likes
3
Points
3
#3
Code:
:IncomingRPC
0BE5: raknet [email protected] = get_hook_param PARAM_PACKETID
if and
[email protected] == RPC_SCRDISPLAYGAMETEXT // GameText
[email protected] == 1
[email protected] == 0
then
    0BE5: raknet [email protected] = get_hook_param PARAM_BITSTREAM
    //ignore gamtext style and time (8bytes = 64bits)
    0BEB: raknet bit_stream [email protected] ignore_bits 64
    //read text length                                   
    0BE7: raknet [email protected] = bit_stream_read [email protected] type BS_TYPE_INT
    //allocate text length + 1 for null terminating char  
    0A8E: [email protected] = [email protected] + 1
    alloc [email protected] = [email protected]
    //clear buffer, make sure last char is 0
    0C11: memset [email protected] value 0 size [email protected]
    //read to buffer with size
    0BE8: raknet bit_stream [email protected] read_array [email protected] size [email protected]
    //chatmsg "GameText: %s" -1 [email protected]
    free [email protected]
end
0BE0: raknet hook_ret true
 
OP
OP
J
Joined
Feb 24, 2018
Messages
14
Likes
0
Points
6
#4
Code:
:IncomingRPC
0BE5: raknet [email protected] = get_hook_param PARAM_PACKETID
if and
[email protected] == RPC_SCRDISPLAYGAMETEXT // GameText
[email protected] == 1
[email protected] == 0
then
    0BE5: raknet [email protected] = get_hook_param PARAM_BITSTREAM
    //ignore gamtext style and time (8bytes = 64bits)
    0BEB: raknet bit_stream [email protected] ignore_bits 64
    //read text length                                  
    0BE7: raknet [email protected] = bit_stream_read [email protected] type BS_TYPE_INT
    //allocate text length + 1 for null terminating char 
    0A8E: [email protected] = [email protected] + 1
    alloc [email protected] = [email protected]
    //clear buffer, make sure last char is 0
    0C11: memset [email protected] value 0 size [email protected]
    //read to buffer with size
    0BE8: raknet bit_stream [email protected] read_array [email protected] size [email protected]
    //chatmsg "GameText: %s" -1 [email protected]
    free [email protected]
end
0BE0: raknet hook_ret true
aciu daletore, much respect and a big thanks
 
Top