Resource icon

Untagged Release Run or Sprint recorded path [0.3.7]

Status
Not open for further replies.

Mila.cs ✅

Well-known member
Joined
Jun 24, 2016
Messages
247
Reaction score
10
Location
̀́̀́
Schiggy said:
someone can make this without chat-spam?

Code:
{$CLEO}
                                               
Thread "BySpexx"      
wait 2000    

0B34: samp register_client_command ".play" to_label @Toggle
0B34: samp register_client_command ".stop" to_label @Restart
0AF0: 10@ = get_int_from_ini_file "cleo\Paths\Options.ini" section "Options" key "sprint"

WHILE TRUE
   wait 0
       if
       31@ == true
       then
       20@ = 0      
       0A9A: 22@ = openfile "CLEO\Paths\WalkPath.txt" mode "rb"
           0A9D: readfile 22@ size 4 to 1@
           0A9D: readfile 22@ size 4 to 2@
           0A9D: readfile 22@ size 4 to 3@
           0AB1: call @char_goto 4 XYZ 1@ 2@ 3@  sprint 10@
           repeat
           wait 0    
           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    
           20@ += 1                      
           if
           00ED:   actor $PLAYER_ACTOR sphere 0 near_point 1@ 2@ radius 1.0 1.0 on_foot
           then      
           // 0AF8: samp add_message_to_chat "[%d]Reading Path{00FF00} X %f {0000FF}Y %f {FF0000}Z %f" color -1 20@ 1@ 2@ 3@            
           0A9D: readfile 22@ size 4 to 1@
           0A9D: readfile 22@ size 4 to 2@
           0A9D: readfile 22@ size 4 to 3@    
           0AB1: call @char_goto 4 XYZ 1@ 2@ 3@  sprint 10@                                
           end                      
           UNTIL 0AD6:   end_of_file 22@ reached    
           0A9B: closefile 22@
       end
END

:Restart
Print "Stopped Path." 1000
wait 500
0A92: RESTART "WalkPath.CS"
004E: STOP THIS CLEO
samp.CmdRet()

:Toggle
if
31@ == true
then
31@ = false
else
31@ = true
Print "Following Path.." 1000
end
samp.CmdRet()

: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
   if
       3@ == 0
   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.5 0.5 on_foot
0AB2: ret 0
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,112
Solutions
5
Reaction score
878
Location
Lithuania
Lang said:
Add possible to record jump walk ? It will be nice

I have already made with that..


Fixed public version source.:

PHP:
{$CLEO}
                                               
0000:

repeat
wait 0
until 0afa:   

0B34: samp register_client_command ".play" to_label @Play
0B34: samp register_client_command ".stop" to_label @Restart
0B34: samp register_client_command ".rec" to_label @Record

WHILE TRUE
   wait 0
IF
31@ == TRUE
THEN  
    IF
    0118:   actor $PLAYER_ACTOR dead
    THEN
        BREAK 
        31@ = FALSE
    END 
    20@ = 0       
    0A9A: 22@ = openfile "CLEO\CharGoto.path" mode "rb" 
    0A9D: readfile 22@ size 4 to 1@ // X
    0A9D: readfile 22@ size 4 to 2@ // Y
    0A9D: readfile 22@ size 4 to 3@ // Z 
    0AB1: call @char_goto 4 XYZ 1@ 2@ 3@  sprint true 
    REPEAT
    wait 0 
    IF
    0118:   actor $PLAYER_ACTOR dead
    THEN
        BREAK
        31@ = FALSE 
    END    
    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  
    20@ += 1                       
    IF
    00ED:   actor $PLAYER_ACTOR sphere 0 near_point 1@ 2@ radius 1.0 1.0 on_foot
    THEN                    
        0A9D: readfile 22@ size 4 to 1@ // X
        0A9D: readfile 22@ size 4 to 2@ // Y
        0A9D: readfile 22@ size 4 to 3@ // Z
        0AB1: call @char_goto 4 XYZ 1@ 2@ 3@  _sprint_ true
                         
    END         
        UNTIL 0AD6:   end_of_file 22@ reached     
        0A9B: closefile 22@ 
END
       
IF
5@ == TRUE
THEN
    20@ = 0       
    0A9A: 22@ = openfile "CLEO\CharGoto.path" mode "wb+"
    REPEAT
    wait 150
    20@ += 1
    IF AND
    82A0:   actor $PLAYER_ACTOR stopped
    0AB0: 87 {W}
    THEN
        04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0   
        0A9E: writefile 22@ size 4{14} from 1@ // X
        0A9E: writefile 22@ size 4{14} from 2@ // Y
        0A9E: writefile 22@ size 4{14} from 3@ // Z
    END            
        UNTIL 5@ == FALSE
        0A9B: closefile 22@
END
       
END

:Restart
PRINTF "~r~Stopped Path.." 1000
wait 500
0A92: RESTART "CharGoto.CS"
004E: STOP THIS CLEO
samp.CmdRet()

:Play
IF
31@ == true
THEN
    31@ = false
ELSE
    31@ = true
    PRINTF "~w~Following Path.." 1000
END
samp.CmdRet()

:Record
IF
5@ == true
THEN
    5@ = false
    PRINTF "~w~Recording ~g~finished!" 1000
ELSE
    5@ = true
    PRINTF "~r~Recording.." 1000
END
samp.CmdRet()

: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@ == true
    then
        if
        8118:   actor $PLAYER_ACTOR dead
        then
            4@ = 0xB73458
            4@ += 0x20
            0A8C: write_memory 4@ size 1 value 255 virtual_protect 0 // value 0 = disable sprint
            4@ = 0xB73458
            4@ += 0x3
            0A8C: write_memory 4@ size 1 value 255 virtual_protect 0 // walk
        else
            break
        end
    ////
    else
    ////
        if
        8118:   actor $PLAYER_ACTOR dead
        then
            4@ = 0xB73458
            4@ += 0x20
            0A8C: write_memory 4@ size 1 value 0 virtual_protect 0 // value 225 = enable sprint
            4@ = 0xB73458
            4@ += 0x3
            0A8C: write_memory 4@ size 1 value 255 virtual_protect 0 // walk
        else
            break
        end
    end
until 00ED: actor $PLAYER_ACTOR 0 near_point 0@ 1@ radius 1.0 1.0 on_foot
0AB2: ret 0

Thanks @Gcode for snippet CharGoto.
Thanks @Opcode.eXe for vehicle recording source and with file create tutorial from VehicleRecording.cs
@Sprinfield Possible record when player close dialog?
Not public version.:
1. Recording when press jump
2. Recording when start run and stop run
Incoming updates .:
1. Record writed commands
2. Create unlimited path.
3. Create it like MultiHack and use for miner bot , anti afk etc..
 

batonkal

Active member
Joined
May 6, 2017
Messages
100
Reaction score
16
Location
Bosnia and Herzegovina
Can someone help me make this record and play multiple paths?
I would like to make this but I don't have enough knowledge about this language.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,112
Solutions
5
Reaction score
878
Location
Lithuania
I working with my new project.
I making on foot record , which let you record : walk, sprint , pressed keys and maybe something else who knows.
This bot will be useful for jobs , where need go positions press keys and back .
Yes ! He have possibility record multiple paths.
 
Last edited:

Parazitas

God
Joined
Jan 2, 2017
Messages
3,112
Solutions
5
Reaction score
878
Location
Lithuania
i have a question it is posible that the "ONVEHICLERECORDER.CS and ONFOOTRECORDER.CS" combined it together? because i work in game as `Trucker` everytime i delivered the goods im in the vehicle then after that i walk to pickup truck
Possible
 
Status
Not open for further replies.
Top