ItemLevelコマンドをCtrl+Cで実行するマクロ(フルスクリーンでも動作)
POEを実行する時、フルスクリーンにするように設定を変更しました。その影響でこちらの記事のDPS表示マクロが表示されなくなりました。ItemLevelを見るように使っていましたが、無いと急に不便に感じる体になってしまっていた・・・。
DPS表示マクロもきっとまだ使うだろうということで、コードはそのままにItemLevelを表示するコードを追加することにしました。このコードはこちらの公式Forumからコピーしてきました。
変更後の全コード
#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 mcpower - modified by Clif4D
;
; 2014/12/11 modified by kiki kotori
; ---------------------------------------
MouseMovePixels := 5 ; How many pixels you have to move. Edit this if you want.
OnClipboardChange:
IfWinActive, Path of Exile ahk_class Direct3DWindowClass ; May save CPU usage when copying stuff outside of PoE. Hasn't been tested.
{
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
;ElementalDamageLow := 0
;ElementalDamageHigh := 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,Item 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,Item Level: %ItemLevel%`n%Defense%
}
else
{
ToolTip,Item Level: %ItemLevel%
}
;// Output Console
BlockInput On
Send {LButton}
Send {Enter}
Sleep 2
Send /itemlevel
Send {Enter}
Sleep, 200
Send {LButton}
BlockInput Off
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 = 50 ; 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 on the tin
ToolTip
return
ItemLevelを知りたいアイテム上でCtrl+Cを押せば
左クリック(アイテムをつかむ) → Enterキー → /itemlevel → Enterキー → 左クリック(アイテムを放す)
を自動でやってくれます。
それでは良いPOEライフを!

![[Unity] 雪に残る足跡表現とパーティクルを使った積雪表現](http://kikikiroku.session.jp/wp-content/uploads/wordpress-popular-posts/1355-featured-120x100.gif)
![[Unity] 新UGUIでゲーム内にモーダルダイアログ(ポーズメニュー)を表示する](http://kikikiroku.session.jp/wp-content/uploads/wordpress-popular-posts/883-featured-120x100.png)
![[Unity] スクリプトからMesh、GameObjectを作成しPrefabへ登録する](http://kikikiroku.session.jp/wp-content/uploads/wordpress-popular-posts/1051-featured-120x100.png)

![[Unity] FF4、FF5のダメージ表示アニメーションをUnityで再現する](http://kikikiroku.session.jp/wp-content/uploads/wordpress-popular-posts/768-featured-120x100.png)
![[Unity] FF10エンカウントエフェクトを再現する [画面バラバラ]](http://kikikiroku.session.jp/wp-content/uploads/wordpress-popular-posts/1074-featured-120x100.png)
![[Unity] FF1からFF6までのダメージ表示アニメーションを再現する](http://kikikiroku.session.jp/wp-content/uploads/wordpress-popular-posts/971-featured-120x100.png)

![[Unity] 画面をキャプチャーしてPNGファイルへ出力する [Not RenderTexture]](http://kikikiroku.session.jp/wp-content/uploads/wordpress-popular-posts/1062-featured-120x100.png)
