VividSynergy
Banned
+6|6002|Bolingbrook, United States
In my opinion, the ultimate update to a program like this would be if it automatically changed your User Settings based on ping, without lagging your computer and disrupting gameplay.
hiberNative
7.62x54R
+21|6008|sweden

Delusion wrote:

almost finished...thats how my version looks right now :

http://img244.imageshack.us/img244/3849/46777625we2.png

http://img176.imageshack.us/img176/3523/94724225ab0.png
it will be ready in a few days after i fix some bugs and think of some more stuff to add/change
awesome. will get.
can you incorporate your avatar in the finished product? <3
Tompie913
I like Chinese
+12|6597|Pittsburgh, PA
I get a Trojan alert from McAfee whenever I try to download it
Delusion
AK Hero
+26|5986|Greece / Rhodos

VividSynergy wrote:

In my opinion, the ultimate update to a program like this would be if it automatically changed your User Settings based on ping, without lagging your computer and disrupting gameplay.
not really possible

hiberNative wrote:

Delusion wrote:

almost finished...thats how my version looks right now :

http://img244.imageshack.us/img244/3849/46777625we2.png

http://img176.imageshack.us/img176/3523/94724225ab0.png
it will be ready in a few days after i fix some bugs and think of some more stuff to add/change
awesome. will get.
can you incorporate your avatar in the finished product? <3
i actually thought about it..but then again i want to keep the gui small and simple
Delusion
AK Hero
+26|5986|Greece / Rhodos
its finished for now :
but im sure i will find something to update/change sooner or later

https://img176.imageshack.us/img176/3523/94724225ab0.png

Code:

/*
======================================================
Battlefield 2 HitReg Fixer 
by Delusion

Original Idea by DupaUnit on bf2s.con : 
http://forums.bf2s.com/viewtopic.php?id=104544
======================================================
*/

SendMode Input 
#Persistent
#NoEnv 
#SingleInstance force
#InstallKeybdHook

programName=BF2 HitFixer
version=v1.6
helpguiname=Help

GoSub CreateIni
GoSub ReadIni
GoSub GGui

/*
======================================================
Hotkeys
======================================================
*/

HotKey ~%v_HitFix%, Hitregfix, On UseErrorLevel
HotKey ~%v_PlayerCount%, PlayerCount, On UseErrorLevel
HotKey ~%v_EnableExtrapolate%, ExtrapolateOnOff, On UseErrorLevel


/*
======================================================
Tray Menu 
======================================================
*/

Menu, Tray, Tip, %programName% by Delusion 
Menu, Tray, NoStandard
Menu, Tray, Add, About, About
Menu, Tray, Add 
Menu, Tray, Add, Hide, Hide
Menu, Tray, Add, Show, Show
Menu, Tray, Disable, Show
Menu, Tray, Default, Show
Menu, Tray, Add 
Menu, Tray, Add, Reload 
Menu, Tray, Add, Edit 
Menu, Tray, Add 
Menu, Tray, Add, Suspend 
Menu, Tray, Add 
Menu, Tray, Add, Exit, Exit 

/*
======================================================
BF2 Process Check
======================================================
*/


SetTimer BF2ProcessCheck, 500
Process Priority, , High
return

BF2ProcessCheck:
   WinGet , szProcessName, ProcessName, A
   If szProcessName = BF2.exe ; <-- BF2 File Name Here
      {
      Suspend Off
      Menu, Tray, UnCheck, Suspend
      }
   Else
      {
      Menu, Tray, Check, Suspend
      Suspend On
      }
return




/*
======================================================
Tray Menu Actions
======================================================
*/

About:
   MsgBox, 64, About, %programName% %version% by Delusion`n`nOriginal Idea by DupaUnit from bf2s.com`n`nMany thanks to AZA & Alekoz from AutoHotkey forums for their help.`n`nContact Email : alexpersonal15[at]yahoo.com`nBF2 Nick : Delusion^inF`nXfire: alexsotirakis
return

Hide:
   IfWinExist,  %helpguiname%
      Winclose,  %helpguiname%
   IfWinExist,  About
      Winclose,  About
Gui, Submit, %programName% 
Gui, 2:Destroy
Menu, Tray, Disable, Hide
Menu, Tray, Enable, Show
guiopen:=0
return

Show:
Gui, Show, , %programName% 
Menu, Tray, Disable, Show
Menu, Tray, Enable, Hide
return

Reload:
Reload
return

Edit:
Edit
return

Suspend:
Suspend, Toggle
Menu, Tray, ToggleCheck, Suspend
SoundBeep, 500, 100
return

Exit:
GuiClose:
ExitApp
return


/*
======================================================
Gui
======================================================
*/

GGui:
   Gui, 1: -MaximizeBox +Theme +ToolWindow -SysMenu +LastFound
   Gui, 1:Add, GroupBox, x4 y-2 w136 h36,
   Gui, 1:Font, bold
   Gui, 1:Add, Text,x8 y12,HitFixer Key :
   Gui, 1:Font,
   Gui, 1:Add, Hotkey,x86 y9 w50 h20 vHitfix, %v_Hitfix%
   Gui, 1:Add, Button,x142 y3 w55 h32 gSave , Save
   Gui, 1:Add, Button,x3 y40 w65 h22 gHelp , Help
   Gui, 1:Add, Button,x68 y40 w65 h22 gHide , Hide
   Gui, 1:Add, Button,x133 y40 w65 h22 gExit , Exit
   Gui, 1:Add, Text,x85 y63,Advanced Options :
   Gui, 1:Add, Button,x183 y62 w15 h15 vAdvanced2 gAdvanced , +
   Gui, 1:Font,
   Gui, 1:Add, StatusBar,gStbr, 
   SB_SetText("by Delusion")
   SB_SetIcon("Shell32.dll",177) 
   Gui, 1:Show,w200 h101, %programName% 
return

Stbr:
   SB_SetText("Pwned")
   Sleep,850
   SB_SetText("by Delusion")
return

/*
======================================================
Gui Actions
======================================================
*/

Help:
   If (!guiopen)
   {
      guiopen:=1
      Gui, 2:+Owner1 -SysMenu +ToolWindow +Theme 
      Gui, 2:Font, bold
      Gui, 2:Add, Text,x8 y8, 1.
      Gui, 2:Font,
      Gui, 2:Add, Text,X+0,%A_Space%%A_Space%In BF2 Press the key you assigned HitFix to,to open the Console
      Gui, 2:Add, Text,x8,%A_Space%%A_Space%(Type your Ping as for example as 50 and not as .50)
      Gui, 2:Add, Text,x8,%A_Space%%A_Space%(Dont press it while the Console is open.`n%A_Space%%A_Space%It will only close it and send the text to BF2 Chat)
      Gui, 2:Font, bold
      Gui, 2:Add, Text,x8, 2.
      Gui, 2:Font,
      Gui, 2:Add, Text,X+0,%A_Space%%A_Space%Type your Ping in the Console and Press Enter
      Gui, 2:Add, Text,x8,%A_Space%%A_Space%(Dont forget to enable ExtrapolateFrame the first time)
      Gui, 2:Add, Text,x8,%A_Space%%A_Space%(Wrong Syntax Error is normal and caused by BF2.Not by Hitfixer)
      Gui, 2:Font, bold
      Gui, 2:Add, Text,x8, 3.
      Gui, 2:Font,
      Gui, 2:Add, Text,X+0,%A_Space%%A_Space%Done! The Script should now start typing those settings.`n%A_Space%%A_Space%You can close the Console now.
      Gui, 2:Add, Button, x268 y157 vbtn w100 Default, Close
      Gui, 2:Show, w370 h182, %helpguiname%
   }
   Else
   {
      Gui, 2:Submit
      Gui, 2:Destroy
      guiopen:=0
   }
return

2ButtonClose:
Gui2Close:
   Gui, 2:Submit
   Gui, 2:Destroy
   guiopen:=0
return

Save:
   Gui Submit, NoHide
   v_Hitfix=%Hitfix%
   v_PlayerCount=%PlayerCount%
   v_EnableExtrapolate=%EnableExtrapolate%
   v_PlayerCountVA=%PlayerCountVA%
   v_ExtrapolOnOff=%ExrapolOnOff%
   IniWrite %v_Hitfix%, %A_WinDir%\BF2HitFixer.ini, Hotkeys, HitfixerKey
   IniWrite %v_PlayerCount%, %A_WinDir%\BF2HitFixer.ini, Hotkeys, PlayerCountKey
   IniWrite %v_EnableExtrapolate%, %A_WinDir%\BF2HitFixer.ini, Hotkeys, EnableExtrapolKey
   IniWrite %v_PlayerCountVA%, %A_WinDir%\BF2HitFixer.ini, Values, PlayerCountValue
   IniWrite %v%, %A_WinDir%\BF2HitFixer.ini, Values, ExtrapolateOnOff
   If ExtrapolOnOff = 1
   IniWrite 1, %A_WinDir%\BF2HitFixer.ini, Values, ExtrapolateOnOff
   If ExtrapolOnOff = 0
   IniWrite 0, %A_WinDir%\BF2HitFixer.ini, Values, ExtrapolateOnOff
   Reload
return


advancedopen=0

Advanced:
   If advancedopen=0
   {
   Gui, 1:Destroy
   Gui, 1: -MaximizeBox +Theme +ToolWindow -SysMenu +LastFound
   Gui, 1:Add, GroupBox, x4 y-2 w136 h36,
   Gui, 1:Font, bold
   Gui, 1:Add, Text,x8 y12,HitFixer Key :
   Gui, 1:Font,
   Gui, 1:Add, Hotkey,x86 y9 w50 h20 vHitfix, %v_Hitfix%
   Gui, 1:Add, Button,x142 y3 w55 h32 gSave , Save
   Gui, 1:Add, Button,x3 y40 w65 h22 gHelp , Help
   Gui, 1:Add, Button,x68 y40 w65 h22 gHide , Hide
   Gui, 1:Add, Button,x133 y40 w65 h22 gExit , Exit
   Gui, 1:Add, Text,x85 y63,Advanced Options :
   Gui, 1:Add, Button,x183 y62 w15 h15 vAdvanced2 gAdvanced , +
   Gui, 1:Font,
   Gui, 1:Add, StatusBar,gStbr, 
   SB_SetText("by Delusion")
   SB_SetIcon("Shell32.dll",177) 
   Gui, 1:Show,w200 h101, %programName% 
      advancedopen:=1
GuiControl, Text, Advanced2, +
   }
   Else
   {
   Gui, 1:Show,w200 h210, %programName% 
   Gui, 1:Add, GroupBox, x4 y75 w192 h56,
   Gui, 1:Add, GroupBox, x4 y128 w192 h55,
   Gui, 1:Font, bold
   Gui, 1:Add, Text,x8 y87, Player Count Key    :
   Gui, 1:Add, Text,x8 y109, Player Count Value :
   Gui, 1:Add, Text,x8 y161, Enable Extrapolate       :
   Gui, 1:Add, Text,x8 y140, Enable Extrapolate Key :
   Gui, 1:Font, s13 bold 
   Gui, 1:Add, Text,cRed x182 y110 gPlayerCountInfo, ?
   Gui, 1:Add, Text,cRed x182 y162 gExtrapolEnableInfo, ?
   Gui, 1:Font,
   Gui, 1:Add, Hotkey,x150 y138 w39 h20 vEnableExtrapolate, %v_EnableExtrapolate%
   Gui, 1:Add, Hotkey,x126 y85 w39 h20 vPlayerCount, %v_PlayerCount%
   Gui, 1:Add, Edit,x126 y107 w39 h20 Limit2 vPlayerCountVA, %v_PlayerCountVA%
   Gui, 1:Add, Checkbox,BackgroundTrans x150 y162 vExtrapolOnOff Checked%v_ExtrapolOnOff%,
GuiControl, Text, Advanced2, -
      advancedopen:=0
   }
return

PlayerCountInfo:
ToolTip,This will set SettingsManager.U32Set GSPerfLogAtPlayerCount`nto how many players you want it to count.`nExample : If its is a 32 man server set the Player Count Value to 32 and run it`ningame by using the key you assigned it to.`nDefault BF2 Setting is 30.
SetTimer, RemoveToolTip, 5000
return

ExtrapolEnableInfo:
ToolTip,This will enable SettingsManager.boolSet GSExtrapolateFrame which is off by default.`nBy enabling it you can now use GSExtrapolationTime`nChanging the Extrapolation time without it being enabled gives you no effect at all.`nYou only need to do this once.After its stored in Usersettings.con it stays enabled until you change it.
SetTimer, RemoveToolTip, 5000
return

RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return

/*
======================================================
HitReg Fix
======================================================
*/

Hitregfix:
    SetKeyDelay , 10
    Send {~ Down}
    Sleep 100
    Send {~ Up}
    Sleep 100
    Send,Enter Ping{Enter}
    Input, Interpol, T10 V,{Enter}{Esc}
if (ErrorLevel = "EndKey:Escape")
    {
        Send,{Space}Cancelled{ENTER}
        return
    }
if !(PingVar < 1000 and PingVar > 1)  
    {
        Send,Please Enter a Valid Number{ENTER}
        return
    }
if PingVar is not digit
    {
        Send,Please Enter a Valid Number{ENTER}
        return
    }
Interpol += 5
LatencyComp := Interpol / 1000
ExtraPol := Interpol * 12
        Send {Enter}
        Send,SettingsManager.floatSet GSDefaultLatencyCompensation %LatencyComp% {Enter}
    Sleep 20
        Send,SettingsManager.U32Set GSExtrapolationTime{Space} %ExtraPol% {Enter}
    Sleep 20
        Send,SettingsManager.U32Set GSInterpolationTime{Space} %Interpol% {Enter}
Sleep 50
    Send {Shift Up}
    Send {Alt Up}
return

TypeSettings:
return


/*
======================================================
Player Count
======================================================
*/

PlayerCount:
    SetKeyDelay 10, 20
    Send {~ Down}
    Sleep 100
    Send {~ Up}
    Sleep 100
    Send,SettingsManager.U32Set GSPerfLogAtPlayerCount{Space} %v_PlayerCountVA%
Sleep 50
    Send {Shift Up}
    Send {Alt Up}
return

/*
======================================================
Extrapolate On / Off
======================================================
*/

ExtrapolateOnOff:
    SetKeyDelay 10, 20
    Send {~ Down}
    Sleep 100
    Send {~ Up}
    Sleep 100
    Send,SettingsManager.boolSet GSExtrapolateFrame{Space} %ExtrapolOnOff%
Sleep 50
    Send {Shift Up}
    Send {Alt Up}
return

ExtrapolateCheck:
return


/*
======================================================
Create ini
======================================================
*/


CreateIni:
   IfNotExist %A_WinDir%\BF2HitFixer.ini
   {
      Empty = 
      FileAppend ,= BF2 Hitfixer =`n`n, %A_WinDir%\BF2HitFixer.ini
      IniWrite F12, %A_WinDir%\BF2HitFixer.ini, Hotkeys, HitfixerKey
      IniWrite F11, %A_WinDir%\BF2HitFixer.ini, Hotkeys, PlayerCountKey
      IniWrite F10, %A_WinDir%\BF2HitFixer.ini, Hotkeys, EnableExtrapolKey
      IniWrite 32, %A_WinDir%\BF2HitFixer.ini, Values, PlayerCountValue
      IniWrite 1, %A_WinDir%\BF2HitFixer.ini, Values, ExtrapolateOnOff
   }
return

return

/*
======================================================
Read ini
======================================================
*/

ReadIni:
   IniRead v_Hitfix, %A_WinDir%\BF2HitFixer.ini, Hotkeys, HitfixerKey
   IniRead v_PlayerCount, %A_WinDir%\BF2HitFixer.ini, Hotkeys, PlayerCountKey
   IniRead v_EnableExtrapolate, %A_WinDir%\BF2HitFixer.ini, Hotkeys, EnableExtrapolKey
   IniRead v_PlayerCountVA, %A_WinDir%\BF2HitFixer.ini, Values, PlayerCountValue
   IniRead v_ExtrapolOnOff, %A_WinDir%\BF2HitFixer.ini, Values, ExtrapolateOnOff
return


/*
======================================================
Ingame Suspend 
======================================================
*/

$Pause::
Suspend, Toggle
Menu, Tray, ToggleCheck, Suspend
SoundBeep, 500, 100
return


/*
======================================================
NOTES :
======================================================
This script has only been tested on Win XP SP2 & SP3
I dont know if it works 100% on Vista yet.

Dont Compile the script.Punkbuster doesnt like compiled ahk scripts.
Using it as an .ahk is perfectly safe.
*/
any bugs/suggestions welcome...
if you used my previous version you will have to delete BF2Hitfixer.ini from C:/Windows or it wont work

Last edited by Delusion (2008-07-14 03:46:28)

Dward
Member
+0|5980
hey there

i had a few people suggest i try this program out

i downloaded it, ran it... all good  (left the window open)

started up a multiplayer game of BF2

got the console down and hit "Ctrl + 0"... nothing happened

my console remained blank

i went back to windows and the Hitfixer 1.31 was still open

would it have anything to do that my BF2 is not installed in the default directory

its directory is this (where the usersettings.con is located):

C:\Games\Battlefield 2\mods\bf2\Settings

thanks in advance for any help

Daniel

oh and i'm running Windows Vista Home Premium 32bit SP1 and Symantec Antivirus Corporate Edition 10.2

Last edited by Dward (2008-07-14 05:40:53)

hiberNative
7.62x54R
+21|6008|sweden

Delusion wrote:

its finished for now :
but im sure i will find something to update/change sooner or later

http://img176.imageshack.us/img176/3523/94724225ab0.png
the hitfixer key for ping doesn't seem to work. tried changing it to F9 and it just says error rigth away after the enter ping text appears.
the other 2 seems to work.

also, i would like to be able to enter the player count from within the game and not tab out when i find a server.

Last edited by hiberNative (2008-07-14 06:18:29)

Miniman7474
Banned.
+30|6412|Daqing Oilfields?

Dward wrote:

hey there

i had a few people suggest i try this program out

i downloaded it, ran it... all good  (left the window open)

started up a multiplayer game of BF2

got the console down and hit "Ctrl + 0"... nothing happened

my console remained blank

i went back to windows and the Hitfixer 1.31 was still open

would it have anything to do that my BF2 is not installed in the default directory

its directory is this (where the usersettings.con is located):

C:\Games\Battlefield 2\mods\bf2\Settings

thanks in advance for any help

Daniel

oh and i'm running Windows Vista Home Premium 32bit SP1 and Symantec Antivirus Corporate Edition 10.2
On Vista you must run all programs using overlay support as administrator. Right click on the file, go to properties, then click on run as administrator under compatibility.
legionair
back to i-life
+336|6837|EU

my says "wrong number"
Delusion
AK Hero
+26|5986|Greece / Rhodos

hiberNative wrote:

Delusion wrote:

its finished for now :
but im sure i will find something to update/change sooner or later

http://img176.imageshack.us/img176/3523/94724225ab0.png
the hitfixer key for ping doesn't seem to work. tried changing it to F9 and it just says error rigth away after the enter ping text appears.
the other 2 seems to work.

also, i would like to be able to enter the player count from within the game and not tab out when i find a server.
yeah i noticed that now...theres a strange problem

this should work :

Code:

/*
======================================================
Battlefield 2 HitReg Fixer 
by Delusion

Original Idea by DupaUnit on bf2s.con : 
http://forums.bf2s.com/viewtopic.php?id=104544
======================================================
*/

SendMode Input 
#Persistent
#NoEnv 
#SingleInstance force
#InstallKeybdHook

programName=BF2 HitFixer
version=v1.6
helpguiname=Help

GoSub CreateIni
GoSub ReadIni
GoSub GGui

/*
======================================================
Hotkeys
======================================================
*/

HotKey ~%v_HitFix%, Hitregfix, On UseErrorLevel
HotKey ~%v_PlayerCount%, PlayerCount, On UseErrorLevel
HotKey ~%v_EnableExtrapolate%, ExtrapolateOnOff, On UseErrorLevel


/*
======================================================
Tray Menu 
======================================================
*/

Menu, Tray, Tip, %programName% by Delusion 
Menu, Tray, NoStandard
Menu, Tray, Add, About, About
Menu, Tray, Add 
Menu, Tray, Add, Hide, Hide
Menu, Tray, Add, Show, Show
Menu, Tray, Disable, Show
Menu, Tray, Default, Show
Menu, Tray, Add 
Menu, Tray, Add, Reload 
Menu, Tray, Add, Edit 
Menu, Tray, Add 
Menu, Tray, Add, Suspend 
Menu, Tray, Add 
Menu, Tray, Add, Exit, Exit 

/*
======================================================
BF2 Process Check
======================================================
*/

/*
SetTimer BF2ProcessCheck, 500
Process Priority, , High
return

BF2ProcessCheck:
   WinGet , szProcessName, ProcessName, A
   If szProcessName = BF2.exe ; <-- BF2 File Name Here
      {
      Suspend Off
      Menu, Tray, UnCheck, Suspend
      }
   Else
      {
      Menu, Tray, Check, Suspend
      Suspend On
      }
return
*/




/*
======================================================
Tray Menu Actions
======================================================
*/

About:
   MsgBox, 64, About, %programName% %version% by Delusion`n`nOriginal Idea by DupaUnit from bf2s.com`n`nMany thanks to AZA & Alekoz from AutoHotkey forums for their help.`n`nContact Email : alexpersonal15[at]yahoo.com`nBF2 Nick : Delusion^inF`nXfire: alexsotirakis
return

Hide:
   IfWinExist,  %helpguiname%
      Winclose,  %helpguiname%
   IfWinExist,  About
      Winclose,  About
Gui, Submit, %programName% 
Gui, 2:Destroy
Menu, Tray, Disable, Hide
Menu, Tray, Enable, Show
guiopen:=0
return

Show:
Gui, Show, , %programName% 
Menu, Tray, Disable, Show
Menu, Tray, Enable, Hide
return

Reload:
Reload
return

Edit:
Edit
return

Suspend:
Suspend, Toggle
Menu, Tray, ToggleCheck, Suspend
SoundBeep, 500, 100
return

Exit:
GuiClose:
ExitApp
return


/*
======================================================
Gui
======================================================
*/

GGui:
   Gui, 1: -MaximizeBox +Theme +ToolWindow -SysMenu +LastFound
   Gui, 1:Add, GroupBox, x4 y-2 w136 h36,
   Gui, 1:Font, bold
   Gui, 1:Add, Text,x8 y12,HitFixer Key :
   Gui, 1:Font,
   Gui, 1:Add, Hotkey,x86 y9 w50 h20 vHitfix, %v_Hitfix%
   Gui, 1:Add, Button,x142 y3 w55 h32 gSave , Save
   Gui, 1:Add, Button,x3 y40 w65 h22 gHelp , Help
   Gui, 1:Add, Button,x68 y40 w65 h22 gHide , Hide
   Gui, 1:Add, Button,x133 y40 w65 h22 gExit , Exit
   Gui, 1:Add, Text,x85 y63,Advanced Options :
   Gui, 1:Add, Button,x183 y62 w15 h15 vAdvanced2 gAdvanced , +
   Gui, 1:Font,
   Gui, 1:Add, StatusBar,gStbr, 
   SB_SetText("by Delusion")
   SB_SetIcon("Shell32.dll",177) 
   Gui, 1:Show,w200 h101, %programName% 
return

Stbr:
   SB_SetText("Pwned")
   Sleep,850
   SB_SetText("by Delusion")
return

/*
======================================================
Gui Actions
======================================================
*/

Help:
   If (!guiopen)
   {
      guiopen:=1
      Gui, 2:+Owner1 -SysMenu +ToolWindow +Theme 
      Gui, 2:Font, bold
      Gui, 2:Add, Text,x8 y8, 1.
      Gui, 2:Font,
      Gui, 2:Add, Text,X+0,%A_Space%%A_Space%In BF2 Press the key you assigned HitFix to,to open the Console
      Gui, 2:Add, Text,x8,%A_Space%%A_Space%(Type your Ping as for example as 50 and not as .50)
      Gui, 2:Add, Text,x8,%A_Space%%A_Space%(Dont press it while the Console is open.`n%A_Space%%A_Space%It will only close it and send the text to BF2 Chat)
      Gui, 2:Font, bold
      Gui, 2:Add, Text,x8, 2.
      Gui, 2:Font,
      Gui, 2:Add, Text,X+0,%A_Space%%A_Space%Type your Ping in the Console and Press Enter
      Gui, 2:Add, Text,x8,%A_Space%%A_Space%(Dont forget to enable ExtrapolateFrame the first time)
      Gui, 2:Add, Text,x8,%A_Space%%A_Space%(Wrong Syntax Error is normal and caused by BF2.Not by Hitfixer)
      Gui, 2:Font, bold
      Gui, 2:Add, Text,x8, 3.
      Gui, 2:Font,
      Gui, 2:Add, Text,X+0,%A_Space%%A_Space%Done! The Script should now start typing those settings.`n%A_Space%%A_Space%You can close the Console now.
      Gui, 2:Add, Button, x268 y157 vbtn w100 Default, Close
      Gui, 2:Show, w370 h182, %helpguiname%
   }
   Else
   {
      Gui, 2:Submit
      Gui, 2:Destroy
      guiopen:=0
   }
return

2ButtonClose:
Gui2Close:
   Gui, 2:Submit
   Gui, 2:Destroy
   guiopen:=0
return

Save:
   Gui Submit, NoHide
   v_Hitfix=%Hitfix%
   v_PlayerCount=%PlayerCount%
   v_EnableExtrapolate=%EnableExtrapolate%
   v_PlayerCountVA=%PlayerCountVA%
   v_ExtrapolOnOff=%ExrapolOnOff%
   IniWrite %v_Hitfix%, %A_WinDir%\BF2HitFixer.ini, Hotkeys, HitfixerKey
   IniWrite %v_PlayerCount%, %A_WinDir%\BF2HitFixer.ini, Hotkeys, PlayerCountKey
   IniWrite %v_EnableExtrapolate%, %A_WinDir%\BF2HitFixer.ini, Hotkeys, EnableExtrapolKey
   IniWrite %v_PlayerCountVA%, %A_WinDir%\BF2HitFixer.ini, Values, PlayerCountValue
   IniWrite %v%, %A_WinDir%\BF2HitFixer.ini, Values, ExtrapolateOnOff
   If ExtrapolOnOff = 1
   IniWrite 1, %A_WinDir%\BF2HitFixer.ini, Values, ExtrapolateOnOff
   If ExtrapolOnOff = 0
   IniWrite 0, %A_WinDir%\BF2HitFixer.ini, Values, ExtrapolateOnOff
   Reload
return


advancedopen=0

Advanced:
   If advancedopen=0
   {
   Gui, 1:Destroy
   Gui, 1: -MaximizeBox +Theme +ToolWindow -SysMenu +LastFound
   Gui, 1:Add, GroupBox, x4 y-2 w136 h36,
   Gui, 1:Font, bold
   Gui, 1:Add, Text,x8 y12,HitFixer Key :
   Gui, 1:Font,
   Gui, 1:Add, Hotkey,x86 y9 w50 h20 vHitfix, %v_Hitfix%
   Gui, 1:Add, Button,x142 y3 w55 h32 gSave , Save
   Gui, 1:Add, Button,x3 y40 w65 h22 gHelp , Help
   Gui, 1:Add, Button,x68 y40 w65 h22 gHide , Hide
   Gui, 1:Add, Button,x133 y40 w65 h22 gExit , Exit
   Gui, 1:Add, Text,x85 y63,Advanced Options :
   Gui, 1:Add, Button,x183 y62 w15 h15 vAdvanced2 gAdvanced , +
   Gui, 1:Font,
   Gui, 1:Add, StatusBar,gStbr, 
   SB_SetText("by Delusion")
   SB_SetIcon("Shell32.dll",177) 
   Gui, 1:Show,w200 h101, %programName% 
      advancedopen:=1
GuiControl, Text, Advanced2, +
   }
   Else
   {
   Gui, 1:Show,w200 h210, %programName% 
   Gui, 1:Add, GroupBox, x4 y75 w192 h56,
   Gui, 1:Add, GroupBox, x4 y128 w192 h55,
   Gui, 1:Font, bold
   Gui, 1:Add, Text,x8 y87, Player Count Key    :
   Gui, 1:Add, Text,x8 y109, Player Count Value :
   Gui, 1:Add, Text,x8 y161, Enable Extrapolate       :
   Gui, 1:Add, Text,x8 y140, Enable Extrapolate Key :
   Gui, 1:Font, s13 bold 
   Gui, 1:Add, Text,cRed x182 y110 gPlayerCountInfo, ?
   Gui, 1:Add, Text,cRed x182 y162 gExtrapolEnableInfo, ?
   Gui, 1:Font,
   Gui, 1:Add, Hotkey,x150 y138 w39 h20 vEnableExtrapolate, %v_EnableExtrapolate%
   Gui, 1:Add, Hotkey,x126 y85 w39 h20 vPlayerCount, %v_PlayerCount%
   Gui, 1:Add, Edit,x126 y107 w39 h20 Limit2 vPlayerCountVA, %v_PlayerCountVA%
   Gui, 1:Add, Checkbox,BackgroundTrans x150 y162 vExtrapolOnOff Checked%v_ExtrapolOnOff%,
GuiControl, Text, Advanced2, -
      advancedopen:=0
   }
return

PlayerCountInfo:
ToolTip,This will set SettingsManager.U32Set GSPerfLogAtPlayerCount`nto how many players you want it to count.`nExample : If its is a 32 man server set the Player Count Value to 32 and run it`ningame by using the key you assigned it to.`nDefault BF2 Setting is 30.
SetTimer, RemoveToolTip, 5000
return

ExtrapolEnableInfo:
ToolTip,This will enable SettingsManager.boolSet GSExtrapolateFrame which is off by default.`nBy enabling it you can now use GSExtrapolationTime`nChanging the Extrapolation time without it being enabled gives you no effect at all.`nYou only need to do this once.After its stored in Usersettings.con it stays enabled until you change it.
SetTimer, RemoveToolTip, 5000
return

RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return

/*
======================================================
HitReg Fix
======================================================
*/

Hitregfix:
    SetKeyDelay , 10
    Send {~ Down}
    Sleep 100
    Send {~ Up}
    Sleep 100
    Send,Enter Ping{Enter}
    Input, Interpol, T10 V,{Enter}{Esc}
if (ErrorLevel = "EndKey:Escape")
    {
        Send,{Space}Cancelled{ENTER}
        return
    }
Interpol += 5
LatencyComp := Interpol / 1000
ExtraPol := Interpol * 12
        Send {Enter}
        Send,SettingsManager.floatSet GSDefaultLatencyCompensation %LatencyComp% {Enter}
    Sleep 20
        Send,SettingsManager.U32Set GSExtrapolationTime{Space} %ExtraPol% {Enter}
    Sleep 20
        Send,SettingsManager.U32Set GSInterpolationTime{Space} %Interpol% {Enter}
Sleep 50
    Send {Shift Up}
    Send {Alt Up}
return

TypeSettings:
return


/*
======================================================
Player Count
======================================================
*/

PlayerCount:
    SetKeyDelay 10, 20
    Send {~ Down}
    Sleep 100
    Send {~ Up}
    Sleep 100
    Send,SettingsManager.U32Set GSPerfLogAtPlayerCount{Space} %v_PlayerCountVA%
Sleep 50
    Send {Shift Up}
    Send {Alt Up}
return

/*
======================================================
Extrapolate On / Off
======================================================
*/

ExtrapolateOnOff:
    SetKeyDelay 10, 20
    Send {~ Down}
    Sleep 100
    Send {~ Up}
    Sleep 100
    Send,SettingsManager.boolSet GSExtrapolateFrame{Space} %ExtrapolOnOff%
Sleep 50
    Send {Shift Up}
    Send {Alt Up}
return

ExtrapolateCheck:
return


/*
======================================================
Create ini
======================================================
*/


CreateIni:
   IfNotExist %A_WinDir%\BF2HitFixer.ini
   {
      Empty = 
      FileAppend ,= BF2 Hitfixer =`n`n, %A_WinDir%\BF2HitFixer.ini
      IniWrite F12, %A_WinDir%\BF2HitFixer.ini, Hotkeys, HitfixerKey
      IniWrite F11, %A_WinDir%\BF2HitFixer.ini, Hotkeys, PlayerCountKey
      IniWrite F10, %A_WinDir%\BF2HitFixer.ini, Hotkeys, EnableExtrapolKey
      IniWrite 32, %A_WinDir%\BF2HitFixer.ini, Values, PlayerCountValue
      IniWrite 1, %A_WinDir%\BF2HitFixer.ini, Values, ExtrapolateOnOff
   }
return

return

/*
======================================================
Read ini
======================================================
*/

ReadIni:
   IniRead v_Hitfix, %A_WinDir%\BF2HitFixer.ini, Hotkeys, HitfixerKey
   IniRead v_PlayerCount, %A_WinDir%\BF2HitFixer.ini, Hotkeys, PlayerCountKey
   IniRead v_EnableExtrapolate, %A_WinDir%\BF2HitFixer.ini, Hotkeys, EnableExtrapolKey
   IniRead v_PlayerCountVA, %A_WinDir%\BF2HitFixer.ini, Values, PlayerCountValue
   IniRead v_ExtrapolOnOff, %A_WinDir%\BF2HitFixer.ini, Values, ExtrapolateOnOff
return


/*
======================================================
Ingame Suspend 
======================================================
*/

$Pause::
Suspend, Toggle
Menu, Tray, ToggleCheck, Suspend
SoundBeep, 500, 100
return


/*
======================================================
NOTES :
======================================================
This script has only been tested on Win XP SP2 & SP3
I dont know if it works 100% on Vista yet.

Dont Compile the script.Punkbuster doesnt like compiled ahk scripts.
Using it as an .ahk is perfectly safe.
*/
i thought on adding support for ingame player count...i will try to add that in future versions
Jello.01
Member
+46|6822|DFW, Texas
So I decided to install BF2 after a year+ and I can say that this just made the hit reg worse than default.
My suggestion would be to toggle SettingsManager.U32Set GSExtrapolateFrame to 1 or 0 depending on what you think makes your hit reg better, and keep Interpolation and Extrapolation at default or your ping as well as that LatencyCompensation.

In my opinion.

Last edited by Jello.01 (2008-07-14 14:09:27)

aimless
Member
+166|6338|Texas
Someone answer my question?

aimless wrote:

Why is extrapolation time your ping times 12? Why not 5, 10, 15, or 1?
jpshoota
Member
+0|6090
the title of this thread says it works in bf2142, but it does not. Gives wrong syntax error when i try to use.
Jello.01
Member
+46|6822|DFW, Texas

aimless wrote:

Someone answer my question?

aimless wrote:

Why is extrapolation time your ping times 12? Why not 5, 10, 15, or 1?
The default extrapolation time is 1200 and the interpolation time is 100. 1200/100=12 so multiply ping by 12, duh!
Dward
Member
+0|5980

Miniman7474 wrote:

Dward wrote:

hey there

i had a few people suggest i try this program out

i downloaded it, ran it... all good  (left the window open)

started up a multiplayer game of BF2

got the console down and hit "Ctrl + 0"... nothing happened

my console remained blank

i went back to windows and the Hitfixer 1.31 was still open

would it have anything to do that my BF2 is not installed in the default directory

its directory is this (where the usersettings.con is located):

C:\Games\Battlefield 2\mods\bf2\Settings

thanks in advance for any help

Daniel

oh and i'm running Windows Vista Home Premium 32bit SP1 and Symantec Antivirus Corporate Edition 10.2
On Vista you must run all programs using overlay support as administrator. Right click on the file, go to properties, then click on run as administrator under compatibility.
thanks that worked
MGS3_GrayFox
Member
+50|6381
This is bull, this doesn't fix crap.
VividSynergy
Banned
+6|6002|Bolingbrook, United States

MGS3_GrayFox wrote:

This is bull, this doesn't fix crap.
http://www.vimeo.com/1313131
ClawHammer
Member
+1|6141|South Australia

MGS3_GrayFox wrote:

This is bull, this doesn't fix crap.
Ur crap.
hiberNative
7.62x54R
+21|6008|sweden
the delusion application isn't working that smootly for me.
still getting an error with the new version about the ping and the other commands could be executed a bit more flawlessly.

i don't know why you people feel like you're getting headshotted with this... maybe you move too little? don't think that this fix will play the game for you...

VividSynergy wrote:

http://www.vimeo.com/1313131
great video demonstration. that's what i've been getting.

Last edited by hiberNative (2008-07-15 05:34:57)

VividSynergy
Banned
+6|6002|Bolingbrook, United States

hiberNative wrote:

the delusion application isn't working that smootly for me.
still getting an error with the new version about the ping and the other commands could be executed a bit more flawlessly.

i don't know why you people feel like you're getting headshotted with this... maybe you move too little? don't think that this fix will play the game for you...

VividSynergy wrote:

http://www.vimeo.com/1313131
great video demonstration. that's what i've been getting.
I didn't make it.

DupaUnit wrote:

aimless wrote:

Someone needs to do an experiment like the ones they did on youtube http://www.youtube.com/watch?v=MPTwGSrjsgo
Here is a video of HitFixer in action and how it effects hit registration.

---------------------------------------------------------------------------------------

VIDEO DEMONSTRATION:
    http://www.vimeo.com/1313131

http://img229.imageshack.us/img229/9643 … ionyx8.jpg
[pt] KEIOS
srs bsns
+231|6866|pimelteror.de
What does Punkbuster/Evenbalance says to this tool? Did anybody send it in, so they won´t detect it as a Gamehack?
[email protected] - just to make sure, that people won´t get banned for this.
bugz
Fission Mailed
+3,311|6525

I think it was mentioned somewhere along the way that it was approved.

Found it...first bullet in the OP

* This application has been approved by Punkbuster, so it is 100% safe and OK to use.

Last edited by ebug9 (2008-07-15 11:01:56)

Mint Sauce
Frighteningly average
+780|6500|eng

ClawHammer wrote:

MGS3_GrayFox wrote:

This is bull, this doesn't fix crap.
Ur crap.
His K/D > Your K/D.

Sit down.
#rekt
DupaUnit
Member
+18|6206
I have submitted each version to Punkbuster and they have approved it.

After my first approval from Punkbuster, they made an update to allow HitFixer and posted it on their site:
Saturday 05.17.2008 [2:00PM]

We have confirmed that non-cheat software caused some of the kicks for Violations #119015 and 119016. We encourage admins to give players the benefit of the doubt and ignore these violation numbers; they have been removed from our system.
Delusion
AK Hero
+26|5986|Greece / Rhodos

hiberNative wrote:

the delusion application isn't working that smootly for me.
still getting an error with the new version about the ping and the other commands could be executed a bit more flawlessly.
.
dont know what you mean..its works perfectly for me and for many other people that have tried it on other forums
what error are you getting? if your getting wrong syntax error then thats normal..its not caused by the script but by bf2

[pt] KEIOS wrote:

What does Punkbuster/Evenbalance says to this tool? Did anybody send it in, so they won´t detect it as a Gamehack?
[email protected] - just to make sure, that people won´t get banned for this.
if its uncompiled like my version...then its pefectly safe to use...punkbuster does not ban autohotkey scripts...unless in some cases when they are compiled and .exe

Last edited by Delusion (2008-07-15 13:36:15)

Board footer

Privacy Policy - © 2024 Jeff Minard