Hello,
You have made a great job !
You have made great improvements !
First of all, about the options Smartcast Toggle and Irritator, i dont use it too, i think it's good to remove it.
For the sales, it can be good idea to add the price in RP to the name of the skin. (You forestall me, i wanted report the Lolsales.com shutdown
)
Recently i have add also a "Ping Test", it can indicate if my ping is good or not.
Here is the topic about this :
https://autohotkey.com/boards/viewtopic.php?t=552
(u can test it directly)
Code: Select all
Ping4(Addr, ByRef Result := "", Timeout := 1024) {
Static WSADATAsize := (2 * 2) + 257 + 129 + (2 * 2) + (A_PtrSize - 2) + A_PtrSize
OrgAddr := Addr
Result := ""
VarSetCapacity(WSADATA, WSADATAsize, 0)
If (Err := DllCall("Ws2_32.dll\WSAStartup", "UShort", 0x0202, "Ptr", &WSADATA, "Int")) {
ErrorLevel := "WSAStartup failed with error " . Err
Return ""
}
If !RegExMatch(Addr, "^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$") { ; Addr contains a name
If !(HOSTENT := DllCall("Ws2_32.dll\gethostbyname", "AStr", Addr, "UPtr")) {
DllCall("Ws2_32.dll\WSACleanup") ; Terminate the use of the Winsock 2 DLL
ErrorLevel := "gethostbyname failed with error " . DllCall("Ws2_32.dll\WSAGetLastError", "Int")
Return ""
}
PAddrList := NumGet(HOSTENT + 0, (2 * A_PtrSize) + 4 + (A_PtrSize - 4), "UPtr")
PIPAddr := NumGet(PAddrList + 0, 0, "UPtr")
Addr := StrGet(DllCall("Ws2_32.dll\inet_ntoa", "UInt", NumGet(PIPAddr + 0, 0, "UInt"), "UPtr"), "CP0")
}
INADDR := DllCall("Ws2_32.dll\inet_addr", "AStr", Addr, "UInt") ; convert address to 32-bit UInt
If (INADDR = 0xFFFFFFFF) {
ErrorLevel := "inet_addr failed for address " . Addr
Return ""
}
; Terminate the use of the Winsock 2 DLL
DllCall("Ws2_32.dll\WSACleanup")
; -------------------------------------------------------------------------------------------------------------------
HMOD := DllCall("LoadLibrary", "Str", "Iphlpapi.dll", "UPtr")
Err := ""
If (HPORT := DllCall("Iphlpapi.dll\IcmpCreateFile", "UPtr")) { ; open a port
REPLYsize := 32 + 8
VarSetCapacity(REPLY, REPLYsize, 0)
If DllCall("Iphlpapi.dll\IcmpSendEcho", "Ptr", HPORT, "UInt", INADDR, "Ptr", 0, "UShort", 0
, "Ptr", 0, "Ptr", &REPLY, "UInt", REPLYsize, "UInt", Timeout, "UInt") {
Result := {}
Result.InAddr := OrgAddr
Result.IPAddr := StrGet(DllCall("Ws2_32.dll\inet_ntoa", "UInt", NumGet(Reply, 0, "UInt"), "UPtr"), "CP0")
Result.RTTime := NumGet(Reply, 8, "UInt")
}
Else
Err := "IcmpSendEcho failed with error " . A_LastError
DllCall("Iphlpapi.dll\IcmpCloseHandle", "Ptr", HPORT)
}
Else
Err := "IcmpCreateFile failed to open a port!"
DllCall("FreeLibrary", "Ptr", HMOD)
; -------------------------------------------------------------------------------------------------------------------
If (Err) {
ErrorLevel := Err
Return ""
}
ErrorLevel := 0
Return Result.RTTime
}
RTT := Ping4("riot.nl", Result)
If (ErrorLevel)
MsgBox, 16, Ping, Error:`r`n%ErrorLevel%
Else
MsgBox, 0, Ping, % "You ping : " . Result.RTTime . "`r`n"
I add a option in the menu to estimate my ping in game.
Then, i think it can be great to add a checkbox in the menu, to launch a game in a group or alone.
Code: Select all
Group:
If A_ThisMenuItem = Solo
{
Menu, Tray, ToggleCheck, Solo
Menu, Tray, Rename, Solo, Group
sGroupe = 1
}
else If A_ThisMenuItem = Group
{
Menu, Tray, ToggleCheck, Group
Menu, Tray, Rename, Group, Solo
sGroupe = 0
}
return
if sGroupe = 1
{
MouseMove, (w*.73),(h*.88)
MouseClick, left, (w*.73),(h*.88),,0
Sleep, 100
}else{
MouseMove, (w*.62),(h*.88)
MouseClick, left, (w*.62),(h*.88),,0
Sleep, 100
}
After, you can also add a "PickToCall" selection. When u accept the game, the script will say in the chat the lane u want to choose and pick ur champion (thank to the search fields).
Here is the selection of the champion and the lane.
Code: Select all
AutoPick:
{
WindoGUI:
myvar = Actif
Gui, -Caption
Gui, font, s12 white
Gui, Add, Text, x458 y6 gclose, x
ChampionListURL = https://global.api.pvp.net/api/lol/static-data/euw/v1.2/champion?locale=fr_FR&api_key=72f7888e-0a65-4f90-aeea-c08f3ae1a6bf
global ChampCount
ComObjError(0)
WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
WebRequest.Open("GET", ChampionListURL)
WebRequest.Send()
str := WebRequest.ResponseText(), ComObjError(0)
StringReplace, str, str, `",,All ;"
StringReplace, str, str, `,, %A_Space%,All
StringReplace, str, str, name, name, UseErrorLevel
ChampCount := ErrorLevel
Pos = 1
Loop, %ChampCount%
{
Pos := (RegExMatch(str, "name:(.*?)\stitle:", Champs, Pos)) + 2
If Champs1 contains Yi
Champs1 = Maitre Yi
If A_Index = 1
NameList = %Champs1%
else
NameList = %NameList%|%Champs1%
}
Sort, NameList, D`|
Gui, Add, Picture, x50 y50 +BackgroundTrans vMyPicture , ChampIcon\Sona.png
gui, Add, ComboBox, vthisVar w140 r10 gAC, %NameList%
Gui, Add, Text, x250 y70, Lane :
gui, Add, Edit, vthatVar r4
gui, add, button, xp-50 yp+90 gDone, OK
Gui, Show, w500 h340
}
return
uiMove:
PostMessage, 0xA1, 2,,, A
Return
AC:
AutoComplete(A_GuiControl)
gui,submit,nohide
GuiControl,, MyPicture, ChampIcon\%thisVar%.png
StringLower, thisVar, thisVar
Return
GuiClose:
Gui Destroy
Return
Done:
gui,submit,nohide
gui, destroy
herochoose := thisVar
lanechoose := thatVar
;PickCall(thisVar,thatVar)
return
myguiclose:
{
ExitApp
}
return
close:
GuiEscape:
Gui, Destroy
Click1:
AutoComplete(A_GuiControl)
gui,submit,nohide
GuiControl,, MyPicture, ChampIcon\%thisVar%.png
Return
;AutoComplete SectionBot adc
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%
}
}
}
Of course, it's available only if the game is a blind game.
Yes , I still have something to say. U can also add the free champ of the week. For that, i enlarge the icon of these champions in the guide list.
Code: Select all
GetFreeChamp(apikey)
{
global ChampCount
GameURL = https://euw.api.pvp.net/api/lol/euw/v1.2/champion?freeToPlay=true&api_key=%apiKey%
ComObjError(0)
WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
WebRequest.Open("GET", GameURL)
WebRequest.Send()
str := WebRequest.ResponseText(), ComObjError(0)
StringReplace, str, str, `",,All ;"
StringReplace, str, str, `,, %A_Space%,All
StringReplace, str, str, id, id, UseErrorLevel
ChampCount := ErrorLevel
Pos = 1
Loop, %ChampCount%
{
Sleep 50
Pos := (RegExMatch(str, "id:(.*?)\sactive:", Champs, Pos)) + 2
If (A_Index = 1)
{
ChampName := GetChampById(Champs1,apikey)
NameList = %ChampName%
}
else
{
ChampName := GetChampById(Champs1,apikey)
NameList = %NameList%|%ChampName%
}
StringReplace, ChampName, ChampName, Cho'Gath, Chogath
StringReplace, ChampName, ChampName, Dr. Mundo, DrMundo
StringReplace, ChampName, ChampName, Jarvan IV, JarvanIV
StringReplace, ChampName, ChampName, Fiddlesticks, FiddleSticks
StringReplace, ChampName, ChampName, LeBlanc, Leblanc
StringReplace, ChampName, ChampName, Kha'Zix, Khazix
StringReplace, ChampName, ChampName, Kog'Maw, KogMaw
StringReplace, ChampName, ChampName, Rek'Sai, RekSai
StringReplace, ChampName, ChampName, Vel'Koz, Velkoz
}
Sort, NameList, D`|
return NameList
}
And on the guide :
If FreeChamp contains %champname%
{
Menu, GuideMenu, Icon, %champname%, %A_ScriptDir%\ChampIcon\%champname%.png,,35
}else{
Menu, GuideMenu, Icon, %champname%, %A_ScriptDir%\ChampIcon\%champname%.png,,20
}
To conclude, the game stats is a good idea, i also make one for the top 5 best champ of the summoner in my game.
Keep on going ur job, it's amazing !
Notice : It's Osimodas, i changed my account to Osi, it's shorter. I'm always French, so sorry for the English