{$CLEO .cs}
0000: NOP
/*
SAVEGAME CHEAT
Author: WastedHymn 27.02.2022 
*/

:script_start
0001: wait 100 ms
00D6: if and
 0ADC:   test_cheat "SAVEGAME"
 0038:   $ONMISSION == 0 // $ == int
004D: jump_if_false @script_start
0002: jump @save_begin


:save_begin
0001: wait 100 ms
$ONMISSON =1
01B4: set_player $PLAYER_CHAR can_move 0
03D8: show_save_screen
:wait_saving
00D6: if
83D9:   not save_done
then
    0001: wait 100 ms    
    0002: jump @wait_saving
end    
/*
else
0169: set_fade_color 0 0 0
016A: fade 0 1000 ms    
end   
*/

00D6: if
0256:   player $PLAYER_CHAR defined
then
    0222: set_player $PLAYER_CHAR health_to 200
    01B4: set_player $PLAYER_CHAR can_move 0
end
0002: jump @save_end

:save_end
0001: wait 100 ms
/*
if
    0256:   player $PLAYER_CHAR defined
then
    02EB: restore_camera_with_jumpcut
    0373: set_camera_directly_behind_player
end
wait 500  
*/
//IF YOU DON'T CHECK PLAYER CHAR GAME CRASHES!
:check_char
if
    0256:   player $PLAYER_CHAR defined
then
    01B4: set_player $PLAYER_CHAR can_move 1
    $ONMISSION = 0
    0ACA: show_text_box "Game Saved."
else
0002: jump @check_char
end
0002: jump @script_start
    
    
        


