Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;zoom fov toggle hold, win 10 x64 ver 1809, ahk u64 ver 1.1.30.03
- ;https://github.com/Kalamity/classMemory/blob/master/classMemory.ahk
- #Include <classMemory>
- #SingleInstance Force
- #Persistent
- setup:
- process, wait, edf5.exe
- game := new _ClassMemory("ahk_exe edf5.exe", "", hProcessCopy)
- mbase := game.BaseAddress
- fov_rva := 0xEE63BC
- ;fov_fileoffset := 0xEE4BBC
- original_fov := 0.789398
- desired_fov := 1.08
- zoom_fov := 0.324
- period := 45000
- DllCall("VirtualProtectEx", "UInt", game.hProcess, "UInt", mbase + fov_rva, "UInt", 4, "UInt", 0x04, "UInt *", 0)
- game.write(mbase + fov_rva, desired_fov, "Float")
- settimer, keepAlive, %period%
- return
- keepAlive:
- if (!game.isHandleValid()) {
- game := []
- settimer, keepAlive, delete
- gosub, setup
- }
- return
- ~*RButton::
- if (!winactive("ahk_pid" game.pid))
- return
- game.write(mbase + fov_rva, zoom_fov, "Float")
- return
- ~*RButton up::
- if (!winactive("ahk_pid" game.pid))
- return
- game.write(mbase + fov_rva, desired_fov, "Float")
- return
- ~Pause::
- suspend, toggle
- pause,, 1
- return
- ~End::
- suspend, toggle
- if (!game.isHandleValid())
- exitapp
- game.write(mbase + fov_rva, original_fov, "Float")
- exitapp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement