Professional Documents
Culture Documents
#NoEnv
#SingleInstance force
FileEncoding , UTF-8
SendMode Input
SetTitleMatchMode, 3
macroVersion := 150
IfNotExist %A_MyDocuments%\AutoHotKey
{
FileCreateDir, %A_MyDocuments%\AutoHotKey
}
SetWorkingDir %A_MyDocuments%\AutoHotKey
IfNotExist, Lib
{
FileCreateDir, Lib
}
FileDelete, Lib\QDL.ahk
str := "#NoTrayIcon`nSetWorkingDir %A_MyDocuments%\AutoHotKey`nUrlDownloadToFile,
%1%,%2%`nIfNotExist, %2%`n{`nFileAppend,ERROR,%2%`n}"
FileAppend, %str%, Lib\QDL.ahk
IfNotExist, cports.exe
{
UrlDownloadToFile, http://lutbot.com/ahk/cports.exe, cports.exe
if ErrorLevel
msgbox, We couldn't download cports.exe, this is used as a
fallback to the normal logout method. The logout functionality may not work until
this is resolved. Please download cports.exe from http://lutbot.com/ahk/cports.exe
and place it in %A_MyDocuments%\AutoHotKey.
UrlDownloadToFile, http://lutbot.com/ahk/cports.chm, cports.chm
if ErrorLevel
error("ED03")
UrlDownloadToFile, http://lutbot.com/ahk/readme.txt, readme.txt
if ErrorLevel
error("ED04")
}
IfNotExist, settings.ini
{
defaultIni := "[variables]`n"
defaultIni .= "CharacterName=Lutbot`n"
defaultIni .= "League=standard`n"
defaultIni .= "PoeSteam=0`n"
defaultIni .= "XOffset=0`n"
defaultIni .= "YOffset=0`n"
defaultIni .= "ColorBG=11213a`n"
defaultIni .= "ColorText=c9d4e5`n"
defaultIni .= "MonitorWhispers=0`n"
defaultIni .= "MonitorWhispersDelay=10000`n"
defaultIni .= "LogFileLocation=ERROR PLEASE SELECT LOG FILE`n"
defaultIni .= "OverlayToggle=0`n"
defaultIni .= "SoundSelector=*-1`n"
defaultIni .= "Beta=1`n"
defaultIni .= "Diablo2=0`n"
defaultIni .= "HighBits=1`n"
defaultIni .= "[whisperMessages]`n"
defaultIni .= "wm1=One moment, I'm in a map.`n"
defaultIni .= "wm2=Sorry, That item has already been sold.`n"
defaultIni .= "wm3=Type a sentence here`n"
defaultIni .= "wm4=Type a sentence here`n"
defaultIni .= "wm5=Type a sentence here`n"
defaultIni .= "[partyMessages]`n"
defaultIni .= "pm1=Type messages here`n"
defaultIni .= "pm2=Accepts regular messages like this`n"
defaultIni .= "pm3=#or global messages like this`n"
defaultIni .= "pm4=%also party messages`n"
defaultIni .= "pm5=&don't spam your guild!`n"
defaultIni .= "pm6=we can use commands too`n"
defaultIni .= "pm7=/passives`n"
defaultIni .= "pm8=or go afk`n"
defaultIni .= "pm9=/afk i gotta poo`n"
defaultIni .= "pm10=the possibilties are endless`n"
defaultIni .= "[hotkeys]`n"
defaultIni .= "logout=```n"
defaultIni .= "superLogout=F12`n"
defaultIni .= "oos=F2`n"
defaultIni .= "remaining=F3`n"
defaultIni .= "whois=F4`n"
defaultIni .= "hideout=F5`n"
defaultIni .= "invite=F6`n"
defaultIni .= "toggleOverlay=F9`n"
defaultIni .= "options=F10`n"
defaultIni .= "priceCheck=F7`n"
defaultIni .= "wm1=^1`n"
defaultIni .= "wm2=^2`n"
defaultIni .= "wm3=^3`n"
defaultIni .= "wm4=^4`n"
defaultIni .= "wm5=^5`n"
defaultIni .= "pm1=!1`n"
defaultIni .= "pm2=!2`n"
defaultIni .= "pm3=!3`n"
defaultIni .= "pm4=!4`n"
defaultIni .= "pm5=!5`n"
defaultIni .= "pm6=!6`n"
defaultIni .= "pm7=!7`n"
defaultIni .= "pm8=!8`n"
defaultIni .= "pm9=!9`n"
defaultIni .= "pm10=!0"
getLeagueListing()
readFromFile()
current := 0
phase := 0
lastWhisperTimeRecieved := 0
;timers
sleepTime := 1000
updateTrackingTimer := 5000 ; 5 seconds
baseUpdateTrackingTimer := 600000 ; 10 minutes
verifyLogoutTimer := 0
baseVerifyLogoutTimer := 180000 ; 3 minutes
processWarningFound := 0
overlayTimer := 0
baseOverlayTimer := sleepTime
updateTrackingTimerActive := true
overlayTimerActive := true
lastUpdated := 1
preloadCportsTimer := 0
basePreloadCportsTimer := 180000 ; 3 minutes
preloadCportsCall := "cports.exe /stext TEMP"
;Ranking Overlay
Gui, 1:+ToolWindow
Gui, 1:Color, %colorBG%
Gui, 1:Font, %colorText% s14, Lucida Sans Unicode
Gui, 1:Add, Text, x3 y4 w120 vguiRank, Rank: N/A
Gui, 1:Font, s8
Gui, 1:Add, Text, x160 y2 vguiErr, Waiting
Gui, 1:Add, Text, x160 y17 vguiSettings, Settings:%hotkeyOptions%
Gui, 1:Font, s14
;Menu
Gui, 2:Add, Text,x5 y5, CharacterName:
Gui, 2:Add, Text,x5 y35, CharacterLeague:
Gui, 2:Add, Text,x5 y60 cc61919, Steam Client:
Gui, 2:Add, Text,x5 y85 cc61919, Dx11 (x64) Client:
Gui, 2:Add, Text,, Overlay X Offset:
Gui, 2:Add, Text,, Overlay Y Offset:
Gui, 2:Add, Text,, Background Color :
Gui, 2:Add, Text,, Text Color :
Gui, 2:Add, Text,, Beta version:
Gui, 2:Add, Text,h34, Diablo2 logout?:
//functions
priceCheck() {
priceCheckCommand:
global league
BlockInput On
clipboard =
Send ^c
BlockInput Off
ClipWait, 1
temp := clipboard
first := ""
second := ""
third := ""
fourth := ""
fifth := ""
secondToLast := ""
last := ""
continue := false
cycle := false
if continue
{
url := "http://api.lutbot.com:8080/price/v1/"
MouseGetPos, newX,newY
StringReplace, newSecond, second, %A_Space%, _, All
url .= league . "/" . newSecond . ""
SetTimer, getPrice, 1000
FileDelete, price.html
run "Lib\QDL.ahk" %url% "price.html"
return
getPrice:
IfExist, price.html
{
SetTimer, getPrice, off
FileRead, priceData, price.html
GuiControl,7:, priceLineOne, %second%
GuiControl,7:, priceLineTwo, %first%
GuiControl,7:, priceLineThree, %priceData%
Gui,7:Show, x%newX% y%newY% NA
SetTimer, hidePriceWindow, 3500
} else {
return
}
return
} else {
MouseGetPos, newX,newY
GuiControl,7:, priceLineOne, Price-Check does not work on
GuiControl,7:, priceLineTwo, non-specific items
GuiControl,7:, priceLineThree,
Gui,7:Show, x%newX% y%newY% NA
SetTimer, hidePriceWindow, 3500
}
return
}
hidePriceWindow(){
hidePriceWindow:
Gui,7:Hide
return
}
;legacy now
getVersion(){
global macroVersion
url := "http://api.lutbot.com:8080/version/v1/"
SetTimer, getVer, 1000
FileDelete, version.html
run "Lib\QDL.ahk" %url% "version.html"
return
getVer:
IfExist, version.html
{
SetTimer, getVer, off
FileRead, newestVersion, version.html
regexLocation := 1
arrayCount := 0
newStart := 0
While regexLocation
{
regexLocation := RegExMatch( leagues, """([A-z()0-9_]+)""",
regexString, regexLocation+1)
if regexLocation != 0
{
if !leagueString
leagueString = %regexString1%
else
leagueString .= "|" . regexString1
}
}
GuiControl,2:, guiLeague, %leagueString%
GuiControl,2:ChooseString, guiLeague, %league%
}
return
}
superLogoutCommand(){
superLogoutCommand:
Critical
logoutCommand()
return
}
logoutCommand(){
global executable, backupExe
logoutCommand:
Critical
succ := logout(executable)
if (succ == 0) && backupExe != "" {
newSucc := logout(backupExe)
error("ED12",executable,backupExe)
if (newSucc == 0) {
error("ED13")
}
}
return
}
cportsLogout(){
global cportsCommand, lastlogout
Critical
start := A_TickCount
ltime := lastlogout + 1000
if ( ltime < A_TickCount ) {
RunWait, %cportsCommand%
lastlogout := A_TickCount
}
Sleep 10
error("nb:" . A_TickCount - start)
return
}
logout(executable){
global GetTable, SetEntry, EnumProcesses, OpenProcessToken,
LookupPrivilegeValue, AdjustTokenPrivileges, loadedPsapi
Critical
start := A_TickCount
poePID := Object()
s := 4096
Process, Exist
h := DllCall("OpenProcess", "UInt", 0x0400, "Int", false, "UInt", ErrorLevel,
"Ptr")
try
{
s := VarSetCapacity(a, s)
c := 0
DllCall(EnumProcesses, "Ptr", &a, "UInt", s, "UIntP", r)
Loop, % r // 4
{
id := NumGet(a, A_Index * 4, "UInt")
if !h
continue
VarSetCapacity(n, s, 0)
e := DllCall("Psapi\GetModuleBaseName", "Ptr", h, "Ptr", 0,
"Str", n, "UInt", A_IsUnicode ? s//2 : s)
if !e
if e := DllCall("Psapi\GetProcessImageFileName", "Ptr", h,
"Str", n, "UInt", A_IsUnicode ? s//2 : s)
SplitPath n, n
DllCall("CloseHandle", "Ptr", h)
if (n && e)
if (n == executable) {
poePID.Insert(id)
}
}
l := poePID.Length()
if ( l = 0 ) {
Process, wait, %executable%, 0.2
if ( ErrorLevel > 0 ) {
poePID.Insert(ErrorLevel)
}
}
VarSetCapacity(dwSize, 4, 0)
result := DllCall(GetTable, UInt, &TcpTable, UInt, &dwSize, UInt, 0,
UInt, 2, UInt, 5, UInt, 0)
VarSetCapacity(TcpTable, NumGet(dwSize), 0)
num := NumGet(&TcpTable,0,"UInt")
IfEqual, num, 0
{
cportsLogout()
error("ED11",num,l,executable)
return False
}
out := 0
Loop %num%
{
cutby := a_index - 1
cutby *= 24
ownerPID := NumGet(&TcpTable,cutby+24,"UInt")
for index, element in poePID {
if ( ownerPID = element )
{
VarSetCapacity(newEntry, 20, 0)
NumPut(12,&newEntry,0,"UInt")
NumPut(NumGet(&TcpTable,cutby+8,"UInt"),&newEntry,4,"UInt")
NumPut(NumGet(&TcpTable,cutby+12,"UInt"),&newEntry,8,"UInt")
NumPut(NumGet(&TcpTable,cutby+16,"UInt"),&newEntry,12,"UInt")
NumPut(NumGet(&TcpTable,cutby+20,"UInt"),&newEntry,16,"UInt")
result := DllCall(SetEntry, UInt, &newEntry)
IfNotEqual, result, 0
{
cportsLogout()
error("TCP" . result,out,result,l,executable)
return False
}
out++
}
}
}
if ( out = 0 ) {
cportsLogout()
error("ED10",out,l,executable)
return False
} else {
error(l . ":" . A_TickCount - start,out,l,executable)
}
}
catch e
{
cportsLogout()
error("ED14","catcherror",e)
return False
}
return True
}
error(var,var2:="",var3:="",var4:="",var5:="",var6:="",var7:="") {
GuiControl,1:, guiErr, %var%
print := A_Now . "," . var . "," . var2 . "," . var3 . "," . var4 . "," .
var5 . "," . var6 . "," . var7 . "`n"
FileAppend, %print%, error.txt, UTF-16
return
}
invite(){
inviteCommand:
BlockInput On
Send ^{Enter}{Home}{Delete}/invite {Enter}
BlockInput Off
return
}
oosCommand(){
oosCommand:
BlockInput On
SendInput, {enter}
Sleep 2
SendInput, {/}oos
SendInput, {enter}
BlockInput Off
return
}
remaining(){
remainingCommand:
BlockInput On
SendInput, {enter}
Sleep 2
SendInput, {/}remaining
SendInput, {enter}
BlockInput Off
return
}
whois(){
whoisCommand:
BlockInput On
Send ^{Enter}{Home}{Delete}/whois {Enter}
BlockInput Off
return
}
hideout(){
hideoutCommand:
BlockInput On
SendInput, {Enter}
Sleep 2
SendInput, {/}hideout
SendInput, {Enter}
BlockInput Off
return
}
whisperCommand1:
BlockInput On
Sleep 2
SendInput ^{Enter}
SendInput %wm1%
SendInput {Enter}
BlockInput Off
return
whisperCommand2:
BlockInput On
Sleep 2
SendInput ^{Enter}
SendInput %wm2%
SendInput {Enter}
BlockInput Off
return
whisperCommand3:
BlockInput On
Sleep 2
SendInput ^{Enter}
SendInput %wm3%
SendInput {Enter}
BlockInput Off
return
whisperCommand4:
BlockInput On
Sleep 2
SendInput ^{Enter}
SendInput %wm4%
SendInput {Enter}
BlockInput Off
return
whisperCommand5:
BlockInput On
Sleep 2
SendInput ^{Enter}
SendInput %wm5%
SendInput {Enter}
BlockInput Off
return
partyCommand1:
BlockInput On
Sleep 2
SendInput {Enter}
SendInput ^A{BS}
SendRaw %pm1%
SendInput {Enter}
BlockInput Off
return
partyCommand2:
BlockInput On
Sleep 2
SendInput {Enter}
SendInput ^A{BS}
SendRaw %pm2%
SendInput {Enter}
BlockInput Off
return
partyCommand3:
BlockInput On
Sleep 2
SendInput {Enter}
SendInput ^A{BS}
SendRaw %pm3%
SendInput {Enter}
BlockInput Off
return
partyCommand4:
BlockInput On
Sleep 2
SendInput {Enter}
SendInput ^A{BS}
SendRaw %pm4%
SendInput {Enter}
BlockInput Off
return
partyCommand5:
BlockInput On
Sleep 2
SendInput {Enter}
SendInput ^A{BS}
SendRaw %pm5%
SendInput {Enter}
BlockInput Off
return
partyCommand6:
BlockInput On
Sleep 2
SendInput {Enter}
SendInput ^A{BS}
SendRaw %pm6%
SendInput {Enter}
BlockInput Off
return
partyCommand7:
BlockInput On
Sleep 2
SendInput {Enter}
SendInput ^A{BS}
SendRaw %pm7%
SendInput {Enter}
BlockInput Off
return
partyCommand8:
BlockInput On
Sleep 2
SendInput {Enter}
SendInput ^A{BS}
SendRaw %pm8%
SendInput {Enter}
BlockInput Off
return
partyCommand9:
BlockInput On
Sleep 2
SendInput {Enter}
SendInput ^A{BS}
SendRaw %pm9%
SendInput {Enter}
BlockInput Off
return
partyCommand10:
BlockInput On
Sleep 2
SendInput {Enter}
SendInput ^A{BS}
SendRaw %pm10%
SendInput {Enter}
BlockInput Off
return
browseForLogFile:
FileSelectFile, logFileLocation,, , Navigate to C:\Program Files
(x86)\Grinding Gear Games\Path of Exile\logs, Text Documents (*.txt; *.log)
GuiControl,2:, guiLogFileLocation, %logFileLocation%
return
changelogGui(){
changelogGui:
FileRead, changelog, changelog.txt
Gui, 3:Add, Edit, w600 h200 +ReadOnly, %changelog%
Gui, 3:Show
return
}
playSound:
Gui, 2:Submit, nohide
SoundPlay, %guiSoundSelector%
return
toggleOverlay(){
toggleOverlayCommand:
global toggle
toggle++
if toggle > 1
toggle := -1
if toggle = -1
{
Gui, 1:Hide
}
if toggle = 0
{
;Gui, 1:Show, h75 NA
Gui, 1:Show, h32 NA
}
if toggle = 1
{
;Gui, 1:Show, h46 NA
Gui, 1:Show, h32 NA
}
return
}
preloadCports(){
global preloadCportsTimer, basePreloadCportsTimer, preloadCportsCall
Run, %preloadCportsCall%
preloadCportsTimer := basePreloadCportsTimer
}
checkOverlay(){
global overlayTimer, baseOverlayTimer, toggle, xOffset, yOffset,
processWarningFound
if toggle != -1
{
IfWinActive Path of Exile
{
WinGetActiveStats,name,width,height,x,y
width += x
width += xOffset
hh := y
hh += yOffset
if toggle = 2
{
width /= 2
width -= 295
height /= 2
height -= 325
Gui, 5:Show, y%height% x%width% NA
}
if ( toggle = 1 ) || ( toggle = 0 )
{
width -= 231
Gui, 1:Show, y%hh% x%width% NA
}
if ( processWarningFound > 0 )
{
Gui, 6:Show, x0 y0 NA
} else {
Gui, 6:Hide
}
} else {
Gui, 1:Hide
Gui, 5:Hide
Gui, 6:Hide
}
}
overlayTimer := baseOverlayTimer
return
}
checkActiveType() {
global verifyLogoutTimer, baseVerifyLogoutTimer, executable,
processWarningFound, backupExe
val := 0
Process, Exist, %executable%
if !ErrorLevel
{
WinGet, id, list,Path of Exile,, Program Manager
Loop, %id%
{
this_id := id%A_Index%
WinGet, this_name, ProcessName, ahk_id %this_id%
backupExe := this_name
found .= ", " . this_name
val++
}
if ( val > 0 )
{
processWarningFound := 1
berrmsgf .= "You are running: " . found . ""
berrmsge .= "Your settings expect: " . executable . ""
} else {
processWarningFound := 0
backupExe := "No issues detected"
}
verifyLogoutTimer := baseVerifyLogoutTimer
return
}
runUpdate(){
global
runUpdate:
UrlDownloadToFile, http://lutbot.com/ahk/macro.ahk, %A_ScriptFullPath%
if ErrorLevel {
error("update","fail",A_ScriptFullPath, macroVersion,
A_AhkVersion)
error("ED07")
}
else {
error("update","pass",A_ScriptFullPath, macroVersion,
A_AhkVersion)
Run "%A_ScriptFullPath%"
}
Sleep 5000 ;This shouldn't ever hit.
error("update","uhoh", A_ScriptFullPath, macroVersion, A_AhkVersion)
dontUpdate:
Gui, 4:Destroy
return
}
checkForWhispers(){
global logFileLocation, lastWhisperTimeRecieved, monitorWhispersTimer,
monitorWhispersDelay, soundSelector
FileRead, BIGFILE, %logFileLocation%
StringGetPos, last25Location, BIGFILE,`n, R75
StringTrimLeft, smallfile, BIGFILE, %last25Location%
regexLocation := 1
arrayCount := 0
newStart := 0
While regexLocation
{
regexLocation := RegExMatch( smallfile, "(\d\d\d\d.\d\d.\d\d
\d\d:\d\d:\d\d)(?:.*)\[INFO Client \d+\] \@(.*)", regexString, regexLocation+1)
if regexLocation != 0
{
time%arrayCount% := regexString1
s%arrayCount% := regexString2
arrayCount++
}
}
loopCounter := 0
lnum := arrayCount-1
displayStart := arrayCount
d = :::
while loopCounter < arrayCount
{
if ( time%loopCounter% > lastWhisperTimeRecieved )
{
displayStart := loopCounter
goto breakWhisperTimes
}
loopCounter++
}
breakWhisperTimes:
if( lnum < 0)
lnum := 0
lastWhisperTimeRecieved := time%lnum%
displayString := ""
iterations := arrayCount - displayStart
loopCounter := arrayCount
verifyLogoutTimer -= sleepTime
if ( preloadCportsTimer <= 0 )
{
IfWinExist, Path of Exile
preloadCports()
else
preloadCportsTimer := basePreloadCportsTimer
}
if ( verifyLogoutTimer <= 0 )
{
IfWinExist, Path of Exile
checkActiveType()
}
Sleep sleepTime
}
return
}
updateTracking(){
global charName, league, updateTrackingTimer, baseUpdateTrackingTimer,
lastUpdated, toggle
updateTrackingTimer := baseUpdateTrackingTimer ; Wait the base time
if ( toggle < 0 ) {
return
}
StringLower, lowName, charName
url := "http://api.lutbot.com:8080/rank/v1/" . league . "/" . lowName . ""
SetTimer, loadLadder, 1000
FileDelete, ladder.json
run "Lib\QDL.ahk" %url% "ladder.json"
return
loadLadder:
rank := ""
IfExist, ladder.json
{
SetTimer, loadLadder, off
FileRead, ladderString, ladder.json
if ( ladderString = "0" ) {
rank := "Rank: Unranked"
} else {
rank := "Rank: "
rank .= ladderString
}
GuiControl,1:, guiRank, %rank%
} else {
return
}
return
}
hotkeys(){
optionsCommand:
global
Gui, 2:Show,, Macro Settings Version %macroVersion% :: AHK Version
%A_AhkVersion%
processWarningFound := 0
Gui, 6:Hide
return
}
submit(){
updateHotkeys:
global
Gui, 2:Submit
updsettings := "[variables]`n"
updsettings .= "CharacterName=" . guiChar . "`n"
updsettings .= "League=" . guiLeague . "`n"
updsettings .= "PoeSteam=" . guiSteam . "`n"
updsettings .= "XOffset=" . guiXOffset . "`n"
updsettings .= "YOffset=" . guiYOffset . "`n"
updsettings .= "ColorBG=" . guicolorBG . "`n"
updsettings .= "ColorText=" . guicolorText . "`n"
updsettings .= "MonitorWhispers=" . guiMonitorWhispers . "`n"
updsettings .= "MonitorWhispersDelay=" . guiMonitorWhispersDelay . "`n"
updsettings .= "LogFileLocation=" . logFileLocation . "`n"
updsettings .= "OverlayToggle=" . toggle . "`n"
updsettings .= "SoundSelector=" . guiSoundSelector . "`n"
updsettings .= "Beta=" . guibeta . "`n"
updsettings .= "HighBits=" . guihighBits . "`n"
updsettings .= "Diablo2=" . guidiablo2 . "`n"
updsettings .= "[whisperMessages]`n"
updsettings .= "wm1=" . guiwm1 . "`n"
updsettings .= "wm2=" . guiwm2 . "`n"
updsettings .= "wm3=" . guiwm3 . "`n"
updsettings .= "wm4=" . guiwm4 . "`n"
updsettings .= "wm5=" . guiwm5 . "`n"
updsettings .= "[partyMessages]`n"
updsettings .= "pm1=" . guipm1 . "`n"
updsettings .= "pm2=" . guipm2 . "`n"
updsettings .= "pm3=" . guipm3 . "`n"
updsettings .= "pm4=" . guipm4 . "`n"
updsettings .= "pm5=" . guipm5 . "`n"
updsettings .= "pm6=" . guipm6 . "`n"
updsettings .= "pm7=" . guipm7 . "`n"
updsettings .= "pm8=" . guipm8 . "`n"
updsettings .= "pm9=" . guipm9 . "`n"
updsettings .= "pm10=" . guipm10 . "`n"
updsettings .= "[hotkeys]`n"
updsettings .= "logout=" . guihotkeyLogout . "`n"
updsettings .= "superLogout=" . guihotkeySuperLogout . "`n"
updsettings .= "oos=" . guihotkeyOos . "`n"
updsettings .= "remaining=" . guihotkeyRemaining . "`n"
updsettings .= "whois=" . guihotkeyWhois . "`n"
updsettings .= "hideout=" . guihotkeyHideout . "`n"
updsettings .= "invite=" . guihotkeyInvite . "`n"
updsettings .= "toggleOverlay=" . guihotkeyToggleOverlay . "`n"
updsettings .= "options=" . guihotkeyOptions . "`n"
updsettings .= "priceCheck=" . guihotkeyPriceCheck . "`n"
updsettings .= "wm1=" . guihotkeywm1 . "`n"
updsettings .= "wm2=" . guihotkeywm2 . "`n"
updsettings .= "wm3=" . guihotkeywm3 . "`n"
updsettings .= "wm4=" . guihotkeywm4 . "`n"
updsettings .= "wm5=" . guihotkeywm5 . "`n"
updsettings .= "pm1=" . guihotkeypm1 . "`n"
updsettings .= "pm2=" . guihotkeypm2 . "`n"
updsettings .= "pm3=" . guihotkeypm3 . "`n"
updsettings .= "pm4=" . guihotkeypm4 . "`n"
updsettings .= "pm5=" . guihotkeypm5 . "`n"
updsettings .= "pm6=" . guihotkeypm6 . "`n"
updsettings .= "pm7=" . guihotkeypm7 . "`n"
updsettings .= "pm8=" . guihotkeypm8 . "`n"
updsettings .= "pm9=" . guihotkeypm9 . "`n"
updsettings .= "pm10=" . guihotkeypm10
FileDelete settings.ini
FileAppend, %updsettings%, settings.ini, UTF-16
readFromFile()
checkActiveType()
return
}
updateFiles(){
readFromFile(){
global
;reset hotkeys ughh.
Hotkey, IfWinActive, Path of Exile
If hotkeyLogout
Hotkey,% hotkeyLogout, logoutCommand, Off
If hotkeyOos
Hotkey,% hotkeyOos, oosCommand, Off
If hotkeyRemaining
Hotkey,% hotkeyRemaining, remainingCommand, Off
If hotkeyWhois
Hotkey,% hotkeyWhois, whoisCommand, Off
If hotkeyHideout
Hotkey,% hotkeyHideout, hideoutCommand, Off
If hotkeyInvite
Hotkey,% hotkeyInvite, inviteCommand, Off
If hotkeyToggleOverlay
Hotkey,% hotkeyToggleOverlay, toggleOverlayCommand, Off
If hotkeyPriceCheck
Hotkey,% hotkeyPriceCheck, priceCheckCommand, Off
If hotkeywm1
Hotkey,% hotkeywm1, whisperCommand1, Off
If hotkeywm2
Hotkey,% hotkeywm2, whisperCommand1, Off
If hotkeywm3
Hotkey,% hotkeywm3, whisperCommand1, Off
If hotkeywm4
Hotkey,% hotkeywm4, whisperCommand1, Off
If hotkeywm5
Hotkey,% hotkeywm5, whisperCommand1, Off
If hotkeypm1
Hotkey,% hotkeypm1, partyCommand1, Off
If hotkeypm2
Hotkey,% hotkeypm2, partyCommand2, Off
If hotkeypm3
Hotkey,% hotkeypm3, partyCommand3, Off
If hotkeypm4
Hotkey,% hotkeypm4, partyCommand4, Off
If hotkeypm5
Hotkey,% hotkeypm5, partyCommand5, Off
If hotkeypm6
Hotkey,% hotkeypm6, partyCommand6, Off
If hotkeypm7
Hotkey,% hotkeypm7, partyCommand7, Off
If hotkeypm8
Hotkey,% hotkeypm8, partyCommand8, Off
If hotkeypm9
Hotkey,% hotkeypm9, partyCommand9, Off
If hotkeypm10
Hotkey,% hotkeypm10, partyCommand10, Off
Hotkey, IfWinActive
If hotkeyOptions
Hotkey,% hotkeyOptions, optionsCommand, Off
If hotkeySuperLogout
Hotkey,% hotkeySuperLogout, superLogoutCommand, Off
Hotkey, IfWinActive, Path of Exile
; variables
IniRead, charName, settings.ini, variables, CharacterName
IniRead, league, settings.ini, variables, League
IniRead, steam, settings.ini, variables, PoeSteam
IniRead, xOffset, settings.ini, variables, XOffset
IniRead, yOffset, settings.ini, variables, YOffset
IniRead, colorBG, settings.ini, variables, ColorBG
IniRead, colorText, settings.ini, variables, ColorText
IniRead, monitorWhispers, settings.ini, variables, MonitorWhispers
IniRead, monitorWhispersDelay, settings.ini, variables, MonitorWhispersDelay
IniRead, logFileLocation, settings.ini, variables, LogFileLocation
IniRead, toggle, settings.ini, variables, OverlayToggle
IniRead, soundSelector, settings.ini, variables, SoundSelector
IniRead, beta, settings.ini, variables, Beta
IniRead, highBits, settings.ini, variables, HighBits
IniRead, diablo2, settings.ini, variables, Diablo2
; whisper messages
IniRead, wm1, settings.ini, whisperMessages, wm1
IniRead, wm2, settings.ini, whisperMessages, wm2
IniRead, wm3, settings.ini, whisperMessages, wm3
IniRead, wm4, settings.ini, whisperMessages, wm4
IniRead, wm5, settings.ini, whisperMessages, wm5
;party messages
IniRead, pm1, settings.ini, partyMessages, pm1
IniRead, pm2, settings.ini, partyMessages, pm2
IniRead, pm3, settings.ini, partyMessages, pm3
IniRead, pm4, settings.ini, partyMessages, pm4
IniRead, pm5, settings.ini, partyMessages, pm5
IniRead, pm6, settings.ini, partyMessages, pm6
IniRead, pm7, settings.ini, partyMessages, pm7
IniRead, pm8, settings.ini, partyMessages, pm8
IniRead, pm9, settings.ini, partyMessages, pm9
IniRead, pm10, settings.ini, partyMessages, pm10
;hotkeys
IniRead, hotkeyLogout, settings.ini, hotkeys, logout, %A_Space%
IniRead, hotkeySuperLogout, settings.ini, hotkeys, superLogout, %A_Space%
IniRead, hotkeyOos, settings.ini, hotkeys, oos, %A_Space%
IniRead, hotkeyRemaining, settings.ini, hotkeys, remaining, %A_Space%
IniRead, hotkeyWhois, settings.ini, hotkeys, whois, %A_Space%
IniRead, hotkeyHideout, settings.ini, hotkeys, hideout, %A_Space%
IniRead, hotkeyInvite, settings.ini, hotkeys, invite, %A_Space%
IniRead, hotkeyToggleOverlay, settings.ini, hotkeys, toggleOverlay, %A_Space%
IniRead, hotkeyOptions, settings.ini, hotkeys, options, %A_Space%
IniRead, hotkeyPriceCheck, settings.ini, hotkeys, priceCheck, %A_Space%
IniRead, hotkeywm1, settings.ini, hotkeys, wm1, %A_Space%
IniRead, hotkeywm2, settings.ini, hotkeys, wm2, %A_Space%
IniRead, hotkeywm3, settings.ini, hotkeys, wm3, %A_Space%
IniRead, hotkeywm4, settings.ini, hotkeys, wm4, %A_Space%
IniRead, hotkeywm5, settings.ini, hotkeys, wm5, %A_Space%
IniRead, hotkeypm1, settings.ini, hotkeys, pm1, %A_Space%
IniRead, hotkeypm2, settings.ini, hotkeys, pm2, %A_Space%
IniRead, hotkeypm3, settings.ini, hotkeys, pm3, %A_Space%
IniRead, hotkeypm4, settings.ini, hotkeys, pm4, %A_Space%
IniRead, hotkeypm5, settings.ini, hotkeys, pm5, %A_Space%
IniRead, hotkeypm6, settings.ini, hotkeys, pm6, %A_Space%
IniRead, hotkeypm7, settings.ini, hotkeys, pm7, %A_Space%
IniRead, hotkeypm8, settings.ini, hotkeys, pm8, %A_Space%
IniRead, hotkeypm9, settings.ini, hotkeys, pm9, %A_Space%
IniRead, hotkeypm10, settings.ini, hotkeys, pm10, %A_Space%
Hotkey, IfWinActive
If hotkeyOptions {
Hotkey,% hotkeyOptions, optionsCommand, On
GuiControl,1:, guiSettings, Settings:%hotkeyOptions%
}
else {
Hotkey,F10, optionsCommand, On
msgbox You dont have some hotkeys set!`nPlease hit F10 to open up your
config prompt and please configure your hotkeys (Path of Exile has to be in
focus).`nThe way you configure hotkeys is now in the GUI (default F10). Otherwise,
you didn't put a hotkey for the options menu. You need that silly.
GuiControl,1:, guiSettings, Settings:%hotkeyOptions%
}
If hotkeySuperLogout
Hotkey,% hotkeySuperLogout, superLogoutCommand, On
Hotkey, IfWinActive, Path of Exile
; extra checks
if monitorWhispers = ERROR
monitorWhispers := 0
if monitorWhispersDelay = ERROR
monitorWhispersDelay := 10000
if monitorWhispersDelay < 10000
monitorWhispersDelay := 10000
if beta = ERROR
beta = 0
if diablo2 = ERROR
diablo2 = 0
if steam = ERROR
steam = 0
if highBits = ERROR
highBits = 0
if (colorBG = "ERROR") || (colorBG = "")
colorBG = 11213a
if (colorText = "ERROR") || (colorText = "")
colorText = c9d4e5
if ( steam ) {
if ( highBits ) {
cportsCommand := "cports.exe /close * * * *
PathOfExile_x64Steam.exe"
executable := "PathOfExile_x64Steam.exe"
} else {
cportsCommand := "cports.exe /close * * * * PathOfExileSteam.exe"
executable := "PathOfExileSteam.exe"
}
} else {
if ( highBits ) {
cportsCommand := "cports.exe /close * * * * PathOfExile_x64.exe"
executable := "PathOfExile_x64.exe"
} else {
cportsCommand := "cports.exe /close * * * * PathOfExile.exe"
executable := "PathOfExile.exe"
}
}
if ( diablo2 ) {
cportsCommand := "cports.exe /close * * * * Game.exe"
executable := "Game.exe"
}
updateTrackingTimer := 5000
monitorWhispersTimer := monitorWhispersDelay
}
; ; ERROR LIST
; min lv = null : you typed in the league name wrong.
; ED01 : Error downloading rank from http://exiletools.com/ , their server might be
unavailible.
; ED02 -> ED04 : Error downloading currports from my website.
http://www.nirsoft.net/utils/cports.html holds the original file.
; ED05 : Error downloading ladder stats from http://exiletools.com/ , their server
might be unavailible.
; ED06 : Error checking for new version.
; ED07 : Error downloading newest version of ahk script.
; ED08 : Error downloading newest changelog.
; ED09 : Error downloading list of active leagues
; ED10 : Logged out with cports No process
; ED11 : Logged out with cports TcpTable Failure
; ED12 : Invalid logout settings
; ED13 : Total logout miss
; ED14 : try/catch