CLEO Help Bug with on / off

CLEO related
Status
Not open for further replies.

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
IDK why , but turn off not working...
Who know how fix that?

@monday
@supahdupahnubah
@springfield


It's mining bot..
PHP:
{$CLEO .cs}
0000:

wait 10000

CONST /// controls
BOT_STOP = 0
BOT_ACTIVATED = 1 
END

CONST
FirstMinePointX = 2748.6038
FirstMinePointY = -2076.5259
FirstMinePointZ = 12.6556

CameraToObjectX = 2785.0935
CameraToObjectY = -2064.8103
CameraToObjectZ = 11.8584

CameraToObjectInsideX = 2787.1697
CameraToObjectInsideY = -2069.6636
CameraToObjectInsideZ = 11.7798

FinishPlaceX = 2794.6511
FinishPlaceY = -2071.5979
FinishPlaceZ = 11.5687
END

0B34: samp register_client_command "minerbot" to_label @cmd

WHILE TRUE
wait 0   

WHILE 31@ == BOT_ACTIVATED
    IF
    00ED: actor $PLAYER_ACTOR 0 near_point FirstMinePointX FirstMinePointY 10.0 10.0 on_foot
    THEN
        0AB1: @WAIT_RANDOM_TIME 2 lowerBorder 500 higherBord 1000 /// make pause before start mine
        say "/mine"
        0AB1: @WAIT_RANDOM_TIME 2 lowerBorder 11000 higherBorder 12000 /// wait until player finish mine and get rock
        0AB1: call @char_goto 4 XYZ CameraToObjectX CameraToObjectY CameraToObjectZ sprint false
        IF
        00ED: actor $PLAYER_ACTOR 0 near_point CameraToObjectX CameraToObjectY 0.4 0.4 on_foot
        THEN    
            0AB1: call @char_goto 4 XYZ CameraToObjectInsideX CameraToObjectInsideY CameraToObjectInsideZ sprint false
            IF
            00ED: actor $PLAYER_ACTOR 0 near_point CameraToObjectInsideX CameraToObjectInsideY  0.4 0.4 on_foot
            THEN
                0AB1: call @char_goto 4 XYZ FinishPlaceX FinishPlaceY FinishPlaceZ sprint false  
                 
                /// FROM HERE CODE STARTING BACK TO ROCK MOUNTAIN 
                IF
                00ED: actor $PLAYER_ACTOR 0 near_point FinishPlaceX FinishPlaceY 0.4 0.4 on_foot
                THEN   
                    0AB1: @WAIT_RANDOM_TIME 2 lowerBorder 3000 higherBord 4000 // make pause until rock gone
                    0AB1: call @char_goto 4 XYZ CameraToObjectInsideX CameraToObjectInsideY CameraToObjectInsideZ sprint true
                    IF
                    00ED: actor $PLAYER_ACTOR 0 near_point CameraToObjectInsideX CameraToObjectInsideY 0.4 0.4 on_foot
                    THEN
                        0AB1: call @char_goto 4 XYZ CameraToObjectX CameraToObjectY CameraToObjectZ sprint true
                        IF
                        00ED: actor $PLAYER_ACTOR 0 near_point CameraToObjectX CameraToObjectY 0.4 0.4 on_foot
                        THEN
                            0AB1: call @char_goto 4 XYZ FirstMinePointX FirstMinePointY FirstMinePointZ sprint true
                        END
                    END
                END
            END
        END
    END
END
    
IF AND // STOP BOT IF $PLAYER_ACTOR DEAD 
31@ == BOT_ACTIVATED
0118:   actor $PLAYER_ACTOR dead
THEN
    31@ = BOT_STOP
    break
END  
      
END

:cmd
IF
1@ == FALSE
THEN
    1@ = TRUE
    31@ = BOT_ACTIVATED
    0AD1: "~w~AUTO MINE: ~b~STARTED" time 1337 
ELSE
    1@ = FALSE
    31@ = BOT_STOP
    0AD1: "~w~AUTO MINE: ~b~STOPED" time 1337 
END
0B43: samp cmd_ret

:char_goto
repeat
    wait 0
    00A0: store_actor $PLAYER_ACTOR position_to 4@ 5@ 2@
    0063: 0@ -= 4@
    0063: 1@ -= 5@
    0604: get_Z_angle_for_point 0@ 1@ store_to 2@
    005B: 0@ += 4@
    005B: 1@ += 5@
    2@ *= 0.01745
    0A96: 4@ = actor $PLAYER_ACTOR struct
    4@ += 0x558
    0A8C: write_memory 4@ size 4 value 2@ virtual_protect 0
    0373: set_camera_directly_behind_player
    if
        3@ == false
    then
        4@ = 0xB73458
        4@ += 0x20
        0A8C: write_memory 4@ size 1 value 0 virtual_protect 0
        4@ = 0xB73458
        4@ += 0x3
        0A8C: write_memory 4@ size 1 value 255 virtual_protect 0
    else
        4@ = 0xB73458
        4@ += 0x20
        0A8C: write_memory 4@ size 1 value 255 virtual_protect 0
        4@ = 0xB73458
        4@ += 0x3
        0A8C: write_memory 4@ size 1 value 255 virtual_protect 0
    end
until 00ED: actor $PLAYER_ACTOR 0 near_point 0@ 1@ radius 0.4 0.4 on_foot
0AB2: ret 0

:WAIT_RANDOM_TIME
0209: 32@ = random_int_in_ranges 0@ 1@
wait 32@
0AB2: 0   
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
158
So "~w~AUTO MINE: ~b~STOPED" is not displayed?

I'm just guessing but maybe it's because there's a "repeat" loop within scm function,

btw isn't this part breaking the endless "while true" loop:
Code:
  31@ = BOT_STOP
    break
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
monday said:
So "~w~AUTO MINE: ~b~STOPED" is not displayed?

I'm just guessing but maybe it's because there's a "repeat" loop within scm function,

btw isn't this part breaking the endless "while true" loop:
 
Code:
  31@ = BOT_STOP
    break


Any idea how fix that?
I mean about this.:
monday said:
I'm just guessing but maybe it's because there's a "repeat" loop within scm function,
 

shanker

Well-known member
Joined
Sep 18, 2016
Messages
291
Reaction score
16
Location
Romania
Parazitas said:
monday said:
So "~w~AUTO MINE: ~b~STOPED" is not displayed?

I'm just guessing but maybe it's because there's a "repeat" loop within scm function,

btw isn't this part breaking the endless "while true" loop:
 
Code:
  31@ = BOT_STOP
    break


Any idea how fix that?
I mean about this.:
monday said:
I'm just guessing but maybe it's because there's a "repeat" loop within scm function,

[shcode=cpp]
while true
    wait 0
    while my_shit_condition
        wait 0
        if not 0@ == 1
        then break // break current loop (second while in this case)
        end
        repeat
            wait 0
            // shits
            if not 0@ == 1
            then break // break current loop (repeat in this case)
            end
        END
    END
END[/shcode]
 
Status
Not open for further replies.
Top