Jump to content

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

League of Legends: Auto Picker (Rek'Sai Release) - 27.11.2014


  • Please log in to reply
68 replies to this topic
Sanctus
  • Members
  • 283 posts
  • Last active: Dec 06 2014 04:05 PM
  • Joined: 30 Nov 2012

Version: 1.10 (27.11.2014)

In preparation for the release of Rek'Sai

http://na.leagueofle...e-void-burrower

 

I decided to update the script and indeed the character list.

 

Improvements:

As many have asked for and indeed worked themselves into their scripts,

AutoComplete function

Lane Caller

has been added to the script.

Full hero list, including upcoming one Rek'Sai.

Sleep Timers increased to a minimum of 40 for slower loading PC's.

F7 Added to Reload script and repick if you change your mind before picking phase.

 

Lanes you can automatically call(default):

ADC

Support

Top

Jungle

Mid

 

How it works:

  • Pick hero you want to be automatically selected for you once you join a game.
  • Make sure you own that hero or it resides here http://euw.leagueofl...ampion-rotation
  • Pick a lane you want to call or not
  • Click 'OK'
  • Popup Messagebox will appear to verify which hero you picked.
  • Look for game, join game, as you normally would.
  • Once at hero selection phase the program will type the hero name you selected and pick it.
  • It will continue to try to pick it until it finds a gray color where the hero icon is suppose to be.
  • If at anytime you want to close the program simply press F8.
#SingleInstance force
Menu, Tray, Tip, League of Legends Auto Picker v1.10`nMade by Sanctus
myGui("x860 y400", "League of Legends AHK AutoPicker")

myGui(position, title)
{
global thatVar
global thisVar
gui, new
gui, Default
gui, +LastFound +LabelMyGui
gui, add, groupbox, w200 h150, LOL AutoPicker
gui, font, s8, Arial
gui, add, text, xm12 ym20 section
gui, add, text, yp center, Choose the hero to play..
gui, Add, ComboBox, vthisVar w120 r10 gAC, Aatrox|Ahri|Akali|Alistar|Amumu|Anivia|Annie|Ashe|Azir|Blitzcrank|Brand|Braum|Caitlyn|Cassiopeia|Cho'Gath|Corki|Darius|Diana|Dr. Mundo|Draven|Elise|Evelynn|Ezreal|Fiddlesticks|Fiora|Fizz|Galio|Gangplank|Garen|Gnar|Gragas|Graves|Hecarim|Heimerdinger|Irelia|Janna|Jarvan IV|Jax|Jayce|Jinx|Kalista|Karma|Karthus|Kassadin|Katarina|Kayle|Kennen|Kha'Zix|Kog'Maw|LeBlanc|Lee Sin|Leona|Lissandra|Lucian|Lulu|Lux|Malphite|Malzahar|Maokai|Master Yi|Miss Fortune|Mordekaiser|Morgana|Nami|Nasus|Nautilus|Nidalee|Nocturne|Nunu|Olaf|Orianna|Pantheon|Poppy|Quinn|Rammus|Rek'Sai|Renekton|Rengar|Riven|Rumble|Ryze|Sejuani|Shaco|Shen|Shyvana|Singed|Sion|Sivir|Skarner|Sona|Soraka|Swain|Syndra|Talon|Taric|Teemo|Thresh|Tristana|Trundle|Tryndamere|Twisted Fate|Twitch|Udyr|Urgot|Varus|Vayne|Veigar|Vel'Koz|Vi|Viktor|Vladimir|Volibear|Warwick|Wukong|Xerath|Xin Zhao|Yasuo|Yorick|Zac|Zed|Ziggs|Zilean|Zyra
gui, add,text, yp+25 center, Choose the lane to call..
gui, Add, ComboBox, vthatVar w120 r10 gAC, ADC|Support|Top|Jungle|Mid
gui, add, button, yp+30 gDone, OK
gui, add, button, xp+30  gmyguiclose, Cancel
gui, add, text, yp+40 center, F8 TO CRASH PROGRAM
gui, add, text, yp+15 xp+17.5, Made by Sanctus
gui, add, link, yp+15 xp-45,  <a href="http://euw.leagueoflegends.com/news/champion-rotation">Click here to see Champion Rotation.</a>
gui, font, s10, Verdana
gui, add, text, yp+15 xp+3, Version: 1.10 (27.11.2014)
gui, show, % position, % title
return

AC: 
AutoComplete(A_GuiControl) 
Return

Done:
{
gui,submit,nohide
gui, destroy
msgbox Hero that will automatically be picked : %thisVar%
msgbox Position that will be automaticly called: %thatVar%
Loop
{
WinWaitActive ahk_class ApolloRuntimeContentWindow
{
PixelSearch, FoundaX, FoundaY, 912, 130, 996, 142, 0xFFFFFF, 0, Fast ;Find Search Box
if ErrorLevel = 0
{
BlockInput, On
MouseClick, left, 930, 135
Sleep 40
Send, %thisVar%
Sleep, 200
MouseClick, Left, 325, 212
Sleep 40
MouseClick, left, 355, 737
Sleep 40
Send, %thatVar%
Sleep 40
MouseClick, left, 922, 735
BlockInput, Off
Sleep, 2000
}
PixelSearch, FoundbX, FoundbY, 296, 180, 350, 233, 0x303030, 0, Fast ;Exit Script
if ErrorLevel = 0
{
ExitApp
}
}
}
return
}
myguiclose:
{
ExitApp
return
}
}

;AutoComplete Section
AutoComplete(ctrl) 
{ 
static lf = "`n" 
If GetKeyState("Delete") or GetKeyState("Backspace") 
Return
SetControlDelay, -1
SetWinDelay, -1 
GuiControlGet, h, Hwnd, %ctrl% 
ControlGet, haystack, List, , , ahk_id %h% 
GuiControlGet, needle, , %ctrl% 
StringMid, text, haystack, pos := InStr(lf . haystack, lf . needle) 
, InStr(haystack . lf, lf, false, pos) - pos 
If text !=
{
if pos != 0
{ 
ControlSetText, , %text%, ahk_id %h% 
ControlSend, , % "{Right " . StrLen(needle) . "}+^{End}", ahk_id %h% 
} 
}
}

;Reload Script / Repick Hero
F7::Reload
;Crash Script
F8::ExitApp  

I will ofc continually update this and try to improve it, as well are any suggestions welcome.

I do though on the other hand not play League of Legends regularly,

if at any time the program stops working or another hero is added, please comment on this thread,

I will be notified and I will update it wink.png


Check out ALL My Scripts  ;)


Sanctus
  • Members
  • 283 posts
  • Last active: Dec 06 2014 04:05 PM
  • Joined: 30 Nov 2012
gui, add, link, yp+15 xp-45,  <a href="http://euw.leagueoflegends.com/news/champion-rotation">Click here to see Champion Rotation.</a>

 

add this code between (Made by Sanctus) and (gui, font,s10,Verdana),

if you want to be able to check out each weeks champion rotation

 

This will be in next version update, until then those with ahk proficiency can do it themselves.


Check out ALL My Scripts  ;)


SuicideJihad
  • Members
  • 5 posts
  • Last active: Apr 09 2013 08:19 PM
  • Joined: 08 Apr 2013

Hello! I really enjoyed your auto-picker for LoL. I am wondering a few things... I am trying to add it where it will also call your position for you. I found out the coords of LoL client are the same no matter where you move it, and for the text box in champion selection it is

x-517

y737
 
I am wondering how to make it read to click on the LoL client and register that! I made a GUI almost the same as yours, couldnt remember exact coords and I skidded (gave credit in credits) your code at the boottom. 
 
WinWaitActive ahk_class ApolloRuntimeContentWindow
{
Click -517,737

Send, %thatVar%


PixelSearch, FoundaX, FoundaY, 852, 121, 1001, 150, 0xFFFFFF, 0, Fast ;Find Search Box
if ErrorLevel = 0
{
MouseClick, left, 890, 139
Send, %thisVar%
Sleep, 200
MouseClick, Left, 325, 212
Sleep, 2000
}
PixelSearch, FoundbX, FoundbY, 296, 182, 349, 233, 0x303030, 0, Fast ;Pick Hero
if ErrorLevel = 0
{
ExitApp
}

 

 

I am wondering what does this do?You see my fail attempt and a click before it searches... but moreover I am looking at this 

 

 

PixelSearch, FoundaX, FoundaY, 852, 121, 1001, 150, 0xFFFFFF, 0, Fast ;Find Search Box

 

What exactly do these all do? Because if I could just do like Find Text Box then that would be so much nicer. Thank you so much :D



SuicideJihad
  • Members
  • 5 posts
  • Last active: Apr 09 2013 08:19 PM
  • Joined: 08 Apr 2013

Okay, so I optimized it for 1920x1080 resolutions. If you would add this code it would be a honor :D 

 

What it does is calls the position for you, then picks your champ.

 

::
#SingleInstance force
myGui("x860 y400", "LoLChampionSelector")

myGui(position, title)
{
	static ThatVar
	static thisVar
	gui, new
	gui, Default
	;gui, Color, 00ABA9
	gui, +LastFound +LabelMyGui
	gui, add, groupbox, w200 h120, LoLChampionSelector
	gui, font, s8, Arial
	gui, add, text, xm12 ym20 section, 
	gui, add, text, yp+17.5 center, Choose The Hero You Want
	gui, add, DropDownList, vthisVar, Ahri|Akali|Alistar|Amumu|Anivia|Annie|Ashe|Blitzcrank|Brand|Caitlyn|Cassiopeia|Cho'Gath|Corki|Darius|Diana|Dr. Mundo|Draven
	|Elise|Evelynn|Ezreal|Fiddlesticks|Fiora|Fizz|Galio|Gangplank|Garen|Gragas|Graves|Hecarim|Heimerdinger|Irelia|Janna|Jarvan IV|Jax|Jayce
	|Karma|Karthus|Kassadin|Katarina|Kayle|Kennen|Kha'Zix|Kog'Maw|LeBlanc|Lee|Leona|Lulu|Lux Mage|Malphite|Malzahar|Maokai|Master Yi|Miss Fortune|Mordekaiser|Morgana
	|Nami|Nasus|Nautilus|Nidalee|Nocturne|Nunu|Olaf|Orianna|Pantheon|Poppy|Quinn and Valor|Rammus|Renekton|Rengar|Riven|Rumble|Ryze
	|Sejuani|Shaco|Shen|Shyvana|Singed|Sion|Sivir|Skarner|Sona|Soraka|Swain|Syndra|Talon|Taric|Teemo|Thresh|Tristana|Trundle|Tryndamere|Twisted Fate|Twitch
	|Udyr|Urgot|Varus|Vayne|Veigar|Vi|Viktor|Vladimir|Volibear|Warwick|Wukong|Xerath|Xin Zhao|Yorick|Zed|Ziggs|Zilean|Zyra
	Gui, Add, DropDownList, vThatVar, ADC|Tank|Support|Top|Jungle|Jungle Sona
	gui, add, button, yp+50 gDone, OK
	gui, add, button, xp+50  gmyguiclose, Cancel
	gui, add, text, yp+40 center, Press Esc to Close 
	gui, add, text, yp+15,  Made by SuicideJihad and im4dbr0
	gui, add, link, yp+15 xp-45,  <a href="http://euw.leagueoflegends.com/news/champion-rotation">Click here to see Champion Rotation.</a>
	gui, font, s10, Verdana
	gui, add, text, yp+15 xp+3, Version: 1.5k
	gui, show, % position, % title
	return

	Done:
	{
	gui,submit,nohide
	gui, destroy
	msgbox Hero that will automatically be picked : %thisVar%
	msgbox Position that will be automaticly called: %thatVar%
	Loop
	{
		WinWaitActive ahk_class ApolloRuntimeContentWindow
		{
			PixelSearch, FoundaX, FoundaY, 852, 121, 1001, 150, 0xFFFFFF, 0, Fast ;Find Search Box
			if ErrorLevel = 0
			{
			MouseClick, left, 364, 740
			Send, %ThatVar%
			Sleep 10
			MouseClick, left, 920, 740
			Sleep 30
			MouseClick, left, 890, 139
			Send, %ThisVar%
			Sleep, 280
			MouseClick, Left, 325, 212
			Sleep, 2000
			}
			PixelSearch, FoundbX, FoundbY, 296, 182, 349, 233, 0x303030, 0, Fast ;Pick Hero
			if ErrorLevel = 0
			{
			ExitApp
			}
		}
	}
	return
	}
	myguiclose:
	{
	ExitApp
	return
	}
}

Esc::ExitApp


Sanctus
  • Members
  • 283 posts
  • Last active: Dec 06 2014 04:05 PM
  • Joined: 30 Nov 2012

 

Okay, so I optimized it for 1920x1080 resolutions. If you would add this code it would be a honor grin.png

 

What it does is calls the position for you, then picks your champ.

 

I'd recommend having the script choose the hero first and then call the lane (it pretty much happens too fast for humans to react but still 1 in 1000 chances someone is ready for it :p)

 

Plus shouldn't need to optimize for 1920x1080 because I believe the launcher (where you select the hero) is always the same size what ever your resolution might be :)

 

Nicely done though, Always good to get extra features.


Check out ALL My Scripts  ;)


SuicideJihad
  • Members
  • 5 posts
  • Last active: Apr 09 2013 08:19 PM
  • Joined: 08 Apr 2013

I'd recommend having the script choose the hero first and then call the lane (it pretty much happens too fast for humans to react but still 1 in 1000 chances someone is ready for it :p)
 
Plus shouldn't need to optimize for 1920x1080 because I believe the launcher (where you select the hero) is always the same size what ever your resolution might be :)
 
Nicely done though, Always good to get extra features.


Yea as long as they don't resize it. And no matter what if you call that position you get it, differet characters are made fr different lanes. So calling position first is better for me at least.

crimble
  • Members
  • 1 posts
  • Last active: May 12 2013 11:07 AM
  • Joined: 03 May 2013

Adding this autocomplete function from 'polyethene' makes the GUI champion/position selection so much faster.

 

http://www.autohotke...boxes/?p=125936



Sanctus
  • Members
  • 283 posts
  • Last active: Dec 06 2014 04:05 PM
  • Joined: 30 Nov 2012

Adding this autocomplete function from 'polyethene' makes the GUI champion/position selection so much faster.

 

http://www.autohotke...boxes/?p=125936

 

Run me through this, dont get what its doing.. he says something about if you dont like globals :/


Check out ALL My Scripts  ;)


FafliX
  • Members
  • 1 posts
  • Last active: Oct 17 2013 02:01 AM
  • Joined: 17 Oct 2013

Are you still updating this? Riot released some new champions. It would be fine for me if you would just add the option to type in the name of the champ you want youself. This way you do not have to update it every time a new champ is released.



Sanctus
  • Members
  • 283 posts
  • Last active: Dec 06 2014 04:05 PM
  • Joined: 30 Nov 2012

That is the best way to quickly fix it :)

I have updated the original post with updated heroes.


Check out ALL My Scripts  ;)


floops
  • Members
  • 1 posts
  • Last active: Jan 28 2014 07:40 AM
  • Joined: 30 Oct 2013

Hi there!

 

So I tried using this and it ended working (eventually) but it spammed the lane I called about 9 times while spamming typing the hero into the search box about 8 times (which produced no results, ofc).

 

I used the code where it called the lane also:

::
#SingleInstance force
myGui("x860 y400", "LoLChampionSelector")

myGui(position, title)
{
	static ThatVar
	static thisVar
	gui, new
	gui, Default
	;gui, Color, 00ABA9
	gui, +LastFound +LabelMyGui
	gui, add, groupbox, w200 h120, LoLChampionSelector
	gui, font, s8, Arial
	gui, add, text, xm12 ym20 section, 
	gui, add, text, yp+17.5 center, Choose The Hero You Want
	gui, add, DropDownList, vthisVar, Ahri|Akali|Alistar|Amumu|Anivia|Annie|Ashe|Blitzcrank|Brand|Caitlyn|Cassiopeia|Cho'Gath|Corki|Darius|Diana|Dr. Mundo|Draven
	|Elise|Evelynn|Ezreal|Fiddlesticks|Fiora|Fizz|Galio|Gangplank|Garen|Gragas|Graves|Hecarim|Heimerdinger|Irelia|Janna|Jarvan IV|Jax|Jayce
	|Karma|Karthus|Kassadin|Katarina|Kayle|Kennen|Kha'Zix|Kog'Maw|LeBlanc|Lee|Leona|Lulu|Lux Mage|Malphite|Malzahar|Maokai|Master Yi|Miss Fortune|Mordekaiser|Morgana
	|Nami|Nasus|Nautilus|Nidalee|Nocturne|Nunu|Olaf|Orianna|Pantheon|Poppy|Quinn and Valor|Rammus|Renekton|Rengar|Riven|Rumble|Ryze
	|Sejuani|Shaco|Shen|Shyvana|Singed|Sion|Sivir|Skarner|Sona|Soraka|Swain|Syndra|Talon|Taric|Teemo|Thresh|Tristana|Trundle|Tryndamere|Twisted Fate|Twitch
	|Udyr|Urgot|Varus|Vayne|Veigar|Vi|Viktor|Vladimir|Volibear|Warwick|Wukong|Xerath|Xin Zhao|Yorick|Zed|Ziggs|Zilean|Zyra
	Gui, Add, DropDownList, vThatVar, ADC|Tank|Support|Top|Jungle|Jungle Sona
	gui, add, button, yp+50 gDone, OK
	gui, add, button, xp+50  gmyguiclose, Cancel
	gui, add, text, yp+40 center, Press Esc to Close 
	gui, add, text, yp+15,  Made by SuicideJihad and im4dbr0
	gui, add, link, yp+15 xp-45,  <a href="http://euw.leagueoflegends.com/news/champion-rotation">Click here to see Champion Rotation.</a>
	gui, font, s10, Verdana
	gui, add, text, yp+15 xp+3, Version: 1.5k
	gui, show, % position, % title
	return

	Done:
	{
	gui,submit,nohide
	gui, destroy
	msgbox Hero that will automatically be picked : %thisVar%
	msgbox Position that will be automaticly called: %thatVar%
	Loop
	{
		WinWaitActive ahk_class ApolloRuntimeContentWindow
		{
			PixelSearch, FoundaX, FoundaY, 852, 121, 1001, 150, 0xFFFFFF, 0, Fast ;Find Search Box
			if ErrorLevel = 0
			{
			MouseClick, left, 364, 740
			Send, %ThatVar%
			Sleep 10
			MouseClick, left, 920, 740
			Sleep 30
			MouseClick, left, 890, 139
			Send, %ThisVar%
			Sleep, 280
			MouseClick, Left, 325, 212
			Sleep, 2000
			}
			PixelSearch, FoundbX, FoundbY, 296, 182, 349, 233, 0x303030, 0, Fast ;Pick Hero
			if ErrorLevel = 0
			{
			ExitApp
			}
		}
	}
	return
	}
	myguiclose:
	{
	ExitApp
	return
	}
}

Esc::ExitApp

Any ideas where it's going wrong?

 

Thanks!



Sanctus
  • Members
  • 283 posts
  • Last active: Dec 06 2014 04:05 PM
  • Joined: 30 Nov 2012

Just tried the script you posted and it works fine (I took away the :: in the top btw)

It called the position and picked the hero I wanted.


Check out ALL My Scripts  ;)


raphaelmca
  • Members
  • 4 posts
  • Last active: Jul 20 2017 05:21 PM
  • Joined: 11 Dec 2013
Hello friends of AutoHotkey, I used the code in this topic and adapted for my use, but I'm not getting a detail ...
 
I wish that when selecting the hero, the script continues with the %thisVar% selected and saved even after restarting before running altogether.
 
Sometimes a player leaves the selection screen and I enter the queue automatically resetting the function %thisVar%
 
can someone help me?
follows the code that I adapted
#SingleInstance force
myGui("x860 y400", "League of Legends - AutoHeroi")
myGui(position, title)
{
	static thisVar
	gui, new
	gui, Default
	;gui, Color, 00ABA9
	gui, +LastFound +LabelMyGui
	gui, add, groupbox, w200 h120, LOL AutoHeroi
	gui, font, s8, Arial
	gui, add, text, xm12 ym20 section, Escolha o Herói...
	gui, add, edit, vthisVar
	gui, add, button, yp+30 gDone, OK
	gui, add, button, xp+30  gmyguiclose, Cancelar
	gui, add, text, yp+40 center, F12 ABRE O PROGRAMA
	gui, add, link, yp+15 xp-45,  <a href="http://euw.leagueoflegends.com/news/champion-rotation">Clique aqui para ver os Heróis da semana.</a>
	gui, show, % position, % title
	return
	Done:
	{
	gui,submit,nohide
	gui, destroy
	msgbox O Herói escolhifo foi %thisVar%
	Loop
	{
		WinWaitActive ahk_class ApolloRuntimeContentWindow
		{
			PixelSearch, FoundaX, FoundaY, 852, 121, 1001, 150, 0xFFFFFF, 0, Fast
			if ErrorLevel = 0
			{
			MouseClick, left, 890, 139
			Send, %thisVar%
			Sleep, 350
			MouseClick, Left, 325, 212
			Sleep, 2000
			}
			PixelSearch, FoundbX, FoundbY, 296, 182, 349, 233, 0x303030, 0, Fast
			if ErrorLevel = 0
			{
			return
			}
		}
	}
	return
	}
	myguiclose:
	{
	ExitApp
	return
	}
}
F12::myGui(position, title)


SoraDaoya
  • Members
  • 1 posts
  • Last active: Dec 12 2013 05:42 PM
  • Joined: 12 Dec 2013

Can this be updated for Yasuo?



nmeseth
  • Members
  • 3 posts
  • Last active: Dec 14 2013 07:20 AM
  • Joined: 07 Mar 2013

I tried manually adding Yasuo's name, but the program did not do anything.

 

As well, all this program does now is press in the middle of the box, and add letters to the word "Search" which doesn't result in any champion.