Your tired of being not the first who writes ADC, mid, top.... then is this program the right choice for you
I quickly developed a simple Autopicker, It's not that well written but it does his job perfectly.
Functions:
-Auto detect Champion selection
-Post a custom text to your Team
-Instant select your Champion
-optional Instalock
-Optimize it to your PC-speed
Note: don't use auto-accept it's currently bugged.
If it doesn't work, run it as admin and try it again.
Source:
PHP Code:
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
Opt("TrayMenuMode", 1+2)
Global $aboutitem = TrayCreateItem("About")
Global $prefsitem = TrayCreateItem("Settings")
TrayCreateItem("")
Global $exititem = TrayCreateItem("Exit")
Global $searchbox_X, $searchbox_Y, $submitbox_X, $submitbox_Y, $champbox_X, $champbox_Y, $checkbox_X, $Checkbox_Y, $textbox_X, $textbox_Y, $Acceptbox_X, $Acceptbox_Y, $Accept_checkbox_X, $Accept_checkbox_Y, $Clip_type, $Clip_champ
Global $Speed = 1, $multiplier = 0.75, $Title_main = "Para's Instapicker", $version = 0.49
$combo_data = "Ahri|Akali|Alistar|Amumu|Anivia|Annie|Ashe|Aurelion Sol|Azir|Bard|Blitzcrank|Brand|Braum|Caitlyn|Cassiopeia|Cho'Gath|Corki|Darius|Diana|Dr. Mundo|"
$combo_data &= "Draven|Ekko|Elise|Evelynn|Ezreal|Fiddlesticks|Fiora|Fizz|Galio|Gangplank|Garen|Gnar|Gragas|Graves|Hecarim|Heimerdinger|Illaoi|Irelia|Janna|Jarvan IV|"
$combo_data &= "Jax|Jayce|Jhin|Jinx|Kalista|Karma|Karthus|Kassadin|Katarina|Kayle|Kennen|Kha'Zix|Kindred|Kog'Maw|LeBlanc|Lee Sin|Leona|Lissandra|Lucian|Lulu|Lux|Malphite|Malzahar|Maokai|Master Yi|"
$combo_data &= "Miss Fortune|Modekaiser|Morgana|Nami|Nasus|Nautilus|Nidalee|Nocturne|Nunu|Olaf|Orianna|Pantheon|Poppy|Quinn|Rammus|Rek'Sai|Renekton|Rengar|Riven|Rumble|Ryze|Sejuani|Shaco|Shen|"
$combo_data &= "Shyvana|Singed|Sion|Sivir|Skarner|Sona|Soraka|Swain|Syndra|Tahm Kench|Talon|Taric|Teemo|Thresh|Tristana|Trundle|Tryndamere|Twisted Fate|Twitch|Udyr|Urgot|Varus|Vayne|Veigar|Vel'Koz|Vi|"
$combo_data &= "Viktor|Vladimir|Volibear|Warwick|Wukong|Xerath|Xin Zhao|Yasuo|Yorick|Zac|Zed|Ziggs|Zilean|Zyra"
$GUI = GUICreate($Title_main, 202, 67, 602, 468)
$Input = GUICtrlCreateInput("", 0, 0, 201, 21)
$Combo = GUICtrlCreateCombo("Aatrox", 0, 24, 201, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, $combo_data )
$CBox = GUICtrlCreateCheckbox("Instalock",4,48,65,17)
GUICtrlSetState(-1,$GUI_CHECKED)
$CBox2 = GUICtrlCreateCheckbox("Auto-Accept",73,48,80,17)
GUICtrlSetState(-1,$GUI_UNCHECKED)
GUICtrlSetState(-1,$GUI_DISABLE)
$BTN = GUICtrlCreateButton("OK", 156, 48, 43, 17)
GUISetState(@SW_SHOW)
While 1
_WinMSG()
_TrayCheck()
WEnd
Func _WaitforAcceptGame();experimental
$refresh_calc_timer = TimerInit()
_calc_pos()
_calc_delay()
Do
sleep(10)
$refresh_calc_timer_dif = TimerDiff($refresh_calc_timer)
If $refresh_calc_timer_dif > 500 Then
_calc_pos()
$refresh_calc_timer = TimerInit()
EndIf
_WinMSG()
_TrayCheck()
ToolTip(Hex(PixelGetColor($Accept_checkbox_X, $Accept_checkbox_Y),6),0,0)
Local $temp_p = PixelGetColor($Accept_checkbox_X, $Accept_checkbox_Y)
Until $temp_p <> 0xC16213 And $temp_p <> 0xC06213 And $temp_p <> 0xC26313 And $temp_p <> 0xC36313 And $temp_p <> 0xC46414 And $temp_p <> 0xC56514 And $temp_p <> 0xC46514 And $temp_p <> 0xC56614 And $temp_p <> 0xC36414 And $temp_p <> 0xC66614 And $temp_p <> 0xC46313 And $temp_p <> 0xC16313 And $temp_p <> 0xC36213 And $temp_p <> 0xC26213 And $temp_p <> 0xC06113 And $temp_p <> 0xC56414 And WinActive("PVP.net Client")
Sleep(750 * $multiplier)
MouseClick("LEFT",$Acceptbox_X,$Acceptbox_Y,2,1)
EndFunc
Func _WaitforChampselection()
$refresh_calc_timer = TimerInit()
_calc_pos()
_calc_delay()
Do
sleep(10)
$refresh_calc_timer_dif = TimerDiff($refresh_calc_timer)
If $refresh_calc_timer_dif > 500 Then
_calc_pos()
$refresh_calc_timer = TimerInit()
EndIf
_WinMSG()
_TrayCheck()
Until PixelGetColor($checkbox_X, $Checkbox_Y) = 0xF08B2C
Sleep(330 * $multiplier)
_calc_pos()
MouseClick("LEFT",$textbox_X,$textbox_Y,2,1)
Sleep(240 * $multiplier)
$temp_clip = ClipGet()
ClipPut($Clip_type)
Send("^v")
Sleep(200 * $multiplier)
Send("{enter}")
Sleep(240 * $multiplier)
MouseClick("LEFT",$searchbox_X,$searchbox_Y,2,1)
Sleep(290 * $multiplier)
ClipPut($Clip_champ)
Send("^v")
Sleep(480 * $multiplier)
MouseClick("LEFT",$champbox_X,$champbox_Y,2,1)
sleep(290 * $multiplier)
If GUICtrlRead($CBox) = 1 Then
MouseClick("LEFT",$submitbox_X,$submitbox_Y,2,1)
EndIf
ClipPut($temp_clip)
EndFunc
Func _calc_delay()
If $Speed = 0 Then
$multiplier = 2.00
ElseIf $Speed = 1 Then
$multiplier = 1.50
ElseIf $Speed = 2 then
$multiplier = 1
EndIf
EndFunc
Func _calc_pos()
$wintitle = WinGetTitle("[CLASS:ApolloRuntimeContentWindow]")
$p = WinGetPos($wintitle)
If [MENTION=2544426]Error T[/MENTION]hen
MsgBox(16,"League of Legends not found","Errorcode: 13",3)
Exit
EndIf
$textbox_X = $p[2] / 3.961904761904762
$textbox_X += $p[0]
$textbox_Y = $p[3] / 1.084462982273201
$textbox_Y += $p[1]
$searchbox_X = $p[2] / 1.460930640913082
$searchbox_X += $p[0]
$searchbox_Y = $p[3] / 6.303030303030303
$searchbox_Y += $p[1]
$champbox_X = $p[2] / 3.961904761904762
$champbox_X += $p[0]
$champbox_Y = $p[3] / 3.924528301886792
$champbox_Y += $p[1]
$submitbox_X = $p[2] / 1.484388938447814
$submitbox_X += $p[0]
$submitbox_Y = $p[3] / 1.60741885625966
$submitbox_Y += $p[1]
$checkbox_X = $p[2] / 3.328
$checkbox_X += $p[0]
$Checkbox_Y = $p[3] / 6.419753086419753
$Checkbox_Y += $p[1]
$Acceptbox_X = $p[2] / 2.220563847429519
$Acceptbox_X += $p[0]
$Acceptbox_Y = $p[3] / 1.803879310344828
$Acceptbox_Y += $p[1]
$Accept_checkbox_X = $p[2] / 1.510438413361169
$Accept_checkbox_X += $p[0]
$Accept_checkbox_Y = $p[3] / 13.90769230769231
$Accept_checkbox_Y += $p[1]
EndFunc
Func _WinMSG()
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $BTN
$Clip_type = GUICtrlRead($Input)
$Clip_champ = GUICtrlRead($Combo)
GUICtrlSetState($BTN,$GUI_DISABLE)
If GUICtrlRead($CBox2) = 1 Then
_WaitforAcceptGame()
EndIf
_WaitforChampselection()
GUICtrlSetState($BTN,$GUI_ENABLE)
TrayTip("successfully","Mission completed :>",3)
EndSwitch
EndFunc
Func _TrayCheck()
Local $msg = TrayGetMsg()
Select
Case $msg = $aboutitem
MsgBox(64,"About:","Version: " & $version & [MENTION=3576271]CRLF[/MENTION] & "Author: Paraly" & [MENTION=3576271]CRLF[/MENTION] & "- Done for Elitepvpers -")
Case $msg = $prefsitem
GUISetState(@SW_HIDE, $GUI)
_Settings(0)
$GUI2 = GUICreate("Settings", 156, 32, 650, 511)
$LBL = GUICtrlCreateLabel("Your PC-Speed:", 2,1,100,14)
$BTN2 = GUICtrlCreateButton("Low", 0, 16, 51, 17)
If $Speed = 0 Then
GUICtrlSetState(-1,$GUI_DISABLE)
EndIf
$BTN3 = GUICtrlCreateButton("Medium", 52, 16, 51, 17)
If $Speed = 1 Then
GUICtrlSetState(-1,$GUI_DISABLE)
EndIf
$BTN4 = GUICtrlCreateButton("High", 104, 16, 51, 17)
If $Speed = 2 Then
GUICtrlSetState(-1,$GUI_DISABLE)
EndIf
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_Settings(1)
GUISetState(@SW_HIDE, $GUI2)
GUISetState(@SW_SHOW, $GUI)
WinActivate($Title_main)
ExitLoop
Case $BTN2
GUICtrlSetState($BTN2,$GUI_DISABLE)
GUICtrlSetState($BTN3,$GUI_ENABLE)
GUICtrlSetState($BTN4,$GUI_ENABLE)
$Speed = 0
Case $BTN3
GUICtrlSetState($BTN2,$GUI_ENABLE)
GUICtrlSetState($BTN3,$GUI_DISABLE)
GUICtrlSetState($BTN4,$GUI_ENABLE)
$Speed = 1
Case $BTN4
GUICtrlSetState($BTN2,$GUI_ENABLE)
GUICtrlSetState($BTN3,$GUI_ENABLE)
GUICtrlSetState($BTN4,$GUI_DISABLE)
$Speed = 2
EndSwitch
WEnd
Case $msg = $exititem
Exit
EndSelect
EndFunc
Func _Settings($mode)
If $mode = 0 Then;Load
If FileExists(@TempDir & "\Instapicker\Instapicker.cfg") Then
$f_settings = FileOpen(@TempDir & "\Instapicker\Instapicker.cfg",0)
$CFG_data = FileRead($f_settings)
FileClose($f_settings)
$CFG_Speed = StringRegExp($CFG_data,"CFG_Speed=(.*?);",3)
If IsArray($CFG_Speed) Then
$Speed = $CFG_Speed[0]
Else
MsgBox(0,"ERROR","Errorcode: 33",3)
Exit
EndIf
Else
_Settings(1)
EndIf
ElseIf $mode = 1 Then;Save
$f_settings = FileOpen(@TempDir & "\Instapicker\Instapicker.cfg",2+8)
FileWrite($f_settings,"CFG_Speed=" & $Speed & ";" & [MENTION=3576271]CRLF[/MENTION])
FileClose($f_settings)
Else
MsgBox(16,"ERROR","Errorcode: 31",3)
Exit
EndIf
EndFunc
**Version 0.49**
-Added Aurelion Sol
-Added Bard
-Added Illaoi
-Added Jhin
-Added Tahm Kench
-Added Ekko
**Version 0.48**
-Added Rek'Sai
**Version 0.47**
-Added Kalista
**Version 0.46**
-Some speed changes
**Version 0.45**
-Added Azir
**Version 0.44**
-Added Gnar
-Added Aurelion Sol
-Added Bard
-Added Illaoi
-Added Jhin
-Added Tahm Kench
-Added Ekko
**Version 0.48**
-Added Rek'Sai
**Version 0.47**
-Added Kalista
**Version 0.46**
-Some speed changes
**Version 0.45**
-Added Azir
**Version 0.44**
-Added Gnar