Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Autohotkey caused irreversible game lag in League of Legends


  • Please log in to reply
22 replies to this topic
ryux
  • Members
  • 13 posts
  • Last active: Nov 08 2015 06:20 PM
  • Joined: 10 Jul 2015

Hi,

 

I've got a problem with the game League of Legends. I made an ahk file for this game and it wouldn't work in the beginning, so I forced it by running the ahk file as admin. Altough the file then worked as intended, the by-product was tremendous lag. So I exited the file. The lag however remained in an eased state. I deinstalled lol and ahk completely (also deleted hidden files and registry entries), and reinstalled League. It didn't change for the good. I tried everything to solve the problem in cooperation with leagues' customer support and my internet providers' customer support for over four weeks. League of Legends' customer support detected corrupted files, but couldn't help me to fix them. I even relocated my pc into factory state, didn't help either. Several internet connection/package loss and system checks proved that everything works perfectly fine. It isn't surprising since no problem with my system or connectivity caused the game lags in first place, I always played League without any problems. The problem immediately occured the first time when I made my ahk file working by running it as admin. I will present you the code in the following, an important part is probably the #IfWinActive context in combination of running the ahk file as admin. Because only then the ahk file will work for League of Legends. Furthermore I could significantly improve my gaming experience in terms of lags by capping the fps from "uncapped" to 144 fps, the lag isn't completely vanished though. I made a video of the current lag I experience (https://vid.me/ZjoC). However before the ahk incident, I played League for like half a year in "uncapped" mode. I had no problems besides some noise in the first 2 minutes after a game started, which hinted towards a coil whine. I'm sorry that I can't provide you all the measures I tried to solve the problem, because it was really a shit ton. However I don't know until today, why I've got this problem at all. So I hope for some sort of insight about errors or bad side-effects caused by autohotkey and how to fix them, because my problem feels like black magic. I notice this lag nearly every game, the customer support sees corrupt files in my r3d logs, but no one knows why and how this problematic state could happen. If there is a Dr. House of Computer Science out there, pls help me. And here is the promised 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.

#MaxHotkeysPerInterval 9999

#SingleInstance Force

#UseHook On

SetTimer, CheckLOL, 300 ; checks if LOL processes exist

Run, "C:\Riot Games\League of Legends\lol.launcher.exe"  ;runs League of Legends

#IfWinActive League of Legends (TM) Client ; the following works only with ingame window being active


a::
	SendInput {c Down}
	Sleep 10
	SendInput {c Up}
	Sleep 70
	SendInput {w Down}
	Sleep 10
	SendInput {w Up}
Return


s::
	SendInput {v Down}
	Sleep 10
	SendInput {v Up}
	Sleep 70
	SendInput {w Down}
	Sleep 10
	SendInput {w Up}
Return	
	

#IfWinActive ; end of context-sensitive



CheckLOL:  ;ahk file closes when League of Legends related processes are closed

Process, Exist, LOLLauncher.exe

if (ErrorLevel = 0 )

{
	Process, Exist, LOLClient.exe
	
	if (ErrorLevel = 0)
	
	{	
		ExitApp
	}
	Return
}	

Return



gilliduck
  • Members
  • 109 posts
  • Last active: Nov 09 2015 01:07 AM
  • Joined: 19 Dec 2013

If that basic code did any thing I'll eat my proverbial hat. There are no changes to your system or any files with that script. I have a hard time believing that the issue has anything to do with AHK outside of weird coincidence in timing.



lifeweaver
  • Members
  • 868 posts
  • Last active: Jan 25 2016 01:29 AM
  • Joined: 04 Mar 2013

 

I even relocated my pc into factory state

What exactly do you mean by this statement? You reinstalled your OS, or did you use some built-in functionality?

 

I agree with gilliduck, almost certainty not AutoHotkey, you might try making a new temp League of Legends account and seeing if the lag persists.


My script runs in A_AhkVersion:=1.1.22.07, get the latest version at http://ahkscript.org/download/

Check out this AutoHotkey tutorial: http://ahkscript.git...o/AHK_Tutorial/

Read the documentation: http://ahkscript.org.../AutoHotkey.htm


ryux
  • Members
  • 13 posts
  • Last active: Nov 08 2015 06:20 PM
  • Joined: 10 Jul 2015

What exactly do you mean by this statement? You reinstalled your OS, or did you use some built-in functionality?

 

I agree with gilliduck, almost certainty not AutoHotkey, you might try making a new temp League of Legends account and seeing if the lag persists.

I actually meant reinstalling my OS, but both is true in terms of my measures



ryux
  • Members
  • 13 posts
  • Last active: Nov 08 2015 06:20 PM
  • Joined: 10 Jul 2015

If that basic code did any thing I'll eat my proverbial hat. There are no changes to your system or any files with that script. I have a hard time believing that the issue has anything to do with AHK outside of weird coincidence in timing.

I tested really everyhting besides my reasonably new router,so I believe it's a problem on this side. So these lags randomly occured the first time, when I also launched this ahk file for the first time. So I just have to live with not being able to play league unless I buy a new router.



Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012

Could any graphics, or even audio, driver updates recently been released for your system that are impacting LoL?

 

Is the lag purely internet lag, or performance lag? If it is purely internet lag, then the router might be to blame, or it could be your ISP. Could be the modem too.



tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: May 02 2019 09:16 PM
  • Joined: 21 Dec 2007

simple point of fact it wasnt AHK that caused your lag. I suspect it may be coincidental in timing but it is most likely a hardware issue based on your description


Never lose.
WIN or LEARN.

ryux
  • Members
  • 13 posts
  • Last active: Nov 08 2015 06:20 PM
  • Joined: 10 Jul 2015

Could any graphics, or even audio, driver updates recently been released for your system that are impacting LoL?

 

Is the lag purely internet lag, or performance lag? If it is purely internet lag, then the router might be to blame, or it could be your ISP. Could be the modem too.

I have very stable fps all the time, and today I learned that I have this deficites not just in LOL but also in other games. Since this day I used the script, no game works how it used to be. My provider says everything is fine form their side including the router. cmd ping test says no package loss, therefore the ping test by freeola (not my isp) protocolled 4% package loss in multiple attempts.



ryux
  • Members
  • 13 posts
  • Last active: Nov 08 2015 06:20 PM
  • Joined: 10 Jul 2015

simple point of fact it wasnt AHK that caused your lag. I suspect it may be coincidental in timing but it is most likely a hardware issue based on your description

The ahk file caused some massive lag most times I used it in League, undisputable more lag than when I played League without it afterwards. Probably ahk is not the problem itself, but it somehow triggered the problem. And now I can probably only play offline or turn-based games forever.



Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012

At worst the #MaxHotkeysPerInterval was what caused the lag, but that would in no way cause direct damage to your computer. At worst, your CPU managed to overheat while the script was running. Though, I do believe you'd still need to set #MaxHotkeysPerThread to something higher to even take advantage of so many hotkeys in an interval...

 

And even at that point, if it's just online multiplayer games affected and nothing in single player, then it's likely not damaged hardware.

 

The only other thing that comes to mind, working off what you've said and the assumption they are all true, is you gave administrative permissions to malware that has damaged your computer in some way - BIOS perhaps? I don't recall you mentioning anything about restoring the BIOS. But I have no idea if BIOS handles internet connection stuff.

 

Hmm... could your new router have some firewall action or any DDoS settings that impede Peer2Peer connections? No idea if LoL does P2P. Could also be your ISP restricting it, even if your ISP said everything was fine - the impaired connections may well be considered fine by them as their anti-P2P tech would be working correctly.



kon
  • Members
  • 1652 posts
  • Last active:
  • Joined: 04 Mar 2013

The chain goes (Your computer)>(Your ISP)>(Internet server stuff)>(LOL servers).

AHK could ONLY interfere with your computer, but if you have reinstalled the OS that means there is no chance any changes AHK made to your system could persist.

 

tank knows more of this than I, but I agree with him: a hardware issue seems likely.

 

Have you tried changing your DNS server to Open DNS or similar?

 

If you know the address of the LOL servers you could do a ping/nslookup/tracert as described here, and send LOL and your ISP the results.



SnowFlake_FlowSnake
  • Members
  • 845 posts
  • Last active: Jan 24 2016 05:24 PM
  • Joined: 08 Oct 2012

were did you downland Autohotkey from?


  • Download link of my scripts on Autohotkey.com 2/10/2015 [DOWNLAND]
  • Contact Info:  https://github.com/floowsnaake //  FloowSnaake(A)gmail.com
  • IF you need Help send me a PM,Email or Post on Github

  • Quote by tank  Posted 29 September 2015 - 06:14 PM

  • "Eventually i will find a way to convert the DB back to PHPBB3. but i dont have the bandwidth right now. No one that has tried has had success. It is the Only way i can keep this open is if i could successfully convert it."

ryux
  • Members
  • 13 posts
  • Last active: Nov 08 2015 06:20 PM
  • Joined: 10 Jul 2015

were did you downland Autohotkey from?

from this side



ryux
  • Members
  • 13 posts
  • Last active: Nov 08 2015 06:20 PM
  • Joined: 10 Jul 2015
Hmm... could your new router have some firewall action or any DDoS settings that impede Peer2Peer connections? No idea if LoL does P2P. Could also be your ISP restricting it, even if your ISP said everything was fine - the impaired connections may well be considered fine by them as their anti-P2P tech would be working correctly.

Well I completely reinstalled LOL with p2p deactivated, and I have the problem also in other games. Moreover League always worked well with my ISP in the past.



kon
  • Members
  • 1652 posts
  • Last active:
  • Joined: 04 Mar 2013

Take your computer over to a friend's house and see if the problem persists.

If the problem does not occur when on a different network, then you know the problem is not due to your computer. (ie: it's your ISP, or router or something else that is to blame.)