CLEO Help Fish bot help.

CLEO related
Status
Not open for further replies.

Everlight

Active member
Joined
Dec 8, 2018
Messages
32
Reaction score
5
hey yo, i tried do fish bot like auto pressing space, but can't do it can someone help me?
here is code, and here is photo i need press space when i get this blue line.
Code:
{$CLEO}
{$INCLUDE SF}
wait 2500
$123 = 0
0BE3: raknet setup_incoming_rpc_hook @in_rpc
0B34: samp register_client_command "zvejyba" to_label @on
:0
wait 0
if
30@==1
then
actor.StorePos($PLAYER_ACTOR, 10@, 9@, 8@)
8@ -= 1.0
0AF9: samp say_msg "/zvejoti"
:1
wait 300
if
30@ == 1
jf @0

if
$123 == 1
then
0B56: set_game_key 6 state true
wait 100
0B56: set_game_key 6 state false
end

if
$123 == 2
then
0B56: set_game_key 17 state true
wait 100
0B56: set_game_key 17 state false
end

alloc 1@ 256
0B75: samp get_chat_string 99 text_to 1@ prefix_to 0 color_to 0 prefix_color_to 0
if or
0C18: 2@ = strstr string1 1@ string2 "Âû ïîéìàëè ðûáó:"
0C18: 2@ = strstr string1 1@ string2 "Ðûáà ñîðâàëàñü"
then
$123=0
wait 500
0B47: samp close_current_dialog_with_button 0
wait 400
actor.PutAt($PLAYER_ACTOR, 10@, 9@, 8@)
0173: set_actor $PLAYER_ACTOR Z_angle_to 180.0
wait 600
0AF9: samp say_msg "/zvejoti"
end

alloc 1@ 256
0B75: samp get_chat_string 99 text_to 1@ prefix_to 0 color_to 0 prefix_color_to 0
if
0C18: 2@ = strstr string1 1@ string2 "Ó âàñ íåò íàæèâû"
then
call @coordmaster 5 X 2594.4607 Y -2463.0203 Length 0.1 Depth 2.0 Delay 100   
wait 200
call @coordmaster 5 X 2618.3899 Y -2459.6841 Length 0.1 Depth 12.0 Delay 100 
wait 200
call @coordmaster 5 X 2607.2791 Y -2436.8081 Length 0.1 Depth 12.0 Delay 100
wait 500
actor.PutAt($PLAYER_ACTOR, 2607.2791, -2436.8081, 13.6466)
wait 2000
0B49: samp set_current_dialog_list_item 2
wait 400
0B47: samp close_current_dialog_with_button 1
wait 700
0B47: samp close_current_dialog_with_button 1
wait 700
0B47: samp close_current_dialog_with_button 0
wait 700
call @coordmaster 5 X 2618.3899 Y -2459.6841 Length 0.1 Depth 12.0 Delay 100
wait 200
call @coordmaster 5 X 2594.4607 Y -2463.0203 Length 0.1 Depth 2.0 Delay 100
wait 200
call @coordmaster 5 X 10@ Y 9@ Length 0.1 Depth 2.0 Delay 100
wait 500
0173: set_actor $PLAYER_ACTOR Z_angle_to 180.0
wait 500
0AF9: samp say_msg "/fish"
end

jump @1
end
jump @0

:in_rpc
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
IF 0@ == 73
    THEN
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT
    0BE7: raknet 4@ = bit_stream_read 1@ type BS_TYPE_INT
    0AC8: 5@ = allocate_memory_size 125
    0BE8: raknet bit_stream 1@ read_array 5@ size 4@
    0C1E: array 5@ element 4@ el_size 1 = 0
    0AC9: free_allocated_memory 5@ 
        ////////////////////////////////////////////////
        if
        0C18: 20@ = strstr string1 5@ string2 "PED_LOCK_TARGET"
        then
        $123 = 1
        end
      
        if
        0C18: 20@ = strstr string1 5@ string2 "PED_FIREWEAPON"
        then
        $123 = 2
        end
        ////////////////////////////////////////////////
        free 7@
        end
0BE0: raknet hook_ret true

:on
0B12: 30@ = 30@ XOR 1
if
30@==0
then
0AF8: samp add_message_to_chat "Âûêë" 0xFFff
else
0AF8: samp add_message_to_chat "Âêë" 0xFFff
end
0B43: samp cmd_ret

:coordmaster
0acd: "CoordMaster ON" 500
0087: 15@ = 0@
0087: 16@ = 1@
while true
         wait 0
         if 12@ == 12
         then
             12@ = 0
             break
         end
         0087: 0@ = 15@
         0087: 1@ = 16@
         actor.StorePos($PLAYER_ACTOR,9@,10@,11@)
         0509: 6@ = distance_between_XY 0@ 1@ and_XY 9@ 10@
         if 6@ <= 120.0
         then
             02CE: 11@ = ground_z_at 0@ 1@ 999.0
             09bc: $PLAYER_ACTOR 0@ 1@ 11@
             if actor.Driving($PLAYER_ACTOR)
             then
                 5@ = actor.CurrentCar($PLAYER_ACTOR)
                 car.LockInCurrentPosition(5@,0)
             else
                 actor.LockInCurrentPosition($PLAYER_ACTOR,0)
             end
             break
         else
             0061: 0@ -= 9@
             0061: 1@ -= 10@
             0604: get_Z_angle_for_point 0@ 1@ store_to 6@
             if actor.Driving($PLAYER_ACTOR)
             then
                 5@ = actor.CurrentCar($PLAYER_ACTOR)
                 car.LockInCurrentPosition(5@,1)
                 car.Angle(5@) = 6@
             else
                 actor.LockInCurrentPosition($PLAYER_ACTOR,1)
                 actor.Angle($PLAYER_ACTOR) = 6@
             end
             04C4: store_coords_to 8@ 9@ 10@ from_actor $PLAYER_ACTOR with_offset 0.0 2@ 0.0 // 70.0 - ðàññòîÿíèå ïðûæêà
             09bc: $PLAYER_ACTOR 8@ 9@ 3@
             32@ = 0
             while 0025:   4@ > 32@
                 wait 0
                 if 0adc: "OFF" // Äåçàêòèâàöèÿ
                 then
                     0acd: "CoordMaster OFF" 500
                     actor.StorePos($PLAYER_ACTOR,8@,9@,10@)
                     02CE: 11@ = ground_z_at 8@ 9@ 999.0
                     11@ += 1.0
                     00a1: $PLAYER_ACTOR 8@ 9@ 11@
                     if actor.Driving($PLAYER_ACTOR)
                     then
                         5@ = actor.CurrentCar($PLAYER_ACTOR)
                         car.LockInCurrentPosition(5@,0)
                     else
                         actor.LockInCurrentPosition($PLAYER_ACTOR,0)
                     end
                     12@ = 12
                     break
                 end
             end
         end
end
0ab2: ret 0
 

Attachments

  • sa-mp-070.png
    sa-mp-070.png
    15 KB · Views: 39

davidel

Well-known member
Joined
Jan 17, 2020
Messages
207
Reaction score
7
Location
Germania
i dont know so much cleo but i think you can with this code if you get textdraw id


Code:
if 0C5D: samp textdraw 2246 is_exists
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Yes, this is what i need.
I can't find anything what you did by yourself , it's look like you just take part code from some cleo's and put in this thread...
Big messy , unreadable clearly...

I have old code , maybe still working....
PHP:
{$CLEO .cs}
0000:


REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY 

32@ = 0

WHILE TRUE
   WAIT 0
if and
8B21:     NOT_CHAT_OPEN
8B4C:  NOT_DIALOG_ACTIVE -1
0AB0: 166 {F5}
then
    repeat
    wait 0
    until 8AB0: 116 {F5} 
    if
    0@ == false
    then
        0@ = true
        chatmsg "{FF0000}ON" -1
    else
        0@ = false
        chatmsg "{FF00FF}OFF" -1
    end
end
   
if
0@ == true
then
    if
    0C5D: samp textdraw 2103 is_exists
    then
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x20 state 255
        wait 30
        0AB1: @Set_Virtual_Key 2 KeyOffSet 0x20 state 0
        if
        8C5D: samp textdraw 2103 is_exists
        then
            if
            32@ > 2000
            then
                say "/command" // put fishing command
                32@ = 0
            end
        end
    end
end

end

:Set_Virtual_Key
{
    255 = true
    0 = false
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
}
2@ = 0xB72CC8
0@ *= 2
005A: 2@ += 0@  // (int)
0A8C: write_memory 2@ size 1 value 1@ virtual_protect 0
0AB2: ret 0
 
Last edited:
Status
Not open for further replies.
Top