diff --git a/.gitignore b/.gitignore index eb2fcfa3..a066395e 100644 --- a/.gitignore +++ b/.gitignore @@ -62,9 +62,6 @@ backup/* backup/ test.ahk -config.ini -config_trade.ini - lib/node_modules lib/npm-debug.log.* release diff --git a/Fallback.exe b/Fallback.exe index 544aeec1..0bc6af4d 100644 Binary files a/Fallback.exe and b/Fallback.exe differ diff --git a/Run_ItemInfo.ahk b/Run_ItemInfo.ahk index fa4a075d..0bad0414 100644 --- a/Run_ItemInfo.ahk +++ b/Run_ItemInfo.ahk @@ -1,137 +1,14 @@ -; #################################################################################################### -; # This script merges PoE-ItemInfo and AdditionalMacros into one script and executes it. -; # We also have to set some global variables and pass them to the ItemInfo script. -; # This is to support using ItemInfo as dependancy for other tools. -; #################################################################################################### -#Include, %A_ScriptDir%\resources\Version.txt +; ##################################################################################################################### +; # This script checks if the right AHK version is installed and runs the ItemInfo merge script. +; ##################################################################################################################### +#Include %A_ScriptDir%\resources\Version.txt -MsgWrongAHKVersion := "AutoHotkey v" . AHKVersionRequired . " or later is needed to run this script. `n`nYou are using AutoHotkey v" . A_AhkVersion . " (installed at: " . A_AhkPath . ")`n`nPlease go to http://ahkscript.org to download the most recent version." -If (A_AhkVersion < AHKVersionRequired) -{ - MsgBox, 16, Wrong AutoHotkey Version, % MsgWrongAHKVersion - ExitApp +MsgWrongAHKVersion := "AutoHotkey v" . AHKVersionRequired . " or later is needed to run this script. It is important not to run version 2.x. `n`nYou are using AutoHotkey v" . A_AhkVersion . " (installed at: " . A_AhkPath . ")`n`nPlease go to http://ahkscript.org to download the most recent version." +If (A_AhkVersion < AHKVersionRequired or A_AhkVersion >= "2.0.00.00") +{ + MsgBox, 16, Wrong AutoHotkey Version, % AHKVersionRequired + ExitApp } -RunAsAdmin() -If (!PoEScripts_CreateTempFolder(A_ScriptDir, "PoE-ItemInfo")) { - ExitApp -} - -If (InStr(A_ScriptDir, A_Desktop)) { - Msgbox, 0x1010, Invalid Installation Path, Executing PoE-ItemInfo from your Desktop may cause script errors, please choose a different directory. -} - -/* - Set ProjectName to create user settings folder in A_MyDocuments -*/ -projectName := "PoE-ItemInfo" -FilesToCopyToUserFolder := ["\resources\config\default_config.ini", "\resources\ahk\default_AdditionalMacros.txt", "\resources\ahk\default_MapModWarnings.txt"] -overwrittenFiles := PoEScripts_HandleUserSettings(projectName, A_MyDocuments, "", FilesToCopyToUserFolder, A_ScriptDir) -isDevelopmentVersion := PoEScripts_isDevelopmentVersion() -userDirectory := A_MyDocuments . "\" . projectName . isDevelopmentVersion - -PoEScripts_CompareUserFolderWithScriptFolder(userDirectory, A_ScriptDir, projectName) - -/* - merge all scripts into `_ItemInfoMain.ahk` and execute it. -*/ -info := ReadFileToMerge(A_ScriptDir "\resources\ahk\POE-ItemInfo.ahk") -addMacros := ReadFileToMerge(userDirectory "\AdditionalMacros.txt") - -info := info . "`n`r`n`r" -addMacros := "#IfWinActive Path of Exile ahk_class POEWindowClass ahk_group PoEexe" . "`n`r`n`r" . addMacros -addMacros .= AppendCustomMacros(userDirectory) - -CloseScript("ItemInfoMain.ahk") -FileDelete, %A_ScriptDir%\_ItemInfoMain.ahk -FileCopy, %A_ScriptDir%\resources\ahk\POE-ItemInfo.ahk, %A_ScriptDir%\_ItemInfoMain.ahk - -FileAppend, %addMacros% , %A_ScriptDir%\_ItemInfoMain.ahk - -; set script hidden -FileSetAttrib, +H, %A_ScriptDir%\_ItemInfoMain.ahk -; pass some parameters to ItemInfo -Run "%A_AhkPath%" "%A_ScriptDir%\_ItemInfoMain.ahk" "%projectName%" "%userDirectory%" "%isDevelopmentVersion%" "%overwrittenFiles%" - -ExitApp - - -; #################################################################################################### -; # functions -; #################################################################################################### - -CloseScript(Name) -{ - DetectHiddenWindows On - SetTitleMatchMode RegEx - IfWinExist, i)%Name%.* ahk_class AutoHotkey - { - WinClose - WinWaitClose, i)%Name%.* ahk_class AutoHotkey, , 2 - If ErrorLevel - Return "Unable to close " . Name - Else - Return "Closed " . Name - } - Else - Return Name . " not found" -} - -RunAsAdmin() -{ - ShellExecute := A_IsUnicode ? "shell32\ShellExecute":"shell32\ShellExecuteA" - If Not A_IsAdmin - { - If A_IsCompiled - DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_ScriptFullPath, str, A_WorkingDir, int, 1) - Else - DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_AhkPath, str, """" . A_ScriptFullPath . """", str, A_WorkingDir, int, 1) - ExitApp - } -} - -AppendCustomMacros(userDirectory) -{ - If(!InStr(FileExist(userDirectory "\CustomMacros"), "D")) { - FileCreateDir, %userDirectory%\CustomMacros\ - } - - appendedMacros := "`n`n" - extensions := "txt,ahk" - Loop %userDirectory%\CustomMacros\* - { - If A_LoopFileExt in %extensions% - { - FileRead, tmp, %A_LoopFileFullPath% - appendedMacros .= "; appended custom macro file: " A_LoopFileName " ---------------------------------------------------" - appendedMacros .= "`n" tmp "`n`n" - } - } - - Return appendedMacros -} - -ReadFileToMerge(path) { - If (FileExist(path)) { - ErrorLevel := 0 - FileRead, file, %path% - If (ErrorLevel = 1) { - ; file does not exist (should be caught already) - Msgbox, 4096, Critical file read error, File "%path%" doesn't exist.`n`nClosing Script... - ExitApp - } Else If (ErrorLevel = 2) { - ; file is locked or inaccessible - Msgbox, 4096, Critical file read error, File "%path%" is locked or inaccessible.`n`nClosing Script... - ExitApp - } Else If (ErrorLevel = 3) { - ; the system lacks sufficient memory to load the file - Msgbox, 4096, Critical file read error, The system lacks sufficient memory to load the file "%path%".`n`nClosing Script... - ExitApp - } Else { - Return file - } - } Else { - Msgbox, 4096, Critical file read error, File "%path%" doesn't exist.`n`nClosing Script... - ExitApp - } -} \ No newline at end of file +Run "%A_AhkPath%" "%A_ScriptDir%\resources\ahk\Merge_ItemInfo.ahk" "%A_ScriptDir%" +ExitApp \ No newline at end of file diff --git a/Run_TradeMacro.ahk b/Run_TradeMacro.ahk index ad208768..0002a2f6 100644 --- a/Run_TradeMacro.ahk +++ b/Run_TradeMacro.ahk @@ -1,15 +1,13 @@ ; ##################################################################################################################### -; # This script merges TradeMacro, TradeMacroInit, PoE-ItemInfo and AdditionalMacros into one script and executes it. -; # We also have to set some global variables and pass them to the ItemInfo/TradeMacroInit scripts. -; # This is to support using ItemInfo as dependancy for TradeMacro. +; # This script checks if the right AHK version is installed and runs the TradeMacro merge script. ; ##################################################################################################################### -#Include, %A_ScriptDir%\resources\VersionTrade.txt +#Include %A_ScriptDir%\resources\VersionTrade.txt -TradeMsgWrongAHKVersion := "AutoHotkey v" . TradeAHKVersionRequired . " or later is needed to run this script. `n`nYou are using AutoHotkey v" . A_AhkVersion . " (installed at: " . A_AhkPath . ")`n`nPlease go to http://ahkscript.org to download the most recent version." -If (A_AhkVersion < TradeAHKVersionRequired) +TradeMsgWrongAHKVersion := "AutoHotkey v" . TradeAHKVersionRequired . " or later is needed to run this script. It is important not to run version 2.x. `n`nYou are using AutoHotkey v" . A_AhkVersion . " (installed at: " . A_AhkPath . ")`n`nPlease go to http://ahkscript.org to download the most recent version." +If (A_AhkVersion < TradeAHKVersionRequired or A_AhkVersion >= "2.0.00.00") { - MsgBox, 16, Wrong AutoHotkey Version, % TradeMsgWrongAHKVersion - ExitApp + MsgBox, 16, Wrong AutoHotkey Version, % TradeMsgWrongAHKVersion + ExitApp } arguments := "" @@ -18,147 +16,5 @@ Loop, %0% ; For each parameter arguments .= " " Trim(%A_Index%) } -If (!InStr(arguments, "-noelevation", 0)) { - RunAsAdmin(arguments) -} -If (InStr(arguments, "-nosplash", 0)) { - skipSplash := 1 -} Else { - skipSplash := 0 - StartSplashScreen() -} - -If (!PoEScripts_CreateTempFolder(A_ScriptDir, "PoE-TradeMacro")) { - ExitApp -} - -If (InStr(A_ScriptDir, A_Desktop)) { - Msgbox, 0x1010, Invalid Installation Path, Executing PoE-TradeMacro from your Desktop may cause script errors, please choose a different directory. -} - -/* - Set ProjectName to create user settings folder in A_MyDocuments -*/ -projectName := "PoE-TradeMacro" -FilesToCopyToUserFolder := ["\resources\config\default_config_trade.ini", "\resources\config\default_config.ini", "\resources\ahk\default_AdditionalMacros.txt", "\resources\ahk\default_MapModWarnings.txt"] -overwrittenFiles := PoEScripts_HandleUserSettings(projectName, A_MyDocuments, projectName, FilesToCopyToUserFolder, A_ScriptDir) -isDevelopmentVersion := PoEScripts_isDevelopmentVersion() -userDirectory := A_MyDocuments . "\" . projectName . isDevelopmentVersion - -PoEScripts_CompareUserFolderWithScriptFolder(userDirectory, A_ScriptDir, projectName) - -/* - merge all scripts into `_TradeMacroMain.ahk` and execute it. -*/ -info := ReadFileToMerge(A_ScriptDir "\resources\ahk\POE-ItemInfo.ahk") -tradeInit := ReadFileToMerge(A_ScriptDir "\resources\ahk\TradeMacroInit.ahk") -trade := ReadFileToMerge(A_ScriptDir "\resources\ahk\TradeMacro.ahk") -addMacros := ReadFileToMerge(userDirectory "\AdditionalMacros.txt") - -info := "`n`r`n`r" . info . "`n`r`n`r" -addMacros := "#IfWinActive Path of Exile ahk_class POEWindowClass ahk_group PoEexe" . "`n`r`n`r" . addMacros . "`n`r`n`r" -addMacros .= AppendCustomMacros(userDirectory) - -CloseScript("_TradeMacroMain.ahk") -CloseScript("_ItemInfoMain.ahk") -FileDelete, %A_ScriptDir%\_TradeMacroMain.ahk -FileDelete, %A_ScriptDir%\_ItemInfoMain.ahk -FileCopy, %A_ScriptDir%\resources\ahk\TradeMacroInit.ahk, %A_ScriptDir%\_TradeMacroMain.ahk - -FileAppend, %info% , %A_ScriptDir%\_TradeMacroMain.ahk -FileAppend, %addMacros% , %A_ScriptDir%\_TradeMacroMain.ahk -FileAppend, %trade% , %A_ScriptDir%\_TradeMacroMain.ahk - -; set script hidden -FileSetAttrib, +H, %A_ScriptDir%\_TradeMacroMain.ahk -; pass some parameters to TradeMacroInit -Run "%A_AhkPath%" "%A_ScriptDir%\_TradeMacroMain.ahk" "%projectName%" "%userDirectory%" "%isDevelopmentVersion%" "%overwrittenFiles%" "isMergedScript" "%skipSplash%" - -ExitApp - - -; #################################################################################################################### -; # functions -; #################################################################################################################### - -CloseScript(Name) -{ - DetectHiddenWindows On - SetTitleMatchMode RegEx - IfWinExist, i)%Name%.* ahk_class AutoHotkey - { - WinClose - WinWaitClose, i)%Name%.* ahk_class AutoHotkey, , 2 - If ErrorLevel - Return "Unable to close " . Name - Else - Return "Closed " . Name - } - Else - Return Name . " not found" -} - -RunAsAdmin(arguments) -{ - ShellExecute := A_IsUnicode ? "shell32\ShellExecute":"shell32\ShellExecuteA" - If Not A_IsAdmin - { - If A_IsCompiled - DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_ScriptFullPath . " " . arguments, str, A_WorkingDir, int, 1) - Else - DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_AhkPath, str, """" . A_ScriptFullPath . """" . " " . arguments, str, A_WorkingDir, int, 1) - ExitApp - } - - Return arguments -} - -StartSplashScreen() { - SplashTextOn, , 20, PoE-TradeMacro, Merging and starting Scripts... -} - -AppendCustomMacros(userDirectory) -{ - If(!InStr(FileExist(userDirectory "\CustomMacros"), "D")) { - FileCreateDir, %userDirectory%\CustomMacros\ - } - - appendedMacros := "`n`n" - extensions := "txt,ahk" - Loop %userDirectory%\CustomMacros\* - { - If A_LoopFileExt in %extensions% - { - FileRead, tmp, %A_LoopFileFullPath% - appendedMacros .= "; appended custom macro file: " A_LoopFileName " ---------------------------------------------------" - appendedMacros .= "`n" tmp "`n`n" - } - } - - Return appendedMacros -} - -ReadFileToMerge(path) { - If (FileExist(path)) { - ErrorLevel := 0 - FileRead, file, %path% - If (ErrorLevel = 1) { - ; file does not exist (should be caught already) - Msgbox, 4096, Critical file read error, File "%path%" doesn't exist.`n`nClosing Script... - ExitApp - } Else If (ErrorLevel = 2) { - ; file is locked or inaccessible - Msgbox, 4096, Critical file read error, File "%path%" is locked or inaccessible.`n`nClosing Script... - ExitApp - } Else If (ErrorLevel = 3) { - ; the system lacks sufficient memory to load the file - Msgbox, 4096, Critical file read error, The system lacks sufficient memory to load the file "%path%".`n`nClosing Script... - ExitApp - } Else { - Return file - } - } Else { - Msgbox, 4096, Critical file read error, File "%path%" doesn't exist.`n`nClosing Script... - ExitApp - } -} \ No newline at end of file +Run "%A_AhkPath%" "%A_ScriptDir%\resources\ahk\Merge_TradeMacro.ahk" "%A_ScriptDir%" %arguments% +ExitApp \ No newline at end of file diff --git a/data_trade/currencyData_Fallback_Hardcore.json b/data_trade/currencyData_Fallback_Hardcore.json new file mode 100644 index 00000000..f6b91a16 --- /dev/null +++ b/data_trade/currencyData_Fallback_Hardcore.json @@ -0,0 +1 @@ +{"lines":[{"currencyTypeName":"Exalted Orb","pay":{"id":0,"leagueId":2,"payCurrencyId":2,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":4,"value":0.0164740,"dataPointCount":1},"receive":null,"paySparkLine":{"data":[0.0,1.46,1.46,1.33,1.40,2.31,-4.22],"totalChange":-4.22},"receiveSparkLine":{"data":[null,0.0,0.0,null,null,null,null],"totalChange":0.0},"chaosEquivalent":60.70},{"currencyTypeName":"Divine Orb","pay":{"id":0,"leagueId":2,"payCurrencyId":3,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":1,"value":0.06667,"dataPointCount":1},"receive":null,"paySparkLine":{"data":[0.0,null,null,-13.33,-6.34,6.67,0.0],"totalChange":0.0},"receiveSparkLine":{"data":[null,null,null,0.0,1.94,3.45,null],"totalChange":3.45},"chaosEquivalent":15.00},{"currencyTypeName":"Master Cartographer's Sextant","pay":{"id":0,"leagueId":2,"payCurrencyId":48,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":1,"value":0.33333,"dataPointCount":1},"receive":null,"paySparkLine":{"data":[null,null,null,null,null,null,0.0],"totalChange":0.0},"receiveSparkLine":{"data":[],"totalChange":0.0},"chaosEquivalent":3.00},{"currencyTypeName":"Gemcutter's Prism","pay":null,"receive":{"id":0,"leagueId":2,"payCurrencyId":1,"getCurrencyId":15,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":1,"value":2.00000,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,0.0,0.0,0.0,30.80,140.00,20.00],"totalChange":20.00},"chaosEquivalent":2.00},{"currencyTypeName":"Cartographer's Chisel","pay":null,"receive":{"id":0,"leagueId":2,"payCurrencyId":1,"getCurrencyId":10,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":2,"value":0.3490540,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,7.32,-5.36,-5.36,-1.16,-3.98,35.84],"totalChange":35.84},"chaosEquivalent":0.35},{"currencyTypeName":"Orb of Chance","pay":null,"receive":{"id":0,"leagueId":2,"payCurrencyId":1,"getCurrencyId":16,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":1,"value":0.33333,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,0.0,0.0,62.86,46.20,0.0,0.0],"totalChange":0.0},"chaosEquivalent":0.33},{"currencyTypeName":"Orb of Alchemy","pay":{"id":0,"leagueId":2,"payCurrencyId":4,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":1,"value":9.00000,"dataPointCount":1},"receive":{"id":0,"leagueId":2,"payCurrencyId":1,"getCurrencyId":4,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":2,"value":0.3454520,"dataPointCount":1},"paySparkLine":{"data":[0.0,null,null,null,null,null,-44.44],"totalChange":-44.44},"receiveSparkLine":{"data":[0.0,0.0,0.0,0.0,0.0,0.0,0.11],"totalChange":0.11},"chaosEquivalent":0.23},{"currencyTypeName":"Glassblower's Bauble","pay":null,"receive":{"id":0,"leagueId":2,"payCurrencyId":1,"getCurrencyId":19,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":1,"value":0.23077,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,0.0,8.09,44.44,0.0,0.0,0.0],"totalChange":0.0},"chaosEquivalent":0.23},{"currencyTypeName":"Chromatic Orb","pay":null,"receive":{"id":0,"leagueId":2,"payCurrencyId":1,"getCurrencyId":17,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":4,"value":0.1083320,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,-1.63,0.44,-15.54,-14.31,6.60,91.35],"totalChange":91.35},"chaosEquivalent":0.11},{"currencyTypeName":"Orb of Alteration","pay":{"id":0,"leagueId":2,"payCurrencyId":6,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":1,"value":25.00000,"dataPointCount":1},"receive":{"id":0,"leagueId":2,"payCurrencyId":1,"getCurrencyId":6,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":3,"value":0.1060620,"dataPointCount":1},"paySparkLine":{"data":[null,null,null,null,null,null,0.0],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,-47.78,-42.80,-36.82,-36.82,-35.24,12.46],"totalChange":12.46},"chaosEquivalent":0.07},{"currencyTypeName":"Orb of Transmutation","pay":null,"receive":{"id":0,"leagueId":2,"payCurrencyId":1,"getCurrencyId":21,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":1,"value":0.05450,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,0.0,0.0,-47.58,-30.26,0.0,0.0],"totalChange":0.0},"chaosEquivalent":0.05},{"currencyTypeName":"Blacksmith's Whetstone","pay":null,"receive":{"id":0,"leagueId":2,"payCurrencyId":1,"getCurrencyId":25,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":2,"value":0.0396120,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,51.21,-13.99,-25.75,-12.61,-21.43,103.39],"totalChange":103.39},"chaosEquivalent":0.04},{"currencyTypeName":"Orb of Augmentation","pay":null,"receive":{"id":0,"leagueId":2,"payCurrencyId":1,"getCurrencyId":20,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":1,"value":0.03333,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,0.0,0.0,0.0,63.82,0.0,0.0],"totalChange":0.0},"chaosEquivalent":0.03},{"currencyTypeName":"Armourer's Scrap","pay":null,"receive":{"id":0,"leagueId":2,"payCurrencyId":1,"getCurrencyId":26,"sampleTimeUtc":"2017-08-30T17:05:50.6165856Z","count":3,"value":0.0291280,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,28.97,-37.08,-33.91,-7.41,73.95,364.30],"totalChange":364.30},"chaosEquivalent":0.03}],"currencyDetails":[{"id":1,"name":"Chaos Orb","poeTradeId":4,"shorthands":["c","chao","chaos","choas"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyRerollRare.png?scale=1&w=1&h=1","type":0},{"id":2,"name":"Exalted Orb","poeTradeId":6,"shorthands":["ex","exe","exa","exalt","exalts","exalted"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyAddModToRare.png?scale=1&w=1&h=1","type":0},{"id":3,"name":"Divine Orb","poeTradeId":15,"shorthands":["div","divine"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyModValues.png?scale=1&w=1&h=1","type":0},{"id":4,"name":"Orb of Alchemy","poeTradeId":3,"shorthands":["alc","alch","alchemy"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyUpgradeToRare.png?scale=1&w=1&h=1","type":0},{"id":5,"name":"Orb of Fusing","poeTradeId":2,"shorthands":["fus","fuse","fusing","fusings"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyRerollSocketLinks.png?scale=1&w=1&h=1","type":0},{"id":6,"name":"Orb of Alteration","poeTradeId":1,"shorthands":["alt","alts","alteration"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyRerollMagic.png?scale=1&w=1&h=1","type":0},{"id":7,"name":"Regal Orb","poeTradeId":14,"shorthands":["regal","rega"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyUpgradeMagicToRare.png?scale=1&w=1&h=1","type":0},{"id":8,"name":"Vaal Orb","poeTradeId":16,"shorthands":["vaal"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyVaal.png?scale=1&w=1&h=1","type":0},{"id":9,"name":"Orb of Regret","poeTradeId":13,"shorthands":["regret","regrets"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyPassiveSkillRefund.png?scale=1&w=1&h=1","type":0},{"id":10,"name":"Cartographer's Chisel","poeTradeId":10,"shorthands":["chis","chisel","chisels","cart"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyMapQuality.png?scale=1&w=1&h=1","type":0},{"id":11,"name":"Jeweller's Orb","poeTradeId":8,"shorthands":["jew","jewel","jeweller","jewellers"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyRerollSocketNumbers.png?scale=1&w=1&h=1","type":0},{"id":12,"name":"Silver Coin","poeTradeId":35,"shorthands":["silver"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SilverObol.png?scale=1&w=1&h=1","type":0},{"id":13,"name":"Perandus Coin","poeTradeId":26,"shorthands":["p","coin","coins","perandus","shekel"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyCoin.png?scale=1&w=1&h=1","type":0},{"id":14,"name":"Orb of Scouring","poeTradeId":11,"shorthands":["scour","scouring"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyConvertToNormal.png?scale=1&w=1&h=1","type":0},{"id":15,"name":"Gemcutter's Prism","poeTradeId":5,"shorthands":["gcp","gemc"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyGemQuality.png?scale=1&w=1&h=1","type":0},{"id":16,"name":"Orb of Chance","poeTradeId":9,"shorthands":["chance","chanc"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyUpgradeRandomly.png?scale=1&w=1&h=1","type":0},{"id":17,"name":"Chromatic Orb","poeTradeId":7,"shorthands":["chrom","chrome","chromes","chromatic","chromatics"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyRerollSocketColours.png?scale=1&w=1&h=1","type":0},{"id":18,"name":"Blessed Orb","poeTradeId":12,"shorthands":["blessed","bles"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyImplicitMod.png?scale=1&w=1&h=1","type":0},{"id":19,"name":"Glassblower's Bauble","poeTradeId":21,"shorthands":["bauble","glass","gla","ba"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyFlaskQuality.png?scale=1&w=1&h=1","type":0},{"id":20,"name":"Orb of Augmentation","poeTradeId":23,"shorthands":["aug","augs","augment","augmentation"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyAddModToMagic.png?scale=1&w=1&h=1","type":0},{"id":21,"name":"Orb of Transmutation","poeTradeId":22,"shorthands":["tra","trans","transmute","transmutes","transmutty","transmutation"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyUpgradeToMagic.png?scale=1&w=1&h=1","type":0},{"id":22,"name":"Mirror of Kalandra","poeTradeId":24,"shorthands":["mirror","mir","kal"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyDuplicate.png?scale=1&w=1&h=1","type":2},{"id":23,"name":"Scroll of Wisdom","poeTradeId":17,"shorthands":["wisdom","wis"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyIdentification.png?scale=1&w=1&h=1","type":0},{"id":24,"name":"Portal Scroll","poeTradeId":18,"shorthands":["portal","port"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyPortal.png?scale=1&w=1&h=1","type":0},{"id":25,"name":"Blacksmith's Whetstone","poeTradeId":20,"shorthands":["whetst","whetstone","whetstones","blacksmith","whet","bla","whe"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyWeaponQuality.png?scale=1&w=1&h=1","type":0},{"id":26,"name":"Armourer's Scrap","poeTradeId":19,"shorthands":["scrap","scraps","armour","armours","armourer","armourers","arm"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyArmourQuality.png?scale=1&w=1&h=1","type":0},{"id":27,"name":"Eternal Orb","poeTradeId":25,"shorthands":["eternal"],"icon":"https://web.poecdn.com/image/Art/2DItems/Currency/CurrencyImprintOrb.png?scale=1&w=1&h=1","type":0},{"id":28,"name":"Sacrifice at Dusk","poeTradeId":27,"shorthands":["dusk"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/Vaal04.png?scale=1&w=1&h=1","type":1},{"id":29,"name":"Sacrifice at Midnight","poeTradeId":28,"shorthands":["midnight","mid"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/Vaal01.png?scale=1&w=1&h=1&v=3b21ce0cd4c0b9e8cf5db6257daf831a3","type":1},{"id":30,"name":"Sacrifice at Dawn","poeTradeId":29,"shorthands":["dawn"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/Vaal02.png?scale=1&w=1&h=1&v=3ead6455599ec6c303f54ba98d6f8eb23","type":1},{"id":31,"name":"Sacrifice at Noon","poeTradeId":30,"shorthands":["noon"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/Vaal03.png?scale=1&w=1&h=1&v=ba374d543316349b87de121039c3cc6f3","type":1},{"id":32,"name":"Mortal Grief","poeTradeId":31,"shorthands":["grief","grie"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/UberVaal04.png?scale=1&w=1&h=1&v=735839ceae0fc45d15ec69555e9314133","type":1},{"id":33,"name":"Mortal Rage","poeTradeId":32,"shorthands":["rage"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/UberVaal01.png?scale=1&w=1&h=1&v=9336df5d7d0befd5963b71e7a68479ce3","type":1},{"id":34,"name":"Mortal Ignorance","poeTradeId":34,"shorthands":["ignorance","ign"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/UberVaal03.png?scale=1&w=1&h=1&v=9fb218dad337a4627a59f74bfa2d6c863","type":1},{"id":35,"name":"Mortal Hope","poeTradeId":33,"shorthands":["hope"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/UberVaal02.png?scale=1&w=1&h=1&v=db5b529a8425bd2b9fd7bee9fca2e0183","type":1},{"id":36,"name":"Eber's Key","poeTradeId":36,"shorthands":["eber"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/PaleCourt01.png?scale=1&w=1&h=1&v=044cbdae1e06e621585eaa627c2162db3","type":1},{"id":37,"name":"Yriel's Key","poeTradeId":37,"shorthands":["yriel"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/PaleCourt02.png?scale=1&w=1&h=1&v=757829336b7239c4b1e398c203f0cca03","type":1},{"id":38,"name":"Inya's Key","poeTradeId":38,"shorthands":["inya"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/PaleCourt03.png?scale=1&w=1&h=1&v=6e43b636847d46b560ef0518869a72943","type":1},{"id":39,"name":"Volkuur's Key","poeTradeId":39,"shorthands":["volkuur"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/PaleCourt04.png?scale=1&w=1&h=1&v=5c3afc6bad631a50f9fe5ccb570aeb363","type":1},{"id":40,"name":"Fragment of the Hydra","poeTradeId":41,"shorthands":["hydra"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/AtlasMaps/FragmentHydra.png?scale=1&w=1&h=1&v=fd37e4be7672c0db8b549a1b16ad489d3","type":1},{"id":41,"name":"Fragment of the Phoenix","poeTradeId":42,"shorthands":["phoenix","phenix","pheon"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/AtlasMaps/FragmentPhoenix.png?scale=1&w=1&h=1&v=8f76720ab06bb40a6d6f75730f92e4a73","type":1},{"id":42,"name":"Fragment of the Minotaur","poeTradeId":43,"shorthands":["minotaur","minot"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/AtlasMaps/FragmentMinotaur.png?scale=1&w=1&h=1&v=e0e3f5e7daf32736d63fc3df1ba981223","type":1},{"id":43,"name":"Fragment of the Chimera","poeTradeId":44,"shorthands":["chimera","chimer"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/AtlasMaps/FragmentChimera.png?scale=1&w=1&h=1&v=15bd6ba80e1853c22ae3acf40abf64283","type":1},{"id":44,"name":"Offering to the Goddess","poeTradeId":40,"shorthands":["offering","offer"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/Labyrinth.png?scale=1&w=1&h=1&v=ef005aef5d2f9135d6922f4b1b912f783","type":1},{"id":45,"name":"Stacked Deck","poeTradeId":-1,"shorthands":["deck"],"icon":"https://web.poecdn.com/image/Art/2DItems/Currency/CurrencyImprintOrb.png?scale=1&w=1&h=1","type":2},{"id":46,"name":"Apprentice Cartographer's Sextant","poeTradeId":45,"shorthands":["apprentice","apprentice-sextant"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/AtlasRadiusWhite.png?scale=1&w=1&h=1","type":0},{"id":47,"name":"Journeyman Cartographer's Sextant","poeTradeId":46,"shorthands":["journeyman","journeyman-sextant"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/AtlasRadiusYellow.png?scale=1&w=1&h=1","type":0},{"id":48,"name":"Master Cartographer's Sextant","poeTradeId":47,"shorthands":["master","master-sextant"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/AtlasRadiusRed.png?scale=1&w=1&h=1","type":0},{"id":49,"name":"Apprentice Cartographer's Seal","poeTradeId":-1,"shorthands":["apprentice-seal"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealWhite.png?scale=1&w=1&h=1","type":2},{"id":50,"name":"Journeyman Cartographer's Seal","poeTradeId":-1,"shorthands":["journeyman-seal"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealYellow.png?scale=1&w=1&h=1","type":2},{"id":51,"name":"Master Cartographer's Seal","poeTradeId":-1,"shorthands":["master-seal"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealRed.png?scale=1&w=1&h=1","type":2},{"id":52,"name":"Sacrifice Set","poeTradeId":48,"shorthands":["sacrifice-set"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealRed.png?scale=1&w=1&h=1","type":2},{"id":53,"name":"Mortal Set","poeTradeId":49,"shorthands":["mortal-set"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealRed.png?scale=1&w=1&h=1","type":2},{"id":54,"name":"Pale Court Set","poeTradeId":50,"shorthands":["pale-court-set"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealRed.png?scale=1&w=1&h=1","type":2},{"id":55,"name":"Shaper Set","poeTradeId":51,"shorthands":["shaper-set"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealRed.png?scale=1&w=1&h=1","type":2},{"id":56,"name":"Splinter of Xoph","poeTradeId":52,"shorthands":["splinter-of-xoph","splinter-xoph"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachShardFire.png?scale=1&w=1&h=1","type":0},{"id":57,"name":"Splinter of Tul","poeTradeId":53,"shorthands":["splinter-of-tul","splinter-tul"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachShardCold.png?scale=1&w=1&h=1","type":0},{"id":58,"name":"Splinter of Esh","poeTradeId":54,"shorthands":["splinter-of-esh","splinter-esh"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachShardLightning.png?scale=1&w=1&h=1","type":0},{"id":59,"name":"Splinter of Uul-Netol","poeTradeId":55,"shorthands":["splinter-of-uul-netol","splinter-uul-netol"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachShardPhysical.png?scale=1&w=1&h=1","type":0},{"id":60,"name":"Splinter of Chayula","poeTradeId":56,"shorthands":["splinter-of-chayula","splinter-chayula"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachShardChaos.png?scale=1&w=1&h=1","type":0},{"id":61,"name":"Blessing of Xoph","poeTradeId":57,"shorthands":["blessing-of-xoph","blessing-xoph"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachUpgraderFire.png?scale=1&w=1&h=1","type":0},{"id":62,"name":"Blessing of Tul","poeTradeId":58,"shorthands":["blessing-of-tul","blessing-tul"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachUpgraderCold.png?scale=1&w=1&h=1","type":0},{"id":63,"name":"Blessing of Esh","poeTradeId":59,"shorthands":["blessing-of-esh","blessing-esh"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachUpgraderLightning.png?scale=1&w=1&h=1","type":0},{"id":64,"name":"Blessing of Uul-Netol","poeTradeId":60,"shorthands":["blessing-of-uul-netol","blessing-uul-netol"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachUpgraderPhysical.png?scale=1&w=1&h=1","type":0},{"id":65,"name":"Blessing of Chayula","poeTradeId":61,"shorthands":["blessing-chayula","blessing-of-chayula"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachUpgraderChaos.png?scale=1&w=1&h=1","type":0},{"id":66,"name":"Xoph's Breachstone","poeTradeId":62,"shorthands":["xophs-breachstone"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachFragmentsFire.png?scale=1&w=1&h=1","type":1},{"id":67,"name":"Tul's Breachstone","poeTradeId":63,"shorthands":["tuls-breachstone"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachFragmentsCold.png?scale=1&w=1&h=1","type":1},{"id":68,"name":"Esh's Breachstone","poeTradeId":64,"shorthands":["eshs-breachstone"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachFragmentsLightning.png?scale=1&w=1&h=1","type":1},{"id":69,"name":"Uul-Netol's Breachstone","poeTradeId":65,"shorthands":["uul-netol-breachstone"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachFragmentsPhysical.png?scale=1&w=1&h=1","type":1},{"id":70,"name":"Chayula's Breachstone","poeTradeId":66,"shorthands":["chayulas-breachstone"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachFragmentsChaos.png?scale=1&w=1&h=1","type":1},{"id":71,"name":"Ancient Reliquary Key","poeTradeId":494,"shorthands":["ancient-reliquary-key"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/VaultMap.png?scale=1&w=1&h=1","type":1},{"id":72,"name":"Divine Vessel","poeTradeId":512,"shorthands":["divine-vessel"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/SinFlaskEmpty.png?scale=1&w=1&h=2","type":1},{"id":73,"name":"Orb of Annulment","poeTradeId":513,"shorthands":["orb-of-annulment"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/AnnullOrb.png?scale=1&w=1&h=1","type":0},{"id":74,"name":"Orb of Binding","poeTradeId":514,"shorthands":["orb-of-binding"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/BindingOrb.png?scale=1&w=1&h=1","type":0},{"id":75,"name":"Orb of Horizons","poeTradeId":515,"shorthands":["orb-of-horizons"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/HorizonOrb.png?scale=1&w=1&h=1","type":0},{"id":76,"name":"Harbinger's Orb","poeTradeId":516,"shorthands":["harbingers-orb"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/HarbingerOrb.png?scale=1&w=1&h=1","type":0},{"id":77,"name":"Engineer's Orb","poeTradeId":517,"shorthands":["engineers-orb"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/EngineersOrb.png?scale=1&w=1&h=1","type":0},{"id":78,"name":"Ancient Orb","poeTradeId":518,"shorthands":["ancient-orb"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/AncientOrb.png?scale=1&w=1&h=1","type":0},{"id":79,"name":"Annulment Shard","poeTradeId":519,"shorthands":["annulment-shard"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/AnnullShard.png?scale=1&w=1&h=1","type":0},{"id":80,"name":"Exalted Shard","poeTradeId":520,"shorthands":["exalted-shard"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/ExaltedShard.png?scale=1&w=1&h=1","type":0},{"id":81,"name":"Mirror Shard","poeTradeId":521,"shorthands":["mirror-shard"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/MirrorShard.png?scale=1&w=1&h=1","type":0}]} \ No newline at end of file diff --git a/data_trade/currencyData_Fallback_Standard.json b/data_trade/currencyData_Fallback_Standard.json new file mode 100644 index 00000000..1c8f72d2 --- /dev/null +++ b/data_trade/currencyData_Fallback_Standard.json @@ -0,0 +1 @@ +{"lines":[{"currencyTypeName":"Blessing of Chayula","pay":null,"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":65,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":2,"value":384.0000000,"dataPointCount":1},"paySparkLine":{"data":[null,null,null,null,0.0,0.0,null],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,10.08,6.33,2.68,25.17,17.97,-3.10],"totalChange":-3.10},"chaosEquivalent":384.00},{"currencyTypeName":"Exalted Orb","pay":{"id":0,"leagueId":1,"payCurrencyId":2,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":53,"value":0.0120180,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":2,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":36,"value":84.2500000,"dataPointCount":1},"paySparkLine":{"data":[0.0,-0.79,-0.88,-1.32,-4.17,-5.06,-6.76],"totalChange":-6.76},"receiveSparkLine":{"data":[0.0,-1.03,-1.28,-3.91,-4.55,-6.59,-7.15],"totalChange":-7.15},"chaosEquivalent":83.73},{"currencyTypeName":"Orb of Annulment","pay":null,"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":73,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":3,"value":58.0000000,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,-36.83,-43.73,-46.55,-52.35,-47.67,-54.49],"totalChange":-54.49},"chaosEquivalent":58.00},{"currencyTypeName":"Divine Orb","pay":{"id":0,"leagueId":1,"payCurrencyId":3,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":19,"value":0.0641160,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":3,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":23,"value":17.2000000,"dataPointCount":1},"paySparkLine":{"data":[0.0,-5.39,-6.85,-11.46,-12.12,-12.78,-16.47],"totalChange":-16.47},"receiveSparkLine":{"data":[0.0,-0.83,-1.01,-3.43,-6.21,-6.70,-13.65],"totalChange":-13.65},"chaosEquivalent":16.40},{"currencyTypeName":"Blessing of Esh","pay":null,"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":63,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":7,"value":7.0000000,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,-29.99,-32.14,-32.19,-34.37,-56.79,-58.63],"totalChange":-58.63},"chaosEquivalent":7.00},{"currencyTypeName":"Master Cartographer's Sextant","pay":{"id":0,"leagueId":1,"payCurrencyId":48,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":6,"value":0.1862050,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":48,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":14,"value":6.2700000,"dataPointCount":1},"paySparkLine":{"data":[0.0,16.18,-11.06,-11.39,-4.75,-5.61,-9.69],"totalChange":-9.69},"receiveSparkLine":{"data":[0.0,-6.16,-8.75,-33.81,-19.79,-28.25,-14.24],"totalChange":-14.24},"chaosEquivalent":5.82},{"currencyTypeName":"Blessing of Uul-Netol","pay":null,"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":64,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":2,"value":5.5000000,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,-26.72,-5.68,10.65,14.31,42.70,-31.39],"totalChange":-31.39},"chaosEquivalent":5.50},{"currencyTypeName":"Blessing of Tul","pay":null,"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":62,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":1,"value":5.00000,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,-17.00,-11.46,101.95,-26.53,-48.77,72.74],"totalChange":72.74},"chaosEquivalent":5.00},{"currencyTypeName":"Journeyman Cartographer's Sextant","pay":{"id":0,"leagueId":1,"payCurrencyId":47,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":3,"value":0.3649860,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":47,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":10,"value":3.4500000,"dataPointCount":1},"paySparkLine":{"data":[0.0,14.68,-1.33,-0.85,-6.64,-2.67,-6.08],"totalChange":-6.08},"receiveSparkLine":{"data":[0.0,7.42,-0.29,0.37,-5.78,3.08,13.74],"totalChange":13.74},"chaosEquivalent":3.09},{"currencyTypeName":"Blessing of Xoph","pay":null,"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":61,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":6,"value":2.5000000,"dataPointCount":1},"paySparkLine":{"data":[],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,-60.51,-48.09,-57.55,-67.46,-62.57,-59.10],"totalChange":-59.10},"chaosEquivalent":2.50},{"currencyTypeName":"Gemcutter's Prism","pay":{"id":0,"leagueId":1,"payCurrencyId":15,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":12,"value":0.5555600,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":15,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":10,"value":1.7865830,"dataPointCount":1},"paySparkLine":{"data":[0.0,-0.49,3.04,-1.47,-0.64,1.51,0.65],"totalChange":0.65},"receiveSparkLine":{"data":[0.0,3.43,1.70,-2.14,-5.17,-5.98,-13.45],"totalChange":-13.45},"chaosEquivalent":1.79},{"currencyTypeName":"Splinter of Chayula","pay":{"id":0,"leagueId":1,"payCurrencyId":60,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":2,"value":0.8499970,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":60,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":22,"value":1.6900030,"dataPointCount":1},"paySparkLine":{"data":[0.0,7.92,7.92,7.92,6.98,7.43,7.68],"totalChange":7.68},"receiveSparkLine":{"data":[0.0,17.77,-12.76,-12.44,-17.31,-15.51,-15.85],"totalChange":-15.85},"chaosEquivalent":1.43},{"currencyTypeName":"Orb of Regret","pay":{"id":0,"leagueId":1,"payCurrencyId":9,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":11,"value":0.7547200,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":9,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":19,"value":1.5000000,"dataPointCount":1},"paySparkLine":{"data":[0.0,1.10,-0.92,-4.12,-1.01,2.30,-1.26],"totalChange":-1.26},"receiveSparkLine":{"data":[0.0,0.96,-1.85,-0.14,-2.27,-2.03,-1.23],"totalChange":-1.23},"chaosEquivalent":1.41},{"currencyTypeName":"Apprentice Cartographer's Sextant","pay":{"id":0,"leagueId":1,"payCurrencyId":46,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":5,"value":1.0500000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":46,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":9,"value":1.0000000,"dataPointCount":1},"paySparkLine":{"data":[0.0,8.39,-4.81,5.66,-7.75,19.52,-1.86],"totalChange":-1.86},"receiveSparkLine":{"data":[0.0,-3.40,16.49,-6.09,-14.66,-2.00,3.64],"totalChange":3.64},"chaosEquivalent":0.98},{"currencyTypeName":"Vaal Orb","pay":{"id":0,"leagueId":1,"payCurrencyId":8,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":8,"value":1.2000000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":8,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":11,"value":1.0000000,"dataPointCount":1},"paySparkLine":{"data":[0.0,4.43,0.81,-2.98,3.71,-25.22,-23.98],"totalChange":-23.98},"receiveSparkLine":{"data":[0.0,-2.15,1.16,1.91,2.86,5.13,13.37],"totalChange":13.37},"chaosEquivalent":0.92},{"currencyTypeName":"Orb of Scouring","pay":{"id":0,"leagueId":1,"payCurrencyId":14,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":6,"value":1.5000000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":14,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":15,"value":0.7824740,"dataPointCount":1},"paySparkLine":{"data":[0.0,1.00,5.27,-3.91,0.25,-2.54,4.08],"totalChange":4.08},"receiveSparkLine":{"data":[0.0,0.12,-4.36,-8.48,-12.41,-9.62,-4.73],"totalChange":-4.73},"chaosEquivalent":0.72},{"currencyTypeName":"Regal Orb","pay":{"id":0,"leagueId":1,"payCurrencyId":7,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":4,"value":1.6300000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":7,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":13,"value":0.8000000,"dataPointCount":1},"paySparkLine":{"data":[0.0,-2.06,9.58,4.07,12.61,4.51,-6.38],"totalChange":-6.38},"receiveSparkLine":{"data":[0.0,-5.38,-7.60,-5.95,-9.34,-12.11,-8.18],"totalChange":-8.18},"chaosEquivalent":0.71},{"currencyTypeName":"Orb of Fusing","pay":{"id":0,"leagueId":1,"payCurrencyId":5,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":15,"value":1.6620000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":5,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":26,"value":0.6666700,"dataPointCount":1},"paySparkLine":{"data":[0.0,2.30,-0.76,-4.07,1.31,3.38,5.01],"totalChange":5.01},"receiveSparkLine":{"data":[0.0,11.98,6.85,8.55,5.31,5.38,5.40],"totalChange":5.40},"chaosEquivalent":0.63},{"currencyTypeName":"Orb of Alchemy","pay":{"id":0,"leagueId":1,"payCurrencyId":4,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":9,"value":3.4066660,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":4,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":25,"value":0.3300540,"dataPointCount":1},"paySparkLine":{"data":[0.0,-0.08,3.85,7.23,5.79,16.39,13.48],"totalChange":13.48},"receiveSparkLine":{"data":[0.0,-0.87,-0.84,-0.86,-2.39,-2.02,1.21],"totalChange":1.21},"chaosEquivalent":0.31},{"currencyTypeName":"Blessed Orb","pay":{"id":0,"leagueId":1,"payCurrencyId":18,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":3,"value":5.0000000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":18,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":11,"value":0.3333300,"dataPointCount":1},"paySparkLine":{"data":[0.0,-0.96,1.53,-1.91,-1.48,-11.28,-6.18],"totalChange":-6.18},"receiveSparkLine":{"data":[0.0,0.38,-1.96,-1.62,-0.74,-0.91,0.71],"totalChange":0.71},"chaosEquivalent":0.27},{"currencyTypeName":"Cartographer's Chisel","pay":{"id":0,"leagueId":1,"payCurrencyId":10,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":5,"value":4.3400000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":10,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":36,"value":0.2777800,"dataPointCount":1},"paySparkLine":{"data":[0.0,4.26,9.91,6.48,1.90,6.94,4.31],"totalChange":4.31},"receiveSparkLine":{"data":[0.0,-1.40,-2.73,-2.10,-3.13,-3.81,-2.78],"totalChange":-2.78},"chaosEquivalent":0.25},{"currencyTypeName":"Chromatic Orb","pay":{"id":0,"leagueId":1,"payCurrencyId":17,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":14,"value":5.5000000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":17,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":27,"value":0.1972440,"dataPointCount":1},"paySparkLine":{"data":[0.0,2.02,6.87,7.61,7.57,5.51,2.88],"totalChange":2.88},"receiveSparkLine":{"data":[0.0,0.73,0.08,-2.89,-3.55,-0.41,-1.25],"totalChange":-1.25},"chaosEquivalent":0.19},{"currencyTypeName":"Splinter of Uul-Netol","pay":{"id":0,"leagueId":1,"payCurrencyId":59,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":1,"value":20.00000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":59,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":9,"value":0.3140640,"dataPointCount":1},"paySparkLine":{"data":[0.0,-5.16,-5.16,-5.16,-5.16,-5.16,-5.16],"totalChange":-5.16},"receiveSparkLine":{"data":[0.0,8.09,8.54,9.62,1.81,-0.64,5.80],"totalChange":5.80},"chaosEquivalent":0.18},{"currencyTypeName":"Orb of Chance","pay":{"id":0,"leagueId":1,"payCurrencyId":16,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":4,"value":6.1200000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":16,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":17,"value":0.1666700,"dataPointCount":1},"paySparkLine":{"data":[0.0,2.08,2.10,4.30,-2.02,-0.17,1.58],"totalChange":1.58},"receiveSparkLine":{"data":[0.0,0.68,-1.31,-1.94,-1.98,-0.92,2.96],"totalChange":2.96},"chaosEquivalent":0.17},{"currencyTypeName":"Splinter of Xoph","pay":{"id":0,"leagueId":1,"payCurrencyId":56,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":1,"value":20.00000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":56,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":15,"value":0.2540000,"dataPointCount":1},"paySparkLine":{"data":[0.0,-7.74,-7.74,-7.74,-7.74,-7.74,-7.74],"totalChange":-7.74},"receiveSparkLine":{"data":[0.0,-0.80,-10.32,-10.29,-10.78,-9.17,-16.55],"totalChange":-16.55},"chaosEquivalent":0.15},{"currencyTypeName":"Splinter of Esh","pay":{"id":0,"leagueId":1,"payCurrencyId":58,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":1,"value":20.00000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":58,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":9,"value":0.2440000,"dataPointCount":1},"paySparkLine":{"data":[0.0,-6.45,-6.45,-6.45,-6.45,-6.45,-6.45],"totalChange":-6.45},"receiveSparkLine":{"data":[0.0,-6.99,-7.69,-6.84,-7.52,-8.91,-6.80],"totalChange":-6.80},"chaosEquivalent":0.15},{"currencyTypeName":"Jeweller's Orb","pay":{"id":0,"leagueId":1,"payCurrencyId":11,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":17,"value":7.4000000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":11,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":25,"value":0.1501580,"dataPointCount":1},"paySparkLine":{"data":[0.0,-2.03,1.65,0.11,4.06,1.98,1.42],"totalChange":1.42},"receiveSparkLine":{"data":[0.0,-1.48,-2.95,-1.83,-2.98,0.92,2.40],"totalChange":2.40},"chaosEquivalent":0.14},{"currencyTypeName":"Silver Coin","pay":{"id":0,"leagueId":1,"payCurrencyId":12,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":3,"value":13.1000000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":12,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":18,"value":0.1119850,"dataPointCount":1},"paySparkLine":{"data":[0.0,-15.37,-8.41,-8.56,-25.73,-9.49,-32.96],"totalChange":-32.96},"receiveSparkLine":{"data":[0.0,2.39,-0.76,-8.73,-11.29,-15.08,-15.82],"totalChange":-15.82},"chaosEquivalent":0.09},{"currencyTypeName":"Splinter of Tul","pay":{"id":0,"leagueId":1,"payCurrencyId":57,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":1,"value":30.00000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":57,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":7,"value":0.1389120,"dataPointCount":1},"paySparkLine":{"data":[0.0,-8.60,-8.60,-8.60,-8.60,-8.60,-8.60],"totalChange":-8.60},"receiveSparkLine":{"data":[0.0,32.81,21.59,27.32,30.88,12.28,24.23],"totalChange":24.23},"chaosEquivalent":0.09},{"currencyTypeName":"Orb of Alteration","pay":{"id":0,"leagueId":1,"payCurrencyId":6,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":8,"value":13.3650000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":6,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":24,"value":0.0833300,"dataPointCount":1},"paySparkLine":{"data":[0.0,-6.98,2.68,3.10,2.56,3.16,3.71],"totalChange":3.71},"receiveSparkLine":{"data":[0.0,2.88,5.74,5.35,5.65,4.80,5.69],"totalChange":5.69},"chaosEquivalent":0.08},{"currencyTypeName":"Glassblower's Bauble","pay":{"id":0,"leagueId":1,"payCurrencyId":19,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":1,"value":30.00000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":19,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":4,"value":0.0730770,"dataPointCount":1},"paySparkLine":{"data":[0.0,22.56,2.52,-47.00,-36.85,54.79,-20.33],"totalChange":-20.33},"receiveSparkLine":{"data":[0.0,5.36,19.23,-21.82,-23.42,-23.33,-24.51],"totalChange":-24.51},"chaosEquivalent":0.05},{"currencyTypeName":"Blacksmith's Whetstone","pay":null,"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":25,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":8,"value":0.0274990,"dataPointCount":1},"paySparkLine":{"data":[0.0,null,50.00,50.00,50.00,0.0,0.0],"totalChange":0.0},"receiveSparkLine":{"data":[0.0,-4.17,-2.59,-10.17,-18.65,0.14,-0.50],"totalChange":-0.50},"chaosEquivalent":0.03},{"currencyTypeName":"Orb of Augmentation","pay":{"id":0,"leagueId":1,"payCurrencyId":20,"getCurrencyId":1,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":1,"value":60.00000,"dataPointCount":1},"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":20,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":10,"value":0.0284160,"dataPointCount":1},"paySparkLine":{"data":[0.0,50.38,50.38,-20.00,-20.00,-6.25,null],"totalChange":-6.25},"receiveSparkLine":{"data":[0.0,-5.43,-11.90,-1.60,-5.89,-11.90,-12.60],"totalChange":-12.60},"chaosEquivalent":0.02},{"currencyTypeName":"Orb of Transmutation","pay":null,"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":21,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":12,"value":0.0166700,"dataPointCount":1},"paySparkLine":{"data":[null,null,0.0,0.56,7.14,null,null],"totalChange":7.14},"receiveSparkLine":{"data":[0.0,13.78,2.99,11.73,7.00,-2.55,12.54],"totalChange":12.54},"chaosEquivalent":0.02},{"currencyTypeName":"Scroll of Wisdom","pay":null,"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":23,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":7,"value":0.0070900,"dataPointCount":1},"paySparkLine":{"data":[0.0,-2.37,-41.84,-25.95,-20.49,null,null],"totalChange":-20.49},"receiveSparkLine":{"data":[0.0,39.52,41.32,18.56,51.90,4.59,6.03],"totalChange":6.03},"chaosEquivalent":0.01},{"currencyTypeName":"Portal Scroll","pay":null,"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":24,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":7,"value":0.0099980,"dataPointCount":1},"paySparkLine":{"data":[null,0.0,-48.77,-33.14,null,null,null],"totalChange":-33.14},"receiveSparkLine":{"data":[0.0,-5.98,1.35,-15.46,17.27,17.04,15.56],"totalChange":15.56},"chaosEquivalent":0.01},{"currencyTypeName":"Armourer's Scrap","pay":null,"receive":{"id":0,"leagueId":1,"payCurrencyId":1,"getCurrencyId":26,"sampleTimeUtc":"2017-08-30T17:05:20.4553887Z","count":11,"value":0.0116300,"dataPointCount":1},"paySparkLine":{"data":[null,null,0.0,0.0,null,-50.00,-50.00],"totalChange":-50.00},"receiveSparkLine":{"data":[0.0,13.80,11.34,-5.71,0.0,-5.71,-5.52],"totalChange":-5.52},"chaosEquivalent":0.01}],"currencyDetails":[{"id":1,"name":"Chaos Orb","poeTradeId":4,"shorthands":["c","chao","chaos","choas"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyRerollRare.png?scale=1&w=1&h=1","type":0},{"id":2,"name":"Exalted Orb","poeTradeId":6,"shorthands":["ex","exe","exa","exalt","exalts","exalted"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyAddModToRare.png?scale=1&w=1&h=1","type":0},{"id":3,"name":"Divine Orb","poeTradeId":15,"shorthands":["div","divine"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyModValues.png?scale=1&w=1&h=1","type":0},{"id":4,"name":"Orb of Alchemy","poeTradeId":3,"shorthands":["alc","alch","alchemy"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyUpgradeToRare.png?scale=1&w=1&h=1","type":0},{"id":5,"name":"Orb of Fusing","poeTradeId":2,"shorthands":["fus","fuse","fusing","fusings"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyRerollSocketLinks.png?scale=1&w=1&h=1","type":0},{"id":6,"name":"Orb of Alteration","poeTradeId":1,"shorthands":["alt","alts","alteration"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyRerollMagic.png?scale=1&w=1&h=1","type":0},{"id":7,"name":"Regal Orb","poeTradeId":14,"shorthands":["regal","rega"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyUpgradeMagicToRare.png?scale=1&w=1&h=1","type":0},{"id":8,"name":"Vaal Orb","poeTradeId":16,"shorthands":["vaal"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyVaal.png?scale=1&w=1&h=1","type":0},{"id":9,"name":"Orb of Regret","poeTradeId":13,"shorthands":["regret","regrets"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyPassiveSkillRefund.png?scale=1&w=1&h=1","type":0},{"id":10,"name":"Cartographer's Chisel","poeTradeId":10,"shorthands":["chis","chisel","chisels","cart"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyMapQuality.png?scale=1&w=1&h=1","type":0},{"id":11,"name":"Jeweller's Orb","poeTradeId":8,"shorthands":["jew","jewel","jeweller","jewellers"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyRerollSocketNumbers.png?scale=1&w=1&h=1","type":0},{"id":12,"name":"Silver Coin","poeTradeId":35,"shorthands":["silver"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SilverObol.png?scale=1&w=1&h=1","type":0},{"id":13,"name":"Perandus Coin","poeTradeId":26,"shorthands":["p","coin","coins","perandus","shekel"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyCoin.png?scale=1&w=1&h=1","type":0},{"id":14,"name":"Orb of Scouring","poeTradeId":11,"shorthands":["scour","scouring"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyConvertToNormal.png?scale=1&w=1&h=1","type":0},{"id":15,"name":"Gemcutter's Prism","poeTradeId":5,"shorthands":["gcp","gemc"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyGemQuality.png?scale=1&w=1&h=1","type":0},{"id":16,"name":"Orb of Chance","poeTradeId":9,"shorthands":["chance","chanc"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyUpgradeRandomly.png?scale=1&w=1&h=1","type":0},{"id":17,"name":"Chromatic Orb","poeTradeId":7,"shorthands":["chrom","chrome","chromes","chromatic","chromatics"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyRerollSocketColours.png?scale=1&w=1&h=1","type":0},{"id":18,"name":"Blessed Orb","poeTradeId":12,"shorthands":["blessed","bles"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyImplicitMod.png?scale=1&w=1&h=1","type":0},{"id":19,"name":"Glassblower's Bauble","poeTradeId":21,"shorthands":["bauble","glass","gla","ba"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyFlaskQuality.png?scale=1&w=1&h=1","type":0},{"id":20,"name":"Orb of Augmentation","poeTradeId":23,"shorthands":["aug","augs","augment","augmentation"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyAddModToMagic.png?scale=1&w=1&h=1","type":0},{"id":21,"name":"Orb of Transmutation","poeTradeId":22,"shorthands":["tra","trans","transmute","transmutes","transmutty","transmutation"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyUpgradeToMagic.png?scale=1&w=1&h=1","type":0},{"id":22,"name":"Mirror of Kalandra","poeTradeId":24,"shorthands":["mirror","mir","kal"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyDuplicate.png?scale=1&w=1&h=1","type":2},{"id":23,"name":"Scroll of Wisdom","poeTradeId":17,"shorthands":["wisdom","wis"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyIdentification.png?scale=1&w=1&h=1","type":0},{"id":24,"name":"Portal Scroll","poeTradeId":18,"shorthands":["portal","port"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyPortal.png?scale=1&w=1&h=1","type":0},{"id":25,"name":"Blacksmith's Whetstone","poeTradeId":20,"shorthands":["whetst","whetstone","whetstones","blacksmith","whet","bla","whe"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyWeaponQuality.png?scale=1&w=1&h=1","type":0},{"id":26,"name":"Armourer's Scrap","poeTradeId":19,"shorthands":["scrap","scraps","armour","armours","armourer","armourers","arm"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/CurrencyArmourQuality.png?scale=1&w=1&h=1","type":0},{"id":27,"name":"Eternal Orb","poeTradeId":25,"shorthands":["eternal"],"icon":"https://web.poecdn.com/image/Art/2DItems/Currency/CurrencyImprintOrb.png?scale=1&w=1&h=1","type":0},{"id":28,"name":"Sacrifice at Dusk","poeTradeId":27,"shorthands":["dusk"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/Vaal04.png?scale=1&w=1&h=1","type":1},{"id":29,"name":"Sacrifice at Midnight","poeTradeId":28,"shorthands":["midnight","mid"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/Vaal01.png?scale=1&w=1&h=1&v=3b21ce0cd4c0b9e8cf5db6257daf831a3","type":1},{"id":30,"name":"Sacrifice at Dawn","poeTradeId":29,"shorthands":["dawn"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/Vaal02.png?scale=1&w=1&h=1&v=3ead6455599ec6c303f54ba98d6f8eb23","type":1},{"id":31,"name":"Sacrifice at Noon","poeTradeId":30,"shorthands":["noon"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/Vaal03.png?scale=1&w=1&h=1&v=ba374d543316349b87de121039c3cc6f3","type":1},{"id":32,"name":"Mortal Grief","poeTradeId":31,"shorthands":["grief","grie"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/UberVaal04.png?scale=1&w=1&h=1&v=735839ceae0fc45d15ec69555e9314133","type":1},{"id":33,"name":"Mortal Rage","poeTradeId":32,"shorthands":["rage"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/UberVaal01.png?scale=1&w=1&h=1&v=9336df5d7d0befd5963b71e7a68479ce3","type":1},{"id":34,"name":"Mortal Ignorance","poeTradeId":34,"shorthands":["ignorance","ign"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/UberVaal03.png?scale=1&w=1&h=1&v=9fb218dad337a4627a59f74bfa2d6c863","type":1},{"id":35,"name":"Mortal Hope","poeTradeId":33,"shorthands":["hope"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/UberVaal02.png?scale=1&w=1&h=1&v=db5b529a8425bd2b9fd7bee9fca2e0183","type":1},{"id":36,"name":"Eber's Key","poeTradeId":36,"shorthands":["eber"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/PaleCourt01.png?scale=1&w=1&h=1&v=044cbdae1e06e621585eaa627c2162db3","type":1},{"id":37,"name":"Yriel's Key","poeTradeId":37,"shorthands":["yriel"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/PaleCourt02.png?scale=1&w=1&h=1&v=757829336b7239c4b1e398c203f0cca03","type":1},{"id":38,"name":"Inya's Key","poeTradeId":38,"shorthands":["inya"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/PaleCourt03.png?scale=1&w=1&h=1&v=6e43b636847d46b560ef0518869a72943","type":1},{"id":39,"name":"Volkuur's Key","poeTradeId":39,"shorthands":["volkuur"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/PaleCourt04.png?scale=1&w=1&h=1&v=5c3afc6bad631a50f9fe5ccb570aeb363","type":1},{"id":40,"name":"Fragment of the Hydra","poeTradeId":41,"shorthands":["hydra"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/AtlasMaps/FragmentHydra.png?scale=1&w=1&h=1&v=fd37e4be7672c0db8b549a1b16ad489d3","type":1},{"id":41,"name":"Fragment of the Phoenix","poeTradeId":42,"shorthands":["phoenix","phenix","pheon"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/AtlasMaps/FragmentPhoenix.png?scale=1&w=1&h=1&v=8f76720ab06bb40a6d6f75730f92e4a73","type":1},{"id":42,"name":"Fragment of the Minotaur","poeTradeId":43,"shorthands":["minotaur","minot"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/AtlasMaps/FragmentMinotaur.png?scale=1&w=1&h=1&v=e0e3f5e7daf32736d63fc3df1ba981223","type":1},{"id":43,"name":"Fragment of the Chimera","poeTradeId":44,"shorthands":["chimera","chimer"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/AtlasMaps/FragmentChimera.png?scale=1&w=1&h=1&v=15bd6ba80e1853c22ae3acf40abf64283","type":1},{"id":44,"name":"Offering to the Goddess","poeTradeId":40,"shorthands":["offering","offer"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/Labyrinth.png?scale=1&w=1&h=1&v=ef005aef5d2f9135d6922f4b1b912f783","type":1},{"id":45,"name":"Stacked Deck","poeTradeId":-1,"shorthands":["deck"],"icon":"https://web.poecdn.com/image/Art/2DItems/Currency/CurrencyImprintOrb.png?scale=1&w=1&h=1","type":2},{"id":46,"name":"Apprentice Cartographer's Sextant","poeTradeId":45,"shorthands":["apprentice","apprentice-sextant"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/AtlasRadiusWhite.png?scale=1&w=1&h=1","type":0},{"id":47,"name":"Journeyman Cartographer's Sextant","poeTradeId":46,"shorthands":["journeyman","journeyman-sextant"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/AtlasRadiusYellow.png?scale=1&w=1&h=1","type":0},{"id":48,"name":"Master Cartographer's Sextant","poeTradeId":47,"shorthands":["master","master-sextant"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/AtlasRadiusRed.png?scale=1&w=1&h=1","type":0},{"id":49,"name":"Apprentice Cartographer's Seal","poeTradeId":-1,"shorthands":["apprentice-seal"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealWhite.png?scale=1&w=1&h=1","type":2},{"id":50,"name":"Journeyman Cartographer's Seal","poeTradeId":-1,"shorthands":["journeyman-seal"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealYellow.png?scale=1&w=1&h=1","type":2},{"id":51,"name":"Master Cartographer's Seal","poeTradeId":-1,"shorthands":["master-seal"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealRed.png?scale=1&w=1&h=1","type":2},{"id":52,"name":"Sacrifice Set","poeTradeId":48,"shorthands":["sacrifice-set"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealRed.png?scale=1&w=1&h=1","type":2},{"id":53,"name":"Mortal Set","poeTradeId":49,"shorthands":["mortal-set"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealRed.png?scale=1&w=1&h=1","type":2},{"id":54,"name":"Pale Court Set","poeTradeId":50,"shorthands":["pale-court-set"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealRed.png?scale=1&w=1&h=1","type":2},{"id":55,"name":"Shaper Set","poeTradeId":51,"shorthands":["shaper-set"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/SealRed.png?scale=1&w=1&h=1","type":2},{"id":56,"name":"Splinter of Xoph","poeTradeId":52,"shorthands":["splinter-of-xoph","splinter-xoph"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachShardFire.png?scale=1&w=1&h=1","type":0},{"id":57,"name":"Splinter of Tul","poeTradeId":53,"shorthands":["splinter-of-tul","splinter-tul"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachShardCold.png?scale=1&w=1&h=1","type":0},{"id":58,"name":"Splinter of Esh","poeTradeId":54,"shorthands":["splinter-of-esh","splinter-esh"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachShardLightning.png?scale=1&w=1&h=1","type":0},{"id":59,"name":"Splinter of Uul-Netol","poeTradeId":55,"shorthands":["splinter-of-uul-netol","splinter-uul-netol"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachShardPhysical.png?scale=1&w=1&h=1","type":0},{"id":60,"name":"Splinter of Chayula","poeTradeId":56,"shorthands":["splinter-of-chayula","splinter-chayula"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachShardChaos.png?scale=1&w=1&h=1","type":0},{"id":61,"name":"Blessing of Xoph","poeTradeId":57,"shorthands":["blessing-of-xoph","blessing-xoph"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachUpgraderFire.png?scale=1&w=1&h=1","type":0},{"id":62,"name":"Blessing of Tul","poeTradeId":58,"shorthands":["blessing-of-tul","blessing-tul"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachUpgraderCold.png?scale=1&w=1&h=1","type":0},{"id":63,"name":"Blessing of Esh","poeTradeId":59,"shorthands":["blessing-of-esh","blessing-esh"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachUpgraderLightning.png?scale=1&w=1&h=1","type":0},{"id":64,"name":"Blessing of Uul-Netol","poeTradeId":60,"shorthands":["blessing-of-uul-netol","blessing-uul-netol"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachUpgraderPhysical.png?scale=1&w=1&h=1","type":0},{"id":65,"name":"Blessing of Chayula","poeTradeId":61,"shorthands":["blessing-chayula","blessing-of-chayula"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachUpgraderChaos.png?scale=1&w=1&h=1","type":0},{"id":66,"name":"Xoph's Breachstone","poeTradeId":62,"shorthands":["xophs-breachstone"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachFragmentsFire.png?scale=1&w=1&h=1","type":1},{"id":67,"name":"Tul's Breachstone","poeTradeId":63,"shorthands":["tuls-breachstone"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachFragmentsCold.png?scale=1&w=1&h=1","type":1},{"id":68,"name":"Esh's Breachstone","poeTradeId":64,"shorthands":["eshs-breachstone"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachFragmentsLightning.png?scale=1&w=1&h=1","type":1},{"id":69,"name":"Uul-Netol's Breachstone","poeTradeId":65,"shorthands":["uul-netol-breachstone"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachFragmentsPhysical.png?scale=1&w=1&h=1","type":1},{"id":70,"name":"Chayula's Breachstone","poeTradeId":66,"shorthands":["chayulas-breachstone"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/Breach/BreachFragmentsChaos.png?scale=1&w=1&h=1","type":1},{"id":71,"name":"Ancient Reliquary Key","poeTradeId":494,"shorthands":["ancient-reliquary-key"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/VaultMap.png?scale=1&w=1&h=1","type":1},{"id":72,"name":"Divine Vessel","poeTradeId":512,"shorthands":["divine-vessel"],"icon":"http://web.poecdn.com/image/Art/2DItems/Maps/SinFlaskEmpty.png?scale=1&w=1&h=2","type":1},{"id":73,"name":"Orb of Annulment","poeTradeId":513,"shorthands":["orb-of-annulment"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/AnnullOrb.png?scale=1&w=1&h=1","type":0},{"id":74,"name":"Orb of Binding","poeTradeId":514,"shorthands":["orb-of-binding"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/BindingOrb.png?scale=1&w=1&h=1","type":0},{"id":75,"name":"Orb of Horizons","poeTradeId":515,"shorthands":["orb-of-horizons"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/HorizonOrb.png?scale=1&w=1&h=1","type":0},{"id":76,"name":"Harbinger's Orb","poeTradeId":516,"shorthands":["harbingers-orb"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/HarbingerOrb.png?scale=1&w=1&h=1","type":0},{"id":77,"name":"Engineer's Orb","poeTradeId":517,"shorthands":["engineers-orb"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/EngineersOrb.png?scale=1&w=1&h=1","type":0},{"id":78,"name":"Ancient Orb","poeTradeId":518,"shorthands":["ancient-orb"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/AncientOrb.png?scale=1&w=1&h=1","type":0},{"id":79,"name":"Annulment Shard","poeTradeId":519,"shorthands":["annulment-shard"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/AnnullShard.png?scale=1&w=1&h=1","type":0},{"id":80,"name":"Exalted Shard","poeTradeId":520,"shorthands":["exalted-shard"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/ExaltedShard.png?scale=1&w=1&h=1","type":0},{"id":81,"name":"Mirror Shard","poeTradeId":521,"shorthands":["mirror-shard"],"icon":"http://web.poecdn.com/image/Art/2DItems/Currency/MirrorShard.png?scale=1&w=1&h=1","type":0}]} \ No newline at end of file diff --git a/lib/PoEScripts_CheckFolderWriteAccess.ahk b/lib/PoEScripts_CheckFolderWriteAccess.ahk new file mode 100644 index 00000000..5542949b --- /dev/null +++ b/lib/PoEScripts_CheckFolderWriteAccess.ahk @@ -0,0 +1,29 @@ +PoE_Scripts_CheckFolderWriteAccess(Folder, critical = true) { + access := FolderWriteAccess(Folder) + + msg := "The script is not able to write any file to " Folder ".`nYour user may not have the necessary permissions. " + msg .= "While it may be possible to manually copy and create files in this folder it doesn't work programmatically.`n`n" + msg .= "The reason for this could be your AntiVir software blocking Autohotkey from modifying files in this directory!" + + If (not access) { + If (critical) { + msg .= "`n`nClosing Script..." + Msgbox, 0x1010, Critical permission error, % msg + ExitApp + } Else { + Msgbox, 4096, Permission error, % msg + } + } + Return access +} + +FolderWriteAccess(Folder) { + If InStr( FileExist(Folder), "D" ) { + FileAppend,,%Folder%\fa.tmp + rval := ! ErrorLevel + FileDelete, %Folder%\fa.tmp + Return rval + } Return - 1 +} + + diff --git a/lib/PoEScripts_Download.ahk.orig b/lib/PoEScripts_Download.ahk.orig deleted file mode 100644 index ae117f9c..00000000 --- a/lib/PoEScripts_Download.ahk.orig +++ /dev/null @@ -1,169 +0,0 @@ -PoEScripts_Download(url, ioData, ioHdr, options, useFallback = true, critical = false, binaryDL = false, errorMsg = "") { - /* - url = download url - ioData = uri encoded postData - ioHdr = array of request headers - options = multiple options separated by newline (currently only "SaveAs:") - - useFallback = Use UrlDownloadToFile if curl fails, not possible for POST requests or when cookies are required - critical = exit macro if download fails - binaryDL = file download (zip for example) - errorMsg = optional error message, will be added to default message - */ - - ; https://curl.haxx.se/download.html -> https://bintray.com/vszakats/generic/curl/ - curl := A_ScriptDir "\lib\curl.exe" - headers := "" - For key, val in ioHdr { - headers .= "-H """ val """ " - } - - PreventErrorMsg := false - If (StrLen(options)) { - If (RegExMatch(options, "i)SaveAs:[ \t]*\K[^\r\n]+", SavePath)) { - commandData .= " " options " " - commandHdr .= "" - } - If (RegExMatch(options, "i)PreventErrorMsg")) { - PreventErrorMsg := true - } - } - - e := {} - Try { - commandData := curl - commandHdr := curl - If (binaryDL) { - commandData .= " -LJkv " ; save as file - If (SavePath) { - commandData .= "-o """ SavePath """ " ; set target destination and name - } - } Else { - commandData .= " -Lks --compressed " - commandHdr .= " -ILks " - } - If (StrLen(headers)) { - commandData .= headers - commandHdr .= headers - } - If (StrLen(ioData)) { - commandData .= "--data """ ioData """ " - } - - ; get data - html := StdOutStream(commandData """" url """") - - ; get return headers in seperate request - If (not binaryDL) { - If (StrLen(ioData)) { - commandHdr := commandHdr """" url "?" ioData """" ; add payload to url since you can't use the -I argument with POST requests - } Else { - commandHdr := commandHdr """" url """" - } - ioHdr := StdOutStream(commandHdr) - } - } Catch e { - - } - - If (!binaryDL) { - ; Use fallback download if curl fails - If ((not RegExMatch(ioHdr, "i)HTTP\/1.1 200 OK") or e.what) and useFallback) { - DownloadFallback(url, html, e, critical, ioHdr, PreventErrorMsg) - } Else If (not RegExMatch(ioHdr, "i)HTTP\/1.1 200 OK" and e.what)) { - ThrowError(e, false, ioHdr, PreventErrorMsg) - } - } - ; handle binary file downloads - Else If (not e.what) { - ; check returned request headers - ioHdr := ParseReturnedHeaders(html) - If (not RegExMatch(ioHdr, "i)HTTP\/1.1 200 OK")) { - MsgBox, 16,, % "Error downloading file to " SavePath - Return "Error: Wrong Status" - } - - ; compare file sizes - FileGetSize, sizeOnDisk, %SavePath% - RegExMatch(ioHdr, "i)Content-Length:\s(\d+)", size) - size := size1 - If (size != sizeOnDisk) { - html := "Error: Different Size" - } - } Else { - ThrowError(e, false, ioHdr, PreventErrorMsg) - } - - Return html -} - -ParseReturnedHeaders(output) { - headerGroups := [] - headerGroup := "" - - Pos := 0 - While Pos := RegExMatch(output, "is)\[5 bytes data.*?({|$)", match, Pos + (StrLen(match) ? StrLen(match) : 1)) { - headerGroups.push(match) - } - - i := headerGroups.Length() - Loop, % i { - If (RegExMatch(headerGroups[i], "is)Content-Length")) { - headerGroup := headerGroups[i] - break - } - i-- - } - - out := "" - headerGroup := RegExReplace(headerGroup, "im)^<|\[5 bytes data\]|^{") - Loop, parse, headerGroup, `n, `r - { - If (StrLen(Trim(A_LoopField))) { - out .= Trim(A_LoopField) - } - } - - Return out -} - -; only works if no post data required/not downloading for example .zip files -DownloadFallback(url, ByRef html, e, critical, errorMsg, PreventErrorMsg = false) { - ErrorLevel := 0 - fileName := RandomStr() . ".txt" - - UrlDownloadToFile, %url%, %A_ScriptDir%\temp\%fileName% - If (!ErrorLevel) { - FileRead, html, %A_ScriptDir%\temp\%fileName% - FileDelete, %A_ScriptDir%\temp\%fileName% - } Else If (!PreventErrorMsg) { - SplashTextOff - ThrowError(e, critical, errorMsg) - } -} - -ThrowError(e, critical = false, errorMsg = "", PreventErrorMsg = false) { - If (PreventErrorMsg) { - Return - } - - msg := "Exception thrown (download)!" - msg .= "`n`nwhat: " e.what "`nfile: " e.file "`nline: " e.line "`nmessage: " e.message "`nextra: " e.extra - msg := StrLen(errorMsg) ? msg "`n`n" errorMsg : msg - - If (critical) { - MsgBox, 16,, % msg - } Else { - MsgBox, % msg - } -} - -RandomStr(l = 24, i = 48, x = 122) { ; length, lowest and highest Asc value - Loop, %l% { - Random, r, i, x - s .= Chr(r) - } - s := RegExReplace(s, "\W", "i") ; only alphanum. - - Return, s -} \ No newline at end of file diff --git a/lib/PoEScripts_HandleUserSettings.ahk b/lib/PoEScripts_HandleUserSettings.ahk index a8272183..47380f6e 100644 --- a/lib/PoEScripts_HandleUserSettings.ahk +++ b/lib/PoEScripts_HandleUserSettings.ahk @@ -1,11 +1,12 @@ -#Include, CalcChecksum.ahk +; ignore include errors to support two different paths +#Include, *i CalcChecksum.ahk +#Include, *i %A_ScriptDir%\..\..\lib\CalcChecksum.ahk - -PoEScripts_HandleUserSettings(ProjectName, BaseDir, External, FilesToCopy, sourceDir) { +PoEScripts_HandleUserSettings(ProjectName, BaseDir, External, sourceDir, scriptDir = "") { Dir := BaseDir . "\" . ProjectName ; check for git files to determine if it's a development version, return a path using the branch name - devBranch := PoEScripts_isDevelopmentVersion() + devBranch := PoEScripts_isDevelopmentVersion(scriptDir) If (StrLen(devBranch)) { Dir := Dir . devBranch } @@ -13,63 +14,28 @@ PoEScripts_HandleUserSettings(ProjectName, BaseDir, External, FilesToCopy, sourc PoEScripts_CreateDirIfNotExist(Dir) ; copy files after checking if it's neccessary (files do not exist, files were changed in latest update) - ; copy .ini files and AdditionalMacros.txt to A_MyDocuments/ProjectName - PoEScripts_CopyFiles(FilesToCopy, sourceDir, Dir, fileList) + PoEScripts_CopyFiles(sourceDir, Dir, fileList) Return fileList } -PoEScripts_CopyFiles(Files, sourceDir, Dir, ByRef fileList) { - tempObj := PoEScripts_ParseFileHashes(Dir) +PoEScripts_CopyFiles(SrcDir, DestDir, ByRef fileList) { + tempObj := PoEScripts_ParseFileHashes(DestDir) hashes := tempObj.dynamic hashes_locked := tempObj.static - fileNames := [] + fileNames := [] overwrittenFiles := [] - FileRemoveDir, %Dir%\temp, 1 - FileCreateDir, %Dir%\temp - - For key, file in Files { - file := sourceDir . file - If (FileExist(file)) { - ; remove "default_" prefix in file-names and copy them to temp folder - SplitPath, file, f_name, f_dir, f_ext, f_name_no_ext, f_drive - file_orig := file - file_name := RegExReplace(f_name_no_ext, "i)default_", "") . "." . f_ext - FileCopy, %file%, %Dir%\temp\%file_name% - file := f_dir . "\" . file_name - fileNames.push(file_name) - - ; hash the file from the new script version - sourceHash := HashFile(Dir . "\temp\" . file_name, "SHA") - hashes[file_name] := sourceHash - - ; if the file from the new release was changed since the last release or does not exist, copy it over - If (PoEScripts_CopyNeeded(file, Dir, sourceHash, hashes_locked)) { - ; remember which files we will overwrite and create backups - If (FileExist(Dir "\" file_name)) { - overwrittenFiles.push(file_name) - PoEScripts_CreateDirIfNotExist(Dir "\backup") - FileMove, %Dir%\%file_name%, %Dir%\backup\%file_name%, 1 - } - ErrorLevel := 0 - FileCopy, %Dir%\temp\%file_name%, %Dir%\%file_name%, 1 - If (ErrorLevel) { - Msgbox % "File: " file_name "could not be copied to the user folder. Please make sure this folder is not protected/readonly." - } - } - FileDelete, %Dir%\temp\%file_name% - } - } + PoEScripts_CopyFolderContentsRecursive(SrcDir, DestDir, fileNames, hashes, hashes_locked, overwrittenFiles) ; recreate hashes file and fill it with array/object contents - FileDelete, %Dir%\data\FileHashes.txt + FileDelete, %DestDir%\data\FileHashes.txt For key, hash in hashes { ; make sure to write only hashes for files that we wanted to copy over, removing files not included in the new release For k, name in fileNames { If (key == name) { - PoEScripts_CreateDirIfNotExist(Dir "\data") - FileAppend, %key% = %hash%`n, %Dir%\data\FileHashes.txt + PoEScripts_CreateDirIfNotExist(DestDir "\data") + FileAppend, %key% = %hash%`n, %DestDir%\data\FileHashes.txt } } } @@ -81,17 +47,72 @@ PoEScripts_CopyFiles(Files, sourceDir, Dir, ByRef fileList) { fileList .= "- " . overwrittenFiles[A_Index] . "`n" } } +} + +PoEScripts_CopyFolderContentsRecursive(SourcePattern, DestinationFolder, ByRef fileNames, ByRef hashes, ByRef hashes_locked, ByRef overwrittenFiles, DoOverwrite = false) { + ; Copies all files and folders matching SourcePattern into the folder named DestinationFolder (recursively), skipping empty folders. + If (!InStr(FileExist(DestinationFolder), "D")) { + count := 0 + Loop, %SourcePattern%\*.*, 1, 1 + count++ + If (count > 0) { + FileCreateDir, %DestinationFolder% + } Else { + Return + } + } + + FileRemoveDir, %DestinationFolder%\temp, 1 + FileCreateDir, %DestinationFolder%\temp + + Loop %SourcePattern%\*.*, 1 + { + If (InStr(FileExist(A_LoopFileFullPath), "D")) { + PoEScripts_CopyFolderContentsRecursive(A_LoopFileFullPath, DestinationFolder "\" A_LoopFileName, fileNames, hashes, hashes_locked, overwrittenFiles, DoOverwrite) + } Else If (not RegExMatch(A_LoopFileFullPath, "i)\.bak$")) { + SplitPath, A_LoopFileFullPath, f_name, f_dir, f_ext, f_name_no_ext, f_drive + file_orig := A_LoopFileFullPath + RegExMatch(f_name_no_ext, "i)(_dontOverwrite)", dontOverwrite) + file_name := RegExReplace(f_name_no_ext, "i)_dontOverwrite", "") . "." . f_ext + FileCopy, %A_LoopFileFullPath%, %DestinationFolder%\temp\%file_name%, 1 + file := f_dir . "\" . file_name + fileNames.push(file_name) + + ; hash the file from the new script version + If (not StrLen(dontOverwrite)) { + sourceHash := HashFile(DestinationFolder . "\temp\" . file_name, "SHA") + hashes[file_name] := sourceHash + } + + ; if the file from the new release was changed since the last release or does not exist, copy it over + If (PoEScripts_CopyNeeded(file_name, DestinationFolder, sourceHash, hashes_locked, dontOverwrite)) { + ; remember which files we will overwrite and create backups + If (FileExist(DestinationFolder "\" file_name)) { + overwrittenFiles.push(file_name) + PoEScripts_CreateDirIfNotExist(DestinationFolder "\backup") + FileMove, %DestinationFolder%\%file_name%, %DestinationFolder%\backup\%file_name%, 1 + } + ErrorLevel := 0 + FileCopy, %DestinationFolder%\temp\%file_name%, %DestinationFolder%\%file_name%, 1 + If (ErrorLevel) { + Msgbox % "File: " file_name "could not be copied to the user folder. Please make sure this folder is not protected/readonly." + } + } + FileDelete, %DestinationFolder%\temp\%file_name% + } + } + FileRemoveDir, %DestinationFolder%\temp, 1 - FileRemoveDir, %Dir%\temp, 1 + Return } -PoEScripts_CopyNeeded(file, targetDir, sourceHash, hashes_locked) { +PoEScripts_CopyNeeded(file, targetDir, sourceHash, hashes_locked, dontOverwrite = "") { SplitPath, file, f_name, f_dir, f_ext, f_name_no_ext, f_drive - + If (FileExist(targetDir . "\" . f_name)) { ; file exists already in target folder - If (PoEScripts_CompareFileHashes(f_name, sourceHash, hashes_locked)) { - ; file hashes are different = file was changed since last release + If (PoEScripts_CompareFileHashes(f_name, sourceHash, hashes_locked) and not StrLen(dontOverwrite)) { + ; file hashes are different -> default file was changed since last release Return 1 } Else { @@ -100,7 +121,7 @@ PoEScripts_CopyNeeded(file, targetDir, sourceHash, hashes_locked) { } Else { ; file doesn't exist in target folder - return 1 + Return 1 } } @@ -120,12 +141,6 @@ PoEScripts_ParseFileHashes(Dir) { Return hashes } -PoEScripts_CreateDirIfNotExist(directory) { - If (!InStr(FileExist(directory), "D")) { - FileCreateDir, %directory% - } -} - PoEScripts_CompareFileHashes(name, sourceHash, hashes_locked) { If (hashes_locked[name] != sourceHash) { Return 1 @@ -133,10 +148,17 @@ PoEScripts_CompareFileHashes(name, sourceHash, hashes_locked) { Return 0 } -PoEScripts_isDevelopmentVersion() { - If (FileExist(A_ScriptDir "\.git")) { - If (FileExist(A_ScriptDir "\.git\HEAD")) { - FileRead, head, %A_ScriptDir%\.git\HEAD +PoEScripts_CreateDirIfNotExist(directory) { + If (!InStr(FileExist(directory), "D")) { + FileCreateDir, %directory% + } +} + +PoEScripts_isDevelopmentVersion(directory = "") { + directory := StrLen(directory) ? directory : A_ScriptDir + If (FileExist(directory "\.git")) { + If (FileExist(directory "\.git\HEAD")) { + FileRead, head, %directory%\.git\HEAD branch := "" Loop, Parse, head, `n, `r { diff --git a/lib/PoEScripts_Update.ahk b/lib/PoEScripts_Update.ahk index b4292ff7..36a71d3f 100644 --- a/lib/PoEScripts_Update.ahk +++ b/lib/PoEScripts_Update.ahk @@ -92,14 +92,13 @@ GetLatestRelease(user, repo, ReleaseVersion, ShowUpdateNotification, userDirecto WinSet, AlwaysOnTop, Off, %SplashScreenTitle% } Gui, UpdateNotification:Font,, Consolas - - boxHeight := isPrerelease ? 80 : 60 - Gui, UpdateNotification:Add, GroupBox, w580 h%boxHeight% cGreen, Update available! + + Gui, UpdateNotification:Add, GroupBox, w630 h80 cGreen, Update available! If (isPrerelease) { Gui, UpdateNotification:Add, Text, x20 yp+20, Warning: This is a pre-release. Gui, UpdateNotification:Add, Text, x20 y+10, Installed version: } Else { - Gui, UpdateNotification:Add, Text, x20 yp+20, Installed version: + Gui, UpdateNotification:Add, Text, x20 yp+30, Installed version: } currentLabel := versions.current.label @@ -114,10 +113,17 @@ GetLatestRelease(user, repo, ReleaseVersion, ShowUpdateNotification, userDirecto Gui, UpdateNotification:Add, Button, x+20 yp-5 gUpdateScript, Update Gui, UpdateNotification:Add, Text, x10 cGreen, Update notes: - Gui, UpdateNotification:Add, Edit, r20 ReadOnly w580 BackgroundTrans, %updateNotes% + Gui, UpdateNotification:Add, Edit, r20 ReadOnly w630 BackgroundTrans, %updateNotes% + + Gui, UpdateNotification:Add, Button, gCloseUpdateWindow, Close + + If (repo = "PoE-TradeMacro") { + payPalUrl := "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4ZVTWJNH6GSME" + Gui, UpdateNotification:Add, Picture, x460 y17 w150 h-1, %A_ScriptDir%\resources\images\Paypal-Logo.png + Gui, UpdateNotification:Add, Link, x450 y63 cBlue, Donate / Buy me a Mystery Box + } - Gui, UpdateNotification:Add, Button, gCloseUpdateWindow, Close - Gui, UpdateNotification:Show, w600 xCenter yCenter, Update + Gui, UpdateNotification:Show, w650 xCenter yCenter, Update ControlFocus, Update, Update WinWaitClose, Update } @@ -148,9 +154,9 @@ ParsePublishDate(date) { } CreateTextBlock(description, date, tag) { - block := "-----------------------------------------------------------------------------------------" . "`n" + block := "----------------------------------------------------------------------------------------------------" . "`n" block .= "[" . date . "] Version: " . tag . "`n" - block .= "-----------------------------------------------------------------------------------------" . "`n" + block .= "----------------------------------------------------------------------------------------------------" . "`n" block .= description . "`n`n" Return block diff --git a/resources/Updates_Trade.txt b/resources/Updates_Trade.txt index ca675f3a..df82fc4b 100644 --- a/resources/Updates_Trade.txt +++ b/resources/Updates_Trade.txt @@ -1,5 +1,20 @@ The following is a list of what has been updated, starting with 1.1.0 +2.5.0 +================================================================================================ +Fixed some pseudomods (Some of them were unintentionally removed under certain conditions). +Fixed the advanced affix lookup via pathof.info, which didn't work for people having spaces in their TradeMacro folder path. +Fixed poaffix.net lookup for daggers. +Disabled the forced 3L/4L selection on the advanced search GUI. +Improved some error handling related to missing file write permissions. +Fixed some harbinger items not being searchable (the reason being that they are correctly parsed as "uniques" but not handled/flagged as such on poe.trade). +Added 20% quality phys dps value to the ItemInfo tooltip. +Added fallbacks for the poe.ninja currency data request failing (site not available). +Added config entries for features yet to be implemented (poeapp support, UI scaling). +Added custom macros example/main file. You can find further explanations about this on the github wiki. +Added sytem tray context menu option to show all assigned hotkeys. +Other small bugfixes. + 2.4.0 ================================================================================================ Improved advanced search GUI: diff --git a/resources/VersionTrade.txt b/resources/VersionTrade.txt index 7b22ccca..884a84fa 100644 --- a/resources/VersionTrade.txt +++ b/resources/VersionTrade.txt @@ -1,2 +1,2 @@ -TradeReleaseVersion := "v2.4.0" +TradeReleaseVersion := "v2.5.0" TradeAHKVersionRequired := "1.1.26.00" diff --git a/resources/ahk/Merge_ItemInfo.ahk b/resources/ahk/Merge_ItemInfo.ahk new file mode 100644 index 00000000..ea76cd8f --- /dev/null +++ b/resources/ahk/Merge_ItemInfo.ahk @@ -0,0 +1,146 @@ +; #################################################################################################### +; # This script merges PoE-ItemInfo and AdditionalMacros into one script and executes it. +; # We also have to set some global variables and pass them to the ItemInfo script. +; # This is to support using ItemInfo as dependancy for other tools. +; #################################################################################################### +#Include, %A_ScriptDir%\..\..\lib\PoEScripts_CheckFolderWriteAccess.ahk +#Include, %A_ScriptDir%\..\..\lib\PoEScripts_CompareUserFolderWithScriptFolder.ahk +#Include, %A_ScriptDir%\..\..\lib\PoEScripts_CreateTempFolder.ahk +#Include, %A_ScriptDir%\..\..\lib\PoEScripts_HandleUserSettings.ahk + +RunAsAdmin() +arg1 = %1% +scriptDir := FileExist(arg1) ? arg1 : RegExReplace(A_ScriptDir, "(.*)\\[^\\]+\\.*", "$1") + +/* + Set ProjectName to create user settings folder in A_MyDocuments +*/ +projectName := "PoE-ItemInfo" + +/* + Check some folder permissions +*/ +PoE_Scripts_CheckFolderWriteAccess(A_MyDocuments . "\" . projectName) +PoE_Scripts_CheckFolderWriteAccess(scriptDir) + +If (!PoEScripts_CreateTempFolder(scriptDir, projectName)) { + ExitApp +} +If (InStr(scriptDir, A_Desktop)) { + Msgbox, 0x1010, Invalid Installation Path, Executing PoE-ItemInfo from your Desktop (or any of its subfolders) may cause script errors, please choose a different directory. +} + +/* + Set some important variables +*/ +FilesToCopyToUserFolder := scriptDir . "\resources\default_UserFiles" +overwrittenFiles := PoEScripts_HandleUserSettings(projectName, A_MyDocuments, "", FilesToCopyToUserFolder, scriptDir) +isDevelopmentVersion := PoEScripts_isDevelopmentVersion(scriptDir) +userDirectory := A_MyDocuments . "\" . projectName . isDevelopmentVersion + +PoEScripts_CompareUserFolderWithScriptFolder(userDirectory, scriptDir, projectName) + +/* + merge all scripts into `_ItemInfoMain.ahk` and execute it. +*/ +info := ReadFileToMerge(scriptDir "\resources\ahk\POE-ItemInfo.ahk") +addMacros := ReadFileToMerge(userDirectory "\AdditionalMacros.txt", FilesToCopyToUserFolder) + +info := info . "`n`r`n`r" +addMacros := "#IfWinActive Path of Exile ahk_class POEWindowClass ahk_group PoEexe" . "`n`r`n`r" . addMacros +addMacros .= AppendCustomMacros(userDirectory) + +CloseScript("ItemInfoMain.ahk") +FileDelete, %scriptDir%\_ItemInfoMain.ahk +FileCopy, %scriptDir%\resources\ahk\POE-ItemInfo.ahk, %scriptDir%\_ItemInfoMain.ahk + +FileAppend, %addMacros% , %scriptDir%\_ItemInfoMain.ahk + +; set script hidden +FileSetAttrib, +H, %scriptDir%\_ItemInfoMain.ahk +; pass some parameters to ItemInfo +Run "%A_AhkPath%" "%scriptDir%\_ItemInfoMain.ahk" "%projectName%" "%userDirectory%" "%isDevelopmentVersion%" "%overwrittenFiles%" + +ExitApp + + +; #################################################################################################### +; # functions +; #################################################################################################### + +CloseScript(Name) +{ + DetectHiddenWindows On + SetTitleMatchMode RegEx + IfWinExist, i)%Name%.* ahk_class AutoHotkey + { + WinClose + WinWaitClose, i)%Name%.* ahk_class AutoHotkey, , 2 + If ErrorLevel + Return "Unable to close " . Name + Else + Return "Closed " . Name + } + Else + Return Name . " not found" +} + +RunAsAdmin() +{ + ShellExecute := A_IsUnicode ? "shell32\ShellExecute":"shell32\ShellExecuteA" + If Not A_IsAdmin + { + If A_IsCompiled + DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_ScriptFullPath, str, A_WorkingDir, int, 1) + Else + DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_AhkPath, str, """" . A_ScriptFullPath . """", str, A_WorkingDir, int, 1) + ExitApp + } +} + +AppendCustomMacros(userDirectory) +{ + If(!InStr(FileExist(userDirectory "\CustomMacros"), "D")) { + FileCreateDir, %userDirectory%\CustomMacros\ + } + + appendedMacros := "`n`n" + extensions := "txt,ahk" + Loop %userDirectory%\CustomMacros\* + { + If A_LoopFileExt in %extensions% + { + FileRead, tmp, %A_LoopFileFullPath% + appendedMacros .= "; appended custom macro file: " A_LoopFileName " ---------------------------------------------------" + appendedMacros .= "`n" tmp "`n`n" + } + } + + Return appendedMacros +} + +ReadFileToMerge(path, fallbackSrcPath = "") { + fallback := StrLen(fallbackSrcPath) ? "`n`nAs a fallback you can try copying the file manually from """ fallbackSrcPath "" : "" + If (FileExist(path)) { + ErrorLevel := 0 + FileRead, file, %path% + If (ErrorLevel = 1) { + ; file does not exist (should be caught already) + Msgbox, 4096, Critical file read error, The file "%path%" doesn't exist. %fallback%`n`nClosing Script... + ExitApp + } Else If (ErrorLevel = 2) { + ; file is locked or inaccessible + Msgbox, 4096, Critical file read error, The file "%path%" is locked or inaccessible.`n`nClosing Script... + ExitApp + } Else If (ErrorLevel = 3) { + ; the system lacks sufficient memory to load the file + Msgbox, 4096, Critical file read error, The system lacks sufficient memory to load the file "%path%".`n`nClosing Script... + ExitApp + } Else { + Return file + } + } Else { + Msgbox, 4096, Critical file read error, The file "%path%" doesn't exist. %fallback%`n`nClosing Script... + ExitApp + } +} \ No newline at end of file diff --git a/resources/ahk/Merge_TradeMacro.ahk b/resources/ahk/Merge_TradeMacro.ahk new file mode 100644 index 00000000..ca724997 --- /dev/null +++ b/resources/ahk/Merge_TradeMacro.ahk @@ -0,0 +1,177 @@ +; ##################################################################################################################### +; # This script merges TradeMacro, TradeMacroInit, PoE-ItemInfo and AdditionalMacros into one script and executes it. +; # We also have to set some global variables and pass them to the ItemInfo/TradeMacroInit scripts. +; # This is to support using ItemInfo as dependancy for TradeMacro. +; ##################################################################################################################### +#Include, %A_ScriptDir%\..\..\lib\PoEScripts_CheckFolderWriteAccess.ahk +#Include, %A_ScriptDir%\..\..\lib\PoEScripts_CompareUserFolderWithScriptFolder.ahk +#Include, %A_ScriptDir%\..\..\lib\PoEScripts_CreateTempFolder.ahk +#Include, %A_ScriptDir%\..\..\lib\PoEScripts_HandleUserSettings.ahk + +arguments := "" +arg1 = %1% +scriptDir := FileExist(arg1) ? arg1 : RegExReplace(A_ScriptDir, "(.*)\\[^\\]+\\.*", "$1") +Loop, %0% ; For each parameter +{ + If (not FileExist(%A_Index%)) { ; we don't want the first argument which is the project scriptdir here + arguments .= " " Trim(%A_Index%) + } +} + +If (!InStr(arguments, "-noelevation", 0)) { + RunAsAdmin(arguments) +} + +If (InStr(arguments, "-nosplash", 0)) { + skipSplash := 1 +} Else { + skipSplash := 0 + StartSplashScreen() +} + +/* + Set ProjectName to create user settings folder in A_MyDocuments +*/ +projectName := "PoE-TradeMacro" + +/* + Check some folder permissions +*/ + +PoE_Scripts_CheckFolderWriteAccess(A_MyDocuments . "\" . projectName) +PoE_Scripts_CheckFolderWriteAccess(scriptDir) + +If (!PoEScripts_CreateTempFolder(scriptDir, projectName)) { + ExitApp +} + +If (InStr(scriptDir, A_Desktop)) { + Msgbox, 0x1010, Invalid Installation Path, Executing PoE-TradeMacro from your Desktop (or any of its subfolders) may cause script errors, please choose a different directory. +} + +/* + Set some important variables +*/ +FilesToCopyToUserFolder := scriptDir . "\resources\default_UserFiles" +overwrittenFiles := PoEScripts_HandleUserSettings(projectName, A_MyDocuments, projectName, FilesToCopyToUserFolder, scriptDir) +isDevelopmentVersion := PoEScripts_isDevelopmentVersion(scriptDir) +userDirectory := A_MyDocuments . "\" . projectName . isDevelopmentVersion + +PoEScripts_CompareUserFolderWithScriptFolder(userDirectory, scriptDir, projectName) + +/* + merge all scripts into `_TradeMacroMain.ahk` and execute it. +*/ +info := ReadFileToMerge(scriptDir "\resources\ahk\POE-ItemInfo.ahk") +tradeInit := ReadFileToMerge(scriptDir "\resources\ahk\TradeMacroInit.ahk") +trade := ReadFileToMerge(scriptDir "\resources\ahk\TradeMacro.ahk") +addMacros := ReadFileToMerge(userDirectory "\AdditionalMacros.txt", FilesToCopyToUserFolder) + +info := "`n`r`n`r" . info . "`n`r`n`r" +addMacros := "#IfWinActive Path of Exile ahk_class POEWindowClass ahk_group PoEexe" . "`n`r`n`r" . addMacros . "`n`r`n`r" +addMacros .= AppendCustomMacros(userDirectory) + +CloseScript("_TradeMacroMain.ahk") +CloseScript("_ItemInfoMain.ahk") +FileDelete, %scriptDir%\_TradeMacroMain.ahk +FileDelete, %scriptDir%\_ItemInfoMain.ahk +FileCopy, %scriptDir%\resources\ahk\TradeMacroInit.ahk, %scriptDir%\_TradeMacroMain.ahk + +FileAppend, %info% , %scriptDir%\_TradeMacroMain.ahk +FileAppend, %addMacros% , %scriptDir%\_TradeMacroMain.ahk +FileAppend, %trade% , %scriptDir%\_TradeMacroMain.ahk + +; set script hidden +FileSetAttrib, +H, %scriptDir%\_TradeMacroMain.ahk +; pass some parameters to TradeMacroInit +Run "%A_AhkPath%" "%scriptDir%\_TradeMacroMain.ahk" "%projectName%" "%userDirectory%" "%isDevelopmentVersion%" "%overwrittenFiles%" "isMergedScript" "%skipSplash%" + +ExitApp + + +; #################################################################################################################### +; # functions +; #################################################################################################################### + +CloseScript(Name) +{ + DetectHiddenWindows On + SetTitleMatchMode RegEx + IfWinExist, i)%Name%.* ahk_class AutoHotkey + { + WinClose + WinWaitClose, i)%Name%.* ahk_class AutoHotkey, , 2 + If ErrorLevel + Return "Unable to close " . Name + Else + Return "Closed " . Name + } + Else + Return Name . " not found" +} + +RunAsAdmin(arguments) +{ + ShellExecute := A_IsUnicode ? "shell32\ShellExecute":"shell32\ShellExecuteA" + If Not A_IsAdmin + { + If A_IsCompiled + DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_ScriptFullPath . " " . arguments, str, A_WorkingDir, int, 1) + Else + DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_AhkPath, str, """" . A_ScriptFullPath . """" . " " . arguments, str, A_WorkingDir, int, 1) + ExitApp + } + + Return arguments +} + +StartSplashScreen() { + SplashTextOn, , 20, PoE-TradeMacro, Merging and starting Scripts... +} + +AppendCustomMacros(userDirectory) +{ + If(!InStr(FileExist(userDirectory "\CustomMacros"), "D")) { + FileCreateDir, %userDirectory%\CustomMacros\ + } + + appendedMacros := "`n`n" + extensions := "txt,ahk" + Loop %userDirectory%\CustomMacros\* + { + If A_LoopFileExt in %extensions% + { + FileRead, tmp, %A_LoopFileFullPath% + appendedMacros .= "; appended custom macro file: " A_LoopFileName " ---------------------------------------------------" + appendedMacros .= "`n" tmp "`n`n" + } + } + + Return appendedMacros +} + +ReadFileToMerge(path, fallbackSrcPath = "") { + fallback := StrLen(fallbackSrcPath) ? "`n`nAs a fallback you can try copying the file manually from """ fallbackSrcPath "" : "" + If (FileExist(path)) { + ErrorLevel := 0 + FileRead, file, %path% + If (ErrorLevel = 1) { + ; file does not exist (should be caught already) + Msgbox, 4096, Critical file read error, The file "%path%" doesn't exist. %fallback%`n`nClosing Script... + ExitApp + } Else If (ErrorLevel = 2) { + ; file is locked or inaccessible + Msgbox, 4096, Critical file read error, The file "%path%" is locked or inaccessible.`n`nClosing Script... + ExitApp + } Else If (ErrorLevel = 3) { + ; the system lacks sufficient memory to load the file + Msgbox, 4096, Critical file read error, The system lacks sufficient memory to load the file "%path%".`n`nClosing Script... + ExitApp + } Else { + Return file + } + } Else { + Msgbox, 4096, Critical file read error, The file "%path%" doesn't exist. %fallback%`n`nClosing Script... + ExitApp + } +} \ No newline at end of file diff --git a/resources/ahk/POE-ItemInfo.ahk b/resources/ahk/POE-ItemInfo.ahk index 55c4cbbc..0dad0e2e 100644 --- a/resources/ahk/POE-ItemInfo.ahk +++ b/resources/ahk/POE-ItemInfo.ahk @@ -560,6 +560,7 @@ GoSub, FetchCurrencyData Menu, TextFiles, Add, Additional Macros, EditAdditionalMacros Menu, TextFiles, Add, Map Mod Warnings, EditMapModWarnings +Menu, TextFiles, Add, Custom Macros Example, EditCustomMacrosExample ; Menu tooltip RelVer := Globals.Get("ReleaseVersion") @@ -569,17 +570,17 @@ Menu, Tray, NoStandard Menu, Tray, Add, Reload Script (Use only this), ReloadScript Menu, Tray, Add ; Separator Menu, Tray, Add, About..., MenuTray_About +Menu, Tray, Add, Show all assigned Hotkeys, ShowAssignedHotkeys Menu, Tray, Add, % Globals.Get("SettingsUITitle", "PoE Item Info Settings"), ShowSettingsUI Menu, Tray, Add, Check for updates, CheckForUpdates Menu, Tray, Add, Update Notes, ShowUpdateNotes Menu, Tray, Add ; Separator -Menu, Tray, Add, Edit, :TextFiles +Menu, Tray, Add, Edit Files, :TextFiles Menu, Tray, Add, Open User Folder, EditOpenUserSettings Menu, Tray, Add ; Separator Menu, Tray, Standard Menu, Tray, Default, % Globals.Get("SettingsUITitle", "PoE Item Info Settings") - IfNotExist, %A_ScriptDir%\data { MsgBox, 16, % Msg.DataDirNotFound @@ -7131,7 +7132,7 @@ AssembleDamageDetails(FullItemData) ; Only show Q20 values if item is not Q20 If (Quality < 20) { - Q20Dps := PhysDps * (PhysMult + 120) / (PhysMult + Quality + 100) + Q20Dps := Q20PhysDps := PhysDps * (PhysMult + 120) / (PhysMult + Quality + 100) If ( twoColDisplay ) { @@ -7142,6 +7143,9 @@ AssembleDamageDetails(FullItemData) Else { Q20Dps := Q20Dps + EleDps + ChaosDps + If (Q20Dps != Q20PhysDps) { + Result = %Result%`nQ20 PDPS: %Q20PhysDps% + } Result = %Result%`nQ20 DPS: %Q20Dps% } } @@ -8557,7 +8561,9 @@ CreatePseudoMods(mods, returnAllMods := False) { ; flat 'element' damage; source: various (wands/rings/amulets etc) Else If (RegExMatch(mod.name, "i)adds .* (Cold|Fire|Lightning|Elemental) damage to (Attacks|Spells)$", element)) { %element1%Dmg_%element2%FlatLow := %element1%Dmg_%element2%FlatLow + mod.values[1] - %element1%Dmg_%element2%FlatHi := %element1%Dmg_%element2%FlatHi + mod.values[2] + %element1%Dmg_%element2%FlatHi := %element1%Dmg_%element2%FlatHi + mod.values[2] + ElementalDmg_%element2%FlatLow += %element1%Dmg_%element2%FlatLow + ElementalDmg_%element2%FlatHi += %element1%Dmg_%element2%FlatHi mod.simplifiedName := "xFlat" element1 "Damage" element2 } ; this would catch any * Spell * Damage * ( we might need to be more precise here ) @@ -8639,75 +8645,76 @@ CreatePseudoMods(mods, returnAllMods := False) { ; ### Generate Basic Stats pseudos If (lifeFlat > 0) { temp := {} - temp.values := [lifeFlat] - temp.name_orig := "+" . lifeFlat . " to maximum Life" - temp.name := "+# to maximum Life" - temp.simplifiedName := "xToMaximumLife" + temp.values := [lifeFlat] + temp.name_orig := "+" . lifeFlat . " to maximum Life" + temp.name := "+# to maximum Life" + temp.simplifiedName := "xToMaximumLife" + temp.exception := true temp.possibleParentSimplifiedNames := ["xToMaximumLife"] tempMods.push(temp) } If (manaFlat > 0) { temp := {} - temp.values := [manaFlat] - temp.name_orig := "+" . manaFlat . " to maximum Mana" - temp.name := "+# to maximum Mana" - temp.simplifiedName := "xToMaximumMana" + temp.values := [manaFlat] + temp.name_orig := "+" . manaFlat . " to maximum Mana" + temp.name := "+# to maximum Mana" + temp.simplifiedName := "xToMaximumMana" temp.possibleParentSimplifiedNames := ["xToMaximumMana"] tempMods.push(temp) } If (energyShieldFlat > 0) { temp := {} - temp.values := [energyShieldFlat] - temp.name_orig := "+" . energyShieldFlat . " to maximum Energy Shield" - temp.name := "+# to maximum Energy Shield" - temp.simplifiedName := "xToMaximumEnergyShield" + temp.values := [energyShieldFlat] + temp.name_orig := "+" . energyShieldFlat . " to maximum Energy Shield" + temp.name := "+# to maximum Energy Shield" + temp.simplifiedName := "xToMaximumEnergyShield" temp.possibleParentSimplifiedNames := ["xToMaximumEnergyShield"] tempMods.push(temp) } If (energyShieldPercent > 0) { temp := {} - temp.values := [energyShieldPercent] - temp.name_orig := energyShieldPercent . "% increased maximum Energy Shield" - temp.name := "#% increased maximum Energy Shield" - temp.simplifiedName := "xIncreasedMaximumEnergyShield" + temp.values := [energyShieldPercent] + temp.name_orig := energyShieldPercent . "% increased maximum Energy Shield" + temp.name := "#% increased maximum Energy Shield" + temp.simplifiedName := "xIncreasedMaximumEnergyShield" temp.possibleParentSimplifiedNames := ["xIncreasedMaximumEnergyShield"] tempMods.push(temp) } ; ### Generate rarity item found pseudo If (rarityItemsFoundPercent > 0) { temp := {} - temp.values := [rarityItemsFoundPercent] - temp.name_orig := rarityItemsFoundPercent . "% increased Rarity of items found" - temp.name := "#% increased Rarity of items found" - temp.simplifiedName := "xIncreasedRarityOfItemsFound" + temp.values := [rarityItemsFoundPercent] + temp.name_orig := rarityItemsFoundPercent . "% increased Rarity of items found" + temp.name := "#% increased Rarity of items found" + temp.simplifiedName := "xIncreasedRarityOfItemsFound" temp.possibleParentSimplifiedNames := ["xIncreasedRarityOfItemsFound"] tempMods.push(temp) } ; ### Generate crit pseudos If (globalCritChancePercent > 0) { temp := {} - temp.values := [globalCritChancePercent] - temp.name_orig := globalCritChancePercent . "% increased Global Critical Strike Chance" - temp.name := "#% increased Global Critical Strike Chance" - temp.simplifiedName := "xIncreasedGlobalCriticalChance" + temp.values := [globalCritChancePercent] + temp.name_orig := globalCritChancePercent . "% increased Global Critical Strike Chance" + temp.name := "#% increased Global Critical Strike Chance" + temp.simplifiedName := "xIncreasedGlobalCriticalChance" temp.possibleParentSimplifiedNames := ["xIncreasedGlobalCriticalChance"] tempMods.push(temp) } If (globalCritMultiplierPercent > 0) { temp := {} - temp.values := [globalCritMultiplierPercent] - temp.name_orig := "+" . globalCritMultiplierPercent . "% to Global Critical Strike Multiplier" - temp.name := "+#% to Global Critical Strike Multiplier" - temp.simplifiedName := "xIncreasedGlobalCriticalMultiplier" + temp.values := [globalCritMultiplierPercent] + temp.name_orig := "+" . globalCritMultiplierPercent . "% to Global Critical Strike Multiplier" + temp.name := "+#% to Global Critical Strike Multiplier" + temp.simplifiedName := "xIncreasedGlobalCriticalMultiplier" temp.possibleParentSimplifiedNames := ["xIncreasedGlobalCriticalMultiplier"] tempMods.push(temp) } If (critChanceForSpellsPercent > 0) { temp := {} - temp.values := [critChanceForSpellsPercent] - temp.name_orig := critChanceForSpellsPercent . "% increased Critical Strike Chance for Spells" - temp.name := "#% increased Critical Strike Chance for Spells" - temp.simplifiedName := "xIncreasedCriticalSpells" + temp.values := [critChanceForSpellsPercent] + temp.name_orig := critChanceForSpellsPercent . "% increased Critical Strike Chance for Spells" + temp.name := "#% increased Critical Strike Chance for Spells" + temp.simplifiedName := "xIncreasedCriticalSpells" temp.possibleParentSimplifiedNames := ["xIncreasedCriticalSpells"] tempMods.push(temp) } @@ -8715,10 +8722,10 @@ CreatePseudoMods(mods, returnAllMods := False) { For i, attribute in ["Strength", "Dexterity", "Intelligence"] { If ( %attribute%Flat > 0 ) { temp := {} - temp.values := [%attribute%Flat] - temp.name_orig := "+" . %attribute%Flat . " to " . attribute - temp.name := "+# to " . attribute - temp.simplifiedName := "xTo" attribute + temp.values := [%attribute%Flat] + temp.name_orig := "+" . %attribute%Flat . " to " . attribute + temp.name := "+# to " . attribute + temp.simplifiedName := "xTo" attribute temp.possibleParentSimplifiedNames := ["xTo" attribute, "xToAllAttributes"] tempMods.push(temp) } @@ -8726,10 +8733,10 @@ CreatePseudoMods(mods, returnAllMods := False) { ; cumulative all attributes mods If (allAttributesFlat > 0) { temp := {} - temp.values := [allAttributesFlat] - temp.name_orig := "+" . allAttributesFlat . " to all Attributes" - temp.name := "+#% to all Attributes" - temp.simplifiedName := "xToAllAttributes" + temp.values := [allAttributesFlat] + temp.name_orig := "+" . allAttributesFlat . " to all Attributes" + temp.name := "+#% to all Attributes" + temp.simplifiedName := "xToAllAttributes" temp.possibleParentSimplifiedNames := ["xToAllAttributes"] tempMods.push(temp) } @@ -8738,10 +8745,10 @@ CreatePseudoMods(mods, returnAllMods := False) { For i, element in ["Fire", "Cold", "Lightning"] { If ( %element%Resist > 0) { temp := {} - temp.values := [%element%Resist] - temp.name_orig := "+" %element%Resist "% to " element " Resistance" - temp.name := "+#% to " element " Resistance" - temp.simplifiedName := "xTo" element "Resistance" + temp.values := [%element%Resist] + temp.name_orig := "+" %element%Resist "% to " element " Resistance" + temp.name := "+#% to " element " Resistance" + temp.simplifiedName := "xTo" element "Resistance" temp.possibleParentSimplifiedNames := ["xTo" element "Resistance", "xToAllElementalResistances"] temp.hideForTradeMacro := true tempMods.push(temp) @@ -8749,10 +8756,11 @@ CreatePseudoMods(mods, returnAllMods := False) { } If (toAllElementalResist > 0) { temp := {} - temp.values := [toAllElementalResist] - temp.name_orig := "+" . toAllElementalResist . "% to all Elemental Resistances" - temp.name := "+#% to all Elemental Resistances" - temp.simplifiedName := "xToAllElementalResistances" + temp.values := [toAllElementalResist] + temp.name_orig := "+" . toAllElementalResist . "% to all Elemental Resistances" + temp.name := "+#% to all Elemental Resistances" + temp.simplifiedName := "xToAllElementalResistances" + temp.exception := true temp.possibleParentSimplifiedNames := ["xToAllElementalResistances"] temp.hideForTradeMacro := true tempMods.push(temp) @@ -8760,59 +8768,61 @@ CreatePseudoMods(mods, returnAllMods := False) { ; Note that total resistances are calculated values with no possible child mods, so they have no simplifiedName If (totalElementalResistance > 0) { temp := {} - temp.values := [totalElementalResistance] - temp.name_orig := "+" . totalElementalResistance . "% total Elemental Resistance" - temp.name := "+#% total Elemental Resistance" - temp.possibleParentSimplifiedNames := ["xToFireResistance", "xToColdResistance", "xToLignthningResistance", "xToAllElementalResistances"] + temp.values := [totalElementalResistance] + temp.name_orig := "+" . totalElementalResistance . "% total Elemental Resistance" + temp.name := "+#% total Elemental Resistance" + temp.exception := true + temp.possibleParentSimplifiedNames := ["xToFireResistance", "xToColdResistance", "xToLightningResistance", "xToAllElementalResistances"] tempMods.push(temp) } ; without chaos resist, this would have the same value as totalElementalResistance If ((totalResistance > 0) AND (chaosResist > 0)) { temp := {} - temp.values := [totalResistance] - temp.name_orig := "+" . totalResistance . "% total Resistance" - temp.name := "+#% total Resistance" - temp.possibleParentSimplifiedNames := ["xToFireResistance", "xToColdResistance", "xToLignthningResistance", "xToAllElementalResistances", "xToChaosResistance"] + temp.values := [totalResistance] + temp.name_orig := "+" . totalResistance . "% total Resistance" + temp.name := "+#% total Resistance" + temp.exception := true + temp.possibleParentSimplifiedNames := ["xToFireResistance", "xToColdResistance", "xToLightningResistance", "xToAllElementalResistances", "xToChaosResistance"] tempMods.push(temp) } ; ### Generate remaining pseudos derived from attributes If (meleePhysDmgGlobal_Percent > 0) { temp := {} - temp.values := [meleePhysDmgGlobal_Percent] - temp.name_orig := meleePhysDmgGlobal_Percent . "% increased Melee Physical Damage" - temp.name := "#% increased Melee Physical Damage" - temp.simplifiedName := "xIncreasedMeleePhysicalDamage" + temp.values := [meleePhysDmgGlobal_Percent] + temp.name_orig := meleePhysDmgGlobal_Percent . "% increased Melee Physical Damage" + temp.name := "#% increased Melee Physical Damage" + temp.simplifiedName := "xIncreasedMeleePhysicalDamage" temp.possibleParentSimplifiedNames := ["xIncreasedMeleePhysicalDamage"] temp.hideForTradeMacro := true tempMods.push(temp) } If (energyShieldPercentGlobal > 0) { temp := {} - temp.values := [energyShieldPercentGlobal] - temp.name_orig := energyShieldPercentGlobal . "% increased Energy Shield (Global)" - temp.name := "#% increased Energy Shield (Global)" - temp.simplifiedName := "xIncreasedEnergyShieldPercentGlobal" + temp.values := [energyShieldPercentGlobal] + temp.name_orig := energyShieldPercentGlobal . "% increased Energy Shield (Global)" + temp.name := "#% increased Energy Shield (Global)" + temp.simplifiedName := "xIncreasedEnergyShieldPercentGlobal" temp.possibleParentSimplifiedNames := ["xIncreasedEnergyShieldPercentGlobal"] temp.hideForTradeMacro := true tempMods.push(temp) } If (evasionRatingPercentGlobal > 0) { temp := {} - temp.values := [evasionRatingPercentGlobal] - temp.name_orig := evasionRatingPercentGlobal . "% increased Evasion (Global)" - temp.name := "#% increased Evasion (Global)" - temp.simplifiedName := "xIncreasedEvasionRatingPercentGlobal" + temp.values := [evasionRatingPercentGlobal] + temp.name_orig := evasionRatingPercentGlobal . "% increased Evasion (Global)" + temp.name := "#% increased Evasion (Global)" + temp.simplifiedName := "xIncreasedEvasionRatingPercentGlobal" temp.possibleParentSimplifiedNames := ["xIncreasedEvasionRatingPercentGlobal"] temp.hideForTradeMacro := true tempMods.push(temp) } If (accuracyRatingFlat > 0) { temp := {} - temp.values := [accuracyRatingFlat] - temp.name_orig := "+" . accuracyRatingFlat . " to Accuracy Rating" - temp.name := "+# to Accuracy Rating" - temp.simplifiedName := "xToAccuracyRating" + temp.values := [accuracyRatingFlat] + temp.name_orig := "+" . accuracyRatingFlat . " to Accuracy Rating" + temp.name := "+# to Accuracy Rating" + temp.simplifiedName := "xToAccuracyRating" temp.possibleParentSimplifiedNames := ["xToAccuracyRating"] tempMods.push(temp) } @@ -8821,10 +8831,10 @@ CreatePseudoMods(mods, returnAllMods := False) { ; spell damage global If (spellDmg_Percent > 0) { temp := {} - temp.values := [spellDmg_Percent] - temp.name_orig := spellDmg_Percent . "% increased Spell Damage" - temp.name := "#% increased Spell Damage" - temp.simplifiedName := "xIncreasedSpellDamage" + temp.values := [spellDmg_Percent] + temp.name_orig := spellDmg_Percent . "% increased Spell Damage" + temp.name := "#% increased Spell Damage" + temp.simplifiedName := "xIncreasedSpellDamage" temp.possibleParentSimplifiedNames := ["xIncreasedSpellDamage"] tempMods.push(temp) } @@ -8833,32 +8843,41 @@ CreatePseudoMods(mods, returnAllMods := False) { percentDamageModSuffixes := [" Damage", " Damage with Attack Skills", " Spell Damage"] flatDamageModSuffixes := ["", " to Attacks", " to Spells"] - For i, element in ["Fire", "Cold", "Lightning", "Elemental"] { + For i, element in dmgTypes { + StringUpper, element, element, T For j, dmgType in ["", "Attacks", "Spells"] { ; ### Percentage damages If (%element%Dmg_%dmgType%Percent > 0) { modSuffix := percentDamageModSuffixes[j] temp := {} - temp.values := [%element%Dmg_%dmgType%Percent] - temp.name_orig := %element%Dmg_%dmgType%Percent "% increased " element . modSuffix - temp.name := "#% increased " element . modSuffix - temp.simplifiedName := "xIncreased" element "Damage" dmgType + temp.values := [%element%Dmg_%dmgType%Percent] + temp.name_orig := %element%Dmg_%dmgType%Percent "% increased " element . modSuffix + temp.name := "#% increased " element . modSuffix + temp.simplifiedName := "xIncreased" element "Damage" dmgType temp.possibleParentSimplifiedNames := ["xIncreased" element "Damage" dmgType, "xIncreased" element "Damage"] ( element != "Elemental" ) ? temp.possibleParentSimplifiedNames.push("xIncreasedElementalDamage" dmgType) : False ( dmgType == "Spells" ) ? temp.possibleParentSimplifiedNames.push("xIncreasedSpellDamage") : False tempMods.push(temp) } ; ### Flat damages - If (%element%Dmg_%dmgType%FlatLow > 0) { + If (%element%Dmg_%dmgType%FlatLow > 0 or %element%Dmg_%dmgType%FlatHi > 0) { modSuffix := flatDamageModSuffixes[j] temp := {} - temp.values := [%element%Dmg_%dmgType%FlatLow, %element%Dmg_%dmgType%FlatHi] - temp.name_orig := "Adds " %element%Dmg_%dmgType%FlatLow " to " %element%Dmg_%dmgType%FlatHi " " element " Damage" modSuffix - temp.name := "Adds # " element " Damage" modSuffix - temp.simplifiedName := "xFlat" element "Damage" dmgType + temp.values := [%element%Dmg_%dmgType%FlatLow, %element%Dmg_%dmgType%FlatHi] + temp.name_orig := "Adds " %element%Dmg_%dmgType%FlatLow " to " %element%Dmg_%dmgType%FlatHi " " element " Damage" modSuffix + temp.name := "Adds # " element " Damage" modSuffix + temp.simplifiedName := "xFlat" element "Damage" dmgType temp.possibleParentSimplifiedNames := ["xFlat" element "Damage" dmgType] - ( element != "Elemental" ) ? temp.possibleParentSimplifiedNames.push("xFlatElementalDamage" dmgType) : False + If (element != "Elemental") { + temp.possibleParentSimplifiedNames.push("xFlatElementalDamage" dmgType) + } Else { + temp.possibleParentSimplifiedNames := [] + For e, el in dmgTypes { + StringUpper, upperEl, el, T + temp.possibleParentSimplifiedNames.push("xFlat" upperEl "Damage" dmgType) + } + } tempMods.push(temp) } } @@ -8890,10 +8909,8 @@ CreatePseudoMods(mods, returnAllMods := False) { If ( tempMod.name == mod.name ) { ; check if it's a flat damage mod If (mod.values[2]) { - mv := (mod.values[1] + mod.values[2]) / 2 - tv := (tempMod.values[1] + tempMod.values[2]) / 2 - - console.log(mod.name "`n" mv " - " tv) + mv := Round((mod.values[1] + mod.values[2]) / 2, 3) + tv := Round((tempMod.values[1] + tempMod.values[2]) / 2, 3) If (tv <= mv) { higher := false } @@ -8906,22 +8923,21 @@ CreatePseudoMods(mods, returnAllMods := False) { } } ; add the tempMod to pseudos if it has greater values, or no parent - If (higher) { + If (higher or (tempMod.exception and returnAllMods)) { tempMod.isVariable:= false tempMod.type := "pseudo" allPseudoMods.push(tempMod) } } - + ; 2nd pass ; now we remove pseudos that are shadowed by an original mod they inherited from ; ex ( '25% increased Cold Spell Damage' is shadowed by '%25 increased Spell Damage' ) - tempPseudoMods := [] For i, tempMod in allPseudoMods { higher := true For j, mod in mods { - ; check if its a parent mod + ; check if it's a parent mod isParentMod := false For k, simplifiedName in tempMod.possibleParentSimplifiedNames { If (mod.simplifiedName == simplifiedName) { @@ -8930,10 +8946,10 @@ CreatePseudoMods(mods, returnAllMods := False) { } } If ( isParentMod ) { - ; check if its a flat damage mod + ; check if it's a flat damage mod If (mod.values[2]) { - mv := (mod.values[1] + mod.values[2]) / 2 - tv := (tempMod.values[1] + tempMod.values[2]) / 2 + mv := Round((mod.values[1] + mod.values[2]) / 2, 3) + tv := Round((tempMod.values[1] + tempMod.values[2]) / 2, 3) If (tv <= mv) { higher := false } @@ -8945,14 +8961,14 @@ CreatePseudoMods(mods, returnAllMods := False) { } } } - ; add the tempMod to pseudos if it has greater values, or no parent - If (higher) { + ; add the tempMod to pseudos if it has greater values, or no parent + If (higher or (tempMod.exception and returnAllMods)) { tempMod.isVariable:= false tempMod.type := "pseudo" tempPseudoMods.push(tempMod) } } - + ; 3rd Pass ; same logic as above but compare pseudo with other pseudos ; remove pseudos that are shadowed by another pseudo @@ -8964,8 +8980,8 @@ CreatePseudoMods(mods, returnAllMods := False) { higher := true For j, tempPseudoB in tempPseudoMods { ; skip if its the same object - if( i != j ) { - ; check if its a parent mod + If ( i != j ) { + ; check if it's a parent mod isParentMod := false For k, simplifiedName in tempPseudoA.possibleParentSimplifiedNames { if (tempPseudoB.simplifiedName == simplifiedName) { @@ -8974,10 +8990,10 @@ CreatePseudoMods(mods, returnAllMods := False) { } } If ( isParentMod ) { - ; check if its a flat damage mod + ; check if it's a flat damage mod If (tempPseudoB.values[2]) { - mv := (tempPseudoB.values[1] + tempPseudoB.values[2]) / 2 - tv := (tempPseudoA.values[1] + tempPseudoA.values[2]) / 2 + mv := Round((tempPseudoB.values[1] + tempPseudoB.values[2]) / 2, 3) + tv := Round((tempPseudoA.values[1] + tempPseudoA.values[2]) / 2, 3) If (tv <= mv) { higher := false } @@ -8991,13 +9007,13 @@ CreatePseudoMods(mods, returnAllMods := False) { } } ; add the tempMod to pseudos if it has greater values, or no parent - If (higher){ + If (higher) { tempPseudoA.isVariable:= false tempPseudoA.type := "pseudo" pseudoMods.push(tempPseudoA) } } - + ; ### This is mostly for TradeMacro ; returns all original mods and the pseudo mods if requested If (returnAllMods) { @@ -10013,7 +10029,7 @@ StdOutStream(sCmd, Callback = "") { ReadConsoleOutputFromFile(command, fileName) { file := "temp\" fileName ".txt" - RunWait %comspec% /c "chcp 1251 /f >nul 2>&1 & %command% > %file%", , Hide + RunWait %comspec% /c "chcp 1251 /f >nul 2>&1 & %command% > %file%", , Hide FileRead, io, %file% Return io @@ -10045,6 +10061,39 @@ UriEncode(Uri, Enc = "UTF-8") { Return, Res } +ScriptInfo(Command) { + ; https://autohotkey.com/boards/viewtopic.php?t=9656 + ; Command must be "ListLines", "ListVars", "ListHotkeys" or "KeyHistory". + static hEdit := 0, pfn, bkp + if !hEdit { + hEdit := DllCall("GetWindow", "ptr", A_ScriptHwnd, "uint", 5, "ptr") + user32 := DllCall("GetModuleHandle", "str", "user32.dll", "ptr") + pfn := [], bkp := [] + for i, fn in ["SetForegroundWindow", "ShowWindow"] { + pfn[i] := DllCall("GetProcAddress", "ptr", user32, "astr", fn, "ptr") + DllCall("VirtualProtect", "ptr", pfn[i], "ptr", 8, "uint", 0x40, "uint*", 0) + bkp[i] := NumGet(pfn[i], 0, "int64") + } + } + + if (A_PtrSize=8) { ; Disable SetForegroundWindow and ShowWindow. + NumPut(0x0000C300000001B8, pfn[1], 0, "int64") ; return TRUE + NumPut(0x0000C300000001B8, pfn[2], 0, "int64") ; return TRUE + } else { + NumPut(0x0004C200000001B8, pfn[1], 0, "int64") ; return TRUE + NumPut(0x0008C200000001B8, pfn[2], 0, "int64") ; return TRUE + } + + static cmds := {ListLines:65406, ListVars:65407, ListHotkeys:65408, KeyHistory:65409} + cmds[Command] ? DllCall("SendMessage", "ptr", A_ScriptHwnd, "uint", 0x111, "ptr", cmds[Command], "ptr", 0) : 0 + + NumPut(bkp[1], pfn[1], 0, "int64") ; Enable SetForegroundWindow. + NumPut(bkp[2], pfn[2], 0, "int64") ; Enable ShowWindow. + + ControlGetText, text,, ahk_id %hEdit% + return text +} + GetContributors(AuthorsPerLine=0) { IfNotExist, %A_ScriptDir%\resources\AUTHORS.txt @@ -10065,6 +10114,62 @@ GetContributors(AuthorsPerLine=0) return Authors } +ShowAssignedHotkeys() { + scriptInfo := ScriptInfo("ListHotkeys") + hotkeys := [] + + Loop, Parse, scriptInfo, `n`r, + { + line := RegExReplace(A_Loopfield, "[\t]", "|") + line := RegExReplace(line, "\|(?!\s)", "| ") . "|" + fields := [] + + If (StrLen(line)) { + Pos := 0 + While Pos := RegExMatch(line, "i)(.*?\|+)", value, Pos + (StrLen(value) ? StrLen(value) : 1)) { + fields.push(Trim(RegExReplace(value1, "\|"))) + } + If (StrLen(fields[1]) and not InStr(fields[1], "--------")) { + hotkeys.push(fields) + } + } + } + + Gui, ShowHotkeys:Add, Text, , List of this scripts assigned hotkeys. + Gui, ShowHotkeys:Default + Gui, Font, , Courier New + Gui, Font, , Consolas + Gui, ShowHotkeys:Add, ListView, r25 w800 NoSortHdr Grid ReadOnly, Type | Enabled | Level | Running | Key combination + For key, val in hotkeys { + If (key != 1) { + LV_Add("", val*) + LV_ModifyCol() + } + } + + i := 0 + Loop % LV_GetCount("Column") + { + i++ + LV_ModifyCol(a_index,"AutoHdr") + } + + text := "reg: The hotkey is implemented via the operating system's RegisterHotkey() function." . "`n" + text .= "reg(no): Same as above except that this hotkey is inactive (due to being unsupported, disabled, or suspended)." . "`n" + text .= "k-hook: The hotkey is implemented via the keyboard hook." . "`n" + text .= "m-hook: The hotkey is implemented via the mouse hook." . "`n" + text .= "2-hooks: The hotkey requires both the hooks mentioned above." . "`n" + text .= "joypoll: The hotkey is implemented by polling the joystick at regular intervals." . "`n" + text .= "`n" + text .= "Enabled: Hotkey is assigned but enabled/disabled [on/off] via the Hotkey command." . "`n" + + Gui, ShowHotkeys:Add, Text, , % text + + Gui, ShowHotkeys:Show, w820 xCenter yCenter, Assigned Hotkeys + Gui, 1:Default + Gui, Font +} + CloseScripts() { ; Close all active scripts listed in Globals.Get("ScriptList"). ; Can be used with scripts extending/including ItemInfo (TradeMacro for example) by adding to/altering this list. @@ -10323,19 +10428,31 @@ AdvancedItemInfoExt() { itemTextBase64 := "" FileDelete, %A_ScriptDir%\temp\itemText.txt FileAppend, %CBContents%, %A_ScriptDir%\temp\itemText.txt, utf-8 - command := "certutil -encode -f %cd%\temp\itemText.txt %cd%\temp\base64ItemText.txt & type %cd%\temp\base64ItemText.txt" + command := "certutil -encode -f ""%cd%\temp\itemText.txt"" ""%cd%\temp\base64ItemText.txt"" & type ""%cd%\temp\base64ItemText.txt""" itemTextBase64 := ReadConsoleOutputFromFile(command, "encodeToBase64.txt") itemTextBase64 := Trim(RegExReplace(itemTextBase64, "i)-----BEGIN CERTIFICATE-----|-----END CERTIFICATE-----|77u/", "")) itemTextBase64 := UriEncode(itemTextBase64) itemTextBase64 := RegExReplace(itemTextBase64, "i)^(%0D)?(%0A)?|((%0D)?(%0A)?)+$", "") url := "http://pathof.info/?item=" itemTextBase64 openWith := AssociatedProgram("html") - Run, %openWith% -new-tab "%Url%" + OpenWebPageWith(openWith, Url) } SuspendPOEItemScript = 0 } } +OpenWebPageWith(application, url) { + If (InStr(application, "iexplore")) { + ie := ComObjCreate("InternetExplorer.Application") + ie.Visible:=True + ie.Navigate(url) + } Else { + ; while this should work with IE there may be cases where it doesn't + Run, "%application%" -new-tab "%Url%" + } + Return +} + LookUpAffixes() { /* Opens item base on poeaffix.net @@ -10368,7 +10485,7 @@ LookUpAffixes() { ev := RegExMatch(ItemData.Stats, "i)Evasion Rating") ? "ev" : "" ar := RegExMatch(ItemData.Stats, "i)Armour") ? "ar" : "" es := RegExMatch(ItemData.Stats, "i)Energy Shield") ? "es" : "" - RegExMatch(Item.SubType, "i)Axe|Sword|Mace|Sceptre|Bow|Staff|Wand|Fish", weapon) + RegExMatch(Item.SubType, "i)Axe|Sword|Mace|Sceptre|Bow|Staff|Wand|Fish|Dagger", weapon) RegExMatch(Item.Subtype, "i)Amulet|Ring|Belt|Quiver|Flask", accessory) RegExMatch(Item.Subtype, "i)Cobalt|Viridian|Crimson", jewel) @@ -10390,7 +10507,7 @@ LookUpAffixes() { url .= prefix "-" suffix ; ".html" } openWith := AssociatedProgram("html") - Run, %openWith% -new-tab "%Url%" + OpenWebPageWith(openWith, Url) } Sleep, 10 @@ -10631,6 +10748,10 @@ EditAdditionalMacros: EditMapModWarnings: OpenUserDirFile("MapModWarnings.txt") return + +EditCustomMacrosExample: + OpenUserDirFile("CustomMacros\customMacros_example.txt") + return EditCurrencyRates: OpenCreateDataTextFile("CurrencyRates.txt") @@ -10640,6 +10761,10 @@ ReloadScript: scriptName := RegExReplace(Globals.Get("ProjectName"), "i)poe-", "Run_") . ".ahk" Run, "%A_AhkPath%" "%A_ScriptDir%\%scriptName%" return + +ShowAssignedHotkeys: + ShowAssignedHotkeys() + return 3GuiClose: Gui, 3:Cancel diff --git a/resources/ahk/TradeMacro.ahk b/resources/ahk/TradeMacro.ahk index 233df1bf..63b745f9 100644 --- a/resources/ahk/TradeMacro.ahk +++ b/resources/ahk/TradeMacro.ahk @@ -226,6 +226,11 @@ TradeFunc_Main(openSearchInBrowser = false, isAdvancedPriceCheck = false, isAdva hasAdvancedSearch := true } + ; Harbinger fragments/maps are unique but not flagged as such on poe.trade + If (RegExMatch(Item.Name, "i)(First|Second|Third|Fourth) Piece of.*|The Beachhead.*")) { + Item.IsUnique := false + } + If (!Item.IsUnique) { preparedItem := TradeFunc_PrepareNonUniqueItemMods(ItemData.Affixes, Item.Implicit, Item.RarityLevel, Enchantment, Corruption, Item.IsMap) preparedItem.maxSockets := Item.maxSockets @@ -602,10 +607,20 @@ TradeFunc_Main(openSearchInBrowser = false, isAdvancedPriceCheck = false, isAdva If (Item.IsMap) { ; add Item.subtype to make sure to only find maps - RequestParams.xbase := Item.SubType + If (not RegExMatch(Item.Name, "i)The Beachhead.*", isHarbingerMap)) { + RequestParams.xbase := Item.SubType + } Else { + RequestParams.xbase := "" + } RequestParams.xtype := "" - If (!Item.IsUnique) { - RequestParams.name := "" + If (not Item.IsUnique) { + console.log(isHarbingerMap) + If (StrLen(isHarbingerMap)) { + ; Beachhead Map workaround (unique but not flagged as such on poe.trade) + RequestParams.name := Item.Name + } Else { + RequestParams.name := "" + } } ; Ivory Temple fix, not sure why it's not recognized and if there are more cases like it @@ -1343,11 +1358,11 @@ TradeFunc_OpenUrlInBrowser(Url) { openWith := If (TradeFunc_CheckBrowserPath(TradeOpts.BrowserPath, false)) { openWith := TradeOpts.BrowserPath - Run, %openWith% -new-tab "%Url%" + OpenWebPageWith(openWith, Url) } Else If (TradeOpts.OpenWithDefaultWin10Fix) { openWith := AssociatedProgram("html") - Run, %openWith% -new-tab "%Url%" + OpenWebPageWith(openWith, Url) } Else { Run %Url% @@ -3179,21 +3194,27 @@ TradeFunc_AdvancedPriceCheckGui(advItem, Stats, Sockets, Links, UniqueStats = "" offset := (m > 1 ) ? "+15" : "15" m++ text := "Links (max): 4" + /* If (Links = 4) { Gui, SelectModsGui:Add, CheckBox, x%offset% yp+0 vTradeAdvancedUseLinksMaxFour Checked, % text } Else { Gui, SelectModsGui:Add, CheckBox, x%offset% yp+0 vTradeAdvancedUseLinksMaxFour, % text - } + } + */ + Gui, SelectModsGui:Add, CheckBox, x%offset% yp+0 vTradeAdvancedUseLinksMaxFour, % text } Else If (Links <= 3 and advItem.maxSockets = 3) { offset := (m > 1 ) ? "+15" : "15" m++ text := "Links (max): 3" + /* If (Links = 3) { Gui, SelectModsGui:Add, CheckBox, x%offset% yp+0 vTradeAdvancedUseLinksMaxThree Checked, % text } Else { Gui, SelectModsGui:Add, CheckBox, x%offset% yp+0 vTradeAdvancedUseLinksMaxThree, % text - } + } + */ + Gui, SelectModsGui:Add, CheckBox, x%offset% yp+0 vTradeAdvancedUseLinksMaxThree, % text } ; ilvl @@ -3685,6 +3706,11 @@ OpenGithubWikiFromMenu: TradeFunc_OpenUrlInBrowser("https://github.com/" user "/" repo "/wiki") Return +OpenPayPal: + url := "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4ZVTWJNH6GSME" + TradeFunc_OpenUrlInBrowser(url) +Return + TradeSettingsUI_BtnOK: Global TradeOpts Gui, Submit @@ -3726,11 +3752,11 @@ ReadPoeNinjaCurrencyData: If (TempChangingLeagueInProgress) { ShowToolTip("Changing league to " . TradeOpts.SearchLeague " (" . TradeGlobals.Get("LeagueName") . ")...", true) } - + sampleValue := ChaosEquivalents["Chaos Orb"] league := TradeUtils.UriEncode(TradeGlobals.Get("LeagueName")) fallback := "" url := "http://poeninja.azureedge.net/api/Data/GetCurrencyOverview?league=" . league - parsedJSON := TradeFunc_DowloadURLtoJSON(url) + parsedJSON := TradeFunc_DowloadURLtoJSON(url, sampleValue) ; fallback to Standard and Hardcore league if used league seems to not be available If (!parsedjson.currencyDetails.length()) { @@ -3741,8 +3767,9 @@ ReadPoeNinjaCurrencyData: league := "Standard" fallback := "Standard" } + url := "http://poeninja.azureedge.net/api/Data/GetCurrencyOverview?league=" . league - parsedJSON := TradeFunc_DowloadURLtoJSON(url) + parsedJSON := TradeFunc_DowloadURLtoJSON(url, sampleValue, true, league) } global CurrencyHistoryData := parsedJSON.lines TradeGlobals.Set("LastAltCurrencyUpdate", A_NowUTC) @@ -3760,13 +3787,40 @@ ReadPoeNinjaCurrencyData: msg .= StrLen(fallback) ? "`n- Using data from " fallback " league since the requested data is not available." : "" ShowToolTip(msg, true) } + TempChangingLeagueInProgress := False Return -TradeFunc_DowloadURLtoJSON(url) { - UrlDownloadToFile, %url%, %A_ScriptDir%\temp\currencyData.json - FileRead, JSONFile, %A_ScriptDir%\temp\currencyData.json - parsedJSON := JSON.Load(JSONFile) +TradeFunc_DowloadURLtoJSON(url, sampleValue, critical = false, league = "") { + errorMsg := "Parsing the currency data (json) from poe.ninja failed.`n" + errorMsg .= "This should only happen when the servers are down / unavailable." + errorMsg .= "`n`n" + errorMsg .= "Using archived data from a fallback file. League: "" league ""." + errorMsg .= "`n`n" + errorMsg .= "This can fix itself when the servers are up again and the data gets updated automatically or if you restart the script at such a time." + + errors := 0 + Try { + UrlDownloadToFile, %url%, %A_ScriptDir%\temp\currencyData.json + FileRead, JSONFile, %A_ScriptDir%\temp\currencyData.json + parsedJSON := JSON.Load(JSONFile) + + ; first currency data parsing (script start) + If (critical and not sampleValue or not parsedJSON.lines.length()) { + errors++ + } + } Catch error { + ; first currency data parsing (script start) + If (critical and not sampleValue) { + errors++ + } + } + + If (errors and critical and not sampleValue) { + MsgBox, 16, PoE-TradeMacro - Error, %errorMsg% + FileRead, JSONFile, %A_ScriptDir%\data_trade\currencyData_Fallback_%league%.json + parsedJSON := JSON.Load(JSONFile) + } Return parsedJSON } diff --git a/resources/ahk/TradeMacroInit.ahk b/resources/ahk/TradeMacroInit.ahk index 93b650c8..d0a19009 100644 --- a/resources/ahk/TradeMacroInit.ahk +++ b/resources/ahk/TradeMacroInit.ahk @@ -22,6 +22,7 @@ If (A_AhkVersion < TradeAHKVersionRequired) } Menu, Tray, Icon, %A_ScriptDir%\resources\images\poe-trade-bl.ico +Menu, Tray, Add, Donate, OpenPayPal Menu, Tray, Add, Open Wiki/FAQ, OpenGithubWikiFromMenu argumentSkipSplash = %6% @@ -148,9 +149,9 @@ argumentOverwrittenFiles = %4% ; when using the fallback exe we're missing the parameters passed by the merge script If (!StrLen(argumentProjectName) > 0) { argumentProjectName := "PoE-TradeMacro" - FilesToCopyToUserFolder := ["\resources\config\default_config_trade.ini", "\resources\config\default_config.ini", "\resources\ahk\default_AdditionalMacros.txt"] + FilesToCopyToUserFolder := A_ScriptDir . "\resources\default_UserFiles" argumentOverwrittenFiles := PoEScripts_HandleUserSettings(projectName, A_MyDocuments, projectName, FilesToCopyToUserFolder, A_ScriptDir) - argumentIsDevVersion := PoEScripts_isDevelopmentVersion() + argumentIsDevVersion := PoEScripts_isDevelopmentVersion(A_ScriptDir) argumentUserDirectory := A_MyDocuments . "\" . projectName . isDevelopmentVersion If (!PoEScripts_CreateTempFolder(A_ScriptDir, "PoE-TradeMacro")) { @@ -965,7 +966,7 @@ CreateTradeSettingsUI() GuiAddCheckbox("Pre-Fill Min-Values", "x287 yp+25 w110 h40", TradeOpts.PrefillMinValue, "PrefillMinValue", "PrefillMinValueH") AddToolTip(PrefillMinValueH, "Automatically fill the min-values in the advanced search GUI.") - GuiAddCheckbox("Pre-Fill Max-Values", "x407 yp0 w110 h40", TradeOpts.PrefillMinValue, "PrefillMaxValue", "PrefillMaxValueH") + GuiAddCheckbox("Pre-Fill Max-Values", "x407 yp0 w110 h40", TradeOpts.PrefillMaxValue, "PrefillMaxValue", "PrefillMaxValueH") AddToolTip(PrefillMaxValueH, "Automatically fill the max-values in the advanced search GUI.") ; option group start diff --git a/resources/ahk/default_AdditionalMacros.txt b/resources/default_UserFiles/AdditionalMacros.txt similarity index 93% rename from resources/ahk/default_AdditionalMacros.txt rename to resources/default_UserFiles/AdditionalMacros.txt index fc3af1d5..c7a9277c 100644 --- a/resources/ahk/default_AdditionalMacros.txt +++ b/resources/default_UserFiles/AdditionalMacros.txt @@ -24,6 +24,10 @@ ;# # ;# Curated list of awesome AHK libs, lib distributions, scripts, tools and resources: # ;# https://github.com/ahkscript/awesome-AutoHotkey # +;# # +;# # +;# AdditionalMacros Wiki entry: # +;# https://github.com/PoE-TradeMacro/POE-TradeMacro/wiki/AdditionalMacros # ;###########-------------------------------------------------------------------########### AM_AssignHotkeys: @@ -45,6 +49,8 @@ AM_AssignHotkeys: global AM_AdvancedItemInfo := ["on", "^!c"] global AM_WhoisLastWhisper := ["on", "^!Enter"] + ; This option can be set in the settings menu (ItemInfo tab) to completely disable assigning + ; AdditionalMacros hotkeys. If (Opts.EnableAdditionalMacros) { Hotkey, % AM_TogglePOEItemScript[2] , AM_TogglePOEItemScript_HKey , % AM_TogglePOEItemScript[1] Hotkey, % AM_Minimize[2] , AM_Minimize_HKey , % AM_Minimize[1] @@ -65,6 +71,8 @@ AM_AssignHotkeys: Hotkey, % AM_AdvancedItemInfo[2] , AM_AdvancedItemInfo_HKey , % AM_AdvancedItemInfo[1] Hotkey, % AM_WhoisLastWhisper[2] , AM_WhoisLastWhisper_HKey , % AM_WhoisLastWhisper[1] } + + GoSub, CM_ExecuteCustomMacrosCode_Label Return AM_TogglePOEItemScript_HKey: diff --git a/resources/default_UserFiles/CustomMacros/customMacros_example_dontOverwrite.txt b/resources/default_UserFiles/CustomMacros/customMacros_example_dontOverwrite.txt new file mode 100644 index 00000000..6d521c06 --- /dev/null +++ b/resources/default_UserFiles/CustomMacros/customMacros_example_dontOverwrite.txt @@ -0,0 +1,14 @@ +/* + Custom macro main file. Don't delete it. Using and including this file is important. If you don't want to edit the + technical AdditionalMacro.txt file, you need this file and the already defined hotkey label. + Epsecially if you want to execute any personal code outside of hotkey labels. + + **TLDR**: + You can add your own code below, use the existing Label. + View a formatted description/how to here -> https://github.com/PoE-TradeMacro/POE-TradeMacro/wiki/Custom-Macros. + + */ + +CM_ExecuteCustomMacrosCode_Label: + +Return \ No newline at end of file diff --git a/resources/ahk/default_MapModWarnings.txt b/resources/default_UserFiles/MapModWarnings.txt similarity index 100% rename from resources/ahk/default_MapModWarnings.txt rename to resources/default_UserFiles/MapModWarnings.txt diff --git a/resources/config/default_config.ini b/resources/default_UserFiles/config.ini similarity index 99% rename from resources/config/default_config.ini rename to resources/default_UserFiles/config.ini index b9747deb..485df8ed 100644 --- a/resources/config/default_config.ini +++ b/resources/default_UserFiles/config.ini @@ -27,6 +27,7 @@ ShowDamageCalculations=1 ; This is based on the rates defined in \CurrencyRates.txt ; You should edit this file with the current currency rates. ShowCurrencyValueInChaos=1 +ScaleUI=0 [DisplayAffixes] diff --git a/resources/config/default_config_trade.ini b/resources/default_UserFiles/config_trade.ini similarity index 99% rename from resources/config/default_config_trade.ini rename to resources/default_UserFiles/config_trade.ini index 1036a2a9..7f78ff41 100644 --- a/resources/config/default_config_trade.ini +++ b/resources/default_UserFiles/config_trade.ini @@ -82,6 +82,7 @@ PrefillMaxValue =1 CurrencySearchHave =Chaos Orb ForceMaxLinks =1 AlternativeCurrencySearch =0 +AlternativeSearch=0 AdvancedSearchCheckMods =0 AdvancedSearchCheckTotalEleRes =0 AdvancedSearchCheckTotalLife =0 diff --git a/resources/images/Paypal-Logo.png b/resources/images/Paypal-Logo.png new file mode 100644 index 00000000..291ff5c2 Binary files /dev/null and b/resources/images/Paypal-Logo.png differ