For questions about night vision binoculars and bolted to SIGHT
there is a piece of code bind_stalker.script:


if fov < 35 and xr_logic.pstor_retrieve(db.actor, "use_scope", 0) == 0 then
wpn = db.actor:active_item()
if wpn and (wpn:section() == "wpn_crossbow" or wpn:section() == "wpn_arm_binoc" or wpn:section() == "wpn_wa2000_mw2" or wpn:section() == "wpn_ak47_m1") then
level.add_pp_effector("nightvision_green.ppe", 1034, true)
get_console():execute ("r2_sun_lumscale_amb 3")
get_console():execute ("r2_sun_lumscale 3")
get_console():execute ("r2_mblur 0.6")
xr_logic.pstor_store(db.actor, "use_scope", 1)
end
elseif fov > 35 and xr_logic.pstor_retrieve(db.actor, "use_scope", 0) == 1 then
xr_logic.pstor_store(db.actor, "use_scope", 0)
level.remove_pp_effector(1034)
get_console():execute ("r2_sun_lumscale_amb 1.1")
get_console():execute ("r2_sun_lumscale 1.1")
get_console():execute ("r2_mblur 0.25")
end


the last three lines return rigidly value, regardless of whether it was before, it is not very convenient because when you exit the game, they are stored in User.ltx
The idea is we must first obtain the values ​​of these parameters, save them into variables, and then to return. LUA, I almost do not know, so I ask a little help 