Hey guys,
I'm actually working on a bot for league of legends, what I've done so far is the following:
which is a function, which creates a bot game. (I'm using that bot game shit, because I don't want to test it in normal game!)
This creates a game, even if it is not open with ControlClick() & ControlSend()
this works perfectly on 2 comps, but the thing is, I want to make it work ingame as well, like the bot shall rightclick on 2 coordinates to not be inactive & get dc'd.
I found out that the game uses directinput, my question is, if there is a way to hook directinput via autoit? I want the game to run in background to watch movies while it levels.
Hope some1 can help.
I'm actually working on a bot for league of legends, what I've done so far is the following:
Code:
Func startGame()
$title = "PVP.net Client"
$full = WinGetTitle($title)
$hwnd = WinGetHandle($full)
WinMove($title, "", 0, 0)
Sleep(1000)
ControlClick($title, "", "", "LEFT", 1, 256, 62) ; click on Play
Sleep(6000)
ControlClick($title, "", "", "LEFT", 1, 550, 450) ; click on Practice
Sleep(6000)
ControlClick($title, "", "", "LEFT", 1, 311, 582) ; click on Create Game
sleep(6000)
ControlSend($title, "", "", "{TAB}")
ControlSend($title, "", "", "{TAB}")
ControlSend($title, "", "", "{TAB}")
ControlSend($title, "", "", "{TAB}")
ControlSend($title, "", "", "{TAB}")
Sleep(1000)
ControlSend($title, "", "", "abcdefgh")
sleep(2000)
ControlSend($title, "", "", "{TAB}")
sleep(2000)
ControlSend($title, "", "", "abcdefgh")
sleep(5000)
ControlClick($title, "", "", "LEFT", 1, 248, 591) ; click on Create Game
; time to add bots!
; add bots to your team!
Sleep(3000)
ControlClick($title, "", "", "LEFT", 1, 468, 378)
Sleep(3000)
ControlClick($title, "", "", "LEFT", 1, 468, 378)
Sleep(3000)
ControlClick($title, "", "", "LEFT", 1, 468, 378)
Sleep(3000)
ControlClick($title, "", "", "LEFT", 1, 468, 378)
; add bots to other team!
Sleep(3000)
ControlClick($title, "", "", "LEFT", 1, 896, 375)
Sleep(3000)
ControlClick($title, "", "", "LEFT", 1, 896, 375)
Sleep(3000)
ControlClick($title, "", "", "LEFT", 1, 896, 375)
Sleep(3000)
ControlClick($title, "", "", "LEFT", 1, 896, 375)
Sleep(3000)
ControlClick($title, "", "", "LEFT", 1, 896, 375)
Sleep(3000)
; click on start game
ControlClick($title, "", "", "LEFT", 1, 832, 589)
EndFunc
This creates a game, even if it is not open with ControlClick() & ControlSend()
this works perfectly on 2 comps, but the thing is, I want to make it work ingame as well, like the bot shall rightclick on 2 coordinates to not be inactive & get dc'd.
I found out that the game uses directinput, my question is, if there is a way to hook directinput via autoit? I want the game to run in background to watch movies while it levels.
Hope some1 can help.