Page 1 of 3 123 LastLast
Results 1 to 15 of 39
  1. #1
    wyvern1990's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    137
    Reputation
    10
    Thanks
    2,817

    Exclamation NoRecoil,NoSpread,MinimapSpotting,ExternalRadar,No Breath,MuzzleVel,ROF,NoGravity

    So, New version with added functionality.
    Updated to latest Patch 27-10-2015.

    Download AHK(AutoHotKey) install as X64.
    Copy Paste code And save with extension as .ahk
    Run game in windowedBorderless, When game is active, run script.
    Press NUMPAD0 (zero) to show menu, click on gamewindow to make it go away(Change focus)

    You also need GDI+.ahk library wich can be found here: https://www.mpgh.net/forum/showthread.php?t=1005336
    And put it in the same folder as the script.

    If you like my work, and want to buy me a beer
    https://www.paypal.com/cgi-bin/websc...=CBU4ECL2VWFJY

    BF4.Ahk


    ONLY TESTED 2 ROUNDS ON TDM 24PLAYER SERVER.

    V4.5
    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
    MaxROF = 2000
    MaxVel = 10000
    IniRead,NoSpread,Settings.dfd,Settings,Spread,100
    NoSpreadOld := NoSpread + 2
    IniRead,NoRecoil,Settings.dfd,Settings,Recoil,0
    IniRead,Overlay,Settings.dfd,Settings,Overlay,0
    IniRead,Breath,Settings.dfd,Settings,Breath,0
    IniRead,Spotting,Settings.dfd,Settings,Spotting,0
    IniRead,PlayerRadar,Settings.dfd,Settings,PlayerRadar,0
    IniRead,showTeam,Settings.dfd,Settings,ShowTeam,0
    IniRead,PosCX1,Settings.dfd,Settings,PosCX1,1920
    IniRead,PosCY1,Settings.dfd,Settings,PosCY1,540
    IniRead,ROFAuto,Settings.dfd,Settings,ROFAuto,0
    IniRead,Auto,Settings.dfd,Settings,Auto,%A_Space%
    IniRead,GravitySet,Settings.dfd,Settings,Gravity,0
    IniRead,MuzzleVel,Settings.dfd,Settings,MuzzleSet,0
    iniRead,MuzzleV,Settings.dfd,Settings,MuzzleVelocity
    
    Process,Priority,,H
    
    ;Type---------------
    PROGRAM = Battlefield 4
    Settimer,Base,10
    Settimer,pData,10
    Settimer, WindowXY,100
    Settimer, Spread,300
    Settimer, Recoil,300
    Settimer, MuzzleVelocitySetting,300
    Settimer, ROFSetting,300
    Settimer, GravitySetting,300
    ;Settimer, Debug, 10
    Settimer,Breath,300
    Settimer, SaveSettings,5000
    Settimer,Overlay,300
    
    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():
    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 ,%NoSpread%
    
    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,MiniMap 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 gpData
    
    Gui, Add, Text ,x10 y130 w120 H30,ShowTeam
    Gui, Add, CheckBox,x120 y130 Checked%ShowTeam% vShowTeam gpData
    
    Gui, Add, Text,x10 y150 W120 H30,HorzPos
    Gui, Add, Slider,x120 y150 w50 h20 Center NoTicks range0-%A_ScreenWidth% vPosCX1 gpData,%PosCX1%
    
    Gui, Add, Text,x10 y170 W120 H30,VertPos
    Gui, Add, Slider,x120 y170 w50 h20 Center NoTicks range0-%A_ScreenHeight% vPosCY1 gpData,%PosCY1%
    
    Gui, Add, Text, x10 y190 w110 h20 vRPMAuto,ROF %Auto%
    Gui, Add, CheckBox,x120 y190  h15 w15 Checked%ROFAuto% vROFAuto 
    Gui, Add, Slider,x140 y190 w50 h20 Center NoTicks range0-%MaxROF% vAuto, %Auto%
    
    Gui, Add, text,x10 y210 w110 h20,NoGravity
    Gui, Add, CheckBox,x120 y210 h15 w15 Checked%GravitySet% vGravitySet ; gRecoil
    
    Gui, Add, Text,x10 y230 w110 h20 vMuzzleText,Vel %MuzzleV%
    Gui, Add, CheckBox,x120 y230  h15 w15 Checked%MuzzleVel% vMuzzleVel 
    Gui, Add, Slider,x140 y230 w50 h20 Center NoTicks range0-%MaxVel% vMuzzleV, %MuzzleV%
    
    Gui, Show, NA x%PosX% y%PosY%,Gui77
    WinSet, TransColor,FA0000, Gui77
    }
    return
    
    
    ~Numpad0::
    IfWinNotActive,Gui77
    {
    	WinGetPos,Xpos, YPos,WidthW,HeightH,Battlefield 4
        PosX := XPos, PosY := YPos
    	Gui, Show,x%PosX% y%PosY%,Gui77
    	WinMove,Gui77,,PosX,PosY
    }
    return
    
    WindowXY:
    WinGetPos,Xpos, YPos,WidthW,HeightH,Battlefield 4
    IfWinNotActive,Gui77
    	Gui,Hide
    IfWinNotExist,Battlefield 4
    {
    	FileDelete,%A_WorkingDir%\Backup.dfd
    	ExitApp
    }
    return
    
    Spread:
    Gui, Submit, Nohide
    if Done = 1
    {
    NoSpreadDec := Round(NoSpread/100,3)
    VarHex := FloatToHex(NoSpreadDec)
    StringTrimRight,NoSpreadDec,NoSpreadDec,1
    GuiControl,,NSpread,Spread %NoSpreadDec%
    	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:
    if Done = 1
    {
    Gui, Submit, Nohide
    if NoRecoil = 1
    	{
    		;if (Recoil1 = FloatToHex(100)) && (Recoil2 = FloatToHex(0))
    		;	return
    		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(FloatToHex(100),WeaponSwayData+0x0440,PROGRAM)
    			WriteMemory(FloatToHex(0),WeaponSwayData+0x0444,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
    ;	if (Recoil1 = Recoil1Ret) && (Recoil2 = Recoil2Ret)
    	;	return
    		WriteMemory(Recoil1Ret,WeaponSwayData+0x0440,PROGRAM)
    		WriteMemory(Recoil2Ret,WeaponSwayData+0x0444,PROGRAM)
    	    }
    	}
    }
    return
    
    
    ROFSetting:
    if Done = 1
    {
    Gui, Submit, Nohide
    if ROFAuto = 1
    	{
    		iniRead,ROF,Backup.dfd,%CurrentWeaponName3%,ROFAuto
    		if ROF = ERROR
    		{
    			IniWrite,%ClientROFAuto%,Backup.dfd,%CurrentWeaponName3%,ROFAuto
    			IniWrite,%ClientROFBurst%,Backup.dfd,%CurrentWeaponName3%,ROFBurst
    		}
    		else
    		{
    			RPM1 := Auto
    			VarHexRPM1 := FloatToHex(Auto)
    			GuiControl,,RPMAuto,ROF %Auto%
    		;	if (ClientROFAuto = HexToFloat(VarHexRPM1))
    		;		return
    			WriteMemory(VarHexRPM1,FiringFunctionData+0x1c8,PROGRAM)
    			WriteMemory(VarHexRPM1,FiringFunctionData+0x1cc,PROGRAM)
    		}
    }
    	
    if ROFAuto = 0
    	{
    		iniRead,ROF,Backup.dfd,%CurrentWeaponName3%,ROFAuto
    		if ROF != ERROR
    		{
    			IniRead,BackupROFAuto,Backup.dfd,%CurrentWeaponName3%,ROFAuto
    			IniRead,BackupROFBurst,Backup.dfd,%CurrentWeaponName3%,ROFBurst
    			VarHexRPM3 := BackupROFAuto
    			VarHexRPM4 := BackupROFBurst
    			GuiControl,,RPMAuto,ROF %BackupROFAuto%
    		;	if (ClientROFAuto = HexToFloat(VarHexRPM3))
    		;		return
    			WriteMemory(FloatToHex(VarHexRPM3),FiringFunctionData+0x1c8,PROGRAM)
    			WriteMemory(FloatToHex(VarHexRPM4),FiringFunctionData+0x1cc,PROGRAM)
    		}
    	}
    }
    return
    
    GravitySetting:
    if Done = 1
    {
    if GravitySet = 1
    	{
    		iniRead,GravityBackup,Backup.dfd,%CurrentWeaponName3%,Gravity
    		if GravityBackup = ERROR
    		{
    			IniWrite,%Gravity%,Backup.dfd,%CurrentWeaponName3%,Gravity
    		}
    		else 
    		{
    			if (Gravity = 0)
    				return
    			WriteMemory(FloatToHex(0),BulletEntityData+0x130,PROGRAM)	
    		}
    	}
    	
    if GravitySet = 0
    	{
    		iniRead,GravityBackup,Backup.dfd,%CurrentWeaponName3%,Gravity
    		if GravityBackup != ERROR
    		{
    			VarHexGr := FloatToHex(GravityBackup)
    			if (Gravity = GravityBackup)
    				return
    			WriteMemory(VarHexGr,BulletEntityData+0x130,PROGRAM)
    		}
    	}
    }
    return
    
    MuzzleVelocitySetting:
    if Done = 1
    {
    Gui, Submit, Nohide
    if MuzzleVel = 1 
    	{
    		iniRead,MuzzleBackup,Backup.dfd,%CurrentWeaponName3%,MuzzleVelocity
    		if MuzzleBackup = ERROR
    		{
    			IniWrite,%MuzzleVelo%,Backup.dfd,%CurrentWeaponName3%,MuzzleVelocity
    		}
    		else
    		{
    			GuiControl,,MuzzleText,Vel %MuzzleV%
    		;	if (MuzzleVelo = HexToFloat(FloatToHex(MuzzleV))) 
    		;		return
    			WriteMemory(FloatToHex(MuzzleV),FiringFunctionData+0x88,PROGRAM)
    		}
    }
    	
    if MuzzleVel = 0
    	{
    		iniRead,MuzzleBackup,Backup.dfd,%CurrentWeaponName3%,MuzzleVelocity
    		if MuzzleBackup != ERROR
    		{
    			GuiControl,,MuzzleText,Vel %MuzzleBackup%
    			VarHexVel := FloatToHex(MuzzleBackup)
    		;	if (MuzzleVelo = MuzzleBackup) 
    		;		return
    			WriteMemory(VarHexVel,FiringFunctionData+0x88,PROGRAM)
    		}
    	}
    }
    return
    
    Overlay:
    if Overlay = 1
    {
    Settimer, OverlayUpdate,1 
    }
    if Overlay = 0
    {
    	Settimer, OverlayUpdate, Off
    	Gui,2: Destroy
    }
    return
    
    OverlayUpdate:
    projectilesLoaded := Convert(ReadMemory(CorrectedFiring+0x01a0,PROGRAM),"D")
    projectilesInMagazines := Convert(ReadMemory(CorrectedFiring+0x01a4,PROGRAM),"D")
    SendText := Round(HexToFloat(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
    
    Breath:
    if Breath = 1
    {
    if InVehicle = 1
    	return
    if Done = 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
    
    pData:
    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)
    }
    While (ide < 63)
    	{
    	if ClientHealth < 1
    		continue
    	ide ++
    	IdToPlayerMapOffset := Convert(ReadMemory(ClientPlayerManager+0x548,PROGRAM),"H")
    	pPlayer := Convert(ReadMemory(IdToPlayerMapOffset+(ide * 0x8),PROGRAM),"H")
    	pSoldier := Convert(ReadMemory(pPlayer+0x14D0,PROGRAM),"H")
    	pPlayerTeamID := ReadMemory(pPlayer+0x13cc,PROGRAM)
    	;pIsOcluded := ReadMemory(pSoldier+591,PROGRAM)
    	pReplication := Convert(ReadMemory(pSoldier+0x490,PROGRAM),"H")
    	pHealthComponent := Convert(ReadMemory(pSoldier+0x140,PROGRAM),"H")
    	pHealth := Round(HexToFloat(Convert(ReadMemory(pHealthComponent+0x20,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"))
    	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"))
    	Yaw := HexToFloat(Convert(ReadMemory(ClientSoldier+0x4D8,PROGRAM),"H"))
    	;PlayerName := ReadMemoryStr(ClientPlayer+0x40,PROGRAM)
    	pSoldierName := ReadMemoryStr(pPlayer+0x40,PROGRAM)
        angle := -Yaw
    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)
    		}	
    	}
    if PlayerRadar = 1
    {	
    IfNotEqual, pPlayerTeamID,  %ClientPlayerTeamID% ; if other team 
        {
    		RColor = 0xFFFF0000
    	}
    	else
    	{
    		if ShowTeam = 1
    			RColor = 0xFF0000FF
    		else
    			RColor = 0x00000000
    	}
    	if pHealth <= 1
    	{
    		RColor = 0x00000000
    	}
    	Distance:
    	xD := Round(PositionX - pPositionX)	
    	yD := Round(PositionY - pPositionY)
    	zD := Round(PositionZ - pPositionZ)
    	pDistance := Round(sqrt((xD * xD) + (yD * yD) + (zD * zD)))
    	ArrayCount++
    	RC%ArrayCount% := RColor
    	xD%ArrayCount% := pPositionX
    	yD%ArrayCount% := pPositionY
    	zD%ArrayCount% := pPositionZ
    	A%ArrayCount% := pDistance 
    	Ry := positionZ - zD%ArrayCount%
    	Rx := PositionX - xD%ArrayCount%
    	if (pDistance < 150)
    		{
    			if (pDistance = 0)
    				continue
    		xR%ArrayCount% := (Rx*Cos(angle)-Ry*Sin(angle))+(PosCX+(Straal/2))
    		yR%ArrayCount% := (Rx*Sin(angle)+Ry*Cos(angle))+(PosCY+(Straal/2))
    		pBrush6 := Gdip_BrushCreateSolid(RC%ArrayCount%)
    		Gdip_FillRoundedRectangle(G3, pBrush6, xR%ArrayCount%, yR%ArrayCount% , 5, 5, 2.5)
    		Gdip_DeleteBrush(pBrush6)
    		}
    	} 
    }	;End While Loop
    if PlayerRadar = 1
    {
    UpdateLayeredWindow(hwnd3, hdc3, 0, 0, Width3, Height3)
    SelectObject(hdc3, obm3)
    DeleteObject(hbm3)
    DeleteDC(hdc3)
    Gdip_DeleteGraphics(G3)
    }
    if PlayerRadar = 0
    {
    	Gui, 4: Destroy
    }
    ArrayCount = 0
    ide = 0
    return
    
    Base:
    IfWinActive,Battlefield 4
    {
        Base := Convert(getProcessBaseAddress(PROGRAM),"H")
    	GameContext := Convert(ReadMemory(Base+0x24a0e88,PROGRAM),"H")
    	ClientPlayerManager := Convert(ReadMemory(GameContext+0x60,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 := Convert(ReadMemory(HealthComponent+0x20,PROGRAM),"H")
    	PlayerName := ReadMemoryStr(ClientPlayer+0x40,PROGRAM)
    	ClientPlayerTeamID := ReadMemory(ClientPlayer+0x13cc,PROGRAM)
    	cActiveSlot := Convert(ReadMemory(SoldierWeaponsComponent+0x0a98,PROGRAM),"H")
    	ActiveSlot := cActiveSlot+2
    	Done :=  ActiveSlot = 2 OR ActiveSlot = 3 OR ActiveSlot = 11
    	InVehicle := Convert(ReadMemory(ClientPlayer+0x14c0,PROGRAM),"H")
    	
    	Angles := Convert(ReadMemory(Base+0x21c7e20,PROGRAM),"H")
    	CorrectedFiring := Convert(ReadMemory(Angles+0x49c0,PROGRAM),"H")
    	CurrentWeaponName := Convert(ReadMemory(CorrectedFiring+0x01c8,PROGRAM),"H")
    	PrimaryFire := 	Convert(ReadMemory(CorrectedFiring+0x0128,PROGRAM),"H")
    	WeaponSway := Convert(ReadMemory(CorrectedFiring+0x0078,PROGRAM),"H")
    	WeaponSwayData := Convert(ReadMemory(WeaponSway+0x0008,PROGRAM),"H")
    	SpreadBase := Round(HexToFLoat(Convert(ReadMemory(WeaponSwayData+0x0430,PROGRAM),"H"))*100)
    	Recoil1 := Convert(ReadMemory(WeaponSwayData+0x0440,PROGRAM),"H")
    	Recoil2 := Convert(ReadMemory(WeaponSwayData+0x0444,PROGRAM),"H")
    	FiringFunctionData := Convert(ReadMemory(PrimaryFire+0x0010,PROGRAM),"H")
    	MuzzleVelo := HexToFloat(Convert(ReadMemory(FiringFunctionData+0x0088,PROGRAM),"H"))
    	BulletEntityData := Convert(ReadMemory(FiringFunctionData+0x00B0,PROGRAM),"H")
    	Gravity := HexToFloat(Convert(ReadMemory(BulletEntityData+0x0130,PROGRAM),"H"))
    	ClientROFAuto := HexToFloat(Convert(ReadMemory(FiringFunctionData+0x1c8,PROGRAM),"H"))
    	ClientROFBurst := HexToFloat(Convert(ReadMemory(FiringFunctionData+0x1cc,PROGRAM),"H"))
    	CurrentWeaponName2 := Convert(ReadMemory(CurrentWeaponName+0x130,PROGRAM),"H")
    	CurrentWeaponName3 := ReadMemoryStr(CurrentWeaponName2+0x0,PROGRAM)
    	
    	MuzzleVelocity := HexToFLoat(Convert(ReadMemory(FiringFunctionData+0x88,PROGRAM),"H"))
    	ROFSettings := HexToFloat(Convert(ReadMemory(FiringFunctionData+0x1c8,PROGRAM),"H"))
    	SpreadBase := HexToFloat(Convert(ReadMemory(WeaponSwayData+0x0430,PROGRAM),"H"))
    }
    return
    
    
    Debug:
    ;MuzzleVelocity := HexToFLoat(Convert(ReadMemory(FiringFunctionData+0x88,PROGRAM),"H"))
    ;ROFSettings := HexToFloat(Convert(ReadMemory(FiringFunctionData+0x1c8,PROGRAM),"H"))
    ;SpreadBase := HexToFloat(Convert(ReadMemory(WeaponSwayData+0x0430,PROGRAM),"H"))
    Tooltip %  "Done = " Done " Gravity = " Gravity "  " CurrentWeaponName3 "   " SpreadBase " " ROFSettings "  " MuzzleVelocity " Error = " A_LastError "  " InVehicle ,500,0
    return
    
    
    
    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) 
    
    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="4",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",24,"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
    }
    
    
    ;NoSpread = 0x3F800000
    ;NoRecoil = 0
    ;Overlay = 0
    ;Breath = 0
    ;Spotting = 0
    ;PlayerRadar = 0
    ;ShowTeam = 0
    ;PosCX1 = 1920 
    ;PosCY1 = 540
    
    SaveSettings:
    IniWrite,%NoSpread%,Settings.dfd,Settings,Spread
    IniWrite,%NoRecoil%,Settings.dfd,Settings,Recoil
    IniWrite,%Overlay%,Settings.dfd,Settings,Overlay
    IniWrite,%Breath%,Settings.dfd,Settings,Breath
    IniWrite,%Spotting%,Settings.dfd,Settings,Spotting
    IniWrite,%PlayerRadar%,Settings.dfd,Settings,PlayerRadar
    IniWrite,%ShowTeam%,Settings.dfd,Settings,ShowTeam
    IniWrite,%PosCX1%,Settings.dfd,Settings,PosCX1
    IniWrite,%PosCY1%,Settings.dfd,Settings,PosCY1
    iniWrite,%ROFAuto%,Settings.dfd,Settings,ROFAuto
    IniWrite,%Auto%,Settings.dfd,Settings,Auto
    IniWrite,%GravitySet%,Settings.dfd,Settings,Gravity
    iniWrite,%MuzzleVel%,Settings.dfd,Settings,MuzzleSet
    iniWrite,%MuzzleV%,Settings.dfd,Settings,MuzzleVelocity
    return
    Last edited by Paralyze; 10-29-2015 at 03:42 PM. Reason: UPDATED TO V4.5

  2. The Following 8 Users Say Thank You to wyvern1990 For This Useful Post:

    dayang315 (10-29-2015),eike88 (10-30-2015),eminemlover (10-28-2015),nateX (10-27-2015),OO893DD (10-27-2015),sarsukatel (10-28-2015),xbie84 (10-27-2015),zldestroid (10-27-2015)

  3. #2
    xbie84's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    Awesome. Will try it any minute now when BF4 is back up. Thanks!

  4. #3
    bootst's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    PBScreens will take a screenshot of this?

  5. #4
    wyvern1990's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    137
    Reputation
    10
    Thanks
    2,817
    Not Sure, Doesnt draw things in game.

  6. #5
    dawind's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    hmm just to inform u Wyvern the script is not reacting to any order ingame ,, so when i try to change spread or any other value it keep the number of old spread while moving the spread bar ,, feels like the game is not reacting anymore ingame , and the script isnt working

  7. #6
    poip0i101's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    also enemies and allies are the same color in the optional radar. a bit confusing.

  8. #7
    wyvern1990's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    137
    Reputation
    10
    Thanks
    2,817
    Quote Originally Posted by dawind View Post
    hmm just to inform u Wyvern the script is not reacting to any order ingame ,, so when i try to change spread or any other value it keep the number of old spread while moving the spread bar ,, feels like the game is not reacting anymore ingame , and the script isnt working
    noticed it to, changed it, seems like that change messed it up (writing to memory only when value changes in GUI)


    also enemies and allies are the same color in the optional radar. a bit confusing.
    working on that to.
    Last edited by wyvern1990; 10-27-2015 at 08:57 AM.

  9. #8
    dawind's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    it just works now dunno why also

  10. #9
    wyvern1990's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    137
    Reputation
    10
    Thanks
    2,817
    Sometimes it does and sometimes it doesn't. Seems like you have to respawn? 1 or 2 times before it works again. Anyway, i deleted the double checks. And radar shows now the good team and enemy colors. Updated the Thread!
    Last edited by wyvern1990; 10-27-2015 at 10:27 AM.

  11. #10
    nateX's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    My Mood
    Tired
    I used it got a crash randomly, it was working great though earlier.

    Only used no recoil , spread and minimap spotting.
    Last edited by nateX; 10-27-2015 at 01:37 PM.

  12. #11
    poip0i101's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    dude its so buggy.. the radar, granted the enemy colors are fixed, only works for about 3 respawns then doesnt work for the entire game. even the recoil doesn't work anymore after a few respawns. ending the process in the task manager and restarting the script doesn't help. thought you should know

  13. #12
    wyvern1990's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    137
    Reputation
    10
    Thanks
    2,817
    i am aware of the problems, and trying to fix them asap. I also find it a hit and miss, no matter what i do or change.
    Sometimes when changing weapon norecoil doesnt carry over, and then after a respawn it does.

    Im also a bit at a loss here....

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

    OO893DD (10-27-2015)

  15. #13
    sidekick_nl's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0
    Can u make a step-by-step how to install and start using it? Thanks

    Nevermind, got it working. Any possibility to build in ESP?
    Last edited by sidekick_nl; 10-27-2015 at 02:28 PM.

  16. #14
    nateX's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    My Mood
    Tired
    It works fine now. i had no breath enabled and didn't notice, it didnt seem to work when it was enabled. maybe the issue is there not sure.

  17. #15
    zldestroid's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    video tutorial,pleeeeeeeees !!!

Page 1 of 3 123 LastLast

Similar Threads

  1. [Request] Norecoil/nospread
    By JoshJay in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 5
    Last Post: 08-19-2012, 07:58 PM
  2. CA NA Weapon Spawner/Aimbot/NoRecoil/NoSpread/Glitcher/Anti-Kick
    By typhoonboi in forum Combat Arms Hack Requests
    Replies: 1
    Last Post: 07-23-2012, 11:36 PM
  3. [Request] Need PlayerPointer,ServerPointer,NoRecoil,NoSpread Addies and Offset
    By gbjhet23 in forum WarRock Philippines Hacks
    Replies: 3
    Last Post: 08-05-2011, 03:55 AM
  4. [Info] interesting for norecoil/nospread
    By DOOP in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 5
    Last Post: 06-22-2011, 04:56 AM
  5. norecoil nospread?
    By falzarex in forum C++/C Programming
    Replies: 9
    Last Post: 01-07-2010, 06:56 PM