◇精神 发表于 2010-10-21 10:18:16

更新!!WIN7 玩魔力延迟 黑屏的进~~!!

本帖最后由 ◇精神 于 2010-12-24 15:06 编辑

登录一线人多的地方会出现游戏无反应1-3秒(正常反应),延迟问题消失,黑屏问题解决
(来源国外某wow论坛,忘记地址了,版权归:Leatrix Latency Fix)
一共由三个.vbs文件组成Install.vbs,Checker.vbs,Remove.vbs
提供压缩包一份,源代码一份,不放心的可直接自己建.vbs文件,开源代码公开.
使用说明:在同一文件夹里 建立三个.txt文件,修改为Install.vbs,Checker.vbs,Remove.vbs,分别按照顺序复制下面的代码放进去
接着运行Install.vbs,会弹出框,点下去,然后自动重启,完了上游戏把
源码我复制在2.3.4楼
这个是以前官网的一个帖子
我以前WIN7 也很卡。延迟 根本玩不了 不过用了这个方法 真的不卡了。 3开都没事..   转给大家
不会弄得PM我吧 我给你传一个程序就好了.

◇精神 发表于 2010-10-21 10:18:51

Install.vbs


' Leatrix Latency Fix 1.22 (Install Script)
' To use, simply run this script and restart your computer.
' To run from within batch files, use 'cscript Install.vbs"

logo = "Leatrix Latency Fix"
Leatrix_Version = "1.22"

Const HKEY_LOCAL_MACHINE = &H80000002

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
Set shell = CreateObject("Shell.Application")
set wsnet = WScript.CreateObject("WScript.Network")
computername = ucase(wsnet.computername)

strKeyPath = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

if Wscript.Arguments.Count => 1 then
    if (WScript.Arguments.Item(0) = "uac") then Leatrix_Uac = 1 else Leatrix_Uac = 0
end if
   
If Instr(1, WScript.FullName, "cscript", vbTextCompare) > 1 Then
    Leatrix_Script = 1
End If

' Show logo for script users
if Leatrix_Script = 1 and Leatrix_Uac = 0 then
    wscript.echo "Leatrix Latency Fix " & Leatrix_Version & " Batch Mode."
    wscript.echo ""
end if

' Latency fix has already been applied
if CheckFix = true then
    msg = "Leatrix Latency Fix is already installed on this computer."
    if Leatrix_Script = 0 then
      msg = msgbox (msg,48,logo)
    else
      wscript.echo msg
    end if
    wscript.quit
end if

' Show title for first run
If Leatrix_Uac = 0 then
    if Leatrix_Script = 0 then
      msg = logo & " " & Leatrix_Version & chr(13) & chr(13) & "This script will reduce your online gaming latency significantly by increasing the frequency of TCP acknowledgements sent to the game server.It is designed for Windows XP (SP2 or higher), Windows Vista (SP1 or higher) and Windows 7 only." _
                     & chr(13) & chr(13) & "If you are not logged into your computer with an account which has Administrator privileges, or you are using Windows Vista or Windows 7 with User Account Control enabled, you will be prompted to enter the username and password of an account which has Administrator privileges." _
                     & chr(13) & chr(13) & "Leatrix Latency Fix is hosted at www.leatrix.com." _
                     & chr(13) & chr(13) & "Click Ok to begin."
    else
      msg = "Installing..."
    end if

    if Leatrix_Script = 0 then
      msg = msgbox (msg,65,logo)

      ' Does user want to quit
      if msg = 2 then
          wscript.quit
      end if
    else
      wscript.echo msg
    end if
end if

' Attempt to apply latency fix
For Each subkey In arrSubKeys
    err = oReg.SetDwordValue (HKEY_LOCAL_MACHINE,strKeyPath & subkey,"TcpAckFrequency","1")
Next

' If fix completed successfully
if CheckFix = true then
    Success
    wscript.quit
end if

' If fix did not complete successfully, run it again with UAC prompt
if CheckFix = false and Leatrix_Uac = 0 then
    if Leatrix_Script = 0 then
      msg = "Either your Windows account does not have Administrator privileges, or you are using Windows Vista or Windows 7 with User Account Control enabled."
      msg = msg + chr(13) + chr(13) & "User Account Control forces programs to run under regular user privileges, even if you are logged into your computer with an account which has Administrator privileges.It's enabled by default on computers running Windows Vista and Windows 7."
      msg = msg + chr(13) + chr(13) & "To get around this, you will be prompted to enter your Windows logon details.In the next window, check the radio button for 'The following user' and enter the username and password of a Windows account which has Administrator privileges.The username must be in the format '" & computername & "\username'."
      msg = msg + chr(13) + chr(13) & "Click Ok to continue"
      msg = msgbox (msg,49,logo)

' Does user want to quit
    if msg = 2 then
      wscript.quit
    end if

' Rerun script with UAC prompt
    shell.ShellExecute "wscript.exe", Chr(34) & _
    WScript.ScriptFullName & Chr(34) & " uac", "", "runas", 1
else
    wscript.echo "Logon failure.You must be logged in with Administrator privileges in order to use batch mode."
    wscript.quit
end if
end if

' Check if script completed successfully with UAC prompt
if Leatrix_Uac = 1 then
    if CheckFix = false then
      msg = "There was an error (" & err.number & ")." & chr(13) & chr(13) & "Ensure that you entered a valid username and password.The username must have Administrator privileges on this computer." & chr(13) & chr(13) & "Click Ok to close the script."
      if Leatrix_Script = 0 then
          msg = msgbox (msg,48,logo)
      end if
    else
      Success
    end if
end if

wscript.quit

Function CheckFix()
' Checks to see if any of the settings have been applied
    StopCheck = 0
    For Each subkey In arrSubKeys
      oReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath & subkey,"TcpAckFrequency",CheckFix
      if CheckFix = 1 then
      else StopCheck = 1
      end if
    Next
    if StopCheck = 1 then CheckFix = false else CheckFix = true
end function

Function Success()
    if Leatrix_Script = 0 then
      set shell = wscript.CreateObject("wscript.shell")
      msg = "Leatrix Latency Fix has been installed successfully."
      msg = msg & chr(13) & "You need to restart your computer for the changes to take effect." & chr(13)
      msg = msg & chr(13) & "Do you want to restart your computer now?"
      msg = msgbox (msg,68,logo)
      if msg = 6 then
      shell.Run "shutdown.exe /r /t 00"
      end if
    else
      wscript.echo "Leatrix Latency Fix has been installed successfully."
      wscript.echo "You need to restart your computer for the changes to take effect."
    end if
end function

◇精神 发表于 2010-10-21 10:19:16

Checker.vbs



' Leatrix Latency Fix Checker
' To use, simply run this script.
' To run from within batch files, use 'cscript Checker.vbs"

logo = "Leatrix Latency Fix Checker"
Leatrix_Version = "1.22"

Const HKEY_LOCAL_MACHINE = &H80000002

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\"
strIPPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
oReg.EnumKey HKEY_LOCAL_MACHINE, strIPPath, subkeylist

Dim Ip(99)
Dim desc(99)

If Instr(1, WScript.FullName, "cscript", vbTextCompare) > 1 Then
    Leatrix_Script = 1
End If

if Leatrix_Script = 1 then
    wscript.echo "Leatrix Latency Fix " & Leatrix_Version & " Batch Mode."
    wscript.echo ""
end if

' Latency fix checker
CheckFix Installed,Ip,desc
if Installed = 0 then msg = "Leatrix Latency Fix is not installed on any network interfaces." end if
if Installed > 0 then
    if Installed = 1 then interface = "interface" else interface = "interfaces" end if
    msg = "Leatrix Latency Fix is installed on " & Installed & " network " & interface & "." & vbCrLf
    if Installed > 0 then
      for k = 1 to Installed
      if desc(k) = "" or desc(k) = vbCrLf then desc(k) = "" & vbCrLf
      if Ip(k) = "0.0.0.0" then Ip(k) = "DHCP or virtual address"
if desc(k) <> vbCrLf then
   msg = msg & vbCrLf & desc(k) & " (" & Ip(k) & ")"
   msg = msg + vbCrLf
end if
      next
    end if
end if
if Leatrix_Script = 0 then
    if Installed = 0 then no = 48 else no = 64 end if
    msg = msgbox (msg,no,logo)
else
    wscript.echo msg
end if
wscript.quit

Function CheckFix(Installed,Ip,desc)
Installed = 0
For Each subkey In arrSubKeys
    oReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath & subkey,"TcpAckFrequency",CheckFix
    if CheckFix = 1 then
      On Error Resume Next
      Installed = Installed + 1
      oReg.GetMultiStringValue HKEY_LOCAL_MACHINE,strKeyPath & subkey,"IPAddress",iValues
      For Each strValue In iValues
      if strValue = "" then Ip(Installed) = "Unknown" else Ip(Installed) = strValue end if
      For Each subkeyq In subkeylist
          oReg.GetStringValue HKEY_LOCAL_MACHINE,strIPPath & subkeyq,"ServiceName",CheckFixx
          if CheckFixx = subkey then
            oReg.GetStringValue HKEY_LOCAL_MACHINE,strIPPath & subkeyq,"Description",descq
             desc(Installed) = descq & vbCrLf
          end if
      next
      next
    end if
Next
end function

◇精神 发表于 2010-10-21 10:20:05

Remove.vbs

' Leatrix Latency Fix 1.22 (Removal Script)
' To use, simply run this script and restart your computer.
' To run from within batch files, use 'cscript Remove.vbs"

logo = "Leatrix Latency Fix"
Leatrix_Version = "1.22"

Const HKEY_LOCAL_MACHINE = &H80000002

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
Set shell = CreateObject("Shell.Application")
set wsnet = WScript.CreateObject("WScript.Network")
computername = ucase(wsnet.computername)

strKeyPath = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

if Wscript.Arguments.Count => 1 then
    if (WScript.Arguments.Item(0) = "uac") then Leatrix_Uac = 1 else Leatrix_Uac = 0
end if

If Instr(1, WScript.FullName, "cscript", vbTextCompare) > 1 Then
    Leatrix_Script = 1
End If

' Show logo for script users
if Leatrix_Script = 1 and Leatrix_Uac = 0 then
    wscript.echo "Leatrix Latency Fix " & Leatrix_Version & " Batch Mode."
    wscript.echo ""
end if

' Latency fix has not been applied
if CheckFix = false then
    msg = "Leatrix Latency Fix is not installed on this computer."
    if Leatrix_Script = 0 then
      msg = msgbox (msg,48,logo)
    else
      wscript.echo msg
    end if
    wscript.quit
end if

' Show title for first run
If Leatrix_Uac = 0 then
    if Leatrix_Script = 0 then
      msg = logo & " " & Leatrix_Version & chr(13) & chr(13) & "This script will remove Leatrix Latency Fix." _
                     & chr(13) & chr(13) & "If you are not logged into your computer with an account which has Administrator privileges, or you are using Windows Vista or Windows 7 with User Account Control enabled, you will be prompted to enter the username and password of an account which has Administrator privileges." _
                     & chr(13) & chr(13) & "Leatrix Latency Fix is hosted at www.leatrix.com." _
                     & chr(13) & chr(13) & "Click Ok to begin."
    else
      msg = "Removing..."
    end if

    if Leatrix_Script = 0 then
      msg = msgbox (msg,65,logo)

      ' Does user want to quit
      if msg = 2 then
          wscript.quit
      end if
    else
      wscript.echo msg
    end if
end if

' Attempt to remove latency fix
For Each subkey In arrSubKeys
    err = oReg.DeleteValue (HKEY_LOCAL_MACHINE,strKeyPath & subkey,"TcpAckFrequency")
Next

' If fix completed successfully
if CheckFix = false then
    Success
    wscript.quit
end if

' If fix did not complete successfully, run it again with UAC prompt
if CheckFix = true and Leatrix_Uac = 0 then
    if Leatrix_Script = 0 then
      msg = "Either your Windows account does not have Administrator privileges, or you are using Windows Vista or Windows 7 with User Account Control enabled."
      msg = msg + chr(13) + chr(13) & "User Account Control forces programs to run under regular user privileges, even if you are logged into your computer with an account which has Administrator privileges.It's enabled by default on computers running Windows Vista and Windows 7."
      msg = msg + chr(13) + chr(13) & "To get around this, you will be prompted to enter your Windows logon details.In the next window, check the radio button for 'The following user' and enter the username and password of a Windows account which has Administrator privileges.The username must be in the format '" & computername & "\username'."
      msg = msg + chr(13) + chr(13) & "Click Ok to continue"
      msg = msgbox (msg,49,logo)

' Does user want to quit
    if msg = 2 then
      wscript.quit
    end if

' Rerun script with UAC prompt
    shell.ShellExecute "wscript.exe", Chr(34) & _
    WScript.ScriptFullName & Chr(34) & " uac", "", "runas", 1
else
    wscript.echo "Logon failure.You must be logged in with Administrator privileges in order to use batch mode."
    wscript.quit
end if
end if

' Check if script completed successfully with UAC prompt
if Leatrix_Uac = 1 then
    if CheckFix = true then
      msg = "There was an error (" & err.number & ")." & chr(13) & chr(13) & "Ensure that you entered a valid username and password.The username must have Administrator privileges on this computer." & chr(13) & chr(13) & "Click Ok to close the script."
      if Leatrix_Script = 0 then
          msg = msgbox (msg,48,logo)
      end if
    else
      Success
    end if
end if

wscript.quit

Function CheckFix()
' Checks to see if any of the settings have been applied
    StopCheck = 0
    For Each subkey In arrSubKeys
      oReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath & subkey,"TcpAckFrequency",CheckFix
      if CheckFix = 1 then
      StopCheck = 1
      end if
    Next
    if StopCheck = 0 then CheckFix = false else CheckFix = true
end function

Function Success()
    if Leatrix_Script = 0 then
      set shell = wscript.CreateObject("wscript.shell")
      msg = "Leatrix Latency Fix has been removed successfully."
      msg = msg & chr(13) & "You need to restart your computer for the changes to take effect." & chr(13)
      msg = msg & chr(13) & "Do you want to restart your computer now?"
      msg = msgbox (msg,68,logo)
      if msg = 6 then
      shell.Run "shutdown.exe /r /t 00"
    end if
    else
      wscript.echo "Leatrix Latency Fix has been removed successfully."
      wscript.echo "You need to restart your computer for the changes to take effect."
    end if
end function

有毒啲 发表于 2010-10-21 12:25:55

只看到一大堆乱码,什么都看不明白- -

◇精神 发表于 2010-10-21 12:27:55

回楼上, 这些不是乱码 而是Install.vbs,Checker.vbs,Remove.vbs 创建着三个文件的 源码

ly69370703 发表于 2010-11-6 10:35:08

问LZ。我本本刚改的WIN7 进游戏黑屏。有时候黑一会就好了。但是很卡。是这个原因吗?

小丶翔 发表于 2010-11-6 11:19:59

XP的路过。。。。虽然学电脑的,但是表示对LZ发的代码没看懂

张婧 发表于 2010-11-6 11:23:06

用WIN7的人路过,没看明白代码.......虽然卡,但是还是我能承受的范围,十线城里掉线我也习惯了

小丶翔 发表于 2010-11-6 11:29:02

LSD好强大。。10线城里还掉线

◇精神 发表于 2010-11-6 11:32:36

问LZ。我本本刚改的WIN7 进游戏黑屏。有时候黑一会就好了。但是很卡。是这个原因吗?
ly69370703 发表于 2010-11-6 10:35 http://molifan.5d6d.com/images/common/back.gif
恩 是这个原因....

◇精神 发表于 2010-11-6 11:33:22

XP的路过。。。。虽然学电脑的,但是表示对LZ发的代码没看懂
『纵横』丶小翔 发表于 2010-11-6 11:19 http://molifan.5d6d.com/images/common/back.gif
这个代码 你们就直接复制下来然后再自己电脑上创建3个文件 把代码复制进去就可以了。。

小丶翔 发表于 2010-11-6 11:34:53

额~~等我哪天换了WIN7再来试试~!嘻嘻

发表于 2010-11-6 11:55:44

电脑高手啊~~~~~~~

鹭 蔓蔓 发表于 2010-11-6 13:21:19

本帖最后由 龙 清沫 于 2011-1-20 16:10 编辑

b_e02 .............

水墨 发表于 2010-11-6 15:05:56

我没弄这些,也不黑也不卡。只是要开四档画质才行,123都卡。

les19850906z 发表于 2010-11-22 11:49:46

我怎么看不到包啊 在哪啊

liuhe9036 发表于 2010-12-2 13:12:09

das das das dsa

yyIchnin2 发表于 2010-12-8 20:34:15

LZ。在线求详细教我弄。我没有这个Install.vbs

wangyiming814 发表于 2010-12-10 20:09:18

好老的帖子啊
页: [1] 2 3 4 5
查看完整版本: 更新!!WIN7 玩魔力延迟 黑屏的进~~!!