Kimo Posted August 25, 2011 Share Posted August 25, 2011 Hi, Im looking to make a script for Diablo II for weapon switch glitch. This involves hitting w then q in game one after eachother quickly. Could anyone help please? Link to comment Share on other sites More sharing options...
4Eyes Posted August 25, 2011 Share Posted August 25, 2011 Kimo, The simple answer is NO! It is against forum rules to discuss game automation and this topic comes up repeatedly. You should have looked before posting lest incur the wrath of the mod's. Look here: http://www.autoitscript.com/forum/forum-2/announcement-13-forum-rules/ Link to comment Share on other sites More sharing options...
Kimo Posted August 25, 2011 Author Share Posted August 25, 2011 Thanks for the quick response, it isnt a cheat or change, my w key is worn out and I have no other keys to bind so I was going to use this instead. Link to comment Share on other sites More sharing options...
4Eyes Posted August 25, 2011 Share Posted August 25, 2011 Buy another keyboard or Valik will come a knockin'! Link to comment Share on other sites More sharing options...
aNewLyfe Posted August 26, 2011 Share Posted August 26, 2011 Thanks for the quick response, it isnt a cheat or change, my w key is worn out and I have no other keys to bind so I was going to use this instead.ahh best self-preservation i ve ever seen ~ Every Living Thing is a Code Snippet of World Application ~ Link to comment Share on other sites More sharing options...
rcmaehl Posted August 26, 2011 Share Posted August 26, 2011 (edited) #include <Misc.au3> While 1 If Not (_IsPressed(87H) = 0) Then Send("{Asc 0x057}") WEndW is now bound to F24. Have fun. This script can not be changed or else it won't work.EDIT: IMPROVED PerformanceEDIT: Bounded W to F24 for easier access Edited August 26, 2011 by rcmaehl My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
rcmaehl Posted August 26, 2011 Share Posted August 26, 2011 (edited) Anyone have any other ideas on how to IMPROVE my scripts' performance. I was thinking making it do math like While 2+2 = 1+3. Edited August 26, 2011 by rcmaehl My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
smashly Posted August 26, 2011 Share Posted August 26, 2011 Hi, I used the example from _WinAPI_SetWindowsHookEx and modified it. Good (maybe bad) is that it suppresses the key your pressing from being sent with the send key. I did a similar thing for myself and the game Dead Space. The game was hard set to w/a/s/d and wouldn't let me assign up/down/left/right keys for movement. #include <WindowsConstants.au3> #include <StructureConstants.au3> #include <WinAPI.au3> OnAutoItExitRegister("_Cleanup") Global $sInKey = "Q", $sOutKey = "w" Global $hKeyProc, $hHook, $iQuit $hKeyProc = DllCallbackRegister("_KeyProc", "long", "int;wparam;lparam") $hHook = _WinAPI_SetWindowsHookEx($WH_KEYBOARD_LL, DllCallbackGetPtr($hKeyProc), _WinAPI_GetModuleHandle(0)) While Not $iQuit Sleep(10) WEnd Func _KeyProc($nCode, $wParam, $lParam) Local $tKEYHOOKS = DllStructCreate($tagKBDLLHOOKSTRUCT, $lParam) If $nCode < 0 Then Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam) If $wParam = $WM_KEYDOWN Then Switch DllStructGetData($tKEYHOOKS, "vkCode") Case Asc($sInKey) Send($sOutKey) Return 1 Case 27 ; Esc key $iQuit = 1 EndSwitch EndIf Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam) EndFunc ;==>_KeyProc Func _Cleanup() If $hHook Then _WinAPI_UnhookWindowsHookEx($hHook) If $hKeyProc Then DllCallbackFree($hKeyProc) EndFunc ;==>Cleanup Cheers Link to comment Share on other sites More sharing options...
rcmaehl Posted August 29, 2011 Share Posted August 29, 2011 *FACEPALM* My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now