Help AUTORUN CHECKPOINT CLEO

Joined
Apr 7, 2017
Messages
14
Likes
0
Points
1
#1
Hello, is it possible to create an cleo mode that is auto-running towards a checkpoint?
This mode should be working like auto-driver cleo but without car only the character...
 

monday

Well-Known Member
Joined
Jun 23, 2014
Messages
919
Likes
4
Points
18
#6
there are opcodes like this



important thing is whether there are any obstacles to avoid, like buildings or objects spawned by server
 

Parazitas

Well-Known Member
Joined
Jan 2, 2017
Messages
680
Likes
2
Points
18
Location
Lithuania
Website
ugbase.eu
#7
Boring...
PHP:
{$CLEO .cs}

thread "Boring"

:ct
wait 0
if
0AB0: 89 {Y}
then    
if     
call @is_cp_active 0
then
    call @get_cp_pos 0 [email protected] [email protected] [email protected]
    if
    044B: $PLAYER_ACTOR on_Foot
    then
        068D: get_camera_position_to [email protected] [email protected] [email protected]
        if
        06BD:   no_obstacles_between [email protected] [email protected] [email protected] and [email protected] [email protected] [email protected] solid 1 car 0 actor 0 object 1 particle 0
        then
            0AB1: call @char_goto 4 XYZ [email protected] [email protected] [email protected]  sprint true
        end 
    end    
end
end
jump @ct
    

:is_cp_active
0AA2: [email protected] = loadlib "samp.dll"
0A8E: [email protected] = [email protected] + 0x21A10C
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0x24
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
IF [email protected] == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AA3: freelib [email protected]
0AB2: ret 0

:get_cp_pos
0AA2: [email protected] = loadlib "samp.dll"
0A8E: [email protected] = [email protected] + 0x21A10C
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0xC
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0x4
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0x4
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
0AA3: freelib [email protected]
0AB2: ret 3 [email protected] [email protected] [email protected]

:char_goto
repeat
    wait 0
    00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected]
    0063: [email protected] -= [email protected]
    0063: [email protected] -= [email protected]
    0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected]
    005B: [email protected] += [email protected]
    005B: [email protected] += [email protected]
    [email protected] *= 0.01745
    0A96: [email protected] = actor $PLAYER_ACTOR struct
    [email protected] += 0x558
    0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0
    0373: set_camera_directly_behind_player
    if
    [email protected] == true
    then
        if
        8118:   actor $PLAYER_ACTOR dead
        then
            [email protected] = 0xB73458
            [email protected] += 0x20
            0A8C: write_memory [email protected] size 1 value 255 virtual_protect 0 // value 0 = disable sprint
            [email protected] = 0xB73458
            [email protected] += 0x3
            0A8C: write_memory [email protected] size 1 value 255 virtual_protect 0 // walk
        else
            break
        end
    ////
    else
    ////
        if
        8118:   actor $PLAYER_ACTOR dead
        then
            [email protected] = 0xB73458
            [email protected] += 0x20
            0A8C: write_memory [email protected] size 1 value 0 virtual_protect 0 // value 225 = enable sprint
            [email protected] = 0xB73458
            [email protected] += 0x3
            0A8C: write_memory [email protected] size 1 value 255 virtual_protect 0 // walk
        else
            break
        end
    end
until 00ED: actor $PLAYER_ACTOR 0 near_point [email protected] [email protected] radius 1.0 1.0 on_foot
0AB2: ret 0
 
Top