Code:
; Numba's POE tools Version 1.1
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
#Persistent ; Only the user can kill the application
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
StringCaseSense, On ; Match strings with case.
SetFormat, FloatFast, 0.2
; ---------------------------------------
; Created by Numba
; Credit to mcpower Clif4D for dps calc
; ---------------------------------------
Gui, Add, Picture, x-8 y0 w840 h300 , Tools GUI.png
Gui, Show, x131 y169 h300 w830, New GUI Window
Return
Menu, Tray, Add, Toggle Window, GuiToggle
Menu, Tray, Default, Toggle Window
;...
Gui, show, w600 h400,.
;...
Main_Window := WinExist("A")
GuiToggle:
IfWinExist, ahk_id %Main_Window%
Gui, Hide
else
Gui, Show
return
; DPS Calc
; Path of Exile Copy Paste for dps calc
F4::
IfWinActive Path of Exile ahk_class Direct3DWindowClass
{
WinActivate
BlockInput On
SendInput {Ctrl down}c{Ctrl up}
BlockInput Off
}
return
MouseMovePixels := 5 ; How many pixels you have to move. Edit this if you want.
OnClipboardChange:
IfWinActive Path of Exile ahk_class Direct3DWindowClass
{
ItemLevel := ""
Name := ""
Type := ""
Quality := 0
AttackSpeed := 0
PhysicalDamageLow := 0
PhysicalDamageHigh := 0
IncreasedPhysicalDamage := 0
FireDamageLow := 0
FireDamageHigh := 0
ColdDamageLow := 0
ColdDamageHigh := 0
LightningDamageLow := 0
LightningDamageHigh := 0
ChaosDamageLow := 0
ChaosDamageHigh := 0
Armour := 0
EvasionRating := 0
EnergyShield := 0
Loop, parse, Clipboard, `n, `r ; Goes through a loop with the lines of text found in the clipboard
{
if (A_Index = 1)
{
IfNotInString, A_Loopfield, Rarity: ; Starts a check whether it has "Rarity:" in the first line, otherwise exit
{
Exit
}
}
else if (A_Index = 2)
{
Name := A_Loopfield
}
else if (A_Index = 3)
{
Type := A_Loopfield
}
else if (!ItemLevel && RegExMatch(A_Loopfield, "Itemlevel: (\d*)", SubPat))
{
ItemLevel := SubPat1
}
else if (!Quality && RegExMatch(A_Loopfield, "Quality: \+(\d*)\%", SubPat))
{
Quality := SubPat1/100
}
else if (!AttackSpeed && RegExMatch(A_Loopfield, "Attacks per Second: (\d\.\d*)", SubPat))
{
AttackSpeed := SubPat1
}
else if (!PhysicalDamageLow && RegExMatch(A_Loopfield, "Physical Damage: (\d*)-(\d*)", SubPat))
{
PhysicalDamageLow := SubPat1
PhysicalDamageHigh := SubPat2
}
else if (!IncreasedPhysicalDamage && RegExMatch(A_Loopfield, "(\d*)\% increased Physical Damage", SubPat))
{
IncreasedPhysicalDamage := SubPat1/100
}
else if (!FireDamageLow && RegExMatch(A_Loopfield, "Adds (\d*)-(\d*) Fire Damage", SubPat))
{
FireDamageLow := SubPat1
FireDamageHigh := SubPat2
}
else if (!ColdDamageLow && RegExMatch(A_Loopfield, "Adds (\d*)-(\d*) Cold Damage", SubPat))
{
ColdDamageLow := SubPat1
ColdDamageHigh := SubPat2
}
else if (!LightningDamageLow && RegExMatch(A_Loopfield, "Adds (\d*)-(\d*) Lightning Damage", SubPat))
{
LightningDamageLow := SubPat1
LightningDamageHigh := SubPat2
}
else if (!ChaosDamageLow && RegExMatch(A_Loopfield, "Adds (\d*)-(\d*) Chaos Damage", SubPat))
{
ChaosDamageLow := SubPat1
ChaosDamageHigh := SubPat2
}
else if (!Armour && RegExMatch(A_Loopfield, "Armour: (\d*)", SubPat))
{
Armour:= SubPat1
}
else if (!EvasionRating && RegExMatch(A_Loopfield, "Evasion Rating: (\d*)", SubPat))
{
EvasionRating:= SubPat1
}
else if (!EnergyShield && RegExMatch(A_Loopfield, "Energy Shield: (\d*)", SubPat))
{
EnergyShield:= SubPat1
}
}
if (!ItemLevel) ; If we didn't get the itemlevel...
exit
if (AttackSpeed) ; It's a weapon
{
pDPS := (PhysicalDamageLow + PhysicalDamageHigh)/2*AttackSpeed
q20pDPS := ( round((round((PhysicalDamageLow)/(1+IncreasedPhysicalDamage+Quality))*(1+IncreasedPhysicalDamage+0.2))) + round((round((PhysicalDamageHigh)/(1+IncreasedPhysicalDamage+Quality))*(1+IncreasedPhysicalDamage+0.2))) ) /2*AttackSpeed
eDPS := (FireDamageLow + FireDamageHigh + ColdDamageLow + ColdDamageHigh + LightningDamageLow + LightningDamageHigh)/2*AttackSpeed
chaosDPS := (ChaosDamageLow + ChaosDamageHigh)/2*AttackSpeed
DPS := pDPS + eDPS + chaosDPS
q20DPS := q20pDPS + eDPS + chaosDPS
Attack := "DPS: " DPS " / " q20DPS "`n"
if (pDPS)
{
Attack := Attack " Physical: " pDPS " / " q20pDPS "`n"
}
if (eDPS)
{
Attack := Attack " Elemental: " eDPS "`n"
}
if (chaosDPS)
{
Attack := Attack " Chaos: " chaosDPS "`n"
}
ToolTip,%Name%`n%Type%`nItem Level: %ItemLevel%`n%Attack%
}
else if(Armour or EvasionRating or EnergyShield)
{
Defense := ""
if (Armour)
{
Defense := Defense "Armour: " Armour "/" round(round(Armour/(1+Quality))*1.2) "`n"
}
if (EvasionRating)
{
Defense := Defense "Evasion Rating: " EvasionRating "/" round(round(EvasionRating/(1+Quality))*1.2) "`n"
}
if (EnergyShield)
{
Defense := Defense "Energy Shield: " EnergyShield "/" round(round(EnergyShield/(1+Quality))*1.2) "`n"
}
ToolTip,%Name%`n%Type%`nItem Level: %ItemLevel%`n%Defense%
}
else
{
ToolTip,%Name%`n%Type%`nItem Level: %ItemLevel%
}
MouseGetPos, X, Y ; Stores the mouse position when the tooltip was displayed
Increment := 0 ; Sets the variable to increment
SetTimer, TimerTick, 100
}
return
TimerTick:
MouseMovePixels = 5 ; How many pixels you have to move. Edit this if you want.
Increment += 1 ; When it hits 75 (7.5 sec), it removes the tool tip just in case of it screwing up
MouseGetPos, currentX, currentY ; Used for the below expression
if ((X - CurrentX)**2 + (Y - CurrentY)**2 > MouseMovePixels**2 or Increment >= 75) {
SetTimer, TimerTick, Off ; When the mouse moves MouseMovePixels pixels, it stops the tooltip.
ToolTip
}
return
RemoveTooltip: ; exactly what it says
ToolTip
return
;You specify the x and y values, in the above example the x was 100 and the y was 1000
RandSleep(x,y) {
;Generate a random number between x(100) and y(1000)
Random, rand, %x%, %y%
;Sleep for the random amount
Sleep %rand%
}
; Path of Exile /oos
F2::
IfWinActive Path of Exile ahk_class Direct3DWindowClass
{
WinActivate
BlockInput On
SendInput {enter}/oos{enter}
BlockInput Off
}
return
; Path of Exile /remaining
F3::
IfWinActive Path of Exile ahk_class Direct3DWindowClass
{
WinActivate
BlockInput On
SendInput {enter}/remaining{enter}
BlockInput Off
}
return
; Path of Exile /itemlevel
F5::
IfWinActive Path of Exile ahk_class Direct3DWindowClass
{
WinActivate
BlockInput On
SendInput {enter}/itemlevel{enter}
BlockInput Off
}
return
; Path of Exile Auto Exit
F7::
IfWinActive Path of Exile ahk_class Direct3DWindowClass
{
WinActivate
BlockInput On
SendInput, {Esc}
WinGetPos,,,Width,Height,A
X := (Width / 2)
Y := Height * .45
RandSleep(150,300)
MouseClick, Left, X, Y, 1, 1
BlockInput Off
}
return
F8::
exitapp
; Spam Chat Chans 1-15 One time
F6::
IfWinActive Path of Exile ahk_class Direct3DWindowClass
{
WinActivate
SendMode Input
loop
{
SendInput {enter}
RandSleep(100,300)
SendInput {BS}
RandSleep(100,300)
SendInput {BS}
RandSleep(100,300)
SendInput {/}
RandSleep(100,300)
SendInput {t}
RandSleep(100,300)
SendInput {r}
RandSleep(100,300)
SendInput {a}
RandSleep(100,300)
SendInput {d}
RandSleep(100,300)
SendInput {e}
RandSleep(100,300)
SendInput {Space}
RandSleep(100,300)
SendInput %A_Index%
RandSleep(100,300)
SendInput {enter}
RandSleep(100,300)
SendInput {enter}
RandSleep(100,300)
SendInput {Up}
RandSleep(100,300)
SendInput {Up}
RandSleep(100,300)
SendInput {enter}
RandSleep(100,300)
If A_Index = 15
Break
else
RandSleep(500,1500)
}
}
return
F10::Pause