CLEO Help Auto reply

CLEO related
Status
Not open for further replies.

Exploder

Member
Joined
Apr 26, 2020
Messages
7
Reaction score
0
Location
China
Hi UG-Base,
I would appreciate if you could help me with creating a cleo mode which instantly writes a preset text while another preset text is sent.
Like if someone said “ Exploder(9):hello” ,Then this mode need to say auto “ / pm 9 hello”

How can i make it work , can anyone give me an example?


the version of samp is 0.3.7
I wait for your help, thank you in advance guys!
 

Attachments

  • example.png
    example.png
    29.2 KB · Views: 11

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,159
Solutions
5
Reaction score
894
Location
Lithuania
This is not full pic..
Looks like simple chat message not sent from player by pm system, that mean you get flood.
 

ItsRobinson

Active member
Joined
Nov 16, 2017
Messages
105
Reaction score
20
PHP:
{$CLEO}
{$INCLUDE SF}
0000: NOP
repeat
    wait 0
until 0AFA:

0BE3: raknet setup_incoming_rpc_hook @in_rpc

while true
    wait 0
end

:in_rpc                 
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if
    0@ == RPC_SCRCLIENTMESSAGE
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT //color
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT //length
    
    0AC8: 4@ = allocate_memory_size 145
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@ //message
    0C0D: struct 4@ offset 3@ size 1 = 0
    
    if and
        0C29: $NOT_USED = stristr string1 4@ string2 "hello"
        0AD4: $NOT_USED = scan_string 4@ format "%s(%d):%s" $NOT_USED 5@ $NOT_USED 
    then
        chatmsg "ID found: %d" -1 5@
    end
    
    free 4@
end
0BE0: raknet hook_ret true

try this, not tested
 

Exploder

Member
Joined
Apr 26, 2020
Messages
7
Reaction score
0
Location
China
PHP:
{$CLEO}
{$INCLUDE SF}
0000: NOP
repeat
    wait 0
until 0AFA:

0BE3: raknet setup_incoming_rpc_hook @in_rpc

while true
    wait 0
end

:in_rpc                
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if
    0@ == RPC_SCRCLIENTMESSAGE
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT //color
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT //length
   
    0AC8: 4@ = allocate_memory_size 145
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@ //message
    0C0D: struct 4@ offset 3@ size 1 = 0
   
    if and
        0C29: $NOT_USED = stristr string1 4@ string2 "hello"
        0AD4: $NOT_USED = scan_string 4@ format "%s(%d):%s" $NOT_USED 5@ $NOT_USED
    then
        chatmsg "ID found: %d" -1 5@
    end
   
    free 4@
end
0BE0: raknet hook_ret true

try this, not tested
I've tried it , but it doesn't work man , I create a bot and let it said hello , and then nothing happened
 

Attachments

  • text.png
    text.png
    3.7 KB · Views: 23
Status
Not open for further replies.
Top