Page 1 of 3 123 LastLast
Results 1 to 15 of 45
  1. #1
    wyvern1990's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    132
    Reputation
    10
    Thanks
    1,845

    Exclamation NoRecoil + NoSpread + NoBreath + MiniMap Spotting + External Radar.

    Based on the AutoIt scipt!
    Converted it to AHK.

    Run game, run script, Press Numpad0 to focuss on overlay menu
    to use the overlay functions ( External radar) you need GDI+.ahk wich can be found http://www.mpgh.net/forum/showthread.php?t=1040747

    Cant post it as it exceeds the number of char's a post can have.

    Updated!

    now able to set position of Radar.

    Code:
    #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn  ; Enable warnings to assist with detecting common errors.
    SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
    #SingleInstance Force
    #NoEnv
    #include GDI+.ahk
    SetBatchLines -1
    
    NoSpread = 0
    NoRecoil = 0
    Overlay = 0
    Breath = 0
    Spotting = 0
    YawInverse = 6
    PlayerRadar = 1
    PosCX1 = 1920
    PosCY1 = 540
    ;Type---------------
    PROGRAM = Battlefield 4
    Settimer,Loop,10
    Settimer,pData,10
    Settimer, WindowXY,100
    Settimer, Spread,100
    Settimer, Recoil,100
    Settimer, Debug, 10
    Settimer, OverlayUpdate3,10
    
    If !pToken := Gdip_Startup()
    {
       MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
       ExitApp
    }
    
    Offset(kl="")
    {
    CLIENTGAMECONTEXT = 0x24a0c00 ;0 +  Base
    ANGLES := 0x21e3400 ;+ base
    ;---------gamecontext----------
    ClientPlayerManager := 0x60 ;GameContext 
    idToPlayerMapOffset := 0x548 ;ClientPlayerManager
    ;------------------ReadLocalPlayer --------------------
    ClientPlayer = 0x540 ;ClientPlayerManager 
    ClientSoldier = 0x14d0 ;ClientPlayer 
    ClientReplication = 0x490 ;ClientSoldier
    soldierWeaponsComponent = 0x570 ;ClientSoldier 
    breathControlHandler = 0x588 ;clientSoldier
    pHealthComponent = 0x140 ;ClientSoldier
    ActiveSlot = 0x0a98 ;SoldierWeaponCompenent 
    CurrentAnimatedWeaponHandler = 0x0890 ;soldierWeaponComponent
    ClientSoldierWeapon := * 0x8 ;currentAnimantedWeaponHandler + ActiveSlot
    CorrectedFiring := 0x49c0 ;Angles
    WeaponSway := 0x78 ;CorrectedFiring
    WeaponSwayData := 0x08 ;WeaponSway
    ;---------------------PlayerData-------------------
    InVehicle := 0x14c0 ;clientPlayer
    TeamID := 0x13cc ;Clientplayer
    Health := 0x20 ;pHealthComponent
    projectilesLoaded := 0x01a0 ;CorrectedFiring
    ProjectilesInMagazines := 0x01a4 ;CorrectedFiring
    PositionX := 0x30 ;clientReplication
    PositionY := 0x34 ;ClientReplication
    PositionZ := 0x38 ;clientReplication
    flYaw := 0x4D8 ;clientSoldier
    Return %kl%
    }
    
    
    MainGui():
    Try{
    WinWaitActive,Battlefield 4,,120
    if WinExist("Battlefield 4")
    {
    WinGetPos,Xpos, YPos,WidthW,HeightH,Battlefield 4
    PosX := XPos+10, PosY := YPos +20
    Gui +AlwaysOnTop -Caption +ToolWindow
    Gui, Color, FA0000
    gui, font,cFF0000 S12 Bold, Arial
    Gui, Add, Text, x10 y10 w100 h20 vNSpread ,Spread %NoSpread%
    Gui, Add, Slider,x120 y10 W50 h20 Center NoTicks Range0-100 vNoSpread gSpread,100
    ;Gui,Add, CheckBox,x120 y10 Checked%NoSpread% vNoSpread gSpread
    Gui, Add, text, x10 y30 w100 h30, NoRecoil
    Gui, Add, CheckBox,x120 y30 Checked%NoRecoil% vNoRecoil gRecoil
    Gui,Add,Text, x10 y50 W100 H40,Overlay
    Gui, Add, CheckBox, x120 y50 Checked%Overlay% vOverlay gOverlay
    gui, Add, Text, x10 y70 w120 h30, NoBreath
    Gui, Add, CheckBox, X120 y70 Checked%Breath% vBreath gBreath
    Gui, Add, Text,x10 y90 w120 h30, Radar Spotting
    
    Gui, Add, CheckBox,x120 y90 Checked%Spotting% vSpotting gpData
    Gui, Add, Text,x10 y110 w120 h30,EnemyRadar
    Gui, Add, Checkbox,x120 y110 Checked%PlayerRadar% vPlayerRadar gOverlayUpdate3
    Gui, Add, Text,x10 y130 W120 H30,HorzPos
    Gui, Add, Slider,x120 y130 w50 h20 Center NoTicks range0-%A_ScreenWidth% vPosCX1 gOverlayUpdate3,1920
    Gui, Add, Text,x10 y150 W120 H30,VertPos
    Gui, Add, Slider,x120 y150 w50 h20 Center NoTicks range0-%A_ScreenHeight% vPosCY1 gOverlayUpdate3,540
    Gui, Show,NA x%PosX% y%PosY%,Gui77
    WinSet, TransColor,FA0000, Gui77
    }
    }Catch{}
    return
    
    ~Numpad0::
    If WinExist("Gui77")
    	WinActivate,Gui77
    return
    
    WindowXY:
    IfWinActive,Battlefield 4
    {
    	WinGetPos,Xpos, YPos,WidthW,HeightH,Battlefield 4
        PosX := XPos, PosY := YPos
    	WinMove,Gui77,,PosX,PosY
    }
    ifWinnotexist, Battlefield 4
    	ExitApp
    return
    
    Spread:
    Gui, Submit, Nohide
    NoSpread := Round(NoSpread/100,3)
    VarHex := FloatToHex(NoSpread)
    StringTrimRight,NoSpread,NoSpread,1
    GuiControl,,NSpread,Spread %NoSpread%
    WriteMemory(VarHex,WeaponSwayData+0x0430,PROGRAM) ;VisualSpreadADS
    WriteMemory(VarHex,WeaponSwayData+0x0434,PROGRAM) ;ProjectileSpreadADS
    WriteMemory(VarHex,WeaponSwayData+0x0438,PROGRAM) ;VisualSpread
    WriteMemory(VarHex,WeaponSwayData+0x043C,PROGRAM) ;ProjectileSpread
    return
    
    Recoil:
    Gui, Submit, Nohide
    if NoRecoil = 1
    	{
    		iniRead,WeaponNameLoad,Backup.dfd,%CurrentWeaponName3%,Weapon
    		if WeaponNameLoad != %CurrentWeaponName3%
    		{
    			IniWrite,%CurrentWeaponName3%,Backup.dfd,%CurrentWeaponName3%,Weapon
    			IniWrite,%Recoil1%,Backup.dfd,%CurrentWeaponName3%,Recoil1B
    			IniWrite,%Recoil2%,Backup.dfd,%CurrentWeaponName3%,Recoil2B
    			}
    			WriteMemory(0x00,WeaponSwayData+0x0444,PROGRAM)
    			WriteMemory(FloatToHex(100),WeaponSwayData+0x0440,PROGRAM)
    		}
    if NoRecoil = 0
       {
    	iniRead,WeaponNameLoad,Backup.dfd,%CurrentWeaponName3%,Weapon
    	if WeaponNameLoad != ERROR
    	{
    	IniRead,Recoil1Ret,Backup.dfd,%CurrentWeaponName3%,Recoil1B
    	IniRead,Recoil2Ret,Backup.dfd,%CurrentWeaponName3%,Recoil2B
    		WriteMemory(Recoil1Ret,WeaponSwayData+0x0444,PROGRAM)
    		WriteMemory(Recoil2Ret,WeaponSwayData+0x0440,PROGRAM)
    	    }
    	}
    return
    
    Overlay:
    Gui, Submit, Nohide
    if Overlay = 1
    {
    Settimer, OverlayUpdate,1 
    }
    if Overlay = 0
    {
    	Settimer, OverlayUpdate, Off
    	Gui,2: Destroy
    }
    return
    
    OverlayUpdate:
    SendText := Round(ClientHealth,1) " / 100 `n" projectilesLoaded " / " ProjectilesInMagazines
    Width := 120, Height := 50
    Gui, 2:  -Caption +E0x80000 +LastFound +OwnDialogs +Owner +AlwaysOnTop
    Gui, 2: Show, NA
    hwnd1 := WinExist()
    hbm := CreateDIBSection(Width, Height)
    hdc := CreateCompatibleDC()
    obm := SelectObject(hdc, hbm)
    G := Gdip_GraphicsFromHDC(hdc)
    Gdip_SetSmoothingMode(G, 4)
    pBrush := Gdip_BrushCreateSolid(0x00000000)
    Gdip_FillRoundedRectangle(G, pBrush, 0, 0, Width, Height, 20)
    Gdip_DeleteBrush(pBrush)
    Font = Arial
    If !hFamily := Gdip_FontFamilyCreate(Font)
    {
       MsgBox, 48, Font error!, The font you have specified does not exist on the system
       ExitApp
    }
    Options = x10p y30p w80p Left cFF00ff00 r4 s15 BoldItalic
    Gdip_TextToGraphics(G, SendText, Options, Font, Width, Height) 
    UpdateLayeredWindow(hwnd1, hdc, PosX, PosY+180, Width, Height)
    Gdip_DeleteFontFamily(hFamily)
    SelectObject(hdc, obm)
    DeleteObject(hbm)
    DeleteDC(hdc)
    Gdip_DeleteGraphics(G)
    return
    
    OverlayUpdate3:
    Gui, Submit, Nohide
    if PlayerRadar = 1
    {
    Straal := (2*150)
    PosCX := PosCX1 - Straal
    PosCY := PosCY1 - Straal 
    Width3 := WidthW, Height3 := HeightH
    Gui, 4:  -Caption +E0x80000 +LastFound +OwnDialogs +Owner +AlwaysOnTop +0x20
    Gui, 4: Show, NA 
    hwnd3 := WinExist()
    hbm3 := CreateDIBSection(Width3, Height3)
    hdc3 := CreateCompatibleDC()
    obm3 := SelectObject(hdc3, hbm3)
    G3 := Gdip_GraphicsFromHDC(hdc3)
    Gdip_SetSmoothingMode(G3, 4)
    pBrush4 := Gdip_BrushCreateSolid(0x11000000)
    pBrush5 := Gdip_BrushCreateSolid(0xFF00FF00)
    Gdip_FillRoundedRectangle(G3, pBrush4, PosCX, PosCY, Straal, Straal, Straal/2)
    Gdip_FillRoundedRectangle(G3, pBrush5, (PosCX+(Straal/2)), (PosCY+(Straal/2)) , 5, 5, 2.5)
    Gdip_DeleteBrush(pBrush4)
    Gdip_DeleteBrush(pBrush5)
    ;pBrush6 := Gdip_BrushCreateSolid(0xFFFF0000)
    Loop, 32
    {
    pBrush6 := Gdip_BrushCreateSolid(RC%A_Index%)
    Gdip_FillRoundedRectangle(G3, pBrush6, xR%A_Index%, yR%A_Index% , 5, 5, 2.5)
    }
    Gdip_DeleteBrush(pBrush6)
    UpdateLayeredWindow(hwnd3, hdc3, 0, 0, Width3, Height3)
    Gdip_DeleteFontFamily(hFamily2)
    SelectObject(hdc3, obm3)
    DeleteObject(hbm3)
    DeleteDC(hdc3)
    Gdip_DeleteGraphics(G3)
    }
    else if PlayerRadar = 0
    {
    	Gui, 4: Destroy
    }
    return
    
    
    Breath:
    if InVehicle = 1
    	return
    if (ActiveSlot Contains 0,9 && Breath = 1)
    {
    	WriteMemory(0x00,BreathControlHandler+0x38,PROGRAM)
    	WriteMemory(0x00,BreathControlHandler+0x3C,PROGRAM)
    	WriteMemory(0x00,BreathControlHandler+0x40,PROGRAM)
    	WriteMemory(0x00,BreathControlHandler+0x44,PROGRAM)
    	WriteMemory(0x00,BreathControlHandler+0x48,PROGRAM)
    	WriteMemory(0x00,BreathControlHandler+0x4C,PROGRAM)
    	WriteMemory(0x00,BreathControlHandler+0x58,PROGRAM)
    }
    else
    	return
    return
    ;--------------------------ESP--------------------------------------------------------------
    
    pData:
    Critical
    Gui, Submit, Nohide
    While (ide < 64)
    	{
    		
    	if ClientHealth < 1
    		ide = 63
    	ide ++
    	pPlayer := Convert(ReadMemory(IdToPlayerMapOffset+(ide * 0x8),PROGRAM),"H")
    	pSoldier := Convert(ReadMemory(pPlayer+0x14D0,PROGRAM),"H")
    	pPlayerTeamID := ReadMemory(pPlayer+0x13cc,PROGRAM)
    if Spotting = 1
    	{
    		if pPlayerTeamID != ClientPlayerTeamID
    		{
    			SpottingTargetComponentData := Convert(ReadMemory(pSoldier+0xBF0,PROGRAM),"H")
    			SpotType := ReadMemory(SpottingTargetComponentData+0x50,PROGRAM)
    			{
    				if (SpotType = 0 && ClientHealth > 0)
    					WriteMemory(0x1,SpottingTargetComponentData+0x50,PROGRAM)
    			}
    		}	
    	}
    IfNotEqual, pPlayerTeamID,  %ClientPlayerTeamID% ; if other team 
        {
    		RColor = 0xFFFF0000
    	}
    	else
    	{
    		RColor = 0xFF0000FF
    	}
    	pHealthComponent := Convert(ReadMemory(pSoldier+0x140,PROGRAM),"H")
    	pHealth := Round(HexToFloat(Convert(ReadMemory(pHealthComponent+0x20,PROGRAM),"H")))
    	if pHealth <= 1
    	{
    		RColor = 0x00000000
    	}
    	pSoldierName := ReadMemoryStr(pPlayer+0x40,PROGRAM)
    	If pSoldierName = %PlayerName%
    	{
    		RColor = 0xFF00FF00
    	}
    	pIsOcluded := ReadMemory(pSoldier+591,PROGRAM)
    	pReplication := Convert(ReadMemory(pSoldier+0x490,PROGRAM),"H")
    	pPositionX := HexToFloat(Convert(ReadMemory(pReplication+0x30,PROGRAM),"H"))
    	pPositionY := HexToFloat(Convert(ReadMemory(pReplication+0x34,PROGRAM),"H"))
    	pPositionZ := HexToFloat(Convert(ReadMemory(pReplication+0x38,PROGRAM),"H"))
    	pVelocityX := HexToFLoat(Convert(ReadMemory(pReplication+0x50,PROGRAM),"H"))
    	pVelocityY := HexToFloat(Convert(ReadMemory(pReplication+0x54,PROGRAM),"H"))
    	pVelocityZ := HexToFloat(Convert(ReadMemory(pReplication+0x58,PROGRAM),"H"))
    	Distance:
    	xD := round(PositionX - pPositionX)	
    	yD := Round(PositionY - pPositionY)
    	zD := Round(PositionZ - pPositionZ)
    	pDistance := Round(sqrt((xD * xD) + (yD * yD) + (zD * zD)))
    	ArrayCount++
    	xD%ArrayCount% := pPositionX
    	yD%ArrayCount% := pPositionY
    	zD%ArrayCount% := pPositionZ
    	A%ArrayCount% := pDistance 
    	B%ArrayCount% := pSoldierName . " " pHealth 
    	C .= A%ArrayCount% ","
    	Ry := positionZ - zD%ArrayCount%
    	Rx := PositionX - xD%ArrayCount%
    	Rz := PositionZ - zD%ArrayCount%
        angleY := -Yaw
    	angleP := -Pitch
    	if pDistance < 150
    	{
    	RC%ArrayCount% := RColor
    	D%ArrayCount% := pDistance
    	xR%ArrayCount% := (Rx*Cos(angleY)-Ry*Sin(angleY))+(PosCX+(Straal/2))
    	yR%ArrayCount% := (Rx*Sin(angleY)+Ry*Cos(angleY))+(PosCY+(Straal/2))
        }	
     }
    Gosub,OverlayUpdate3
    ArrayCount = 0
    ide = 0
    return
    
    InsertionSort(var) {                     ; SORT COMMA SEPARATED LIST
       StringSplit a, var, `,                ; make array, size = a0
       Loop % a0-1 {
          i := A_Index+1, v := a%i%, j := i-1
          While j>0 and a%j%>v
             u := j+1, a%u% := a%j%, j--
          u := j+1, a%u% := v
       }
       Loop % a0                             ; construct string from sorted array
          sorted .= "," . a%A_Index%
       Return SubStr(sorted,2)               ; drop leading comma
    }
    
    Debug:
    ;Gosub,AngleCalc
    ;Tooltip % xD1 "  " yD1 "  " zD1 " X " PositionX "  Y "  PositionY  " Z "  PositionZ " flYaw " flYaw "  flPitch " flPitch ,0,0
    ;tooltip % " yaw "  Yaw " pitch "  Pitch " x "  x  " y " y " z " z " NX " newx " NY " newy " NZ " newz " XF " xFinal " YF " yFinal " ZF " zFinal " SX " screenx1 " SY " screeny1 " W  "  WidthW " H " HeightH ,0,0
    ;Tooltip % pSoldierName " X " screenx1 " Y " screeny1 "  " pIsOcluded,0,0  
    ;Tooltip % "Length R " R  "`n Angle T " Yaw " `n Circle CentreXY " H  "  "  K  " `n X " xR1 " `n Y  " yR1 ,0,0
    ;Tooltip % Rx "  "  Ry  "    "  Rz "    "  xR21 "   " yR21,0,0
    return
    
    
    CalcHorzFOV(FOV)  ;RECOIL
    {
    Pie = 3.14159
    heightFOV = %A_ScreenHeight%
    widthFOV = %A_ScreenWidth%
    vfovDeg := FOV  ;Vertical FOV From PROFSAVE_profile
    Deg2Rad := Round(vfovDeg*(Pie/180),3) ;Converts Deg to Radians
    hfovRad := Round(2*atan(tan(Deg2Rad/2)*widthFOV/heightFOV),3) ;Calc hFOV with vFOV in rad
    Rad2Deg := Round(hfovRad*(180/Pie)) ;Converts Radians back to Deg
    return Rad2Deg
    }	
    
    return
    D2R(Deg) ;Deg2Rad
    {
    Pie = 3.1415926535897932384626433832795
    Rad := (Deg*(Pie/180)) ;Converts Deg to Radians
    return Rad
    }
    
    R2D(Rad) ;Rad2Deg
    {
    Pie = 3.1415926535897932384626433832795
    Deg := (Rad*(180/Pie)) ;Converts Radians back to Deg
    Return Deg
    }
    
    WriteMemory(WVALUE,MADDRESS,PROGRAM) 
    { 
    winget, pid, PID, %PROGRAM% 
    
    ProcessHandle := DllCall("OpenProcess", "int", 2035711, "char", 0, "UInt", PID, "UInt") 
    DllCall("WriteProcessMemory", "UInt", ProcessHandle, "UInt", MADDRESS, "Uint*", WVALUE, "Uint", 4, "Uint *", 0) 
    
    DllCall("CloseHandle", "int", ProcessHandle) 
    return 
    }
    
    HexToFloat(x) {
       Return (1-2*(x>>31)) * (2**((x>>23 & 255)-150)) * (0x800000 | x & 0x7FFFFF)
    }
    
    HexToDouble(x) { ; may be wrong at extreme values
       Return (2*(x>0)-1) * (2**((x>>52 & 0x7FF)-1075)) * (0x10000000000000 | x & 0xFFFFFFFFFFFFF)
    }
    
    FloatToHex(f) {
       form := A_FormatInteger
       SetFormat Integer, HEX
       v := DllCall("MulDiv", Float,f, Int,1, Int,1, UInt)
       SetFormat Integer, %form%
       Return v
    }
    
    DoubleToHex(d) {
       form := A_FormatInteger
       SetFormat Integer, HEX
       v := DllCall("ntdll.dll\RtlLargeIntegerShiftLeft",Double,d, UChar,0, Int64)
       SetFormat Integer, %form%
       Return v
    }
    
    ReadMemory(MADDRESS=0,PROGRAM="",MVALUE="",BYTE=4)
    {
    	Static OLDPROC, ProcessHandle
    	if MVALUE := " " 
    	VarSetCapacity(MVALUE,4,0)
    	If PROGRAM != %OLDPROC%
    	{
    		WinGet, pid, pid, % OLDPROC := PROGRAM
    		ProcessHandle := ( ProcessHandle ? 0*(closed:=DllCall("CloseHandle"
    		,"UInt",ProcessHandle)) : 0 )+(pid ? DllCall("OpenProcess"
    		,"Int",16,"Int",0,"UInt",pid) : 0)
    	}
    	If (ProcessHandle) && DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"str",MVALUE,"UInt",BYTE,"UInt *",0)
    	return *(&MVALUE+3)<<24 | *(&MVALUE+2)<<16 | *(&MVALUE+1)<<8 | *(&MVALUE)
    	return !ProcessHandle ? "Handle Closed: " closed : "Fail"
    }
    
    getProcessBaseAddress(WindowTitle, windowMatchMode := "3")    ;WindowTitle can be anything ahk_exe ahk_class etc
    {
        if (windowMatchMode && A_TitleMatchMode != windowMatchMode)
        {
            mode := A_TitleMatchMode ; This is a string and will not contain the 0x prefix
            StringReplace, windowMatchMode, windowMatchMode, 0x ; remove hex prefix as SetTitleMatchMode will throw a run time error. This will occur if integer mode is set to hex and matchmode param is passed as an number not a string.
            SetTitleMatchMode, %windowMatchMode%    ;mode 3 is an exact match
        }
        WinGet, hWnd, ID, %WindowTitle%
        if mode
            SetTitleMatchMode, %mode%    ; In case executed in autoexec
        if !hWnd
            return ; return blank failed to find window
        return DllCall(A_PtrSize = 4     ; If DLL call fails, returned value will = 0
            ? "GetWindowLong"
            : "GetWindowLongPtr"
            , "Ptr", hWnd, "Int", -6, A_Is64bitOS ? "Int64" : "UInt")  
            ; For the returned value when the OS is 64 bit use Int64 to prevent negative overflow when AHK is 32 bit and target process is 64bit 
            ; however if the OS is 32 bit, must use UInt, otherwise the number will be huge (however it will still work as the lower 4 bytes are correct)      
            ; Note - it's the OS bitness which matters here, not the scripts/AHKs
    }   
    
    ReadMemoryStr(MADDRESS=0, PROGRAM = "", length = 0 , terminator = "")  ; "" = Null
    { 
        Static OLDPROC, ProcessHandle
    
        If (PROGRAM != OLDPROC || !ProcessHandle)
        {
            WinGet, pid, pid, % OLDPROC := PROGRAM
            ProcessHandle := ( ProcessHandle ? 0*(closed:=DllCall("CloseHandle"
            ,"UInt",ProcessHandle)) : 0 )+(pid ? DllCall("OpenProcess"
            ,"Int",16,"Int",0,"UInt",pid) : 0) ;PID is stored in value pid
        }
        ; length depends on the encoding too
        VarSetCapacity(Output, length ? length : 1, 0)
        If !length ; read until terminator found or something goes wrong/error
    	{
            Loop
            { 
                success := DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", MADDRESS++, "str", Output, "Uint", 1, "Uint *", 0) 
                if (ErrorLevel || !success || Output = terminator) 
                    break
                teststr .= Output 
    		} 
    	}		
    	Else ; will read X length
    	{
            DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", MADDRESS, "str", Output, "Uint", length, "Uint *", 0) 
            ;  Loop % length
            ;     teststr .= chr(NumGet(Output, A_Index-1, "Char"))      
            teststr := StrGet(&Output, length, "UTF-8")
    	}
    	return teststr 	 
    }
    
    ;H for Hex D for Dec
    Convert(Number=0, ConvertTo="") {
    	TmpNum := Number
    	Ok := False
    	If TmpNum Is Integer
    		Ok := True
    	Else If TmpNum Is Xdigit
    	{
    		Ok := True
    		TmpNum := "0x" TmpNum
    	} Else If (InStr(TmpNum, "0x"))
    		Ok := True
    	Else
    		Return -1
    	If (Ok)
    		If (ConvertTo = "D" ) {
    			SetFormat Integer, D
    			TmpNum += 0
    			SetFormat Integer, H
    			Return TmpNum
    		} Else If (ConvertTo = "H") {
    			SetFormat Integer, H
    			TmpNum += 0
    			SetFormat Integer, D
    			Return TmpNum
    		} Else
    			Return -2
    	Else
    		Return -3
    }
    
    Loop:
    {
        Base := Convert(getProcessBaseAddress(PROGRAM),"H")
    	GameContext := Convert(ReadMemory(Base+0x24a0c00,PROGRAM),"H")
    	ClientPlayerManager := Convert(ReadMemory(GameContext+0x60,PROGRAM),"H") 
    	idToPlayerMapOffset := Convert(ReadMemory(ClientPlayerManager+0x548,PROGRAM),"H")
    	Angles := Convert(ReadMemory(Base+0x21e3400,PROGRAM),"H")
    	;----------------LocelPlayer--------------------
    	ClientPlayer := Convert(ReadMemory(ClientPlayerManager+0x540,PROGRAM),"H") 
    	ClientSoldier := Convert(ReadMemory(ClientPlayer+0x14d0,PROGRAM),"H")
    	ClientReplication := Convert(ReadMemory(ClientSoldier+0x490,PROGRAM),"H")
    	SoldierWeaponsComponent := Convert(ReadMemory(ClientSoldier+0x570,PROGRAM),"H")
    	breathControlHandler := Convert(ReadMemory(ClientSoldier+0x588,PROGRAM),"H")
    	HealthComponent := Convert(ReadMemory(ClientSoldier+0x140,PROGRAM),"H")
    	ClientHealth := HexToFloat(Convert(ReadMemory(HealthComponent+0x20,PROGRAM),"H"))
    	if ClientHealth < 1
    		return
    	ActiveSlot := Convert(ReadMemory(SoldierWeaponsComponent+0x0a98,PROGRAM),"D")
    	CurrentAnimatedWeaponHandler := Convert(ReadMemory(SoldierWeaponsComponent+0x0890,PROGRAM),"H")
    	ClientSoldierWeapon := ReadMemoryStr(CurrentAnimatedWeaponHandler +(ActiveSlot * 0x8),PROGRAM)
    	CorrectedFiring := Convert(ReadMemory(Angles+0x49c0,PROGRAM),"H")
    	WeaponSway := Convert(ReadMemory(CorrectedFiring+0x78,PROGRAM),"H")
    	WeaponSwayData := Convert(ReadMemory(WeaponSway+0x08,PROGRAM),"H")
    	Vrads := Convert(ReadMemory(WeaponSwayData+0x0430,PROGRAM),"H")
    	Prads := HexToFloat(Convert(ReadMemory(WeaponSwayData+0x0434,PROGRAM),"H"))
    	Vr := HexToFloat(Convert(ReadMemory(WeaponSwayData+0x0438,PROGRAM),"H"))
    	Pr := HexToFloat(Convert(ReadMemory(WeaponSwayData+0x043C,PROGRAM),"H"))
    	;------------PlayerData----------------
    	InVehicle := Convert(ReadMemory(ClientPlayer+0x14c0,PROGRAM),"H")
    	ClientPlayerTeamID := ReadMemory(ClientPlayer+0x13cc,PROGRAM)
    	PlayerName := ReadMemoryStr(ClientPlayer+0x40,PROGRAM)
    	projectilesLoaded := Convert(ReadMemory(CorrectedFiring+0x01a0,PROGRAM),"D")
    	projectilesInMagazines := Convert(ReadMemory(CorrectedFiring+0x01a4,PROGRAM),"D")
    	
    	PositionX := HexToFloat(Convert(ReadMemory(ClientReplication+0x30,PROGRAM),"H"))
    	PositionY := HexToFloat(Convert(ReadMemory(ClientReplication+0x34,PROGRAM),"H")) ;Heigth in map
    	PositionZ := HexToFloat(Convert(ReadMemory(ClientReplication+0x38,PROGRAM),"H"))
    	
    	VelocityX := HexToFloat(Convert(ReadMemory(ClientReplication+0x50,PROGRAM),"H"))
    	VelocityY := HexToFloat(Convert(ReadMemory(ClientReplication+0x54,PROGRAM),"H"))
    	VelocityZ := HexToFloat(Convert(ReadMemory(ClientReplication+0x58,PROGRAM),"H"))
    	
    	Yaw := HexToFloat(Convert(ReadMemory(ClientSoldier+0x4D8,PROGRAM),"H"))
    	Pitch := HexToFloat(Convert(ReadMemory(ClientSoldier+0x4DC,PROGRAM),"H"))
    	CurrentWeaponName := Convert(ReadMemory(CorrectedFiring+0x01c8,PROGRAM),"H")
    	CurrentWeaponName2 := Convert(ReadMemory(CurrentWeaponName+0x0130,PROGRAM),"H")
    	CurrentWeaponName3 := ReadMemoryStr(CurrentWeaponName2+0x0,PROGRAM)
    	Recoil1 := Convert(ReadMemory(WeaponSwayData+0x0440,PROGRAM),"H")
    	Recoil2 := Convert(ReadMemory(WeaponSwayData+0x0444,PROGRAM),"H")
    	;ToolTip %  ClientSoldierWeapon
    }
    return
    Last edited by wyvern1990; 10-18-2015 at 11:25 AM.

  2. The Following User Says Thank You to wyvern1990 For This Useful Post:

    nateX (10-22-2015)

  3. #2
    waynomat's Avatar
    Join Date
    Dec 2012
    Gender
    female
    Posts
    92
    Reputation
    10
    Thanks
    301
    Works awesome (except external radar)....great work!
    +rep

  4. The Following User Says Thank You to waynomat For This Useful Post:

    wyvern1990 (10-18-2015)

  5. #3
    wyvern1990's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    132
    Reputation
    10
    Thanks
    1,845
    Quote Originally Posted by waynomat View Post
    Works awesome (except external radar)....great work!
    +rep
    Need to have GDI+.ahk in same folder.
    Cant it upload it for cut and paste cus file is to big.

  6. #4
    jyystefious's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    Is this PB/FF safe or is there any risks?

  7. #5
    wyvern1990's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    132
    Reputation
    10
    Thanks
    1,845
    Quote Originally Posted by jyystefious View Post
    Is this PB/FF safe or is there any risks?
    If you use Nospread there is FF ban risk (accuaracy status), just dont make every bullet hit target. Or dont put it to zero but .32 (slider)

  8. #6
    jyystefious's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    ok, thanks

  9. #7
    waynomat's Avatar
    Join Date
    Dec 2012
    Gender
    female
    Posts
    92
    Reputation
    10
    Thanks
    301
    awesome wyvern, best ahk script i have ever seen!
    Radar works now too

    I have two suggestions:
    1. would it be possible to make the script save the settings? So we dont need to make the adjustments over and over again.
    If not, it would be cool if you could comment the lines to change in the script, i.e. to let the radar draw at a specific location. I tried to change the position by changing x/y values, but right after start it just resets to default position (to the right).
    I like using the radar over the minimap to the lower left (especially for hardcore)

    2. pls remove own team from radar (blue dots)

    Again: its already awesome
    Last edited by waynomat; 10-18-2015 at 03:35 PM.

  10. #8
    jyystefious's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0

    Cheat help

    ughh, need a bit help as im new to using autohotkey overall
    Which one of the AHk files do i need to run and if anyones up
    i just need quick instructions how to use the cheat
    have tried but cant get to work :P

    cheers guys

  11. #9
    wyvern1990's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    132
    Reputation
    10
    Thanks
    1,845
    Quote Originally Posted by waynomat View Post
    awesome wyvern, best ahk script i have ever seen!
    Radar works now too

    Would it be possible to make the script save the settings? So we dont need to make the adjustments over and over again.
    If not, it would be cool if you could comment the lines to change in the script, i.e. to let the radar draw at a specific location. I tried to change the position by changing x/y values, but right after start it just resets to default position (to the right).
    I like using the radar over the minimap to the lower left (especially for hardcore)

    Again: its already awesome
    Ill look into it, already thought of it myself. But want to keep it as basic as possible. You dont happen tot be good in triangle calculations? Planning tot make an external ESP, but the mathmatics give me headache.
    Thanks for your positieve feedback!

  12. #10
    Paralyze's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    The Netherlands
    Posts
    5,809
    Reputation
    1395
    Thanks
    1,357
    Quote Originally Posted by wyvern1990 View Post
    positieve feedback!
    Very positieve

    And I have a question, why don't you make an .exe from this instead of just posting the code? Don't have any knowledge of ahk and stuff
    Last edited by Paralyze; 10-18-2015 at 03:43 PM.
    Member: December 24th, 2012
    Donator: January 4th, 2013
    Editor: January 19th, 2013 - August 17th, 2013
    Battlefield Minion: March 7th, 2013 - September 22nd, 2013
    Former Staff: September 22nd, 2013 - January 21st, 2014
    Battlefield Minion: January 21st, 2014 - May 5th, 2014
    Titanfall Minion: February 25th, 2014 - May 5th, 2014
    Former Staff: May 5th, 2014 - October 10th, 2015
    Battlefield Minion: October 10th, 2015 - Current
    Call of Duty Minion: March 4th, 2016 - Current

  13. #11
    waynomat's Avatar
    Join Date
    Dec 2012
    Gender
    female
    Posts
    92
    Reputation
    10
    Thanks
    301
    Quote Originally Posted by Paralyze View Post


    Very positieve

    And I have a question, why don't you make an .exe from this instead of just posting the code? Don't have any knowledge of ahk and stuff
    This way you can easily change code and have a unique hack - so posting the source is the best way there is. you can create an exe by yourself if you want to.

    How to use:
    1. create a file with the extension .ahk (like "Ilikeit.ahk") with a texteditor and paste the code inside - save the file.
    2. easy way: just install autohotkey (visit their homepage). All you have to do to start the script is to doubleclick the file you created.
    portable way: if you downloaded only the binary files of autohotkey, doubleclick your file and let windows ask for the program to open it with, and tell it to always use autohotkey.exe


    @wyvern1990
    one more nice thing is an option to increase RPM, heres the code from c++, you only need to recode it for ahk:
    if (m.Read(0x1421e3400)->r(0x49c0)->r(0x128)->r(0x10))
    {
    m.Write<float>(0x01C8, 1200.0f); // or 1500 or 2000 RPM
    m.Write<float>(0x168 + 0x60, 1200.0f); // Float m_RateOfFire
    m.Write<float>(0x168 + 0x64, 1200.0f); // Float m_RateOfFireForBurst

    hope you can get it working (works awesome for supporter lmgs, like m240b and all single fire weapons - like pistols, dmrs AND shotguns )

    btw, dont waste (too much) time for esp - especially if you want to keep it basic. Theres already a lot of ESPs around, but they usually miss the core features like norecoil, nospread, radar and high rpm - so this is the niche to get in
    Last edited by waynomat; 10-18-2015 at 04:13 PM.

  14. The Following User Says Thank You to waynomat For This Useful Post:

    [MPGH]Paralyze (10-18-2015)

  15. #12
    wyvern1990's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    132
    Reputation
    10
    Thanks
    1,845
    Quote Originally Posted by waynomat View Post
    awesome wyvern, best ahk script i have ever seen!
    Radar works now too

    I have two suggestions:
    1. would it be possible to make the script save the settings? So we dont need to make the adjustments over and over again.
    If not, it would be cool if you could comment the lines to change in the script, i.e. to let the radar draw at a specific location. I tried to change the position by changing x/y values, but right after start it just resets to default position (to the right).
    I like using the radar over the minimap to the lower left (especially for hardcore)

    2. pls remove own team from radar (blue dots)

    Again: its already awesome
    Quote Originally Posted by waynomat View Post
    This way you can easily change code and have a unique hack - so posting the source is the best way there is. you can create an exe by yourself if you want to.

    How to use:
    1. create a file with the extension .ahk (like "Ilikeit.ahk") with a texteditor and paste the code inside - save the file.
    2. easy way: just install autohotkey (visit their homepage). All you have to do to start the script is to doubleclick the file you created.
    portable way: if you downloaded only the binary files of autohotkey, doubleclick your file and let windows ask for the program to open it with, and tell it to always use autohotkey.exe


    @wyvern1990
    one more nice thing is an option to increase RPM, heres the code from c++, you only need to recode it for ahk:
    if (m.Read(0x1421e3400)->r(0x49c0)->r(0x128)->r(0x10))
    {
    m.Write<float>(0x01C8, 1200.0f); // or 1500 or 2000 RPM
    m.Write<float>(0x168 + 0x60, 1200.0f); // Float m_RateOfFire
    m.Write<float>(0x168 + 0x64, 1200.0f); // Float m_RateOfFireForBurst

    hope you can get it working (works awesome for supporter lmgs, like m240b and all single fire weapons - like pistols, dmrs AND shotguns )

    btw, dont waste (too much) time for esp - especially if you want to keep it basic. Theres already a lot of ESPs around, but they usually miss the core features like norecoil, nospread, radar and high rpm - so this is the niche to get in
    You van make adjustments in de Gui,add,.... Section. After the "slider" you see 540 and 1920(in pixels), change those to the position to start from.
    Saw the offsets, but couldnt retrace them in cheat engine (test range) or ReClass. Will definatly look into them when i get the chance D most of the offsets i "stole" from other threads. As i have no clue hoe to reverse-engineer code with ida.
    Last edited by wyvern1990; 10-18-2015 at 05:36 PM.

  16. #13
    Scarko's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    How can I trun off/on recoil? Do I change the 0 to a 1? Srry im just new to hacking

  17. #14
    camodz11's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    44
    Reputation
    10
    Thanks
    0
    My Mood
    Amused
    It would be better with exe but i have no clue how to use source code any help

    - - - Updated - - -

    Quote Originally Posted by Paralyze View Post


    Very positieve

    And I have a question, why don't you make an .exe from this instead of just posting the code? Don't have any knowledge of ahk and stuff
    Agreed i dont even know how to use source code

  18. #15
    waynomat's Avatar
    Join Date
    Dec 2012
    Gender
    female
    Posts
    92
    Reputation
    10
    Thanks
    301
    Quote Originally Posted by wyvern1990 View Post
    You van make adjustments in de Gui,add,.... Section. After the "slider" you see 540 and 1920(in pixels), change those to the position to start from.
    Bingo, thnx I changed the wrong values (at the beginning of the script), and obviously, they instantly get overwritten bei the slider-values
    Looking forward to rpm feature *G*


    Quote Originally Posted by camodz11 View Post
    It would be better with exe but i have no clue how to use source code any help

    - - - Updated - - -
    Agreed i dont even know how to use source code
    Pls don´t spam questions that have already been asked AND answered - see my post #11

Page 1 of 3 123 LastLast

Similar Threads

  1. [Detected] BFH - Simple NoRecoil & NoSpread & NoBreath
    By Marcelis02 in forum Battlefield Hardline Hacks & Cheats
    Replies: 12
    Last Post: 05-24-2016, 02:21 AM
  2. [Source Code] BFH - Simple NoRecoil & NoSpread & NoBreath (c++)
    By Marcelis02 in forum Battlefield Hardline Hacks & Cheats
    Replies: 11
    Last Post: 04-24-2016, 05:02 AM
  3. [Detected] Battlefield 4 External NoRecoil + NoSpread + NoBreath!
    By ZusCoo in forum Battlefield 4 Hacks & Cheats
    Replies: 10
    Last Post: 02-25-2014, 08:26 AM
  4. [Patched] Battlefield 4 External NoRecoil + NoSpread + NoBreath
    By Mareek89 in forum Battlefield 4 Hacks & Cheats
    Replies: 78
    Last Post: 01-30-2014, 11:59 AM
  5. [Outdated] Battlefield 4 External NoRecoil + NoSpread + NoBreath
    By Veritas in forum Battlefield 4 Hacks & Cheats
    Replies: 79
    Last Post: 01-14-2014, 08:10 AM