├── .gitattributes ├── .gitignore ├── README.markdown ├── Run_ItemInfo.ahk ├── data ├── AccuracyRating_BowWand.txt ├── AccuracyRating_Global.txt ├── AccuracyRating_HelmetGloves.txt ├── AccuracyRating_IncrPhysDamage.txt ├── AccuracyRating_LightRadius.txt ├── AccuracyRating_Weapon.txt ├── AdditionalBlockChanceAgainstProjectiles.txt ├── AdditionalPhysicalDamageReduction.txt ├── AddsChaosDamage_1H.txt ├── AddsChaosDamage_2H.txt ├── AddsChaosDamage_AmuletRing.txt ├── AddsColdDamage_1H.txt ├── AddsColdDamage_2H.txt ├── AddsColdDamage_AmuletRing.txt ├── AddsColdDamage_Gloves.txt ├── AddsColdDamage_Quivers.txt ├── AddsFireDamage_1H.txt ├── AddsFireDamage_2H.txt ├── AddsFireDamage_AmuletRing.txt ├── AddsFireDamage_Gloves.txt ├── AddsFireDamage_Quivers.txt ├── AddsLightningDamage_1H.txt ├── AddsLightningDamage_2H.txt ├── AddsLightningDamage_AmuletRing.txt ├── AddsLightningDamage_Gloves.txt ├── AddsLightningDamage_Quivers.txt ├── AddsPhysDamage_1H.txt ├── AddsPhysDamage_2H.txt ├── AddsPhysDamage_Amulet.txt ├── AddsPhysDamage_Gloves.txt ├── AddsPhysDamage_Quivers.txt ├── AddsPhysDamage_Ring.txt ├── AttackAndCastSpeed_Shield.txt ├── AttackSpeed_ArmourAndItems.txt ├── AttackSpeed_BowsAndWands.txt ├── AttackSpeed_Shield.txt ├── AttackSpeed_Weapons.txt ├── BleedDuration.txt ├── BlockChance.txt ├── CastSpeedAmulet.txt ├── CastSpeedCraft.txt ├── CastSpeedRing.txt ├── CastSpeedShield.txt ├── CastSpeed_1H.txt ├── CastSpeed_2H.txt ├── ChanceToAvoidBeingStunned.txt ├── ChanceToAvoidElementalAilments.txt ├── ChanceToBleed.txt ├── ChanceToBlockSpells.txt ├── ChanceToDodgeAttacks_BodyArmour.txt ├── ChanceToDodgeAttacks_Shield.txt ├── ChanceToDodgeSpellDamage.txt ├── ChanceToFreeze.txt ├── ChanceToIgnite.txt ├── ChanceToPoison.txt ├── ChanceToShock.txt ├── CritChanceSpells.txt ├── CritChance_Amulet.txt ├── CritChance_Quiver.txt ├── CritChance_Weapon.txt ├── CritMultiplierGlobal.txt ├── CritMultiplierLocal.txt ├── CurrencyRates.txt ├── DivinationCardList.txt ├── EnergyShieldRegeneratedPerSecond.txt ├── FlaskChargesGained.txt ├── FlaskChargesUsed.txt ├── FlaskDuration.txt ├── FlaskLifeRecoveryRate.txt ├── FlaskManaRecoveryRate.txt ├── GemLevel.txt ├── GemLevel_Bow.txt ├── GemLevel_Chaos.txt ├── GemLevel_Elemental.txt ├── GemLevel_Melee.txt ├── GemLevel_Minion.txt ├── GemLevel_Support.txt ├── GemLevel_UnsetRing.txt ├── GemQualityList.txt ├── GemQuality_Support.txt ├── Implicits.json ├── IncrAccuracyRating_LightRadius.txt ├── IncrArmour.txt ├── IncrArmour_Amulet.txt ├── IncrArmour_BodyArmourShield.txt ├── IncrArmour_StunRecovery.txt ├── IncrAttackDamage_Shield.txt ├── IncrBleedingDamage.txt ├── IncrBurningDamage.txt ├── IncrColdDamage_Suffix_Amulet.txt ├── IncrColdDamage_Suffix_Ring.txt ├── IncrColdDamage_Suffix_Weapon.txt ├── IncrDamageLeo.txt ├── IncrDefences_HybridBase.txt ├── IncrDefences_HybridBase_BodyArmourShield.txt ├── IncrDefences_HybridBase_StunRecovery.txt ├── IncrEleDamage_Shield.txt ├── IncrEleTypeDamage_Prefix_Staff.txt ├── IncrEleTypeDamage_Prefix_WandSceptreFocus.txt ├── IncrElementalDamageWithAttackSkills.txt ├── IncrElementalDamageWithAttackSkills_Ring.txt ├── IncrElementalDamageWithAttackSkills_Weapon.txt ├── IncrEnergyShield.txt ├── IncrEnergyShield_BodyArmourShield.txt ├── IncrEnergyShield_StunRecovery.txt ├── IncrEvasion.txt ├── IncrEvasion_Amulet.txt ├── IncrEvasion_BodyArmourShield.txt ├── IncrEvasion_StunRecovery.txt ├── IncrFireDamage_Suffix_Amulet.txt ├── IncrFireDamage_Suffix_Ring.txt ├── IncrFireDamage_Suffix_Weapon.txt ├── IncrLightningDamage_Suffix_Amulet.txt ├── IncrLightningDamage_Suffix_Ring.txt ├── IncrLightningDamage_Suffix_Weapon.txt ├── IncrMaxEnergyShield_Amulet.txt ├── IncrPhysDamage.txt ├── IncrPhysDamage_AccuracyRating.txt ├── IncrPhysDamage_Shield.txt ├── IncrPoisonDamage.txt ├── IncrQuantity.txt ├── IncrRarity_Prefix_AmuletRing.txt ├── IncrRarity_Prefix_GlovesBoots.txt ├── IncrRarity_Prefix_Helmet.txt ├── IncrRarity_Suffix_AmuletRingHelmet.txt ├── IncrRarity_Suffix_Craft.txt ├── IncrRarity_Suffix_GlovesBoots.txt ├── IncrTrapMineDamage.txt ├── IncrTrapThrowingMineLayingSpeed.txt ├── ItemList.txt ├── LifeLeechedPerSecond.txt ├── LifeOnBlock.txt ├── LifeOnHit_Amulet.txt ├── LifeOnHit_GlovesRing.txt ├── LifeOnHit_Weapon.txt ├── LifeOnKill.txt ├── LifeRegen.txt ├── LifeRegenPercent.txt ├── LifeRegen_BodyArmour.txt ├── LightRadius_AccuracyRating.txt ├── ManaCostOfSkills.txt ├── ManaLeech.txt ├── ManaOnBlock.txt ├── ManaOnKill.txt ├── ManaRegen.txt ├── MapList.txt ├── MaxLife.txt ├── MaxLife_AmuletBootsGloves.txt ├── MaxLife_BeltHelmetQuiver.txt ├── MaxLife_BodyArmour.txt ├── MaxLife_Ring.txt ├── MaxLife_Shield.txt ├── MaxLife_ToDef_BodyArmour.txt ├── MaxLife_ToDef_GlovesBoots.txt ├── MaxLife_ToDef_ShieldHelmet.txt ├── MaxMana.txt ├── MaxMana_AmuletRing.txt ├── MaxMana_SpellDamage.txt ├── MovementSpeed_Belt.txt ├── MovementSpeed_Boots.txt ├── PhysDamageReturn.txt ├── PhysicalAttackDamageLeeched.txt ├── PoisonDuration.txt ├── ProjectileSpeed.txt ├── ReducedAttrReqs.txt ├── SpellAddsCold_1H.txt ├── SpellAddsCold_2H.txt ├── SpellAddsFire_1H.txt ├── SpellAddsFire_2H.txt ├── SpellAddsLightning_1H.txt ├── SpellAddsLightning_2H.txt ├── SpellDamage_1H.txt ├── SpellDamage_Amulet.txt ├── SpellDamage_MaxMana_1H.txt ├── SpellDamage_MaxMana_Staff.txt ├── SpellDamage_Staff.txt ├── StunBlockRecovery_Armour.txt ├── StunBlockRecovery_EnergyShield.txt ├── StunBlockRecovery_Evasion.txt ├── StunBlockRecovery_HybridBase.txt ├── StunBlockRecovery_Suffix.txt ├── StunDuration.txt ├── StunThreshold.txt ├── TalismanTiers.txt ├── To1Attribute.txt ├── To1Attribute_ilvl85.txt ├── ToAllAttributes.txt ├── ToAllAttributes_Amulet.txt ├── ToAllResist.txt ├── ToAllResist_Amulet.txt ├── ToArmour_Belt.txt ├── ToArmour_BodyArmourShield.txt ├── ToArmour_BodyArmourShield_HybridBase.txt ├── ToArmour_GlovesBoots.txt ├── ToArmour_GlovesBoots_HybridBase.txt ├── ToArmour_Helmet.txt ├── ToArmour_Helmet_HybridBase.txt ├── ToArmour_MaxLife_BodyArmour.txt ├── ToArmour_MaxLife_GlovesBoots.txt ├── ToArmour_MaxLife_ShieldHelmet.txt ├── ToChaosResist.txt ├── ToColdResist.txt ├── ToEvasion_BodyArmourShield.txt ├── ToEvasion_BodyArmourShield_HybridBase.txt ├── ToEvasion_GlovesBoots.txt ├── ToEvasion_GlovesBoots_HybridBase.txt ├── ToEvasion_Helmet.txt ├── ToEvasion_Helmet_HybridBase.txt ├── ToEvasion_MaxLife_BodyArmour.txt ├── ToEvasion_MaxLife_GlovesBoots.txt ├── ToEvasion_MaxLife_ShieldHelmet.txt ├── ToEvasion_Ring.txt ├── ToFireResist.txt ├── ToLightningResist.txt ├── ToMaxES_AmuletBelt.txt ├── ToMaxES_BodyArmour.txt ├── ToMaxES_BodyArmourShield_HybridBase.txt ├── ToMaxES_GlovesBoots.txt ├── ToMaxES_GlovesBoots_HybridBase.txt ├── ToMaxES_Helmet.txt ├── ToMaxES_Helmet_HybridBase.txt ├── ToMaxES_MaxLife_BodyArmour.txt ├── ToMaxES_MaxLife_GlovesBoots.txt ├── ToMaxES_MaxLife_ShieldHelmet.txt ├── ToMaxES_Ring.txt ├── ToMaxES_Shield.txt ├── ToWeaponRange.txt ├── UniqueHasFatedVariant.txt ├── Uniques.txt ├── abyss_jewel │ ├── AccuracyRating.txt │ ├── AddsChaosDamageToAttacks.txt │ ├── AddsChaosDamageToSpells.txt │ ├── AddsChaosDamageToSpellsWhile.txt │ ├── AddsColdDamageToAttacks.txt │ ├── AddsColdDamageToSpells.txt │ ├── AddsColdDamageToSpellsWhile.txt │ ├── AddsColdDamageToWeaponTypeAttacks.txt │ ├── AddsFireDamageToAttacks.txt │ ├── AddsFireDamageToSpells.txt │ ├── AddsFireDamageToSpellsWhile.txt │ ├── AddsFireDamageToWeaponTypeAttacks.txt │ ├── AddsLightningDamageToAttacks.txt │ ├── AddsLightningDamageToSpells.txt │ ├── AddsLightningDamageToSpellsWhile.txt │ ├── AddsLightningDamageToWeaponTypeAttacks.txt │ ├── AddsPhysicalDamageToAttacks.txt │ ├── AddsPhysicalDamageToSpells.txt │ ├── AddsPhysicalDamageToSpellsWhile.txt │ ├── AddsPhysicalDamageToWeaponTypeAttacks.txt │ ├── EnergyShieldRegenerated.txt │ ├── LifeRegenerated.txt │ ├── ManaRegenerated.txt │ ├── MaxLife.txt │ ├── MaxMana.txt │ ├── MinionsDealAdditionalChaosDamage.txt │ ├── MinionsDealAdditionalColdDamage.txt │ ├── MinionsDealAdditionalFireDamage.txt │ ├── MinionsDealAdditionalLightningDamage.txt │ ├── MinionsDealAdditionalPhysicalDamage.txt │ ├── MinionsRegenerateLife.txt │ ├── ToArmour.txt │ ├── ToEvasionRating.txt │ └── ToMaximumEnergyShield.txt ├── crafted │ ├── MaxLife_Elreon.txt │ ├── MaxLife_Haku.txt │ └── MaxLife_Tora.txt └── jewel │ ├── AreaDamage.txt │ ├── AttackAndCastSpeed.txt │ ├── AttackSpeedWhileDualWielding.txt │ ├── AttackSpeedWhileHoldingShield.txt │ ├── AttackSpeedWith1H2HMelee.txt │ ├── AttackSpeedWithWeapontype.txt │ ├── AttackSpeed_Jewels.txt │ ├── BleedingDurationOnEnemies.txt │ ├── BlockChance_ChanceToBlock_Jewels.txt │ ├── CastSpeedWithWhile.txt │ ├── CastSpeed_Jewels.txt │ ├── ChanceToBleed.txt │ ├── ChanceToFreeze.txt │ ├── ChanceToIgnite.txt │ ├── ChanceToPoison.txt │ ├── ChanceToShock.txt │ ├── CritChanceElementalSkills.txt │ ├── CritChanceFireColdLightningSkills.txt │ ├── CritChanceGlobal_IncrAcc_Jewels.txt │ ├── CritChanceGlobal_Jewels.txt │ ├── CritChanceSpells_Jewels.txt │ ├── CritChanceWith1H2HMelee.txt │ ├── CritMeleeMultiplier.txt │ ├── CritMultiplierElementalSkills.txt │ ├── CritMultiplierFireColdLightningSkills.txt │ ├── CritMultiplierGlobal_Jewels.txt │ ├── CritMultiplierSpells.txt │ ├── CritMultiplierWhileDualWielding.txt │ ├── CritMultiplierWith1H2HMelee.txt │ ├── DamageOverTime.txt │ ├── ESOnHit.txt │ ├── EnergyShieldRechargeRate.txt │ ├── FasterStartOfEnergyShieldRecharge.txt │ ├── FreezeDurationOnEnemies.txt │ ├── IIR_Suffix_Jewels.txt │ ├── IgniteDurationOnEnemies.txt │ ├── IncrAccuracyRating_CritChance_Jewels.txt │ ├── IncrAccuracyRating_Jewels.txt │ ├── IncrArmour_Jewels.txt │ ├── IncrBleedingDamage.txt │ ├── IncrBurningDamage.txt │ ├── IncrChaosDamage.txt │ ├── IncrDamage.txt │ ├── IncrEvasion_Jewels.txt │ ├── IncrFireColdLightningDamage_Jewels.txt │ ├── IncrMaxEnergyShield_Jewels.txt │ ├── IncrMaximumLife.txt │ ├── IncrMaximumMana_Jewel.txt │ ├── IncrMeleePhysDamageWhileHoldingShield.txt │ ├── IncrMineDamage.txt │ ├── IncrMineLayingSpeed.txt │ ├── IncrPhysDamageWith1H2HMelee.txt │ ├── IncrPhysDamageWithWeapontype.txt │ ├── IncrPhysDamage_Jewels.txt │ ├── IncrPhysWeaponDamageDualWielding.txt │ ├── IncrPoisonDamage.txt │ ├── IncrTotemDamage.txt │ ├── IncrTotemLife.txt │ ├── IncrTrapDamage.txt │ ├── IncrTrapThrowingSpeed.txt │ ├── KnockBackOnHit.txt │ ├── LifeOnHit_Jewels.txt │ ├── ManaOnHit.txt │ ├── ManaRegen_Jewels.txt │ ├── MeleeCritChance.txt │ ├── MeleeDamage.txt │ ├── MinionBlockChance.txt │ ├── MinionIncrMaximumLife.txt │ ├── MinionsDealIncrDamage.txt │ ├── PhysicalAttackDamageLeeched_Jewels.txt │ ├── PoisonDuration.txt │ ├── ProjectileDamage.txt │ ├── ProjectileSpeed_Jewels.txt │ ├── ReducedManaCost.txt │ ├── ShockDurationOnEnemies.txt │ ├── SpellDamageDualWielding_Jewels.txt │ ├── SpellDamageHoldingShield_Jewels.txt │ ├── SpellDamageWieldingStaff_Jewels.txt │ ├── SpellDamage_Jewels.txt │ ├── StunDuration_Jewels.txt │ ├── StunRecovery_Suffix_Jewels.txt │ ├── To1Attribute_Jewels.txt │ ├── To1Resist_Jewels.txt │ ├── To2Attributes_Jewels.txt │ ├── To2Resist_Jewels.txt │ ├── ToAllAttributes_Jewels.txt │ ├── ToAllResist_Jewels.txt │ ├── ToAllResist_Jewels_Minions.txt │ ├── ToAllResist_Jewels_Totems.txt │ ├── ToChaosResist_Jewels.txt │ └── WeaponCritChanceDualWielding.txt ├── lib ├── AdvancedHotkey.ahk ├── AssociatedProgram.ahk ├── CalcChecksum.ahk ├── Class_AdvancedToolTipGui.ahk ├── Class_ColorPicker.ahk ├── Class_Console.ahk ├── Class_GdipTooltip.ahk ├── ConvertKeyToKeyCode.ahk ├── DebugPrintArray.ahk ├── EasyIni.ahk ├── Gdip2.ahk ├── IEComObjectTestCall.ahk ├── JSON.ahk ├── PoEScripts_AdvancedToolTip.ahk ├── PoEScripts_CheckCorrectClientLanguage.ahk ├── PoEScripts_CheckFolderWriteAccess.ahk ├── PoEScripts_ColorPicker.ahk ├── PoEScripts_CompareUserFolderWithScriptFolder.ahk ├── PoEScripts_CreateTempFolder.ahk ├── PoEScripts_Download.ahk ├── PoEScripts_DownloadLanguageFiles.ahk ├── PoEScripts_FinishUpdate.ahk ├── PoEScripts_HandleUserSettings.ahk ├── PoEScripts_ItemFilterNamePlate.ahk ├── PoEScripts_RunAsAdmin.ahk ├── PoEScripts_TranslateItemData.ahk ├── PoEScripts_Update.ahk ├── _Struct.ahk ├── copyUpdate.bat ├── curl.exe ├── makeReleaseArchive_nodeJS.js ├── package.json ├── sizeof.ahk ├── tooltip.ahk └── zip.ahk └── resources ├── AUTHORS.txt ├── Updates.txt ├── Version.txt ├── ahk ├── AdditionalMacros.ahk ├── Merge_ItemInfo.ahk ├── POE-ItemInfo.ahk └── jsonData.ahk ├── default_UserFiles ├── AdditionalMacros.ini ├── CustomMacros │ └── customMacros_example_dontOverwrite.txt ├── MapModWarnings.ini └── config.ini ├── fonts ├── Fontin-Bold.ttf ├── Fontin-Italic.ttf ├── Fontin-Regular.ttf └── Fontin-SmallCaps.ttf ├── images ├── colorPickerPreviewBg.png ├── info.ico ├── info.png ├── poe-bw.ico ├── poe-web.ico ├── poe.ico └── splash.png └── tests └── Test_WinHTTPRequest.ahk /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Declare files that will always have CRLF line endings on checkout 5 | *.txt text eol=crlf 6 | *.ini text eol=crlf 7 | 8 | # Custom for Visual Studio 9 | *.cs diff=csharp 10 | 11 | # Standard to msysgit 12 | *.doc diff=astextplain 13 | *.DOC diff=astextplain 14 | *.docx diff=astextplain 15 | *.DOCX diff=astextplain 16 | *.dot diff=astextplain 17 | *.DOT diff=astextplain 18 | *.pdf diff=astextplain 19 | *.PDF diff=astextplain 20 | *.rtf diff=astextplain 21 | *.RTF diff=astextplain 22 | 23 | # These files are binary and should be left untouched 24 | *.png binary 25 | *.jpg binary 26 | *.jpeg binary 27 | *.gif binary 28 | *.ico binary 29 | *.mov binary 30 | *.mp4 binary 31 | *.mp3 binary 32 | *.flv binary 33 | *.fla binary 34 | *.swf binary 35 | *.gz binary 36 | *.zip binary 37 | *.7z binary 38 | *.ttf binary 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | .idea/.name 45 | .idea/misc.xml 46 | .idea/encodings.xml 47 | .idea/modules.xml 48 | .idea/POE-ItemInfo.iml 49 | .idea/workspace.xml 50 | POE-ItemInfo.ahk.bak 51 | .idea/ 52 | 53 | *.bak 54 | main.ahk 55 | TradeMacroMain.ahk 56 | temp/* 57 | temp 58 | data_trade/leagues.json 59 | data_trade/old_data_files/ 60 | data_trade/backup/* 61 | backup/* 62 | backup/ 63 | test.ahk 64 | test.txt 65 | DebugFile.txt 66 | 67 | lib/node_modules 68 | lib/npm-debug.log.* 69 | *.orig 70 | release 71 | _TradeMacroMain.ahk 72 | _ItemInfoMain.ahk 73 | resources/tests/tempOutput/* 74 | data/lang/lang.json 75 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | Introduction 2 | ------------ 3 | 4 | **PoE-ItemInfo** grew out of smaller scripts. It is included in the even bigger PoE-TradeMacro (see "Links"). 5 | 6 | ItemInfo itself brings the following features: 7 | * Affix overview on all items, in particular: 8 | * Roll ranges and roll tier classification for rare/magic equipment 9 | * Roll ranges for uniques, flasks and jewels 10 | * Maps: infos such as the 3->1 vendor recipe result, bosses, layout and possible divination cards 11 | * Optional "Map Mod Warnings" when certain affixes are present 12 | * Divination Cards: drop locations 13 | * Gems: display the quality effect 14 | * Calculate chaos value of other currency items with ratios fetched from http://poe.ninja/ 15 | * Optional "Additional Macros" for fast hideout travel (via chat command), faster stash tab selection and more 16 | 17 | Many of these features are user-adjustable in the settings menu or corresponding .ini files. 18 | 19 | Links 20 | ----- 21 | ItemInfo Forum Thread: https://www.pathofexile.com/forum/view-thread/1678678 22 | TradeMacro GitHub page: https://poe-trademacro.github.io/ 23 | TradeMacro Forum Thread: https://www.pathofexile.com/forum/view-thread/1757730 24 | 25 | Requirements 26 | ------------ 27 | A recent AutoHotkey version. You can get AutoHotkey from http://ahkscript.org/ 28 | Use the typical version which is v1.1.xx, do **not** use v2 from "Other Releases". 29 | 30 | Known Issues 31 | ------------ 32 | The script is not always right. Take it as a helper, not as dead certainty. 33 | 34 | Essence mods are not marked in any way, so the script will treat them as a regular mod or mark them as unknown. 35 | Crafted mods are marked ingame, but not in the data visible to the script. The script recognizes a few crafted mods, but will treat the majority as regular mods or mark them as unknown. 36 | 37 | Attribution 38 | ----------- 39 | Foundations created by 40 | * Nipper4369 and original authors (http://www.pathofexile.com/forum/view-thread/594346) 41 | * Hazydoc (https://www.pathofexile.com/forum/view-thread/790438) 42 | 43 | Extended, updated and curated by Slinkston and Bahnzo from Oct 2015 - Apr 2016 (https://www.pathofexile.com/forum/view-thread/1463814) 44 | Currently extended, updated and curated by aRTy42 and Eruyome (TradeMacro) 45 | 46 | Contributors 47 | ------------ 48 | See AUTHORS.txt for contributor info. 49 | -------------------------------------------------------------------------------- /Run_ItemInfo.ahk: -------------------------------------------------------------------------------- 1 | ; ##################################################################################################################### 2 | ; # This script checks if the right AHK version is installed and runs the ItemInfo merge script. 3 | ; ##################################################################################################################### 4 | 5 | versionFilePath := A_ScriptDir "\resources\Version.txt" 6 | FileRead, versionFile, %versionFilePath% 7 | error := ErrorLevel 8 | 9 | If (not StrLen(versionFile) or error) { 10 | If (RegExMatch(A_ScriptDir, "i)\.zip$")) { 11 | MsgBox, 16, PoE-ItemInfo - Critical error, % "You are trying to run PoE-ItemInfo from inside a zip-archive, please unzip the whole folder. `n`nClosing script..." 12 | ExitApp 13 | } Else { 14 | If (FileExist(versionFilePath)) { 15 | MsgBox, 16, PoE-ItemInfo - Critical error, % "Script couldn't find the file """ A_ScriptDir "\resources\VersionTrade.txt"". `n`nClosing script..." 16 | } Else { 17 | MsgBox, 16, PoE-ItemInfo - Critical error, % "Script couldn't read/access the file """ A_ScriptDir "\resources\VersionTrade.txt"". `n`nClosing script..." 18 | } 19 | ExitApp 20 | } 21 | } 22 | Else { 23 | RegExMatch(versionFile, "i)ReleaseVersion.*?:=.*?""(.*?)""", relV) 24 | ReleaseVersion := relV1 25 | RegExMatch(versionFile, "i)AHKVersionRequired.*?:=.*?""(.*?)""", reqV) 26 | AHKVersionRequired := reqV1 27 | } 28 | 29 | MsgWrongAHKVersion := "AutoHotkey v" . AHKVersionRequired . " or later is needed to run this script. It is important not to run version 2.x. or 1.0. `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." 30 | If (A_AhkVersion < AHKVersionRequired or A_AhkVersion >= "2.0.00.00" or A_AhkVersion < "1.1.00.00") 31 | { 32 | MsgBox, 16, Wrong AutoHotkey Version, % MsgWrongAHKVersion 33 | ExitApp 34 | } 35 | 36 | Run "%A_AhkPath%" "%A_ScriptDir%\resources\ahk\Merge_ItemInfo.ahk" "%A_ScriptDir%" 37 | ExitApp -------------------------------------------------------------------------------- /data/AccuracyRating_BowWand.txt: -------------------------------------------------------------------------------- 1 | 1|5-15 2 | 12|16-60 3 | 20|61-100 4 | 26|101-130 5 | 33|131-165 6 | 41|166-200 7 | 50|201-250 8 | 63|251-320 9 | 80|321-360 -------------------------------------------------------------------------------- /data/AccuracyRating_Global.txt: -------------------------------------------------------------------------------- 1 | 1|5-15 2 | 12|16-60 3 | 20|61-100 4 | 26|101-130 5 | 33|131-165 6 | 41|166-200 7 | 50|201-250 8 | 63|251-320 9 | 76|321-400 -------------------------------------------------------------------------------- /data/AccuracyRating_HelmetGloves.txt: -------------------------------------------------------------------------------- 1 | 1|5-15 2 | 12|16-60 3 | 20|61-100 4 | 26|101-130 5 | 33|131-165 6 | 41|166-200 7 | 50|201-250 8 | 63|251-320 9 | 76|321-400 10 | 85|401-500 -------------------------------------------------------------------------------- /data/AccuracyRating_IncrPhysDamage.txt: -------------------------------------------------------------------------------- 1 | 1|3-7 2 | 11|8-30 3 | 23|31-50 4 | 35|51-64 5 | 46|65-82 6 | 60|83-99 7 | 73|100-134 8 | 83|135-169 -------------------------------------------------------------------------------- /data/AccuracyRating_LightRadius.txt: -------------------------------------------------------------------------------- 1 | 8|10-20 2 | 15|21-40 3 | 30|0 -------------------------------------------------------------------------------- /data/AccuracyRating_Weapon.txt: -------------------------------------------------------------------------------- 1 | 1|5-15 2 | 12|16-60 3 | 20|61-100 4 | 26|101-130 5 | 33|131-165 6 | 41|166-200 7 | 50|201-250 8 | 63|251-320 -------------------------------------------------------------------------------- /data/AdditionalBlockChanceAgainstProjectiles.txt: -------------------------------------------------------------------------------- 1 | 8|1-2 2 | 19|3-4 3 | 30|5-6 4 | 55|7-8 5 | 70|9-10 6 | 81|11-12 -------------------------------------------------------------------------------- /data/AdditionalPhysicalDamageReduction.txt: -------------------------------------------------------------------------------- 1 | 25|2 2 | 85|3-4 -------------------------------------------------------------------------------- /data/AddsChaosDamage_1H.txt: -------------------------------------------------------------------------------- 1 | 83|47-72,98-123 -------------------------------------------------------------------------------- /data/AddsChaosDamage_2H.txt: -------------------------------------------------------------------------------- 1 | 83|70-108,147-185 -------------------------------------------------------------------------------- /data/AddsChaosDamage_AmuletRing.txt: -------------------------------------------------------------------------------- 1 | 30|8-11,18-23 -------------------------------------------------------------------------------- /data/AddsColdDamage_1H.txt: -------------------------------------------------------------------------------- 1 | 2|1-2,3 2 | 12|6-8,13-15 3 | 19|10-13,19-23 4 | 27|14-18,27-32 5 | 34|17-23,34-40 6 | 43|22-29,43-50 7 | 52|26-35,52-60 8 | 63|31-42,63-73 9 | 75|37-50,74-87 -------------------------------------------------------------------------------- /data/AddsColdDamage_2H.txt: -------------------------------------------------------------------------------- 1 | 2|2-3,4-5 2 | 12|10-13,19-22 3 | 19|11-15,23-27 4 | 27|21-27,41-48 5 | 34|26-34,52-60 6 | 43|32-43,65-76 7 | 52|39-52,78-91 8 | 63|47-63,94-110 9 | 75|56-75,112-131 -------------------------------------------------------------------------------- /data/AddsColdDamage_AmuletRing.txt: -------------------------------------------------------------------------------- 1 | 2|1,2 2 | 13|3-4,7-8 3 | 21|5-7,10-12 4 | 29|6-9,13-16 5 | 36|8-11,16-19 6 | 45|10-13,20-24 7 | 53|12-16,24-28 8 | 65|14-19,29-34 9 | 77|17-22,34-40 -------------------------------------------------------------------------------- /data/AddsColdDamage_Gloves.txt: -------------------------------------------------------------------------------- 1 | 2|1,2 2 | 13|3-4,7-8 3 | 21|5-7,10-12 4 | 29|6-9,13-16 5 | 36|8-11,16-19 -------------------------------------------------------------------------------- /data/AddsColdDamage_Quivers.txt: -------------------------------------------------------------------------------- 1 | 2|1,2 2 | 13|3-4,7-8 3 | 21|5-7,10-12 4 | 29|6-9,13-16 -------------------------------------------------------------------------------- /data/AddsFireDamage_1H.txt: -------------------------------------------------------------------------------- 1 | 1|1-2,3-4 2 | 11|8-10,15-18 3 | 18|12-16,24-28 4 | 26|17-22,33-39 5 | 33|21-28,42-49 6 | 42|26-35,53-61 7 | 51|32-42,63-74 8 | 62|38-51,77-89 9 | 74|45-61,91-106 -------------------------------------------------------------------------------- /data/AddsFireDamage_2H.txt: -------------------------------------------------------------------------------- 1 | 1|3-4,5-6 2 | 11|12-16,23-27 3 | 18|18-24,36-42 4 | 26|25-34,50-59 5 | 33|32-42,63-74 6 | 42|40-53,79-92 7 | 51|48-64,95-111 8 | 62|58-77,115-134 9 | 74|68-91,137-160 -------------------------------------------------------------------------------- /data/AddsFireDamage_AmuletRing.txt: -------------------------------------------------------------------------------- 1 | 1|1,2 2 | 12|3-5,7-8 3 | 20|5-7,11-13 4 | 28|7-10,15-18 5 | 35|9-12,19-22 6 | 44|11-15,23-27 7 | 52|13-18,27-31 8 | 64|16-22,32-38 9 | 76|19-25,39-45 -------------------------------------------------------------------------------- /data/AddsFireDamage_Gloves.txt: -------------------------------------------------------------------------------- 1 | 1|1,2 2 | 12|3-5,7-8 3 | 20|5-7,11-13 4 | 28|7-10,15-18 -------------------------------------------------------------------------------- /data/AddsFireDamage_Quivers.txt: -------------------------------------------------------------------------------- 1 | 1|1,2 2 | 12|3-5,7-8 3 | 20|5-7,11-13 4 | 28|7-10,15-18 -------------------------------------------------------------------------------- /data/AddsLightningDamage_1H.txt: -------------------------------------------------------------------------------- 1 | 3|1,6 2 | 13|1-2,27-28 3 | 19|1-3,41-43 4 | 31|2-5,58-61 5 | 34|2-6,72-76 6 | 42|2-7,91-96 7 | 51|3-9,110-116 8 | 63|4-11,133-140 9 | 74|4-13,158-166 -------------------------------------------------------------------------------- /data/AddsLightningDamage_2H.txt: -------------------------------------------------------------------------------- 1 | 3|1,9-10 2 | 13|1-3,41-43 3 | 19|2-5,62-66 4 | 31|2-7,87-92 5 | 34|3-9,109-115 6 | 42|4-11,137-145 7 | 51|4-13,165-174 8 | 63|5-16,200-211 9 | 74|6-19,237-250 -------------------------------------------------------------------------------- /data/AddsLightningDamage_AmuletRing.txt: -------------------------------------------------------------------------------- 1 | 3|1,5 2 | 13|1,14-15 3 | 22|1-2,22-23 4 | 28|1-2,27-28 5 | 35|1-3,33-34 6 | 44|1-4,40-43 7 | 52|2-5,47-50 8 | 64|3-6,57-61 9 | 76|3-7,68-72 -------------------------------------------------------------------------------- /data/AddsLightningDamage_Gloves.txt: -------------------------------------------------------------------------------- 1 | 3|1,5 2 | 13|1,14-15 3 | 22|1-2,22-23 4 | 28|1-2,27-28 -------------------------------------------------------------------------------- /data/AddsLightningDamage_Quivers.txt: -------------------------------------------------------------------------------- 1 | 3|1,5 2 | 13|1,14-15 3 | 22|1-2,22-23 4 | 28|1-2,27-28 -------------------------------------------------------------------------------- /data/AddsPhysDamage_1H.txt: -------------------------------------------------------------------------------- 1 | 2|1,2-3 2 | 13|4-5,8-9 3 | 21|6-8,13-15 4 | 29|7-11,16-19 5 | 36|9-13,20-24 6 | 46|13-17,26-30 7 | 54|14-19,29-35 8 | 65|17-24,36-41 9 | 77|20-27,41-49 -------------------------------------------------------------------------------- /data/AddsPhysDamage_2H.txt: -------------------------------------------------------------------------------- 1 | 2|2,4-5 2 | 13|6-8,12-14 3 | 21|9-12,18-21 4 | 29|11-15,23-27 5 | 36|14-19,28-33 6 | 46|18-24,36-42 7 | 54|20-27,41-48 8 | 65|24-33,49-57 9 | 77|29-38,58-68 -------------------------------------------------------------------------------- /data/AddsPhysDamage_Amulet.txt: -------------------------------------------------------------------------------- 1 | 5|1,2 2 | 13|2-3,4-5 3 | 19|3-4,6-7 4 | 28|4-6,9-10 5 | 35|5-7,11-12 6 | 44|6-9,13-15 7 | 52|7-10,15-18 8 | 64|9-12,19-22 9 | 76|11-15,22-26 -------------------------------------------------------------------------------- /data/AddsPhysDamage_Gloves.txt: -------------------------------------------------------------------------------- 1 | 5|1,2 2 | 13|2-3,4-5 3 | 19|3-4,6-7 4 | 28|4-6,9-10 -------------------------------------------------------------------------------- /data/AddsPhysDamage_Quivers.txt: -------------------------------------------------------------------------------- 1 | 5|1,2 2 | 13|2-3,4-5 3 | 19|3-4,6-7 4 | 28|4-6,9-10 -------------------------------------------------------------------------------- /data/AddsPhysDamage_Ring.txt: -------------------------------------------------------------------------------- 1 | 5|1,2 2 | 13|2-3,4-5 3 | 19|3-4,6-7 4 | 28|4-6,9-10 5 | 35|5-7,11-12 6 | 44|6-9,13-15 -------------------------------------------------------------------------------- /data/AttackAndCastSpeed_Shield.txt: -------------------------------------------------------------------------------- 1 | 15|3-4 2 | 45|5-8 3 | 70|7-8 -------------------------------------------------------------------------------- /data/AttackSpeed_ArmourAndItems.txt: -------------------------------------------------------------------------------- 1 | 1|5-7 2 | 11|8-10 3 | 22|11-13 4 | 76|14-16 -------------------------------------------------------------------------------- /data/AttackSpeed_BowsAndWands.txt: -------------------------------------------------------------------------------- 1 | 1|5-7 2 | 11|8-10 3 | 22|11-13 4 | 30|14-16 -------------------------------------------------------------------------------- /data/AttackSpeed_Shield.txt: -------------------------------------------------------------------------------- 1 | 1|5-7 2 | 11|8-10 3 | 22|11-13 -------------------------------------------------------------------------------- /data/AttackSpeed_Weapons.txt: -------------------------------------------------------------------------------- 1 | 1|5-7 2 | 11|8-10 3 | 22|11-13 4 | 30|14-16 5 | 37|17-19 6 | 45|20-22 7 | 60|23-25 8 | 77|26-27 -------------------------------------------------------------------------------- /data/BleedDuration.txt: -------------------------------------------------------------------------------- 1 | 30|8-12 2 | 60|13-18 -------------------------------------------------------------------------------- /data/BlockChance.txt: -------------------------------------------------------------------------------- 1 | 10|1-3 2 | 58|4-6 3 | 85|7-8 -------------------------------------------------------------------------------- /data/CastSpeedAmulet.txt: -------------------------------------------------------------------------------- 1 | 2|5-7 2 | 15|8-10 3 | 30|11-13 4 | -------------------------------------------------------------------------------- /data/CastSpeedCraft.txt: -------------------------------------------------------------------------------- 1 | 1|4-8 2 | -------------------------------------------------------------------------------- /data/CastSpeedRing.txt: -------------------------------------------------------------------------------- 1 | 2|5-7 2 | -------------------------------------------------------------------------------- /data/CastSpeedShield.txt: -------------------------------------------------------------------------------- 1 | 2|5-7 2 | 15|8-10 3 | 30|11-13 -------------------------------------------------------------------------------- /data/CastSpeed_1H.txt: -------------------------------------------------------------------------------- 1 | 2|5-7 2 | 15|8-10 3 | 30|11-13 4 | 40|14-16 5 | 55|17-19 6 | 72|20-22 7 | 83|23-25 8 | -------------------------------------------------------------------------------- /data/CastSpeed_2H.txt: -------------------------------------------------------------------------------- 1 | 2|8-11 2 | 15|12-15 3 | 30|17-20 4 | 40|21-24 5 | 55|26-29 6 | 72|30-33 7 | 83|35-38 -------------------------------------------------------------------------------- /data/ChanceToAvoidBeingStunned.txt: -------------------------------------------------------------------------------- 1 | 23|11-13 2 | 41|14-16 3 | 57|17-19 4 | 73|20-22 -------------------------------------------------------------------------------- /data/ChanceToAvoidElementalAilments.txt: -------------------------------------------------------------------------------- 1 | 23|8-11 2 | 41|12-15 3 | 57|16-19 4 | 73|20-23 -------------------------------------------------------------------------------- /data/ChanceToBleed.txt: -------------------------------------------------------------------------------- 1 | 15|10 2 | 55|15 3 | 85|20 -------------------------------------------------------------------------------- /data/ChanceToBlockSpells.txt: -------------------------------------------------------------------------------- 1 | 30|1-3 2 | 60|4-6 -------------------------------------------------------------------------------- /data/ChanceToDodgeAttacks_BodyArmour.txt: -------------------------------------------------------------------------------- 1 | 25|3-4 2 | 85|5-6 -------------------------------------------------------------------------------- /data/ChanceToDodgeAttacks_Shield.txt: -------------------------------------------------------------------------------- 1 | 35|2 2 | 62|3 3 | 78|4 -------------------------------------------------------------------------------- /data/ChanceToDodgeSpellDamage.txt: -------------------------------------------------------------------------------- 1 | 35|2 2 | 62|3 3 | 78|4 -------------------------------------------------------------------------------- /data/ChanceToFreeze.txt: -------------------------------------------------------------------------------- 1 | 15|6-8 -------------------------------------------------------------------------------- /data/ChanceToIgnite.txt: -------------------------------------------------------------------------------- 1 | 15|6-8 -------------------------------------------------------------------------------- /data/ChanceToPoison.txt: -------------------------------------------------------------------------------- 1 | 15|10 2 | 55|20 3 | 85|30 -------------------------------------------------------------------------------- /data/ChanceToShock.txt: -------------------------------------------------------------------------------- 1 | 15|6-8 -------------------------------------------------------------------------------- /data/CritChanceSpells.txt: -------------------------------------------------------------------------------- 1 | 11|10-19 2 | 21|20-39 3 | 28|40-59 4 | 41|60-79 5 | 59|80-99 6 | 76|100-109 7 | -------------------------------------------------------------------------------- /data/CritChance_Amulet.txt: -------------------------------------------------------------------------------- 1 | 1|10-14 2 | 20|15-19 3 | 30|20-24 4 | 44|25-29 5 | 58|30-34 6 | 72|35-38 7 | -------------------------------------------------------------------------------- /data/CritChance_Quiver.txt: -------------------------------------------------------------------------------- 1 | 1|10-14 2 | 20|15-19 3 | 30|20-24 4 | 44|25-29 5 | 58|30-34 6 | 72|35-38 7 | 85|39-44 -------------------------------------------------------------------------------- /data/CritChance_Weapon.txt: -------------------------------------------------------------------------------- 1 | 1|10-14 2 | 20|15-19 3 | 30|20-24 4 | 44|25-29 5 | 59|30-34 6 | 73|35-38 7 | -------------------------------------------------------------------------------- /data/CritMultiplierGlobal.txt: -------------------------------------------------------------------------------- 1 | 8|8-12 2 | 21|13-19 3 | 31|20-24 4 | 45|25-29 5 | 59|30-34 6 | 74|35-38 7 | -------------------------------------------------------------------------------- /data/CritMultiplierLocal.txt: -------------------------------------------------------------------------------- 1 | 8|8-14 2 | 21|15-19 3 | 30|20-24 4 | 44|25-29 5 | 59|30-34 6 | 73|35-38 7 | -------------------------------------------------------------------------------- /data/CurrencyRates.txt: -------------------------------------------------------------------------------- 1 | ; Data from http://poe.ninja 2 | ; Preloaded with standard league rates. 3 | ; Adjust these to reflect current rates in your league. 4 | ; The base currency item is Orb of Chaos. 5 | ; The format is |: 6 | ; Comments with semicolon. Blank lines will be ignored. 7 | ; Last updated (manually): 2017-01-21 8 | Exalted Orb|1:88.52 9 | Blessing of Tul|1:24.5 10 | Divine Orb|1:21 11 | Blessing of Xoph|1:20 12 | Master Cartographer's Sextant|1:6.25 13 | Splinter of Uul-Netol|1:2.8 14 | Journeyman Cartographer's Sextant|1:2.62 15 | Splinter of Tul|1:1.8 16 | Splinter of Esh|1:1.8 17 | Orb of Regret|1:1.4 18 | Gemcutter's Prism|1:1.17 19 | Vaal Orb|1:1 20 | Regal Orb|1.1:1 21 | Apprentice Cartographer's Sextant|1.22:1 22 | Orb of Scouring|1.41:1 23 | Splinter of Xoph|2.08:1 24 | Orb of Fusing|2.86:1 25 | Orb of Alchemy|3.33:1 26 | Cartographer's Chisel|3.33:1 27 | Orb of Chance|4.17:1 28 | Blessed Orb|4.55:1 29 | Silver Coin|8.33:1 30 | Jeweller's Orb|11.11:1 31 | Orb of Alteration|12.5:1 32 | Chromatic Orb|12.5:1 33 | Glassblower's Bauble|14.29:1 34 | Orb of Augmentation|50:1 35 | Perandus Coin|100:1 36 | Orb of Transmutation|100:1 37 | Portal Scroll|100:1 38 | Blacksmith's Whetstone|100:1 39 | Armourer's Scrap|100:1 40 | Mirror of Kalandra|18000:1 -------------------------------------------------------------------------------- /data/DivinationCardList.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/data/DivinationCardList.txt -------------------------------------------------------------------------------- /data/EnergyShieldRegeneratedPerSecond.txt: -------------------------------------------------------------------------------- 1 | 25|0.6 2 | 85|1 -------------------------------------------------------------------------------- /data/FlaskChargesGained.txt: -------------------------------------------------------------------------------- 1 | 2|10-20 2 | 85|21-30 -------------------------------------------------------------------------------- /data/FlaskChargesUsed.txt: -------------------------------------------------------------------------------- 1 | 3|10-20 2 | -------------------------------------------------------------------------------- /data/FlaskDuration.txt: -------------------------------------------------------------------------------- 1 | 7|10-20 -------------------------------------------------------------------------------- /data/FlaskLifeRecoveryRate.txt: -------------------------------------------------------------------------------- 1 | 5|10-20 -------------------------------------------------------------------------------- /data/FlaskManaRecoveryRate.txt: -------------------------------------------------------------------------------- 1 | 5|10-20 -------------------------------------------------------------------------------- /data/GemLevel.txt: -------------------------------------------------------------------------------- 1 | 50|1 -------------------------------------------------------------------------------- /data/GemLevel_Bow.txt: -------------------------------------------------------------------------------- 1 | 9|1 2 | 64|2 -------------------------------------------------------------------------------- /data/GemLevel_Chaos.txt: -------------------------------------------------------------------------------- 1 | 4|1 2 | 55|2 -------------------------------------------------------------------------------- /data/GemLevel_Elemental.txt: -------------------------------------------------------------------------------- 1 | 2|1 2 | 55|2 -------------------------------------------------------------------------------- /data/GemLevel_Melee.txt: -------------------------------------------------------------------------------- 1 | 8|1 2 | 63|2 -------------------------------------------------------------------------------- /data/GemLevel_Minion.txt: -------------------------------------------------------------------------------- 1 | 14|1 2 | 65|2 3 | 86|3 -------------------------------------------------------------------------------- /data/GemLevel_Support.txt: -------------------------------------------------------------------------------- 1 | 44|1 -------------------------------------------------------------------------------- /data/GemLevel_UnsetRing.txt: -------------------------------------------------------------------------------- 1 | 2|1 2 | 50|2 3 | 76|3 -------------------------------------------------------------------------------- /data/GemQuality_Support.txt: -------------------------------------------------------------------------------- 1 | 1|4-5 2 | 1|5-6 3 | 1|6-7 4 | 1|7-8 -------------------------------------------------------------------------------- /data/IncrAccuracyRating_LightRadius.txt: -------------------------------------------------------------------------------- 1 | 8|0 2 | 15|0 3 | 30|5-10 -------------------------------------------------------------------------------- /data/IncrArmour.txt: -------------------------------------------------------------------------------- 1 | 3|15-26 2 | 17|27-42 3 | 29|43-55 4 | 42|56-67 5 | 60|68-79 6 | 72|80-91 7 | 84|92-100 -------------------------------------------------------------------------------- /data/IncrArmour_Amulet.txt: -------------------------------------------------------------------------------- 1 | 2|2-4 2 | 18|5-7 3 | 30|8-10 4 | 42|11-13 5 | 56|14-16 6 | 70|17-19 7 | 77|20-22 -------------------------------------------------------------------------------- /data/IncrArmour_BodyArmourShield.txt: -------------------------------------------------------------------------------- 1 | 3|15-26 2 | 17|27-42 3 | 29|43-55 4 | 42|56-67 5 | 60|68-79 6 | 72|80-91 7 | 84|92-100 8 | 86|101-110 -------------------------------------------------------------------------------- /data/IncrArmour_StunRecovery.txt: -------------------------------------------------------------------------------- 1 | 1|6-13 2 | 17|14-20 3 | 29|21-26 4 | 42|27-32 5 | 60|33-38 6 | 78|39-42 -------------------------------------------------------------------------------- /data/IncrAttackDamage_Shield.txt: -------------------------------------------------------------------------------- 1 | 4|4-8 2 | 15|9-16 3 | 30|17-24 4 | 60|25-29 5 | 81|30-34 -------------------------------------------------------------------------------- /data/IncrBleedingDamage.txt: -------------------------------------------------------------------------------- 1 | 20|21-25 2 | 40|26-30 3 | 60|31-35 -------------------------------------------------------------------------------- /data/IncrBurningDamage.txt: -------------------------------------------------------------------------------- 1 | 20|16-20 2 | 40|21-25 3 | 60|26-30 -------------------------------------------------------------------------------- /data/IncrColdDamage_Suffix_Amulet.txt: -------------------------------------------------------------------------------- 1 | 12|3-7 2 | 24|8-12 3 | 36|13-17 4 | 50|18-22 5 | 64|23-26 -------------------------------------------------------------------------------- /data/IncrColdDamage_Suffix_Ring.txt: -------------------------------------------------------------------------------- 1 | 12|3-7 2 | 24|8-12 3 | 36|13-17 4 | 50|18-22 -------------------------------------------------------------------------------- /data/IncrColdDamage_Suffix_Weapon.txt: -------------------------------------------------------------------------------- 1 | 12|3-7 2 | 24|8-12 3 | 36|13-17 4 | 50|18-22 5 | 64|23-26 6 | 76|27-30 -------------------------------------------------------------------------------- /data/IncrDamageLeo.txt: -------------------------------------------------------------------------------- 1 | 44|5-15 -------------------------------------------------------------------------------- /data/IncrDefences_HybridBase.txt: -------------------------------------------------------------------------------- 1 | 3|15-26 2 | 19|27-42 3 | 30|43-55 4 | 44|56-67 5 | 60|68-79 6 | 72|80-91 7 | 84|92-100 -------------------------------------------------------------------------------- /data/IncrDefences_HybridBase_BodyArmourShield.txt: -------------------------------------------------------------------------------- 1 | 3|15-26 2 | 19|27-42 3 | 30|43-55 4 | 44|56-67 5 | 60|68-79 6 | 72|80-91 7 | 84|92-100 8 | 86|101-110 -------------------------------------------------------------------------------- /data/IncrDefences_HybridBase_StunRecovery.txt: -------------------------------------------------------------------------------- 1 | 2|6-13 2 | 19|14-20 3 | 30|21-26 4 | 44|27-32 5 | 60|33-38 6 | 78|39-42 -------------------------------------------------------------------------------- /data/IncrEleDamage_Shield.txt: -------------------------------------------------------------------------------- 1 | 4|4-8 2 | 15|9-16 3 | 30|17-24 4 | 60|25-29 5 | 81|30-34 -------------------------------------------------------------------------------- /data/IncrEleTypeDamage_Prefix_Staff.txt: -------------------------------------------------------------------------------- 1 | 2|15-29 2 | 11|30-44 3 | 23|45-59 4 | 35|60-74 5 | 46|75-89 6 | 58|90-104 7 | 79|105-110 8 | 84|111-115 -------------------------------------------------------------------------------- /data/IncrEleTypeDamage_Prefix_WandSceptreFocus.txt: -------------------------------------------------------------------------------- 1 | 2|10-19 2 | 11|20-29 3 | 23|30-39 4 | 35|40-49 5 | 46|50-59 6 | 58|60-69 7 | 64|70-74 8 | 84|75-79 -------------------------------------------------------------------------------- /data/IncrElementalDamageWithAttackSkills.txt: -------------------------------------------------------------------------------- 1 | 4|5-10 2 | 15|11-20 3 | 30|21-30 4 | 60|31-36 5 | 81|37-42 6 | 86|43-50 -------------------------------------------------------------------------------- /data/IncrElementalDamageWithAttackSkills_Ring.txt: -------------------------------------------------------------------------------- 1 | 4|5-10 2 | 15|11-20 3 | 30|21-30 4 | 60|31-36 5 | 81|37-42 6 | -------------------------------------------------------------------------------- /data/IncrElementalDamageWithAttackSkills_Weapon.txt: -------------------------------------------------------------------------------- 1 | 4|5-10 2 | 15|11-20 3 | 30|21-30 4 | 60|31-37 5 | 81|38-42 6 | -------------------------------------------------------------------------------- /data/IncrEnergyShield.txt: -------------------------------------------------------------------------------- 1 | 3|11-28 2 | 18|27-42 3 | 30|43-55 4 | 44|56-67 5 | 60|68-79 6 | 72|80-91 7 | 84|92-100 -------------------------------------------------------------------------------- /data/IncrEnergyShield_BodyArmourShield.txt: -------------------------------------------------------------------------------- 1 | 3|11-28 2 | 18|27-42 3 | 30|43-55 4 | 44|56-67 5 | 60|68-79 6 | 72|80-91 7 | 84|92-100 8 | 86|101-110 -------------------------------------------------------------------------------- /data/IncrEnergyShield_StunRecovery.txt: -------------------------------------------------------------------------------- 1 | 3|6-13 2 | 18|14-20 3 | 30|21-26 4 | 44|27-32 5 | 60|33-38 6 | 78|39-42 -------------------------------------------------------------------------------- /data/IncrEvasion.txt: -------------------------------------------------------------------------------- 1 | 3|15-26 2 | 19|27-42 3 | 30|43-55 4 | 44|56-67 5 | 60|68-79 6 | 72|80-91 7 | 84|92-100 -------------------------------------------------------------------------------- /data/IncrEvasion_Amulet.txt: -------------------------------------------------------------------------------- 1 | 2|2-4 2 | 19|5-7 3 | 30|8-10 4 | 42|11-13 5 | 56|14-16 6 | 70|17-19 7 | 77|20-22 8 | -------------------------------------------------------------------------------- /data/IncrEvasion_BodyArmourShield.txt: -------------------------------------------------------------------------------- 1 | 3|15-26 2 | 19|27-42 3 | 30|43-55 4 | 44|56-67 5 | 60|68-79 6 | 72|80-91 7 | 84|92-100 8 | 86|101-110 -------------------------------------------------------------------------------- /data/IncrEvasion_StunRecovery.txt: -------------------------------------------------------------------------------- 1 | 2|6-13 2 | 19|14-20 3 | 30|21-26 4 | 44|27-32 5 | 60|33-38 6 | 78|39-42 -------------------------------------------------------------------------------- /data/IncrFireDamage_Suffix_Amulet.txt: -------------------------------------------------------------------------------- 1 | 8|3-7 2 | 22|8-12 3 | 36|13-17 4 | 50|18-22 5 | 64|23-26 -------------------------------------------------------------------------------- /data/IncrFireDamage_Suffix_Ring.txt: -------------------------------------------------------------------------------- 1 | 8|3-7 2 | 22|8-12 3 | 36|13-17 4 | 50|18-22 -------------------------------------------------------------------------------- /data/IncrFireDamage_Suffix_Weapon.txt: -------------------------------------------------------------------------------- 1 | 8|3-7 2 | 22|8-12 3 | 36|13-17 4 | 50|18-22 5 | 64|23-26 6 | 76|27-30 -------------------------------------------------------------------------------- /data/IncrLightningDamage_Suffix_Amulet.txt: -------------------------------------------------------------------------------- 1 | 10|3-7 2 | 23|8-12 3 | 36|13-17 4 | 50|18-22 5 | 64|23-26 -------------------------------------------------------------------------------- /data/IncrLightningDamage_Suffix_Ring.txt: -------------------------------------------------------------------------------- 1 | 10|3-7 2 | 23|8-12 3 | 36|13-17 4 | 50|18-22 -------------------------------------------------------------------------------- /data/IncrLightningDamage_Suffix_Weapon.txt: -------------------------------------------------------------------------------- 1 | 10|3-7 2 | 23|8-12 3 | 36|13-17 4 | 50|18-22 5 | 64|23-26 6 | 76|27-30 -------------------------------------------------------------------------------- /data/IncrMaxEnergyShield_Amulet.txt: -------------------------------------------------------------------------------- 1 | 3|2-4 2 | 18|5-7 3 | 30|8-10 4 | 42|11-13 5 | 56|14-16 6 | 70|17-19 7 | 77|20-22 -------------------------------------------------------------------------------- /data/IncrPhysDamage.txt: -------------------------------------------------------------------------------- 1 | 1|40-49 2 | 11|50-64 3 | 23|65-84 4 | 35|85-109 5 | 46|110-134 6 | 60|135-154 7 | 73|155-169 8 | 83|170-179 -------------------------------------------------------------------------------- /data/IncrPhysDamage_AccuracyRating.txt: -------------------------------------------------------------------------------- 1 | 1|15-19 2 | 11|20-24 3 | 23|25-34 4 | 35|35-44 5 | 46|45-54 6 | 60|55-64 7 | 73|65-74 8 | 83|75-79 -------------------------------------------------------------------------------- /data/IncrPhysDamage_Shield.txt: -------------------------------------------------------------------------------- 1 | 4|8-12 2 | 15|13-17 3 | 30|18-22 4 | 60|23-28 5 | 81|29-33 -------------------------------------------------------------------------------- /data/IncrPoisonDamage.txt: -------------------------------------------------------------------------------- 1 | 20|21-25 2 | 40|26-30 3 | 60|31-35 -------------------------------------------------------------------------------- /data/IncrQuantity.txt: -------------------------------------------------------------------------------- 1 | 2|4-8 2 | 32|9-12 3 | 55|13-16 4 | 77|17-20 -------------------------------------------------------------------------------- /data/IncrRarity_Prefix_AmuletRing.txt: -------------------------------------------------------------------------------- 1 | 20|8-12 2 | 39|13-18 3 | 62|19-24 4 | 84|25-28 -------------------------------------------------------------------------------- /data/IncrRarity_Prefix_GlovesBoots.txt: -------------------------------------------------------------------------------- 1 | 20|8-12 2 | 39|13-18 -------------------------------------------------------------------------------- /data/IncrRarity_Prefix_Helmet.txt: -------------------------------------------------------------------------------- 1 | 20|8-12 2 | 39|13-18 3 | 62|19-24 -------------------------------------------------------------------------------- /data/IncrRarity_Suffix_AmuletRingHelmet.txt: -------------------------------------------------------------------------------- 1 | 3|6-10 2 | 30|11-14 3 | 53|15-20 4 | 75|21-26 -------------------------------------------------------------------------------- /data/IncrRarity_Suffix_Craft.txt: -------------------------------------------------------------------------------- 1 | 30|13-17|Elreon 7 -------------------------------------------------------------------------------- /data/IncrRarity_Suffix_GlovesBoots.txt: -------------------------------------------------------------------------------- 1 | 3|6-10 2 | 30|11-14 -------------------------------------------------------------------------------- /data/IncrTrapMineDamage.txt: -------------------------------------------------------------------------------- 1 | 1|10-20 -------------------------------------------------------------------------------- /data/IncrTrapThrowingMineLayingSpeed.txt: -------------------------------------------------------------------------------- 1 | 1|6-12 -------------------------------------------------------------------------------- /data/ItemList.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/data/ItemList.txt -------------------------------------------------------------------------------- /data/LifeLeechedPerSecond.txt: -------------------------------------------------------------------------------- 1 | 44|20-40 -------------------------------------------------------------------------------- /data/LifeOnBlock.txt: -------------------------------------------------------------------------------- 1 | 11|5-15 2 | 22|16-25 3 | 36|26-40 4 | 48|41-60 5 | 60|61-85 6 | 75|86-100 -------------------------------------------------------------------------------- /data/LifeOnHit_Amulet.txt: -------------------------------------------------------------------------------- 1 | 8|2 2 | 20|3 3 | 30|4 -------------------------------------------------------------------------------- /data/LifeOnHit_GlovesRing.txt: -------------------------------------------------------------------------------- 1 | 8|2 -------------------------------------------------------------------------------- /data/LifeOnHit_Weapon.txt: -------------------------------------------------------------------------------- 1 | 8|2 2 | 20|3 3 | 30|4 4 | 40|5 5 | -------------------------------------------------------------------------------- /data/LifeOnKill.txt: -------------------------------------------------------------------------------- 1 | 1|3-6 2 | 23|7-10 3 | 40|11-14 -------------------------------------------------------------------------------- /data/LifeRegen.txt: -------------------------------------------------------------------------------- 1 | 1|1-2 2 | 18|2-4 3 | 30|4-7 4 | 44|7-10 5 | 59|10-13 6 | 78|13-16 7 | 83|16-20 -------------------------------------------------------------------------------- /data/LifeRegenPercent.txt: -------------------------------------------------------------------------------- 1 | 18|0.4-0.5 2 | 36|0.6-0.7 3 | 60|0.8-0.9 4 | 81|1-1.1 -------------------------------------------------------------------------------- /data/LifeRegen_BodyArmour.txt: -------------------------------------------------------------------------------- 1 | 1|1-2 2 | 18|2-4 3 | 30|4-7 4 | 44|7-10 5 | 59|10-13 6 | 78|13-16 7 | 83|16-20 8 | 86|20-25 -------------------------------------------------------------------------------- /data/LightRadius_AccuracyRating.txt: -------------------------------------------------------------------------------- 1 | 8|5 2 | 15|10 3 | 30|15 -------------------------------------------------------------------------------- /data/ManaCostOfSkills.txt: -------------------------------------------------------------------------------- 1 | 44|4-8 -------------------------------------------------------------------------------- /data/ManaLeech.txt: -------------------------------------------------------------------------------- 1 | 50|0.2-0.4 2 | 70|0.6-0.8 3 | -------------------------------------------------------------------------------- /data/ManaOnBlock.txt: -------------------------------------------------------------------------------- 1 | 15|4-12 2 | 32|13-21 3 | 58|22-30 4 | 75|31-39 -------------------------------------------------------------------------------- /data/ManaOnKill.txt: -------------------------------------------------------------------------------- 1 | 1|1 2 | 24|2-3 3 | 40|4-6 -------------------------------------------------------------------------------- /data/ManaRegen.txt: -------------------------------------------------------------------------------- 1 | 2|10-19 2 | 18|20-29 3 | 29|30-39 4 | 42|40-49 5 | 55|50-59 6 | 79|60-69 -------------------------------------------------------------------------------- /data/MapList.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/data/MapList.txt -------------------------------------------------------------------------------- /data/MaxLife.txt: -------------------------------------------------------------------------------- 1 | 1|3-9 2 | 5|10-19 3 | 11|20-29 4 | 18|30-39 5 | 24|40-49 6 | 30|50-59 7 | 36|60-69 8 | 44|70-79 9 | 54|80-89 10 | 64|90-99 11 | 73|100-109 12 | 81|110-119 13 | -------------------------------------------------------------------------------- /data/MaxLife_AmuletBootsGloves.txt: -------------------------------------------------------------------------------- 1 | 1|3-9 2 | 5|10-19 3 | 11|20-29 4 | 18|30-39 5 | 24|40-49 6 | 30|50-59 7 | 36|60-69 8 | 44|70-79 9 | 54|80-89 -------------------------------------------------------------------------------- /data/MaxLife_BeltHelmetQuiver.txt: -------------------------------------------------------------------------------- 1 | 1|3-9 2 | 5|10-19 3 | 11|20-29 4 | 18|30-39 5 | 24|40-49 6 | 30|50-59 7 | 36|60-69 8 | 44|70-79 9 | 54|80-89 10 | 64|90-99 -------------------------------------------------------------------------------- /data/MaxLife_BodyArmour.txt: -------------------------------------------------------------------------------- 1 | 1|3-9 2 | 5|10-19 3 | 11|20-29 4 | 18|30-39 5 | 24|40-49 6 | 30|50-59 7 | 36|60-69 8 | 44|70-79 9 | 54|80-89 10 | 64|90-99 11 | 73|100-109 12 | 81|110-119 13 | 86|120-129 -------------------------------------------------------------------------------- /data/MaxLife_Ring.txt: -------------------------------------------------------------------------------- 1 | 1|3-9 2 | 5|10-19 3 | 11|20-29 4 | 18|30-39 5 | 24|40-49 6 | 30|50-59 7 | 36|60-69 8 | 44|70-79 -------------------------------------------------------------------------------- /data/MaxLife_Shield.txt: -------------------------------------------------------------------------------- 1 | 1|3-9 2 | 5|10-19 3 | 11|20-29 4 | 18|30-39 5 | 24|40-49 6 | 30|50-59 7 | 36|60-69 8 | 44|70-79 9 | 54|80-89 10 | 64|90-99 11 | 73|100-109 12 | -------------------------------------------------------------------------------- /data/MaxLife_ToDef_BodyArmour.txt: -------------------------------------------------------------------------------- 1 | 30|18-23 2 | 46|24-28 3 | 62|29-33 4 | 78|34-38 -------------------------------------------------------------------------------- /data/MaxLife_ToDef_GlovesBoots.txt: -------------------------------------------------------------------------------- 1 | 30|18-23 2 | 46|24-28 -------------------------------------------------------------------------------- /data/MaxLife_ToDef_ShieldHelmet.txt: -------------------------------------------------------------------------------- 1 | 30|18-23 2 | 46|24-28 3 | 62|29-33 -------------------------------------------------------------------------------- /data/MaxMana.txt: -------------------------------------------------------------------------------- 1 | 1|15-19 2 | 11|20-24 3 | 17|25-29 4 | 23|30-34 5 | 29|35-39 6 | 35|40-44 7 | 42|45-49 8 | 51|50-54 9 | 60|55-59 10 | 69|60-64 11 | 75|65-68 12 | 81|69-73 -------------------------------------------------------------------------------- /data/MaxMana_AmuletRing.txt: -------------------------------------------------------------------------------- 1 | 1|15-19 2 | 11|20-24 3 | 17|25-29 4 | 23|30-34 5 | 29|35-39 6 | 35|40-44 7 | 42|45-49 8 | 51|50-54 9 | 60|55-59 10 | 69|60-64 11 | 75|65-68 12 | 81|69-73 13 | 85|74-78 -------------------------------------------------------------------------------- /data/MaxMana_SpellDamage.txt: -------------------------------------------------------------------------------- 1 | 2|8-10 2 | 11|11-13 3 | 23|14-16 4 | 35|17-19 5 | 46|20-22 6 | 58|23-25 7 | 80|26-28 -------------------------------------------------------------------------------- /data/MovementSpeed_Belt.txt: -------------------------------------------------------------------------------- 1 | 40|1-5 -------------------------------------------------------------------------------- /data/MovementSpeed_Boots.txt: -------------------------------------------------------------------------------- 1 | 1|10 2 | 15|15 3 | 30|20 4 | 40|25 5 | 55|30 6 | 86|35 -------------------------------------------------------------------------------- /data/PhysDamageReturn.txt: -------------------------------------------------------------------------------- 1 | 1|1-4 2 | 10|5-10 3 | 20|11-24 4 | 35|25-50 -------------------------------------------------------------------------------- /data/PhysicalAttackDamageLeeched.txt: -------------------------------------------------------------------------------- 1 | 50|0.2-0.4 2 | 60|0.6-0.8 3 | 70|1.0-1.2 4 | -------------------------------------------------------------------------------- /data/PoisonDuration.txt: -------------------------------------------------------------------------------- 1 | 30|8-12 2 | 60|13-18 -------------------------------------------------------------------------------- /data/ProjectileSpeed.txt: -------------------------------------------------------------------------------- 1 | 14|10-17 2 | 27|18-25 3 | 41|26-33 4 | 55|34-41 5 | 82|42-46 -------------------------------------------------------------------------------- /data/ReducedAttrReqs.txt: -------------------------------------------------------------------------------- 1 | 36|18 2 | 60|32 -------------------------------------------------------------------------------- /data/SpellAddsCold_1H.txt: -------------------------------------------------------------------------------- 1 | 1|1,2-3 2 | 11|5-7,10-12 3 | 18|8-10,16-18 4 | 26|11-15,22-25 5 | 33|14-18,27-32 6 | 42|17-23,34-40 7 | 51|21-28,41-48 8 | 62|25-33,50-58 9 | 74|30-40,60-69 -------------------------------------------------------------------------------- /data/SpellAddsCold_2H.txt: -------------------------------------------------------------------------------- 1 | 1|1-2,3-4 2 | 11|8-10,15-18 3 | 18|12-16,23-27 4 | 26|16-22,33-38 5 | 33|21-27,41-48 6 | 42|26-34,52-60 7 | 51|31-41,62-73 8 | 62|38-50,75-88 9 | 74|45-60,89-104 -------------------------------------------------------------------------------- /data/SpellAddsFire_1H.txt: -------------------------------------------------------------------------------- 1 | 1|1-2,3-4 2 | 11|6-8,12-14 3 | 18|10-13,19-22 4 | 26|13-18,27-31 5 | 33|17-22,33-39 6 | 42|21-28,42-49 7 | 51|25-34,51-59 8 | 62|31-41,61-71 9 | 74|36-49,73-85 -------------------------------------------------------------------------------- /data/SpellAddsFire_2H.txt: -------------------------------------------------------------------------------- 1 | 1|1-2,4-5 2 | 11|8-11,17-19 3 | 18|13-17,26-30 4 | 26|18-24,36-42 5 | 33|23-30,45-53 6 | 42|28-38,57-66 7 | 51|34-46,68-80 8 | 62|41-55,83-96 9 | 74|49-65,98-115 -------------------------------------------------------------------------------- /data/SpellAddsLightning_1H.txt: -------------------------------------------------------------------------------- 1 | 1|1,4-5 2 | 11|1-2,21-22 3 | 18|1-3,33-35 4 | 26|1-4,46-49 5 | 33|2-5,58-61 6 | 42|2-6,73-77 7 | 51|2-7,88-93 8 | 62|3-9,106-112 9 | 74|3-10,126-133 -------------------------------------------------------------------------------- /data/SpellAddsLightning_2H.txt: -------------------------------------------------------------------------------- 1 | 1|1,6-7 2 | 11|1-3,32-34 3 | 18|1-4,49-52 4 | 26|2-6,69-73 5 | 33|2-7,87-92 6 | 42|3-9,109-115 7 | 51|4-11,132-139 8 | 62|4-13,159-168 9 | 74|5-15,189-200 -------------------------------------------------------------------------------- /data/SpellDamage_1H.txt: -------------------------------------------------------------------------------- 1 | 2|10-19 2 | 11|20-29 3 | 23|30-39 4 | 35|40-49 5 | 46|50-59 6 | 58|60-69 7 | 64|70-74 8 | 84|75-79 -------------------------------------------------------------------------------- /data/SpellDamage_Amulet.txt: -------------------------------------------------------------------------------- 1 | 5|3-7 2 | 20|8-12 3 | 38|13-17 4 | 56|18-22 5 | 76|23-26 -------------------------------------------------------------------------------- /data/SpellDamage_MaxMana_1H.txt: -------------------------------------------------------------------------------- 1 | 2|5-9 2 | 11|10-14 3 | 23|15-19 4 | 35|20-24 5 | 46|25-29 6 | 58|30-34 7 | 80|35-39 -------------------------------------------------------------------------------- /data/SpellDamage_MaxMana_Staff.txt: -------------------------------------------------------------------------------- 1 | 2|8-14 2 | 11|15-22 3 | 23|23-29 4 | 35|30-37 5 | 46|38-44 6 | 58|45-50 7 | 80|51-55 -------------------------------------------------------------------------------- /data/SpellDamage_Staff.txt: -------------------------------------------------------------------------------- 1 | 2|15-29 2 | 11|30-44 3 | 23|45-59 4 | 35|60-74 5 | 46|75-89 6 | 58|90-104 7 | 79|105-110 8 | 84|111-115 -------------------------------------------------------------------------------- /data/StunBlockRecovery_Armour.txt: -------------------------------------------------------------------------------- 1 | 1|6-7 2 | 17|8-9 3 | 29|10-11 4 | 42|12-13 5 | 60|14-15 6 | 78|16-17 -------------------------------------------------------------------------------- /data/StunBlockRecovery_EnergyShield.txt: -------------------------------------------------------------------------------- 1 | 3|6-7 2 | 18|8-9 3 | 30|10-11 4 | 44|12-13 5 | 60|14-15 6 | 78|16-17 -------------------------------------------------------------------------------- /data/StunBlockRecovery_Evasion.txt: -------------------------------------------------------------------------------- 1 | 2|6-7 2 | 19|8-9 3 | 30|10-11 4 | 44|12-13 5 | 60|14-15 6 | 78|16-17 -------------------------------------------------------------------------------- /data/StunBlockRecovery_HybridBase.txt: -------------------------------------------------------------------------------- 1 | 2|6-7 2 | 19|8-9 3 | 30|10-11 4 | 44|12-13 5 | 60|14-15 6 | 78|16-17 -------------------------------------------------------------------------------- /data/StunBlockRecovery_Suffix.txt: -------------------------------------------------------------------------------- 1 | 1|11-13 2 | 17|14-16 3 | 28|17-19 4 | 42|20-22 5 | 56|23-25 6 | 79|26-28 -------------------------------------------------------------------------------- /data/StunDuration.txt: -------------------------------------------------------------------------------- 1 | 5|11-15 2 | 18|16-20 3 | 30|21-25 4 | 44|26-30 5 | 58|31-35 -------------------------------------------------------------------------------- /data/StunThreshold.txt: -------------------------------------------------------------------------------- 1 | 5|5-7 2 | 20|8-9 3 | 30|10-11 4 | 44|12-13 5 | 58|14-15 -------------------------------------------------------------------------------- /data/TalismanTiers.txt: -------------------------------------------------------------------------------- 1 | Breakrib Talisman|1 2 | Ashscale Talisman|1 3 | Deep One Talisman|1 4 | Lone Antler Talisman|1 5 | Deadhand Talisman|1 6 | Bonespire Talisman|1 7 | Black Maw Talisman|1 8 | Undying Flesh Talisman|1 9 | Rot Head Talisman|1 10 | Fangjaw Talisman|2 11 | Avian Twins Talisman|2 12 | Splitnewt Talisman|2 13 | Hexclaw Talisman|2 14 | Wereclaw Talisman|2 15 | Clutching Talisman|2 16 | Primal Skull Talisman|2 17 | Monkey Twins Talisman|3 18 | Three Rat Talisman|3 19 | Longtooth Talisman|3 20 | Rotfeather Talisman|3 21 | Three Hands Talisman|3 22 | Spinefuse Talisman|3 23 | Monkey Paw Talisman|3 24 | Greatwolf Talisman |4 25 | -------------------------------------------------------------------------------- /data/To1Attribute.txt: -------------------------------------------------------------------------------- 1 | 1|8-12 2 | 11|13-17 3 | 22|18-22 4 | 33|23-27 5 | 44|28-32 6 | 55|33-37 7 | 66|38-42 8 | 74|43-50 9 | 82|51-55 -------------------------------------------------------------------------------- /data/To1Attribute_ilvl85.txt: -------------------------------------------------------------------------------- 1 | 1|8-12 2 | 11|13-17 3 | 22|18-22 4 | 33|23-27 5 | 44|28-32 6 | 55|33-37 7 | 66|38-42 8 | 74|43-50 9 | 82|51-55 10 | 85|56-60 -------------------------------------------------------------------------------- /data/ToAllAttributes.txt: -------------------------------------------------------------------------------- 1 | 1|1-4 2 | 11|5-8 3 | 22|9-12 4 | 33|13-16 5 | 44|17-20 6 | 55|21-24 7 | 66|25-28 8 | 77|29-32 -------------------------------------------------------------------------------- /data/ToAllAttributes_Amulet.txt: -------------------------------------------------------------------------------- 1 | 1|1-4 2 | 11|5-8 3 | 22|9-12 4 | 33|13-16 5 | 44|17-20 6 | 55|21-24 7 | 66|25-28 8 | 77|29-32 9 | 85|33-35 -------------------------------------------------------------------------------- /data/ToAllResist.txt: -------------------------------------------------------------------------------- 1 | 12|3-5 2 | 24|6-8 3 | 36|9-11 4 | 48|12-14 5 | 60|15-16 -------------------------------------------------------------------------------- /data/ToAllResist_Amulet.txt: -------------------------------------------------------------------------------- 1 | 12|3-5 2 | 24|6-8 3 | 36|9-11 4 | 48|12-14 5 | 60|15-16 6 | 85|17-18 -------------------------------------------------------------------------------- /data/ToArmour_Belt.txt: -------------------------------------------------------------------------------- 1 | 1|3-10 2 | 18|11-35 3 | 30|36-60 4 | 44|61-138 5 | 57|139-322 6 | 71|323-400 7 | 83|401-460 8 | 86|461-540 -------------------------------------------------------------------------------- /data/ToArmour_BodyArmourShield.txt: -------------------------------------------------------------------------------- 1 | 1|3-10 2 | 18|11-35 3 | 30|36-60 4 | 46|61-138 5 | 59|139-322 6 | 73|323-400 7 | -------------------------------------------------------------------------------- /data/ToArmour_BodyArmourShield_HybridBase.txt: -------------------------------------------------------------------------------- 1 | 1|3-7 2 | 18|9-25 3 | 30|27-45 4 | 46|46-103 5 | 69|105-241 6 | 73|243-300 -------------------------------------------------------------------------------- /data/ToArmour_GlovesBoots.txt: -------------------------------------------------------------------------------- 1 | 1|3-10 2 | 18|11-35 3 | 30|36-60 4 | -------------------------------------------------------------------------------- /data/ToArmour_GlovesBoots_HybridBase.txt: -------------------------------------------------------------------------------- 1 | 1|3-7 2 | 18|9-25 3 | 30|27-45 -------------------------------------------------------------------------------- /data/ToArmour_Helmet.txt: -------------------------------------------------------------------------------- 1 | 1|3-10 2 | 18|11-35 3 | 30|36-60 4 | 44|61-138 5 | -------------------------------------------------------------------------------- /data/ToArmour_Helmet_HybridBase.txt: -------------------------------------------------------------------------------- 1 | 1|3-7 2 | 18|9-25 3 | 30|27-45 4 | 46|46-103 -------------------------------------------------------------------------------- /data/ToArmour_MaxLife_BodyArmour.txt: -------------------------------------------------------------------------------- 1 | 30|14-20 2 | 46|21-42 3 | 62|43-95 4 | 78|96-120 -------------------------------------------------------------------------------- /data/ToArmour_MaxLife_GlovesBoots.txt: -------------------------------------------------------------------------------- 1 | 30|14-20 2 | 46|21-42 -------------------------------------------------------------------------------- /data/ToArmour_MaxLife_ShieldHelmet.txt: -------------------------------------------------------------------------------- 1 | 30|14-20 2 | 46|21-42 3 | 62|43-95 -------------------------------------------------------------------------------- /data/ToChaosResist.txt: -------------------------------------------------------------------------------- 1 | 16|5-10 2 | 30|11-15 3 | 44|16-20 4 | 56|21-25 5 | 65|26-30 6 | 81|31-35 -------------------------------------------------------------------------------- /data/ToColdResist.txt: -------------------------------------------------------------------------------- 1 | 1|6-11 2 | 14|12-17 3 | 26|18-23 4 | 38|24-29 5 | 50|30-35 6 | 60|36-41 7 | 72|42-45 8 | 84|46-48 -------------------------------------------------------------------------------- /data/ToEvasion_BodyArmourShield.txt: -------------------------------------------------------------------------------- 1 | 1|3-10 2 | 18|11-35 3 | 29|36-60 4 | 42|61-138 5 | 56|139-322 6 | 70|323-400 7 | -------------------------------------------------------------------------------- /data/ToEvasion_BodyArmourShield_HybridBase.txt: -------------------------------------------------------------------------------- 1 | 1|3-7 2 | 18|9-25 3 | 30|27-45 4 | 46|46-103 5 | 69|105-241 6 | 73|243-300 -------------------------------------------------------------------------------- /data/ToEvasion_GlovesBoots.txt: -------------------------------------------------------------------------------- 1 | 1|3-10 2 | 18|11-35 3 | 29|36-60 4 | -------------------------------------------------------------------------------- /data/ToEvasion_GlovesBoots_HybridBase.txt: -------------------------------------------------------------------------------- 1 | 1|3-7 2 | 18|9-25 3 | 30|27-45 -------------------------------------------------------------------------------- /data/ToEvasion_Helmet.txt: -------------------------------------------------------------------------------- 1 | 1|3-10 2 | 18|11-35 3 | 29|36-60 4 | 42|61-138 5 | -------------------------------------------------------------------------------- /data/ToEvasion_Helmet_HybridBase.txt: -------------------------------------------------------------------------------- 1 | 1|3-7 2 | 18|9-25 3 | 30|27-45 4 | 46|46-103 -------------------------------------------------------------------------------- /data/ToEvasion_MaxLife_BodyArmour.txt: -------------------------------------------------------------------------------- 1 | 30|14-20 2 | 46|21-42 3 | 62|43-95 4 | 78|96-120 -------------------------------------------------------------------------------- /data/ToEvasion_MaxLife_GlovesBoots.txt: -------------------------------------------------------------------------------- 1 | 30|14-20 2 | 46|21-42 -------------------------------------------------------------------------------- /data/ToEvasion_MaxLife_ShieldHelmet.txt: -------------------------------------------------------------------------------- 1 | 30|14-20 2 | 46|21-42 3 | 62|43-95 -------------------------------------------------------------------------------- /data/ToEvasion_Ring.txt: -------------------------------------------------------------------------------- 1 | 1|3-10 2 | 18|11-35 3 | 29|36-60 4 | 42|61-80 5 | 58|81-120 6 | 72|121-150 7 | 84|151-170 8 | -------------------------------------------------------------------------------- /data/ToFireResist.txt: -------------------------------------------------------------------------------- 1 | 1|6-11 2 | 12|12-17 3 | 24|18-23 4 | 36|24-29 5 | 48|30-35 6 | 60|36-41 7 | 72|42-45 8 | 84|46-48 -------------------------------------------------------------------------------- /data/ToLightningResist.txt: -------------------------------------------------------------------------------- 1 | 1|6-11 2 | 13|12-17 3 | 25|18-23 4 | 37|24-29 5 | 49|30-35 6 | 60|36-41 7 | 72|42-45 8 | 84|46-48 -------------------------------------------------------------------------------- /data/ToMaxES_AmuletBelt.txt: -------------------------------------------------------------------------------- 1 | 3|1-3 2 | 11|4-8 3 | 17|9-12 4 | 23|13-15 5 | 29|16-19 6 | 35|20-22 7 | 42|23-26 8 | 50|27-31 9 | 59|32-37 10 | 68|38-43 11 | 74|44-47 12 | 80|48-51 13 | -------------------------------------------------------------------------------- /data/ToMaxES_BodyArmour.txt: -------------------------------------------------------------------------------- 1 | 3|3-5 2 | 11|6-11 3 | 17|12-16 4 | 23|17-23 5 | 29|24-30 6 | 35|31-38 7 | 43|39-49 8 | 51|50-61 9 | 60|62-76 10 | 69|77-90 11 | 75|91-100 -------------------------------------------------------------------------------- /data/ToMaxES_BodyArmourShield_HybridBase.txt: -------------------------------------------------------------------------------- 1 | 1|3-4 2 | 18|9-12 3 | 30|18-22 4 | 46|30-36 5 | 69|58-67 6 | 73|69-75 -------------------------------------------------------------------------------- /data/ToMaxES_GlovesBoots.txt: -------------------------------------------------------------------------------- 1 | 3|3-5 2 | 11|6-11 3 | 17|12-16 4 | 23|17-23 5 | 29|24-30 6 | 35|31-38 7 | 43|39-49 -------------------------------------------------------------------------------- /data/ToMaxES_GlovesBoots_HybridBase.txt: -------------------------------------------------------------------------------- 1 | 1|3-4 2 | 18|9-12 3 | 30|18-22 -------------------------------------------------------------------------------- /data/ToMaxES_Helmet.txt: -------------------------------------------------------------------------------- 1 | 3|3-5 2 | 11|6-11 3 | 17|12-16 4 | 23|17-23 5 | 29|24-30 6 | 35|31-38 7 | 43|39-49 8 | 51|50-61 -------------------------------------------------------------------------------- /data/ToMaxES_Helmet_HybridBase.txt: -------------------------------------------------------------------------------- 1 | 1|3-4 2 | 18|9-12 3 | 30|18-22 4 | 46|30-36 -------------------------------------------------------------------------------- /data/ToMaxES_MaxLife_BodyArmour.txt: -------------------------------------------------------------------------------- 1 | 30|8-10 2 | 46|11-15 3 | 62|16-25 4 | 78|26-30 -------------------------------------------------------------------------------- /data/ToMaxES_MaxLife_GlovesBoots.txt: -------------------------------------------------------------------------------- 1 | 30|8-10 2 | 46|11-15 -------------------------------------------------------------------------------- /data/ToMaxES_MaxLife_ShieldHelmet.txt: -------------------------------------------------------------------------------- 1 | 30|8-10 2 | 46|11-15 3 | 62|16-25 -------------------------------------------------------------------------------- /data/ToMaxES_Ring.txt: -------------------------------------------------------------------------------- 1 | 3|1-3 2 | 11|4-8 3 | 17|9-12 4 | 23|13-15 5 | 29|16-19 6 | 35|20-22 7 | 42|23-26 8 | 50|27-31 9 | 59|32-37 10 | 68|38-43 11 | 74|44-47 12 | -------------------------------------------------------------------------------- /data/ToMaxES_Shield.txt: -------------------------------------------------------------------------------- 1 | 3|3-5 2 | 11|6-11 3 | 17|12-16 4 | 23|17-23 5 | 29|24-30 6 | 35|31-38 7 | 43|39-49 8 | 51|50-61 9 | 60|62-76 10 | 69|77-90 -------------------------------------------------------------------------------- /data/ToWeaponRange.txt: -------------------------------------------------------------------------------- 1 | 35|1-2 -------------------------------------------------------------------------------- /data/UniqueHasFatedVariant.txt: -------------------------------------------------------------------------------- 1 | ; One exact item name per line. 2 | ; Line comments with semicolon. Blank lines will be ignored. 3 | ; Items according to http://pathofexile.gamepedia.com/Category:Unique_items_with_fated_variants 4 | 5 | Araku Tiki 6 | Asenath's Mark 7 | Atziri's Mirror 8 | Blackgleam 9 | Blackheart 10 | Bramblejack 11 | Briskwrap 12 | Bloodboil 13 | Cameria's Maul 14 | Chalice of Horrors 15 | Chober Chaber 16 | Craghead 17 | Crown of Thorns 18 | Death's Harp 19 | Deidbell 20 | Doedre's Tenure 21 | Doomfletch 22 | Dreadarc 23 | Dusktoe 24 | Eclipse Solaris 25 | Ezomyte Peak 26 | Fencoil 27 | Foxshade 28 | Geofri's Baptism 29 | Geofri's Crest 30 | Goredrill 31 | Heatshiver 32 | Hrimnor's Hymn 33 | Hrimsorrow 34 | Hyrri's Bite 35 | Icetomb 36 | Iron Heart 37 | Kaltenhalt 38 | Kaom's Sign 39 | Karui Ward 40 | Limbsplit 41 | Malachai's Simula 42 | Quecholli 43 | Queen's Decree 44 | Realmshaper 45 | Redbeak 46 | Reverberation Rod 47 | Shavronne's Pace 48 | Silverbranch 49 | Springleaf 50 | Storm Cloud 51 | Sundance 52 | The Dancing Dervish 53 | The Ignomon 54 | The Magnate 55 | The Screaming Eagle 56 | The Stormheart 57 | Timeclasp 58 | Windscream 59 | Wondertrap 60 | -------------------------------------------------------------------------------- /data/Uniques.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/data/Uniques.txt -------------------------------------------------------------------------------- /data/abyss_jewel/AccuracyRating.txt: -------------------------------------------------------------------------------- 1 | 1|31-60 2 | 52|61-120 3 | 78|121-240 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsChaosDamageToAttacks.txt: -------------------------------------------------------------------------------- 1 | 36|1,3-4 2 | 48|2-3,5-6 3 | 64|4-5,7-8 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsChaosDamageToSpells.txt: -------------------------------------------------------------------------------- 1 | 33|3-4,6-7 2 | 48|5-7,8-10 3 | 57|8-10,11-13 4 | 68|11-13,14-16 5 | 79|14-16,18-22 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsChaosDamageToSpellsWhile.txt: -------------------------------------------------------------------------------- 1 | 1|1-2,3-5 2 | 42|3-5,7-9 3 | 54|6-8,10-12 4 | 65|9-11,13-15 5 | 75|12-14,15-17 6 | 84|15-17,20-24 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsColdDamageToAttacks.txt: -------------------------------------------------------------------------------- 1 | 36|6-9,12-15 2 | 45|8-11,15-19 3 | 53|10-14,20-24 4 | 65|12-16,25-30 5 | 77|14-19,31-37 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsColdDamageToSpells.txt: -------------------------------------------------------------------------------- 1 | 29|6-8,9-11 2 | 43|9-11,12-14 3 | 52|12-14,15-19 4 | 63|15-17,20-23 5 | 76|19-23,24-32 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsColdDamageToSpellsWhile.txt: -------------------------------------------------------------------------------- 1 | 1|2-4,5-7 2 | 38|7-9,11-13 3 | 47|10-12,14-16 4 | 56|13-15,17-21 5 | 68|16-18,22-24 6 | 80|19-25,26-34 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsColdDamageToWeaponTypeAttacks.txt: -------------------------------------------------------------------------------- 1 | 1|6-9,13-16 2 | 38|8-11,16-19 3 | 47|10-13,20-24 4 | 59|12-16,24-28 5 | 68|14-19,29-34 6 | 83|17-22,34-40 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsFireDamageToAttacks.txt: -------------------------------------------------------------------------------- 1 | 35|6-10,14-18 2 | 44|9-12,19-23 3 | 52|11-15,24-28 4 | 64|13-19,28-34 5 | 76|15-21,34-40 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsFireDamageToSpells.txt: -------------------------------------------------------------------------------- 1 | 30|6-8,9-11 2 | 43|9-11,12-14 3 | 55|12-14,15-19 4 | 66|15-17,20-23 5 | 77|19-23,24-32 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsFireDamageToSpellsWhile.txt: -------------------------------------------------------------------------------- 1 | 1|2-4,5-7 2 | 40|7-9,11-13 3 | 52|10-12,14-16 4 | 62|13-15,17-21 5 | 70|16-18,22-24 6 | 81|19-25,26-34 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsFireDamageToWeaponTypeAttacks.txt: -------------------------------------------------------------------------------- 1 | 1|7-10,15-18 2 | 40|9-12,19-22 3 | 51|11-15,23-27 4 | 62|13-18,27-31 5 | 72|16-22,32-38 6 | 84|19-25,39-45 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsLightningDamageToAttacks.txt: -------------------------------------------------------------------------------- 1 | 35|1-2,27-29 2 | 44|1-3,35-38 3 | 52|1-4,42-45 4 | 64|2-5,51-55 5 | 76|2-6,62-68 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsLightningDamageToSpells.txt: -------------------------------------------------------------------------------- 1 | 28|1-2,15-19 2 | 44|1-3,20-24 3 | 54|1-4,25-29 4 | 65|1-5,30-32 5 | 75|1-6,37-45 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsLightningDamageToSpellsWhile.txt: -------------------------------------------------------------------------------- 1 | 1|1,6-10 2 | 39|1-2,17-21 3 | 48|1-3,22-26 4 | 58|1-4,29-33 5 | 70|1-5,34-36 6 | 82|1-6,43-51 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsLightningDamageToWeaponTypeAttacks.txt: -------------------------------------------------------------------------------- 1 | 1|1-2,27-28 2 | 37|1-3,33-34 3 | 48|1-4,40-43 4 | 60|2-5,47-50 5 | 70|3-6,57-61 6 | 82|3-7,68-72 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsPhysicalDamageToAttacks.txt: -------------------------------------------------------------------------------- 1 | 34|1,3-4 2 | 45|2-3,5-6 3 | 61|4-5,7-8 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsPhysicalDamageToSpells.txt: -------------------------------------------------------------------------------- 1 | 32|3-4,6-7 2 | 45|5-7,8-10 3 | 56|8-10,11-13 4 | 65|11-13,14-16 5 | 78|14-16,18-22 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsPhysicalDamageToSpellsWhile.txt: -------------------------------------------------------------------------------- 1 | 1|1-2,3-5 2 | 42|3-5,7-9 3 | 54|6-8,10-12 4 | 63|9-11,13-15 5 | 72|12-14,15-17 6 | 83|15-17,20-24 -------------------------------------------------------------------------------- /data/abyss_jewel/AddsPhysicalDamageToWeaponTypeAttacks.txt: -------------------------------------------------------------------------------- 1 | 1|1-2,3-4 2 | 42|3-4,5-6 3 | 64|5-6,7-9 4 | 83|7-8,10-12 -------------------------------------------------------------------------------- /data/abyss_jewel/EnergyShieldRegenerated.txt: -------------------------------------------------------------------------------- 1 | 1|2-4 2 | 30|5-8 3 | 60|9-12 -------------------------------------------------------------------------------- /data/abyss_jewel/LifeRegenerated.txt: -------------------------------------------------------------------------------- 1 | 1|2-4 2 | 40|5-8 3 | 80|9-12 -------------------------------------------------------------------------------- /data/abyss_jewel/ManaRegenerated.txt: -------------------------------------------------------------------------------- 1 | 1|0.5-1 2 | 40|1.1-2 3 | 75|2.1-3 -------------------------------------------------------------------------------- /data/abyss_jewel/MaxLife.txt: -------------------------------------------------------------------------------- 1 | 1|25-30 2 | 35|31-35 3 | 74|36-45 4 | 82|46-50 -------------------------------------------------------------------------------- /data/abyss_jewel/MaxMana.txt: -------------------------------------------------------------------------------- 1 | 1|25-30 2 | 40|31-35 3 | 75|36-45 4 | 83|46-50 -------------------------------------------------------------------------------- /data/abyss_jewel/MinionsDealAdditionalChaosDamage.txt: -------------------------------------------------------------------------------- 1 | 1|1-2,3-5 2 | 42|3-5,7-9 3 | 54|6-8,10-12 4 | 65|9-11,13-15 5 | 75|12-14,16-18 6 | 84|15-17,22-26 -------------------------------------------------------------------------------- /data/abyss_jewel/MinionsDealAdditionalColdDamage.txt: -------------------------------------------------------------------------------- 1 | 1|1-2,3-5 2 | 38|3-5,7-9 3 | 47|6-8,10-12 4 | 56|9-11,13-15 5 | 68|12-14,16-18 6 | 80|15-17,22-26 -------------------------------------------------------------------------------- /data/abyss_jewel/MinionsDealAdditionalFireDamage.txt: -------------------------------------------------------------------------------- 1 | 1|1-2,3-5 2 | 40|3-5,7-9 3 | 52|6-8,10-12 4 | 62|9-11,13-15 5 | 70|12-14,16-18 6 | 81|15-17,22-26 -------------------------------------------------------------------------------- /data/abyss_jewel/MinionsDealAdditionalLightningDamage.txt: -------------------------------------------------------------------------------- 1 | 1|1,3-5 2 | 39|1-2,8-12 3 | 48|1-3,13-17 4 | 58|2-5,18-22 5 | 70|2-6,23-29 6 | 82|3-9,30-36 -------------------------------------------------------------------------------- /data/abyss_jewel/MinionsDealAdditionalPhysicalDamage.txt: -------------------------------------------------------------------------------- 1 | 1|1-2,3-5 2 | 42|3-5,7-9 3 | 54|6-8,10-12 4 | 63|9-11,13-15 5 | 72|12-14,16-18 6 | 83|15-17,22-26 -------------------------------------------------------------------------------- /data/abyss_jewel/MinionsRegenerateLife.txt: -------------------------------------------------------------------------------- 1 | 1|2-4 2 | 30|5-8 3 | 60|9-12 -------------------------------------------------------------------------------- /data/abyss_jewel/ToArmour.txt: -------------------------------------------------------------------------------- 1 | 1|36-60 2 | 40|61-100 3 | 75|101-180 -------------------------------------------------------------------------------- /data/abyss_jewel/ToEvasionRating.txt: -------------------------------------------------------------------------------- 1 | 1|36-60 2 | 40|61-100 3 | 75|101-180 -------------------------------------------------------------------------------- /data/abyss_jewel/ToMaximumEnergyShield.txt: -------------------------------------------------------------------------------- 1 | 1|25-30 2 | 40|31-35 3 | 75|36-45 4 | 83|46-50 -------------------------------------------------------------------------------- /data/crafted/MaxLife_Elreon.txt: -------------------------------------------------------------------------------- 1 | 15|15-24|Elreon 2 2 | 25|25-34|Elreon 4 3 | 35|35-44|Elreon 6 -------------------------------------------------------------------------------- /data/crafted/MaxLife_Haku.txt: -------------------------------------------------------------------------------- 1 | 15|35-44|Haku 2 2 | 25|45-54|Haku 4 3 | 35|55-64|Haku 6 -------------------------------------------------------------------------------- /data/crafted/MaxLife_Tora.txt: -------------------------------------------------------------------------------- 1 | 15|35-44|Tora 2 2 | 25|45-54|Tora 4 3 | 35|55-64|Tora 6 -------------------------------------------------------------------------------- /data/jewel/AreaDamage.txt: -------------------------------------------------------------------------------- 1 | 1|10-12 -------------------------------------------------------------------------------- /data/jewel/AttackAndCastSpeed.txt: -------------------------------------------------------------------------------- 1 | 1|2-4 -------------------------------------------------------------------------------- /data/jewel/AttackSpeedWhileDualWielding.txt: -------------------------------------------------------------------------------- 1 | 1|4-6 -------------------------------------------------------------------------------- /data/jewel/AttackSpeedWhileHoldingShield.txt: -------------------------------------------------------------------------------- 1 | 1|4-6 -------------------------------------------------------------------------------- /data/jewel/AttackSpeedWith1H2HMelee.txt: -------------------------------------------------------------------------------- 1 | 1|4-6 -------------------------------------------------------------------------------- /data/jewel/AttackSpeedWithWeapontype.txt: -------------------------------------------------------------------------------- 1 | 1|6-8 -------------------------------------------------------------------------------- /data/jewel/AttackSpeed_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|3-5 2 | -------------------------------------------------------------------------------- /data/jewel/BleedingDurationOnEnemies.txt: -------------------------------------------------------------------------------- 1 | 1|12-16 -------------------------------------------------------------------------------- /data/jewel/BlockChance_ChanceToBlock_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|1 -------------------------------------------------------------------------------- /data/jewel/CastSpeedWithWhile.txt: -------------------------------------------------------------------------------- 1 | 1|3-5 -------------------------------------------------------------------------------- /data/jewel/CastSpeed_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|2-4 -------------------------------------------------------------------------------- /data/jewel/ChanceToBleed.txt: -------------------------------------------------------------------------------- 1 | 1|3-5 -------------------------------------------------------------------------------- /data/jewel/ChanceToFreeze.txt: -------------------------------------------------------------------------------- 1 | 1|3-5 -------------------------------------------------------------------------------- /data/jewel/ChanceToIgnite.txt: -------------------------------------------------------------------------------- 1 | 1|3-5 -------------------------------------------------------------------------------- /data/jewel/ChanceToPoison.txt: -------------------------------------------------------------------------------- 1 | 1|3-5 -------------------------------------------------------------------------------- /data/jewel/ChanceToShock.txt: -------------------------------------------------------------------------------- 1 | 1|3-5 -------------------------------------------------------------------------------- /data/jewel/CritChanceElementalSkills.txt: -------------------------------------------------------------------------------- 1 | 1|10-14 -------------------------------------------------------------------------------- /data/jewel/CritChanceFireColdLightningSkills.txt: -------------------------------------------------------------------------------- 1 | 1|14-18 -------------------------------------------------------------------------------- /data/jewel/CritChanceGlobal_IncrAcc_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|6-10 -------------------------------------------------------------------------------- /data/jewel/CritChanceGlobal_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|8-12 -------------------------------------------------------------------------------- /data/jewel/CritChanceSpells_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|10-14 -------------------------------------------------------------------------------- /data/jewel/CritChanceWith1H2HMelee.txt: -------------------------------------------------------------------------------- 1 | 1|14-18 -------------------------------------------------------------------------------- /data/jewel/CritMeleeMultiplier.txt: -------------------------------------------------------------------------------- 1 | 1|12-15 -------------------------------------------------------------------------------- /data/jewel/CritMultiplierElementalSkills.txt: -------------------------------------------------------------------------------- 1 | 1|12-15 -------------------------------------------------------------------------------- /data/jewel/CritMultiplierFireColdLightningSkills.txt: -------------------------------------------------------------------------------- 1 | 1|15-18 -------------------------------------------------------------------------------- /data/jewel/CritMultiplierGlobal_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|9-12 -------------------------------------------------------------------------------- /data/jewel/CritMultiplierSpells.txt: -------------------------------------------------------------------------------- 1 | 1|12-15 -------------------------------------------------------------------------------- /data/jewel/CritMultiplierWhileDualWielding.txt: -------------------------------------------------------------------------------- 1 | 1|15-18 -------------------------------------------------------------------------------- /data/jewel/CritMultiplierWith1H2HMelee.txt: -------------------------------------------------------------------------------- 1 | 1|15-18 -------------------------------------------------------------------------------- /data/jewel/DamageOverTime.txt: -------------------------------------------------------------------------------- 1 | 1|10-12 -------------------------------------------------------------------------------- /data/jewel/ESOnHit.txt: -------------------------------------------------------------------------------- 1 | 1|2-3 -------------------------------------------------------------------------------- /data/jewel/EnergyShieldRechargeRate.txt: -------------------------------------------------------------------------------- 1 | 1|6-8 -------------------------------------------------------------------------------- /data/jewel/FasterStartOfEnergyShieldRecharge.txt: -------------------------------------------------------------------------------- 1 | 1|4-6 -------------------------------------------------------------------------------- /data/jewel/FreezeDurationOnEnemies.txt: -------------------------------------------------------------------------------- 1 | 1|12-16 -------------------------------------------------------------------------------- /data/jewel/IIR_Suffix_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|4-6 -------------------------------------------------------------------------------- /data/jewel/IgniteDurationOnEnemies.txt: -------------------------------------------------------------------------------- 1 | 1|6-8 -------------------------------------------------------------------------------- /data/jewel/IncrAccuracyRating_CritChance_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|6-10 -------------------------------------------------------------------------------- /data/jewel/IncrAccuracyRating_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|10-14 -------------------------------------------------------------------------------- /data/jewel/IncrArmour_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|14-18 -------------------------------------------------------------------------------- /data/jewel/IncrBleedingDamage.txt: -------------------------------------------------------------------------------- 1 | 1|16-20 -------------------------------------------------------------------------------- /data/jewel/IncrBurningDamage.txt: -------------------------------------------------------------------------------- 1 | 1|16-20 -------------------------------------------------------------------------------- /data/jewel/IncrChaosDamage.txt: -------------------------------------------------------------------------------- 1 | 1|9-13 -------------------------------------------------------------------------------- /data/jewel/IncrDamage.txt: -------------------------------------------------------------------------------- 1 | 1|8-10 -------------------------------------------------------------------------------- /data/jewel/IncrEvasion_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|14-18 -------------------------------------------------------------------------------- /data/jewel/IncrFireColdLightningDamage_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|14-16 -------------------------------------------------------------------------------- /data/jewel/IncrMaxEnergyShield_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|6-8 2 | -------------------------------------------------------------------------------- /data/jewel/IncrMaximumLife.txt: -------------------------------------------------------------------------------- 1 | 1|5-7 -------------------------------------------------------------------------------- /data/jewel/IncrMaximumMana_Jewel.txt: -------------------------------------------------------------------------------- 1 | 1|6-8 -------------------------------------------------------------------------------- /data/jewel/IncrMeleePhysDamageWhileHoldingShield.txt: -------------------------------------------------------------------------------- 1 | 1|12-14 -------------------------------------------------------------------------------- /data/jewel/IncrMineDamage.txt: -------------------------------------------------------------------------------- 1 | 1|14-16 -------------------------------------------------------------------------------- /data/jewel/IncrMineLayingSpeed.txt: -------------------------------------------------------------------------------- 1 | 1|6-8 -------------------------------------------------------------------------------- /data/jewel/IncrPhysDamageWith1H2HMelee.txt: -------------------------------------------------------------------------------- 1 | 1|12-14 -------------------------------------------------------------------------------- /data/jewel/IncrPhysDamageWithWeapontype.txt: -------------------------------------------------------------------------------- 1 | 1|14-16 -------------------------------------------------------------------------------- /data/jewel/IncrPhysDamage_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|14-16 -------------------------------------------------------------------------------- /data/jewel/IncrPhysWeaponDamageDualWielding.txt: -------------------------------------------------------------------------------- 1 | 1|12-14 -------------------------------------------------------------------------------- /data/jewel/IncrPoisonDamage.txt: -------------------------------------------------------------------------------- 1 | 1|16-20 -------------------------------------------------------------------------------- /data/jewel/IncrTotemDamage.txt: -------------------------------------------------------------------------------- 1 | 1|12-16 -------------------------------------------------------------------------------- /data/jewel/IncrTotemLife.txt: -------------------------------------------------------------------------------- 1 | 1|8-12 -------------------------------------------------------------------------------- /data/jewel/IncrTrapDamage.txt: -------------------------------------------------------------------------------- 1 | 1|14-16 -------------------------------------------------------------------------------- /data/jewel/IncrTrapThrowingSpeed.txt: -------------------------------------------------------------------------------- 1 | 1|6-8 -------------------------------------------------------------------------------- /data/jewel/KnockBackOnHit.txt: -------------------------------------------------------------------------------- 1 | 1|4-6 -------------------------------------------------------------------------------- /data/jewel/LifeOnHit_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|2-3 -------------------------------------------------------------------------------- /data/jewel/ManaOnHit.txt: -------------------------------------------------------------------------------- 1 | 1|1-2 -------------------------------------------------------------------------------- /data/jewel/ManaRegen_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|12-15 -------------------------------------------------------------------------------- /data/jewel/MeleeCritChance.txt: -------------------------------------------------------------------------------- 1 | 1|10-14 -------------------------------------------------------------------------------- /data/jewel/MeleeDamage.txt: -------------------------------------------------------------------------------- 1 | 1|10-12 -------------------------------------------------------------------------------- /data/jewel/MinionBlockChance.txt: -------------------------------------------------------------------------------- 1 | 1|2-4 -------------------------------------------------------------------------------- /data/jewel/MinionIncrMaximumLife.txt: -------------------------------------------------------------------------------- 1 | 1|8-12 -------------------------------------------------------------------------------- /data/jewel/MinionsDealIncrDamage.txt: -------------------------------------------------------------------------------- 1 | 1|14-16 -------------------------------------------------------------------------------- /data/jewel/PhysicalAttackDamageLeeched_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|0.2-0.4 -------------------------------------------------------------------------------- /data/jewel/PoisonDuration.txt: -------------------------------------------------------------------------------- 1 | 1|6-8 -------------------------------------------------------------------------------- /data/jewel/ProjectileDamage.txt: -------------------------------------------------------------------------------- 1 | 1|10-12 -------------------------------------------------------------------------------- /data/jewel/ProjectileSpeed_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|6-8 -------------------------------------------------------------------------------- /data/jewel/ReducedManaCost.txt: -------------------------------------------------------------------------------- 1 | 1|3-5 -------------------------------------------------------------------------------- /data/jewel/ShockDurationOnEnemies.txt: -------------------------------------------------------------------------------- 1 | 1|12-16 -------------------------------------------------------------------------------- /data/jewel/SpellDamageDualWielding_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|14-16 -------------------------------------------------------------------------------- /data/jewel/SpellDamageHoldingShield_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|14-16 -------------------------------------------------------------------------------- /data/jewel/SpellDamageWieldingStaff_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|14-16 -------------------------------------------------------------------------------- /data/jewel/SpellDamage_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|10-12 -------------------------------------------------------------------------------- /data/jewel/StunDuration_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|10-14 -------------------------------------------------------------------------------- /data/jewel/StunRecovery_Suffix_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|10-14 -------------------------------------------------------------------------------- /data/jewel/To1Attribute_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|12-16 -------------------------------------------------------------------------------- /data/jewel/To1Resist_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|12-15 -------------------------------------------------------------------------------- /data/jewel/To2Attributes_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|8-10 -------------------------------------------------------------------------------- /data/jewel/To2Resist_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|10-12 -------------------------------------------------------------------------------- /data/jewel/ToAllAttributes_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|6-8 -------------------------------------------------------------------------------- /data/jewel/ToAllResist_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|8-10 -------------------------------------------------------------------------------- /data/jewel/ToAllResist_Jewels_Minions.txt: -------------------------------------------------------------------------------- 1 | 1|6-10 -------------------------------------------------------------------------------- /data/jewel/ToAllResist_Jewels_Totems.txt: -------------------------------------------------------------------------------- 1 | 1|6-10 -------------------------------------------------------------------------------- /data/jewel/ToChaosResist_Jewels.txt: -------------------------------------------------------------------------------- 1 | 1|7-13 -------------------------------------------------------------------------------- /data/jewel/WeaponCritChanceDualWielding.txt: -------------------------------------------------------------------------------- 1 | 1|14-18 -------------------------------------------------------------------------------- /lib/AssociatedProgram.ahk: -------------------------------------------------------------------------------- 1 | ;-- Function: AssociatedProgram 2 | ;-- Description: Returns the full path of the program (if any) associated to 3 | ; a file extension (p_FileExt). 4 | ;-- Original author: TheGood 5 | ; http://www.autohotkey.com/forum/viewtopic.php?p=363558#363558 6 | ;-- Modified by: Eruyome 7 | ;-- Programming note: AssocQueryStringA is never called because it returns 8 | ; invalid results on Windows XP. 9 | AssociatedProgram(p_FileExt) { 10 | program := "" 11 | ext := p_FileExt 12 | Static ASSOCSTR_EXECUTABLE:=2 13 | 14 | ;-- Workaround for AutoHotkey Basic 15 | PtrType:=A_PtrSize ? "Ptr":"UInt" 16 | 17 | ;-- File extension 18 | if SubStr(p_FileExt,1,1)<>"." 19 | p_FileExt:="." . p_FileExt ;-- Prepend dot 20 | 21 | ;-- If needed, convert file extension to Unicode 22 | l_FileExtW:=p_FileExt 23 | if not A_IsUnicode 24 | { 25 | nSize:=StrLen(p_FileExt)+1 ;-- Size in chars including terminating null 26 | VarSetCapacity(l_FileExtW,nSize*2) ;-- Size in bytes 27 | DllCall("MultiByteToWideChar","UInt",0,"UInt",0,PtrType,&p_FileExt,"Int",-1,PtrType,&l_FileExtW,"Int",nSize) 28 | } 29 | 30 | ;-- Get the full path to the program 31 | VarSetCapacity(l_EXENameW,65536,0) ;-- Size allows for 32K characters 32 | DllCall("shlwapi.dll\AssocQueryStringW" 33 | ,"UInt",0 ;-- ASSOCF flags 34 | ,"UInt",ASSOCSTR_EXECUTABLE ;-- ASSOCSTR flags 35 | ,PtrType,&l_FileExtW ;-- pszAssoc (file extension used) 36 | ,PtrType,0 ;-- pszExtra (not used) 37 | ,PtrType,&l_EXENameW ;-- pszOut (output string) 38 | ,PtrType . "*",65536) ;-- pcchOut (len of the output string) 39 | 40 | ;-- If needed, convert result back to ANSI 41 | if A_IsUnicode 42 | program := l_EXENameW 43 | else { 44 | nSize:=DllCall("WideCharToMultiByte","UInt",0,"UInt",0,PtrType,&l_EXENameW,"Int",-1,PtrType,0,"Int",0,PtrType,0,PtrType,0) 45 | ;-- Returns the number of bytes including the terminating null 46 | 47 | VarSetCapacity(l_EXEName,nSize) 48 | DllCall("WideCharToMultiByte","UInt",0,"UInt",0,PtrType,&l_EXENameW,"Int",-1,PtrType,&l_EXEName,"Int",nSize,PtrType,0,PtrType,0) 49 | program := l_EXEName 50 | } 51 | 52 | app1 := AssocQueryApp(ext) 53 | app2 := DefaultProgramUserChoice(ext) 54 | app := (app2 and app1 != app2) ? app2 : app1 55 | program := (program != app) ? app : program 56 | 57 | Return program 58 | } 59 | 60 | AssocQueryApp(ext) { 61 | RegRead, type, HKCR, .%ext% 62 | RegRead, act , HKCR, %type%\shell 63 | If ErrorLevel 64 | act = open 65 | RegRead, cmd , HKCR, %type%\shell\%act%\command 66 | app := Trim(RegExReplace(cmd, """(.*?)"".*","$1")) 67 | Return, app 68 | } 69 | 70 | DefaultProgramUserChoice(ext) { 71 | ; Find the Registry key name for the default browser 72 | Try { 73 | RegRead, AppKeyName, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.%ext%\UserChoice, Progid 74 | 75 | ; Find the executable command associated with the above Registry key 76 | RegRead, AppFullCommand, HKEY_CLASSES_ROOT, %AppKeyName%\shell\open\command 77 | 78 | ; The above RegRead will return the path and executable name of the application contained within quotes and optional parameters 79 | ; We only want the text contained inside the first set of quotes which is the path and executable 80 | ; Find the ending quote position (we know the beginning quote is in position 0 so start searching at position 1) 81 | StringGetPos, pos, AppFullCommand, ",,1 82 | 83 | ; Decrement the found position by one to work correctly with the StringMid function 84 | pos := --pos 85 | 86 | ; Extract and return the path and executable of the browser 87 | StringMid, AppPathandEXE, AppFullCommand, 2, %pos% 88 | } Catch e { 89 | 90 | } 91 | Return AppPathandEXE 92 | } -------------------------------------------------------------------------------- /lib/CalcChecksum.ahk: -------------------------------------------------------------------------------- 1 | HashFile(filePath,hashType=2) ; By Deo, http://www.autohotkey.com/forum/viewtopic.php?t=71133 2 | { 3 | PROV_RSA_AES := 24 4 | CRYPT_VERIFYCONTEXT := 0xF0000000 5 | BUFF_SIZE := 1024 * 1024 ; 1 MB 6 | HP_HASHVAL := 0x0002 7 | HP_HASHSIZE := 0x0004 8 | 9 | HASH_ALG := (hashType = 1 OR hashType = "MD2") ? (CALG_MD2 := 32769) : HASH_ALG 10 | HASH_ALG := (hashType = 2 OR hashType = "MD5") ? (CALG_MD5 := 32771) : HASH_ALG 11 | HASH_ALG := (hashType = 3 OR hashType = "SHA") ? (CALG_SHA := 32772) : HASH_ALG 12 | HASH_ALG := (hashType = 4 OR hashType = "SHA256") ? (CALG_SHA_256 := 32780) : HASH_ALG ;Vista+ only 13 | HASH_ALG := (hashType = 5 OR hashType = "SHA384") ? (CALG_SHA_384 := 32781) : HASH_ALG ;Vista+ only 14 | HASH_ALG := (hashType = 6 OR hashType = "SHA512") ? (CALG_SHA_512 := 32782) : HASH_ALG ;Vista+ only 15 | 16 | f := FileOpen(filePath,"r","CP0") 17 | if !IsObject(f) 18 | return 0 19 | if !hModule := DllCall( "GetModuleHandleW", "str", "Advapi32.dll", "Ptr" ) 20 | hModule := DllCall( "LoadLibraryW", "str", "Advapi32.dll", "Ptr" ) 21 | if !dllCall("Advapi32\CryptAcquireContextW" 22 | ,"Ptr*",hCryptProv 23 | ,"Uint",0 24 | ,"Uint",0 25 | ,"Uint",PROV_RSA_AES 26 | ,"UInt",CRYPT_VERIFYCONTEXT ) 27 | Gosub,HashTypeFreeHandles 28 | 29 | if !dllCall("Advapi32\CryptCreateHash" 30 | ,"Ptr",hCryptProv 31 | ,"Uint",HASH_ALG 32 | ,"Uint",0 33 | ,"Uint",0 34 | ,"Ptr*",hHash ) 35 | Gosub, HashTypeFreeHandles 36 | 37 | VarSetCapacity(read_buf,BUFF_SIZE,0) 38 | 39 | hCryptHashData := DllCall("GetProcAddress", "Ptr", hModule, "AStr", "CryptHashData", "Ptr") 40 | While (cbCount := f.RawRead(read_buf, BUFF_SIZE)) 41 | { 42 | if (cbCount = 0) 43 | break 44 | 45 | if !dllCall(hCryptHashData 46 | ,"Ptr",hHash 47 | ,"Ptr",&read_buf 48 | ,"Uint",cbCount 49 | ,"Uint",0 ) 50 | Gosub, HashTypeFreeHandles 51 | } 52 | 53 | if !dllCall("Advapi32\CryptGetHashParam" 54 | ,"Ptr",hHash 55 | ,"Uint",HP_HASHSIZE 56 | ,"Uint*",HashLen 57 | ,"Uint*",HashLenSize := 4 58 | ,"UInt",0 ) 59 | Gosub, HashTypeFreeHandles 60 | 61 | VarSetCapacity(pbHash,HashLen,0) 62 | if !dllCall("Advapi32\CryptGetHashParam" 63 | ,"Ptr",hHash 64 | ,"Uint",HP_HASHVAL 65 | ,"Ptr",&pbHash 66 | ,"Uint*",HashLen 67 | ,"UInt",0 ) 68 | Gosub, HashTypeFreeHandles 69 | 70 | SetFormat,integer,Hex 71 | loop,%HashLen% 72 | { 73 | num := numget(pbHash,A_index-1,"UChar") 74 | hashval .= substr((num >> 4),0) . substr((num & 0xf),0) 75 | } 76 | SetFormat,integer,D 77 | 78 | HashTypeFreeHandles: 79 | f.Close() 80 | DllCall("FreeLibrary", "Ptr", hModule) 81 | dllCall("Advapi32\CryptDestroyHash","Ptr",hHash) 82 | dllCall("Advapi32\CryptReleaseContext","Ptr",hCryptProv,"UInt",0) 83 | return hashval 84 | } -------------------------------------------------------------------------------- /lib/Class_ColorPicker.ahk: -------------------------------------------------------------------------------- 1 | ; AutoHotkey Version: 1.1.12.00 2 | ; Language: English 3 | ; Dev Platform: Windows 7 Home Premium x64 4 | ; Original Author: Joe DF | http://joedf.co.nr | joedf@users.sourceforge.net 5 | ; Date: August 20th, 2013 6 | ; Link: https://autohotkey.com/boards/viewtopic.php?t=65 7 | ; 8 | ; Script Function: 9 | ; Color Dialog script. 10 | ; 11 | ; Extended and rewritten as a class for the PoE-TradeMacro script (https://github.com/PoE-TradeMacro/POE-TradeMacro) 12 | ; Author: Eruyome 13 | ; Date: October 7th, 2017 14 | ; Class function: 15 | ; Color picker UI with color preview (including opacity). 16 | ; Returns an array with: 17 | ; ARGB hex value (0x00000000) 18 | ; RGB hex value (000000) 19 | ; Alpha value in percent (100) 20 | 21 | class ColorPicker 22 | { 23 | __New(RGBv = "", Av = "", PickerTitle = "Color Picker", bgImage = "") 24 | { 25 | /* 26 | RBGv: RGB hex value (000000 - FFFFFF). 27 | Av: Alpha/Opacity (0 - 100) %. 28 | PickerTitle: Window title. 29 | bgImage: Optional background image for the color preview. 30 | */ 31 | 32 | global 33 | RGBv := this.ValidateRGBColor(RGBv, "FFFFFF") 34 | Av := (not StrLen(Av) > 0) ? 85 : this.ValidateOpacity(Av, 100) 35 | 36 | RegexMatch(RGBv, "i)(.{2})(.{2})(.{2})", match) 37 | RegexMatch(this.hexToRgb(RGBv), "i)(\d+),\s?(\d+),\s?(\d+)", match) 38 | Rval := match1 39 | Gval := match2 40 | Bval := match3 41 | Aval := Av 42 | ARGBval := this.rgbaToARGBHex(Rval, Gval, Bval, Aval) 43 | RGBval := 44 | hasImage := FileExist(bgImage) 45 | 46 | ColorPickerResultARGBHex := ARGBval 47 | ColorPickerResultColor := RegexReplace(ARGBval, "i)^.{4}") 48 | ColorPickerResultTrans := Aval 49 | 50 | ;Destroy GUIs in case they still exist 51 | Gui, GDIColorPicker:Destroy 52 | Gui, GDIColorPickerPreview:Destroy 53 | 54 | ;Create Color Dialog GUI 55 | Gui, GDIColorPicker:Add, Text, x0 y10 w75 h20 +Right, Red 56 | Gui, GDIColorPicker:Add, Text, x0 y30 w75 h20 +Right, Green 57 | Gui, GDIColorPicker:Add, Text, x0 y50 w75 h20 +Right, Blue 58 | Gui, GDIColorPicker:Add, Text, x0 y70 w75 h20 +Right, Alpha/Opacity 59 | Gui, GDIColorPicker:Add, Slider, x75 y10 w190 h20 AltSubmit +NoTicks +Range0-255 vsR gColorPickerSliderSub, %Rval% 60 | Gui, GDIColorPicker:Add, Slider, x75 y30 w190 h20 AltSubmit +NoTicks +Range0-255 vsG gColorPickerSliderSub, %Gval% 61 | Gui, GDIColorPicker:Add, Slider, x75 y50 w190 h20 AltSubmit +NoTicks +Range0-255 vsB gColorPickerSliderSub, %Bval% 62 | Gui, GDIColorPicker:Add, Slider, x75 y70 w190 h20 AltSubmit +NoTicks +Range0-100 vsA gColorPickerSliderSub, %Aval% 63 | Gui, GDIColorPicker:Add, Edit, x265 y10 w45 h20 gColorPickerEditSub veR +Limit3 +Number, %Rval% 64 | Gui, GDIColorPicker:Add, UpDown, Range0-255 vuR gColorPickerUpDownSub, %Rval% 65 | Gui, GDIColorPicker:Add, Edit, x265 y30 w45 h20 gColorPickerEditSub veG +Limit3 +Number, %Gval% 66 | Gui, GDIColorPicker:Add, UpDown, Range0-255 vuG gColorPickerUpDownSub, %Gval% 67 | Gui, GDIColorPicker:Add, Edit, x265 y50 w45 h20 gColorPickerEditSub veB +Limit3 +Number, %Bval% 68 | Gui, GDIColorPicker:Add, UpDown, Range0-255 vuB gColorPickerUpDownSub, %Bval% 69 | Gui, GDIColorPicker:Add, Edit, x265 y70 w45 h20 gColorPickerEditSub veA +Limit3 +Number, %Aval% 70 | Gui, GDIColorPicker:Add, UpDown, Range0-100 vuA gColorPickerUpDownSub, %Aval% 71 | If (hasImage) { 72 | Gui, GDIColorPicker:Add, Picture, vPbg w80 h80 x315 y10, %bgImage% 73 | Gui, GDIColorPicker:Add, Button, x315 y100 w80 h20 gColorPickerButtonToggleBg, Toggle BG 74 | showImage := true 75 | } 76 | Gui, GDIColorPicker:Add, Button, x115 y100 w80 h20 vbS gColorPickerButtonSave, Save 77 | Gui, GDIColorPicker:Add, Button, x+10 y100 w80 h20 gColorPickerButtonCancel, Cancel 78 | Gui, GDIColorPicker:+LastFound 79 | Gui, GDIColorPicker:Show, w401 h125, % PickerTitle 80 | GuiControl, Hide, Pbg 81 | 82 | MainhWnd := WinExist() 83 | 84 | Gui, GDIColorPickerPreview: New, +AlwaysOnTop -resize -SysMenu -Caption 85 | gui, GDIColorPickerPreview: color, blue 86 | Gui, GDIColorPickerPreview: Show, x315 y10 w80 h80 87 | Gui, GDIColorPickerPreview: +LastFound 88 | SubhWnd := WinExist() 89 | DllCall("SetParent", "uint", SubhWnd, "uint", MainhWnd) 90 | WinSet, Style, -0xC00000, A 91 | WinActivate, ahk_id %MainhWnd% 92 | GoSub, ColorPickerSetValues 93 | 94 | ; wait until the GUI is closed to return the picked color values 95 | WinWaitClose, ahk_id %MainhWnd% 96 | Results := [ColorPickerResultARGBHex, ColorPickerResultColor, ColorPickerResultTrans] 97 | 98 | Return Results 99 | 100 | /* 101 | GUI Labels 102 | */ 103 | ColorPickerEditSub: 104 | ;Get Values 105 | GuiControlGet, Rval, GDIColorPicker:, eR 106 | GuiControlGet, Gval, GDIColorPicker:, eG 107 | GuiControlGet, Bval, GDIColorPicker:, eB 108 | GuiControlGet, Aval, GDIColorPicker:, eA 109 | ;Set preview 110 | GoSub ColorPickerSetValues 111 | ;Make Everything else aware 112 | GuiControl, GDIColorPicker:, uR, %Rval% 113 | GuiControl, GDIColorPicker:, uG, %Gval% 114 | GuiControl, GDIColorPicker:, uB, %Bval% 115 | GuiControl, GDIColorPicker:, uA, %Aval% 116 | GuiControl, GDIColorPicker:, sR, %Rval% 117 | GuiControl, GDIColorPicker:, sG, %Gval% 118 | GuiControl, GDIColorPicker:, sB, %Bval% 119 | GuiControl, GDIColorPicker:, sA, %Aval% 120 | Return 121 | 122 | ColorPickerUpDownSub: 123 | ;Get Values 124 | GuiControlGet, Rval, GDIColorPicker:, uR 125 | GuiControlGet, Gval, GDIColorPicker:, uG 126 | GuiControlGet, Bval, GDIColorPicker:, uB 127 | GuiControlGet, Aval, GDIColorPicker:, uA 128 | ;Set preview 129 | GoSub ColorPickerSetValues 130 | ;Make Everything else aware 131 | GuiControl, GDIColorPicker:, eR, %Rval% 132 | GuiControl, GDIColorPicker:, eG, %Gval% 133 | GuiControl, GDIColorPicker:, eB, %Bval% 134 | GuiControl, GDIColorPicker:, eA, %Aval% 135 | GuiControl, GDIColorPicker:, sR, %Rval% 136 | GuiControl, GDIColorPicker:, sG, %Gval% 137 | GuiControl, GDIColorPicker:, sB, %Bval% 138 | GuiControl, GDIColorPicker:, sA, %Aval% 139 | Return 140 | 141 | ColorPickerSliderSub: 142 | ;Get Values 143 | GuiControlGet, Rval, GDIColorPicker:, sR 144 | GuiControlGet, Gval, GDIColorPicker:, sG 145 | GuiControlGet, Bval, GDIColorPicker:, sB 146 | GuiControlGet, Aval, GDIColorPicker:, sA 147 | ;Set preview 148 | GoSub ColorPickerSetValues 149 | ;Make Everything else aware 150 | GuiControl,, eR, %Rval% 151 | GuiControl,, eG, %Gval% 152 | GuiControl,, eB, %Bval% 153 | GuiControl,, eA, %Aval% 154 | GuiControl,, uR, %Rval% 155 | GuiControl,, uG, %Gval% 156 | GuiControl,, uB, %Bval% 157 | GuiControl,, uA, %Aval% 158 | Return 159 | 160 | ColorPickerSetValues: 161 | ;Convert values to Hex 162 | ARGBval := this.rgbaToARGBHex(Rval, Gval, Bval, Aval) 163 | RGBVal := RegexReplace(ARGBval, "i)^.{4}") 164 | 165 | ; remove "0x" and alpha value and convert alpha value to 0-255 166 | windowColor := RegexReplace(ARGBval, "i)^.{4}") 167 | alpha := Aval / 100 * 255 168 | Gui, GDIColorPickerPreview:Color, %windowColor% 169 | WinSet, Transparent, %alpha%, ahk_id %SubhWnd% 170 | 171 | ;Display Tooltip 172 | ToolTip Red: %Rval%`nGreen: %Gval%`nBlue: %Bval%`nOpacity: %Aval%`%`nHex: %ARGBval% 173 | ;Make tooltip disappear after 375 ms (3/8th of a second) 174 | SetTimer, ColorPickerRemoveToolTip, 375 175 | ;Apply colour to preview 176 | GuiControl, +Background%ARGBval%, pC 177 | Return 178 | 179 | ColorPickerRemoveToolTip: 180 | SetTimer, ColorPickerRemoveToolTip, Off ;Turn timer off 181 | ToolTip ;Turn off tooltip 182 | Return 183 | 184 | ColorPickerButtonSave: 185 | ColorPickerResultARGBHex := ARGBval 186 | ColorPickerResultColor := RegexReplace(ARGBval, "i)^.{4}") 187 | ColorPickerResultTrans := Aval 188 | 189 | ;Remove '0x' prefix to hex color code, saving it directly to the clipboard 190 | StringReplace, Clipboard, ARGBval, 0x 191 | ;Display Last selected values... (these values can later be used), and Notify the user 192 | output := "RGBA: (" Rval ", " Gval ", " Bval ", " Round(Aval / 100, 2) ")`nARGB Hex: " ARGBval "`nCopied to Clipboard!" 193 | ;MsgBox, 64, Simple Color Dialog, % output 194 | 195 | Gui, GDIColorPicker:Destroy 196 | Gui, GDIColorPickerPreview:Destroy 197 | Return 198 | 199 | ColorPickerButtonCancel: 200 | Gui, GDIColorPicker:Destroy 201 | Gui, GDIColorPickerPreview:Destroy 202 | Return 203 | 204 | ColorPickerButtonToggleBg: 205 | GuiControl, % ( showImage ) ? "hide" : "show", Pbg 206 | showImage := showImage ? false : true 207 | Return 208 | 209 | GDIColorPickerPreviewGuiEscape: 210 | Gui, GDIColorPickerPreview:Destroy 211 | Return 212 | } 213 | 214 | rgbaToARGBHex(r, g, b, a) { 215 | ; convert percent alpha to 0-255 216 | a := (a / 100) * 255 217 | if (a < 1) { 218 | a := Floor(a) 219 | } else { 220 | a := Ceil(a) 221 | } 222 | 223 | ; won't work without IntegerFast when called from a Label 224 | SetFormat, IntegerFast, % (f := A_FormatInteger) = "D" ? "H" : f 225 | h := a + 0 . r + 0 . g + 0 . b + 0 226 | SetFormat, Integer, %f% 227 | 228 | res := "0x" . RegExReplace(RegExReplace(h, "0x(.)(?=$|0x)", "0$1"), "0x") 229 | Return, res 230 | } 231 | 232 | hexToRgb(s, d = "") { 233 | SetFormat, Integer, % (f := A_FormatInteger) = "H" ? "D" : f 234 | Loop, % StrLen(s := RegExReplace(s, "^(?:0x|#)")) // 2 235 | c%A_Index% := 0 + (h := "0x" . SubStr(s, A_Index * 2 - 1, 2)) 236 | SetFormat, Integer, %f% 237 | Return, c1 . (d := d = "" ? "," : d) . c2 . d . c3 238 | } 239 | 240 | ValidateRGBColor(Color, Default) { 241 | StringUpper, Color, Color 242 | RegExMatch(Trim(Color), "i)(^[0-9A-F]{6}$)", hex) 243 | Return StrLen(hex) ? hex : Default 244 | } 245 | 246 | ValidateOpacity(Opacity, Default) { 247 | Opacity := Opacity + 0 ; convert string to int 248 | If (not RegExMatch(Opacity, "i)[0-9]+")) { 249 | Opacity := Default 250 | } 251 | If (Opacity > 100) { 252 | Opacity := 100 253 | } Else If (Opacity < 0) { 254 | Opacity := 0 255 | } 256 | 257 | Return Opacity 258 | } 259 | } -------------------------------------------------------------------------------- /lib/ConvertKeyToKeyCode.ahk: -------------------------------------------------------------------------------- 1 | ; ############################################################################################################# 2 | ; # This script was originally developed for the TradeMacro (https://github.com/PoE-TradeMacro/POE-TradeMacro) 3 | ; # It allows to run script and use hotkeys regardless of the current keyboard layout 4 | ; # 5 | ; # Github: https://github.com/dein0s 6 | ; # Twitter: https://twitter.com/dein0s 7 | ; # Discord: dein0s#2248 8 | ; ############################################################################################################# 9 | 10 | 11 | Global ENG_US := 0x4090409 12 | Global DetectHiddenWindowsDefault := A_DetectHiddenWindows 13 | Global TitleMatchModeDefault := A_TitleMatchMode 14 | Global FormatIntegerDefault := A_FormatInteger 15 | Global ScriptID := GetCurrentScriptID() 16 | Global ScriptThread := DllCall("GetWindowThreadProcessId", "UInt", ScriptID, "UInt", 0) 17 | 18 | Global ExcludeModifiersPattern := "[^\#\!\^\+\&\<\>\*\~\$\s]+" 19 | Global PrefixSC := "SC" 20 | Global PrefixVK := "VK" 21 | 22 | 23 | SetSettingsExecution() { 24 | DetectHiddenWindows, On 25 | SetTitleMatchMode, 2 26 | SetFormat, IntegerFast, H 27 | Return 28 | } 29 | 30 | 31 | SetSettingsDefault() { 32 | DetectHiddenWindows, %DetectHiddenWindowsDefault% 33 | SetTitleMatchMode, %TitleMatchModeDefault% 34 | SetFormat, IntegerFast, %FormatIntegerDefault% 35 | Return 36 | } 37 | 38 | 39 | GetCurrentScriptID() { 40 | SetSettingsExecution() 41 | WinGet, _ScriptID, ID, %A_ScriptName% ahk_class AutoHotkey 42 | SetSettingsDefault() 43 | Return _ScriptID 44 | } 45 | 46 | 47 | GetCurrentLayout() { 48 | ; Get current keyboard layout for the active script 49 | SetSettingsExecution() 50 | _Layout := DllCall("GetKeyboardLayout", "UInt", ScriptThread) 51 | SetSettingsDefault() 52 | Return _Layout 53 | } 54 | 55 | 56 | SwitchLayout(LayoutID) { 57 | ; Switch keyboard layout for the active script 58 | SetSettingsExecution() 59 | ; Switch the script keyboard layout to the layout identical to the active window 60 | ; 0x50 - WM_INPUTLANGCHANGEREQUEST 61 | SendMessage, 0x50,, %LayoutID%,, ahk_id %ScriptID% 62 | ; https://msdn.microsoft.com/en-us/library/windows/desktop/ms724947%28v=vs.85%29.aspx 63 | ; update user profile and broadcast WM_SETTINGCHANGE message 64 | DllCall("SystemParametersInfo", "UInt", 0x005A, "UInt", 0, "UInt", LayoutID, "UInt", 2) 65 | SetSettingsDefault() 66 | Return 67 | } 68 | 69 | 70 | CustomGetKeyCode(Key, SC:=true) { 71 | _Defaultlayout := GetCurrentLayout() 72 | _KeyCode := (SC=true) ? GetKeySC(Key) : GetKeyVK(Key) 73 | If (_KeyCode = 0 and _Defaultlayout != ENG_US) { 74 | ; Retrieving key code can fail (0 returned from GetKeySC()/GetKeyVK()) if the Key couldn't be found 75 | ; in a current keyboard layout (ie. "d" key in a russian layout) or if it's MouseKey or some MediaKey 76 | 77 | ; NB: workaround for the issues caused by https://github.com/PoE-TradeMacro/POE-TradeMacro/pull/540 78 | SwitchLayoutStart := A_TickCount 79 | SwitchLayoutElapsed := 0 80 | while (GetCurrentLayout() != ENG_US and SwitchLayoutElapsed < 120) { 81 | SwitchLayout(ENG_US) 82 | Sleep, 50 83 | SwitchLayoutElapsed := (A_TickCount - SwitchLayoutStart) / 1000 84 | } 85 | _KeyCode := (SC=true) ? GetKeySC(Key) : GetKeyVK(Key) 86 | SwitchLayout(_Defaultlayout) 87 | } 88 | Return _KeyCode 89 | } 90 | 91 | 92 | CustomGetKeyName(KeyCode, ForceENG:=true) { 93 | _Defaultlayout := GetCurrentLayout() 94 | If (ForceENG and _Defaultlayout != ENG_US) { 95 | SwitchLayout(ENG_US) 96 | } 97 | _KeyName := GetKeyName(KeyCode) 98 | If (_Defaultlayout != GetCurrentLayout()) { 99 | SwitchLayout(_Defaultlayout) 100 | } 101 | Return _KeyName 102 | } 103 | 104 | 105 | KeyCodeToKeyName(KeyCode, ForceENG:=true) { 106 | _Result := KeyCode 107 | _Pos := 1 108 | While (_Pos := RegExMatch(KeyCode, ExcludeModifiersPattern, _Match, _Pos + StrLen(_Match))) { 109 | If InStr(_Match, PrefixSC) or InStr(_Match, PrefixVK) { 110 | _KeyName := CustomGetKeyName(_Match, ForceENG) 111 | _Result := RegExReplace(_Result, _Match, _KeyName) 112 | } 113 | } 114 | Return _Result 115 | } 116 | 117 | 118 | KeyNameToKeyCode(Key, SC:=true) { 119 | _Result := Key 120 | _Pos := 1 121 | _CodePrefix := (SC=true) ? PrefixSC : PrefixVK 122 | _NotCodePrefix := (SC=true) ? PrefixVK : PrefixSC 123 | While (_Pos := RegExMatch(Key, ExcludeModifiersPattern, _Match, _Pos + StrLen(_Match))) { 124 | If !InStr(_Match, _CodePrefix) { 125 | _NameToConvert := _Match 126 | If InStr(_Match, _NotCodePrefix) { 127 | _NameToConvert := KeyCodeToKeyName(_Match) 128 | } 129 | _KeyCode := CustomGetKeyCode(_NameToConvert, SC) 130 | _Result := (_KeyCode=0) ? _Result : RegExReplace(_Result, _Match, Format("{1:s}{2:X}", _CodePrefix, _KeyCode)) 131 | } 132 | } 133 | Return _Result 134 | } 135 | 136 | 137 | KeyToSC(Key) { 138 | Return KeyNameToKeyCode(Key, true) 139 | } 140 | 141 | 142 | KeyToVK(Key) { 143 | Return KeyNameToKeyCode(Key, false) 144 | } 145 | -------------------------------------------------------------------------------- /lib/DebugPrintArray.ahk: -------------------------------------------------------------------------------- 1 | DebugPrintArray(Array, Display=1, Level=0, guiWidth=800, guiHeight=900) 2 | { 3 | Global DebugPrintArray 4 | 5 | Loop, % 4 + (Level*8) 6 | Tabs .= A_Space 7 | 8 | Output := "Array`r`n" . SubStr(Tabs, 5) . "(" 9 | 10 | If (StrLen(Array)) { 11 | Array := [Array] 12 | } 13 | 14 | For Key, Value in Array 15 | { 16 | If (IsObject(Value)) 17 | { 18 | Level++ 19 | Value := DebugPrintArray(Value, 0, Level) 20 | Level-- 21 | } 22 | 23 | Output .= "`r`n" . Tabs . "[" . Key . "] => " . Value 24 | } 25 | 26 | Output .= "`r`n" . SubStr(Tabs, 5) . ")" 27 | 28 | 29 | If (!Display) 30 | Return Output 31 | 32 | Gui, DebugPrintArray:+MaximizeBox +Resize 33 | Gui, DebugPrintArray:Font, s9, Courier New 34 | Gui, DebugPrintArray:Add, Edit, x12 y10 w%guiWidth% h%guiHeight% vDebugPrintArray ReadOnly HScroll, %Output% 35 | windowSize := guiWidth + 20 36 | windowHeight := guiHeight + 20 37 | Gui, DebugPrintArray:Show, w%windowSize% h%windowHeight%, DebugPrintArray 38 | Gui, DebugPrintArray:+LastFound 39 | ControlSend, , {Right} 40 | WinWaitClose 41 | Return Output 42 | 43 | DebugPrintArrayGuiSize: 44 | DebugAnchor("DebugPrintArray", "wh") 45 | Return 46 | 47 | DebugPrintArrayGuiClose: 48 | Gui, DebugPrintArray:Destroy 49 | Return 50 | 51 | DebugPrintArrayGuiEscape: 52 | Gui, DebugPrintArray:Destroy 53 | Return 54 | } 55 | 56 | /* 57 | Function: Anchor 58 | Defines how controls should be automatically positioned relative to the new dimensions of a window when resized. 59 | 60 | Parameters: 61 | cl - a control HWND, associated variable name or ClassNN to operate on 62 | a - (optional) one or more of the anchors: 'x', 'y', 'w' (width) and 'h' (height), 63 | optionally followed by a relative factor, e.g. "x h0.5" 64 | r - (optional) true to redraw controls, recommended for GroupBox and Button types 65 | 66 | Examples: 67 | > "xy" ; bounds a control to the bottom-left edge of the window 68 | > "w0.5" ; any change in the width of the window will resize the width of the control on a 2:1 ratio 69 | > "h" ; similar to above but directrly proportional to height 70 | 71 | Remarks: 72 | To assume the current window size for the new bounds of a control (i.e. resetting) simply omit the second and third parameters. 73 | However if the control had been created with DllCall() and has its own parent window, 74 | the container AutoHotkey created GUI must be made default with the +LastFound option prior to the call. 75 | For a complete example see anchor-example.ahk. 76 | 77 | License: 78 | - Version 4.60a 79 | - Simplified BSD License 80 | */ 81 | DebugAnchor(i, a = "", r = false) { 82 | static c, cs = 12, cx = 255, cl = 0, g, gs = 8, gl = 0, gpi, gw, gh, z = 0, k = 0xffff 83 | If z = 0 84 | VarSetCapacity(g, gs * 99, 0), VarSetCapacity(c, cs * cx, 0), z := true 85 | If (!WinExist("ahk_id" . i)) { 86 | GuiControlGet, t, Hwnd, %i% 87 | If ErrorLevel = 0 88 | i := t 89 | Else ControlGet, i, Hwnd, , %i% 90 | } 91 | VarSetCapacity(gi, 68, 0), DllCall("GetWindowInfo", "UInt", gp := DllCall("GetParent", "UInt", i), "UInt", &gi) 92 | , giw := NumGet(gi, 28, "Int") - NumGet(gi, 20, "Int"), gih := NumGet(gi, 32, "Int") - NumGet(gi, 24, "Int") 93 | If (gp != gpi) { 94 | gpi := gp 95 | Loop, %gl% 96 | If (NumGet(g, cb := gs * (A_Index - 1)) == gp) { 97 | gw := NumGet(g, cb + 4, "Short"), gh := NumGet(g, cb + 6, "Short"), gf := 1 98 | Break 99 | } 100 | If (!gf) 101 | NumPut(gp, g, gl), NumPut(gw := giw, g, gl + 4, "Short"), NumPut(gh := gih, g, gl + 6, "Short"), gl += gs 102 | } 103 | ControlGetPos, dx, dy, dw, dh, , ahk_id %i% 104 | Loop, %cl% 105 | If (NumGet(c, cb := cs * (A_Index - 1)) == i) { 106 | If a = 107 | { 108 | cf = 1 109 | Break 110 | } 111 | giw -= gw, gih -= gh, as := 1, dx := NumGet(c, cb + 4, "Short"), dy := NumGet(c, cb + 6, "Short") 112 | , cw := dw, dw := NumGet(c, cb + 8, "Short"), ch := dh, dh := NumGet(c, cb + 10, "Short") 113 | Loop, Parse, a, xywh 114 | If A_Index > 1 115 | av := SubStr(a, as, 1), as += 1 + StrLen(A_LoopField) 116 | , d%av% += (InStr("yh", av) ? gih : giw) * (A_LoopField + 0 ? A_LoopField : 1) 117 | DllCall("SetWindowPos", "UInt", i, "Int", 0, "Int", dx, "Int", dy 118 | , "Int", InStr(a, "w") ? dw : cw, "Int", InStr(a, "h") ? dh : ch, "Int", 4) 119 | If r != 0 120 | DllCall("RedrawWindow", "UInt", i, "UInt", 0, "UInt", 0, "UInt", 0x0101) ; RDW_UPDATENOW | RDW_INVALIDATE 121 | Return 122 | } 123 | If cf != 1 124 | cb := cl, cl += cs 125 | bx := NumGet(gi, 48), by := NumGet(gi, 16, "Int") - NumGet(gi, 8, "Int") - gih - NumGet(gi, 52) 126 | If cf = 1 127 | dw -= giw - gw, dh -= gih - gh 128 | NumPut(i, c, cb), NumPut(dx - bx, c, cb + 4, "Short"), NumPut(dy - by, c, cb + 6, "Short") 129 | , NumPut(dw, c, cb + 8, "Short"), NumPut(dh, c, cb + 10, "Short") 130 | Return, true 131 | } -------------------------------------------------------------------------------- /lib/IEComObjectTestCall.ahk: -------------------------------------------------------------------------------- 1 | #SingleInstance, force 2 | 3 | userFolderPath = %1% 4 | 5 | ; don't use the fallback if it was completed successfully once 6 | ; 7 | global Fallback := True 8 | global wb1 := 9 | global wb2 := 10 | If (FileExist(userFolderPath "\IEComObjectCall.txt")) { 11 | Fallback := False 12 | } 13 | 14 | url := "https://poe-trademacro.github.io/userCount/index.html" 15 | Try { 16 | wb1 := ComObjCreate("InternetExplorer.Application") 17 | wb1.Visible := False 18 | wb1.Navigate(url) 19 | IELoad(wb1, loaded, userFolderPath) 20 | } Catch error { 21 | If (Fallback) { 22 | Try { 23 | wb2 := ComObjCreate("InternetExplorer.Application") 24 | wb2.Visible := True 25 | wb2.Navigate(url) 26 | IELoad(wb2, loaded, userFolderPath, true) 27 | } Catch e { 28 | CleanIE() 29 | } 30 | } 31 | } 32 | 33 | CleanIE() { 34 | Try { 35 | wb1.Quit 36 | wb2.Quit 37 | } Catch e { 38 | 39 | } 40 | ExitApp 41 | } 42 | 43 | IELoad(wb, ByRef loaded = false, path = "", visible = false) ;You need to send the IE handle to the function unless you define it as global. 44 | { 45 | i := 0 46 | If !wb ;If wb is not a valid pointer then quit 47 | Return False 48 | Loop 49 | { 50 | Sleep,100 51 | Try { 52 | loaded := wb.Document.getElementById("loaded").innerHTML = "Loaded." ? true : false 53 | } catch e { 54 | 55 | } 56 | Try { 57 | ready := wb.Document.Readystate 58 | } catch a { 59 | 60 | } 61 | i++ 62 | } 63 | Until ((ready = "Complete" and loaded or i = 2000)) 64 | 65 | If (loaded and not FileExist(path "\IEComObjectCall.txt")) { 66 | FileAppend, true, %path%\IEComObjectCall.txt 67 | Fallback := False 68 | CleanIE() 69 | } 70 | If (not Fallback or (Fallback and not visible)) { 71 | CleanIE() 72 | } 73 | 74 | Return True 75 | } -------------------------------------------------------------------------------- /lib/JSON.ahk: -------------------------------------------------------------------------------- 1 | /** 2 | * Lib: JSON.ahk 3 | * JSON lib for AutoHotkey. 4 | * Version: 5 | * v2.0.00.00 [updated 11/07/2015 (MM/DD/YYYY)] 6 | * License: 7 | * WTFPL [http://wtfpl.net/] 8 | * Requirements: 9 | * Latest version of AutoHotkey (v1.1+ or v2.0-a+) 10 | * Installation: 11 | * Use #Include JSON.ahk or copy into a function library folder and then 12 | * use #Include 13 | * Links: 14 | * GitHub: - https://github.com/cocobelgica/AutoHotkey-JSON 15 | * Forum Topic - http://goo.gl/r0zI8t 16 | * Email: - cocobelgica gmail com 17 | */ 18 | 19 | 20 | /** 21 | * Class: JSON 22 | * The JSON object contains methods for parsing JSON and converting values 23 | * to JSON. Callable - NO; Instantiable - YES; Subclassable - YES; 24 | * Nestable(via #Include) - NO. 25 | * Methods: 26 | * Load() - see relevant documentation before method definition header 27 | * Dump() - see relevant documentation before method definition header 28 | */ 29 | class JSON 30 | { 31 | /** 32 | * Method: Load 33 | * Parses a JSON string into an AHK value 34 | * Syntax: 35 | * value := JSON.Load( text [, reviver ] ) 36 | * Parameter(s): 37 | * value [retval] - parsed value 38 | * text [in, opt] - JSON formatted string 39 | * reviver [in, opt] - function object, similar to JavaScript's 40 | * JSON.parse() 'reviver' parameter 41 | */ 42 | class Load extends JSON.Functor 43 | { 44 | Call(self, text, reviver:="") 45 | { 46 | this.rev := IsObject(reviver) ? reviver : false 47 | this.keys := this.rev ? {} : false 48 | 49 | static q := Chr(34) 50 | , json_value := q . "{[01234567890-tfn" 51 | , json_value_or_array_closing := q . "{[]01234567890-tfn" 52 | , object_key_or_object_closing := q . "}" 53 | 54 | key := "" 55 | is_key := false 56 | root := {} 57 | stack := [root] 58 | next := json_value 59 | pos := 0 60 | 61 | while ((ch := SubStr(text, ++pos, 1)) != "") { 62 | if InStr(" `t`r`n", ch) 63 | continue 64 | if !InStr(next, ch, 1) 65 | this.ParseError(next, text, pos) 66 | 67 | holder := stack[1] 68 | is_array := holder.IsArray 69 | 70 | if InStr(",:", ch) { 71 | next := (is_key := !is_array && ch == ",") ? q : json_value 72 | 73 | } else if InStr("}]", ch) { 74 | ObjRemoveAt(stack, 1) 75 | next := stack[1]==root ? "" : stack[1].IsArray ? ",]" : ",}" 76 | 77 | } else { 78 | if InStr("{[", ch) { 79 | ; Check if Array() is overridden and if its return value has 80 | ; the 'IsArray' property. If so, Array() will be called normally, 81 | ; otherwise, use a custom base object for arrays 82 | static json_array := Func("Array").IsBuiltIn || ![].IsArray ? {IsArray: true} : 0 83 | 84 | ; sacrifice readability for minor(actually negligible) performance gain 85 | (ch == "{") 86 | ? ( is_key := true 87 | , value := {} 88 | , next := object_key_or_object_closing ) 89 | ; ch == "[" 90 | : ( value := json_array ? new json_array : [] 91 | , next := json_value_or_array_closing ) 92 | 93 | ObjInsertAt(stack, 1, value) 94 | 95 | if (this.keys) 96 | this.keys[value] := [] 97 | 98 | } else { 99 | if (ch == q) { 100 | i := pos 101 | while (i := InStr(text, q,, i+1)) { 102 | value := StrReplace(SubStr(text, pos+1, i-pos-1), "\\", "\u005c") 103 | 104 | static ss_end := A_AhkVersion<"2" ? 0 : -1 105 | if (SubStr(value, ss_end) != "\") 106 | break 107 | } 108 | 109 | if (!i) 110 | this.ParseError("'", text, pos) 111 | 112 | value := StrReplace(value, "\/", "/") 113 | , value := StrReplace(value, "\" . q, q) 114 | , value := StrReplace(value, "\b", "`b") 115 | , value := StrReplace(value, "\f", "`f") 116 | , value := StrReplace(value, "\n", "`n") 117 | , value := StrReplace(value, "\r", "`r") 118 | , value := StrReplace(value, "\t", "`t") 119 | 120 | pos := i ; update pos 121 | 122 | i := 0 123 | while (i := InStr(value, "\",, i+1)) { 124 | if !(SubStr(value, i+1, 1) == "u") 125 | this.ParseError("\", text, pos - StrLen(SubStr(value, i+1))) 126 | 127 | uffff := Abs("0x" . SubStr(value, i+2, 4)) 128 | if (A_IsUnicode || uffff < 0x100) 129 | value := SubStr(value, 1, i-1) . Chr(uffff) . SubStr(value, i+6) 130 | } 131 | 132 | if (is_key) { 133 | key := value, next := ":" 134 | continue 135 | } 136 | 137 | } else { 138 | value := SubStr(text, pos, i := RegExMatch(text, "[\]\},\s]|$",, pos)-pos) 139 | 140 | static number := "number", null := "" 141 | if value is %number% 142 | value += 0 143 | else if (value == "true" || value == "false" || value == "null") 144 | value := %value% + 0 145 | else 146 | ; we can do more here to pinpoint the actual culprit 147 | ; but that's just too much extra work. 148 | this.ParseError(next, text, pos, i) 149 | 150 | pos += i-1 151 | } 152 | 153 | next := holder==root ? "" : is_array ? ",]" : ",}" 154 | } ; If InStr("{[", ch) { ... } else 155 | 156 | is_array? key := ObjPush(holder, value) : holder[key] := value 157 | 158 | if (this.keys && this.keys.HasKey(holder)) 159 | this.keys[holder].Push(key) 160 | } 161 | 162 | } ; while ( ... ) 163 | 164 | return this.rev ? this.Walk(root, "") : root[""] 165 | } 166 | 167 | ParseError(expect, text, pos, len:=1) 168 | { 169 | static q := Chr(34) 170 | 171 | line := StrSplit(SubStr(text, 1, pos), "`n", "`r").Length() 172 | col := pos - InStr(text, "`n",, -(StrLen(text)-pos+1)) 173 | msg := Format("{1}`n`nLine:`t{2}`nCol:`t{3}`nChar:`t{4}" 174 | , (expect == "") ? "Extra data" 175 | : (expect == "'") ? "Unterminated string starting at" 176 | : (expect == "\") ? "Invalid \escape" 177 | : (expect == ":") ? "Expecting ':' delimiter" 178 | : (expect == q) ? "Expecting object key enclosed in double quotes" 179 | : (expect == q . "}") ? "Expecting object key enclosed in double quotes or object closing '}'" 180 | : (expect == ",}") ? "Expecting ',' delimiter or object closing '}'" 181 | : (expect == ",]") ? "Expecting ',' delimiter or array closing ']'" 182 | : InStr(expect, "]") ? "Expecting JSON value or array closing ']'" 183 | : "Expecting JSON value(string, number, true, false, null, object or array)" 184 | , line, col, pos) 185 | 186 | static offset := A_AhkVersion<"2" ? -3 : -4 187 | throw Exception(msg, offset, SubStr(text, pos, len)) 188 | } 189 | 190 | Walk(holder, key) 191 | { 192 | value := holder[key] 193 | if IsObject(value) 194 | for i, k in this.keys[value] 195 | value[k] := this.Walk.Call(this, value, k) ; bypass __Call 196 | 197 | return this.rev.Call(holder, key, value) 198 | } 199 | } 200 | 201 | /** 202 | * Method: Dump 203 | * Converts an AHK value into a JSON string 204 | * Syntax: 205 | * str := JSON.Dump( value [, replacer, space ] ) 206 | * Parameter(s): 207 | * str [retval] - JSON representation of an AHK value 208 | * value [in] - any value(object, string, number) 209 | * replacer [in, opt] - function object, similar to JavaScript's 210 | * JSON.stringify() 'replacer' parameter 211 | * space [in, opt] - similar to JavaScript's JSON.stringify() 212 | * 'space' parameter 213 | */ 214 | class Dump extends JSON.Functor 215 | { 216 | Call(self, value, replacer:="", space:="") 217 | { 218 | this.rep := IsObject(replacer) ? replacer : "" 219 | 220 | this.gap := "" 221 | if (space) { 222 | static integer := "integer" 223 | if space is %integer% 224 | Loop, % ((n := Abs(space))>10 ? 10 : n) 225 | this.gap .= " " 226 | else 227 | this.gap := SubStr(space, 1, 10) 228 | 229 | this.indent := "`n" 230 | } 231 | 232 | return this.Str({"": value}, "") 233 | } 234 | 235 | Str(holder, key) 236 | { 237 | value := holder[key] 238 | 239 | if (this.rep) 240 | value := this.rep.Call(holder, key, value) 241 | 242 | if IsObject(value) { 243 | if (this.gap) { 244 | stepback := this.indent 245 | this.indent .= this.gap 246 | } 247 | 248 | is_array := value.IsArray 249 | ; Array() is not overridden, rollback to old method of 250 | ; identifying array-like objects 251 | if (!is_array) { 252 | for i in value 253 | is_array := i == A_Index 254 | until !is_array 255 | } 256 | 257 | str := "" 258 | if (is_array) { 259 | Loop, % value.Length() { 260 | if (this.gap) 261 | str .= this.indent 262 | 263 | str .= value.HasKey(A_Index) ? this.Str(value, A_Index) . "," : "null," 264 | } 265 | } else { 266 | colon := this.gap ? ": " : ":" 267 | for k in value { 268 | if (this.gap) 269 | str .= this.indent 270 | 271 | str .= this.Quote(k) . colon . this.Str(value, k) . "," 272 | } 273 | } 274 | 275 | if (str != "") { 276 | str := RTrim(str, ",") 277 | if (this.gap) 278 | str .= stepback 279 | } 280 | 281 | if (this.gap) 282 | this.indent := stepback 283 | 284 | return is_array ? "[" . str . "]" : "{" . str . "}" 285 | } 286 | ; is_number ? value : "value" 287 | return ObjGetCapacity([value], 1)=="" ? value : this.Quote(value) 288 | } 289 | 290 | Quote(string) 291 | { 292 | static q := Chr(34) 293 | 294 | if (string != "") { 295 | string := StrReplace(string, "\", "\\") 296 | ; , string := StrReplace(string, "/", "\/") ; optional in ECMAScript 297 | , string := StrReplace(string, q, "\" . q) 298 | , string := StrReplace(string, "`b", "\b") 299 | , string := StrReplace(string, "`f", "\f") 300 | , string := StrReplace(string, "`n", "\n") 301 | , string := StrReplace(string, "`r", "\r") 302 | , string := StrReplace(string, "`t", "\t") 303 | 304 | static rx_escapable := A_AhkVersion<"2" ? "O)[^\x20-\x7e]" : "[^\x20-\x7e]" 305 | while RegExMatch(string, rx_escapable, m) 306 | string := StrReplace(string, m.Value, Format("\u{1:04x}", Ord(m.Value))) 307 | } 308 | 309 | return q . string . q 310 | } 311 | } 312 | 313 | class Functor 314 | { 315 | __Call(method, args*) 316 | { 317 | ; When casting to Call(), use a new instance of the "function object" 318 | ; so as to avoid directly storing the properties(used across sub-methods) 319 | ; into the "function object" itself. 320 | if IsObject(method) 321 | return (new this).Call(method, args*) 322 | else if (method == "") 323 | return (new this).Call(args*) 324 | } 325 | } 326 | } -------------------------------------------------------------------------------- /lib/PoEScripts_AdvancedToolTip.ahk: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /lib/PoEScripts_CheckCorrectClientLanguage.ahk: -------------------------------------------------------------------------------- 1 | PoEScripts_CheckCorrectClientLanguage() { 2 | iniPath := A_MyDocuments . "\My Games\Path of Exile\" 3 | configs := [] 4 | productionIni := iniPath . "production_Config.ini" 5 | betaIni := iniPath . "beta_Config.ini" 6 | 7 | configs.push(productionIni) 8 | configs.push(betaIni) 9 | If (not FileExist(productionIni) and not FileExist(betaIni)) { 10 | Loop %iniPath%\*.ini 11 | { 12 | configs.push(iniPath . A_LoopFileName) 13 | } 14 | } 15 | 16 | wrongLanguage := false 17 | readFile := "" 18 | For key, val in configs { 19 | IniRead, language, %val%, LANGUAGE, language 20 | If (language != "ERROR") { 21 | If (language != "en") { 22 | wrongLanguage := true 23 | } 24 | RegExMatch(val, "i)([^\\]+)\.[^\\]+$", readFile) 25 | Break 26 | } 27 | } 28 | 29 | If (wrongLanguage) { 30 | msg := "It seems that you aren't using 'English' as your game clients language, according to the file '" readFile "'." "`n`n" 31 | msg .= "As long as GGG doesn't add a way to get the items data in english when using different game clients, this script won't work with those languages." "`n`n" 32 | msg .= "Please change your language or click 'ignore' if you want to start the script anyway." 33 | 34 | MsgBox, 0x1012, Wrong PoE Game Client Language, % msg 35 | 36 | IfMsgBox, Ignore 37 | { 38 | Return 1 39 | } 40 | IfMsgBox, Retry 41 | { 42 | PoEScripts_CheckCorrectClientLanguage() 43 | } 44 | IfMsgBox, Cancel 45 | { 46 | Return 0 47 | } 48 | IfMsgBox, Abort 49 | { 50 | Return 0 51 | } 52 | } 53 | Return 1 54 | } -------------------------------------------------------------------------------- /lib/PoEScripts_CheckFolderWriteAccess.ahk: -------------------------------------------------------------------------------- 1 | PoEScripts_CheckFolderWriteAccess(Folder, critical = true) { 2 | access := FolderWriteAccess(Folder) 3 | 4 | msg := "The script is not able to write any file to " Folder ".`nYour user may not have the necessary permissions. " 5 | msg .= "While it may be possible to manually copy and create files in this folder it doesn't work programmatically.`n`n" 6 | msg .= "The reason for this could be your AntiVir software blocking Autohotkey from modifying files in this directory!" 7 | 8 | If (not access) { 9 | If (critical) { 10 | msg .= "`n`nClosing Script..." 11 | Msgbox, 0x1010, Critical permission error, % msg 12 | ExitApp 13 | } Else { 14 | Msgbox, 4096, Permission error, % msg 15 | } 16 | } 17 | Return access 18 | } 19 | 20 | FolderWriteAccess(Folder) { 21 | If InStr( FileExist(Folder), "D" ) { 22 | FileAppend,,%Folder%\fa.tmp 23 | rval := ! ErrorLevel 24 | FileDelete, %Folder%\fa.tmp 25 | Return rval 26 | } Return - 1 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /lib/PoEScripts_ColorPicker.ahk: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /lib/PoEScripts_CompareUserFolderWithScriptFolder.ahk: -------------------------------------------------------------------------------- 1 | PoEScripts_CompareUserFolderWithScriptFolder(userPath, scriptPath, project, exit = true) { 2 | If (userPath = scriptPath) { 3 | action := exit ? "move/install" : "install" 4 | msg := "The " project " macro can't be run from the " project " user settings folder. Please " action " the macro to a different location." 5 | msg .= "`n`nInvalid location: `n " userPath 6 | msg .= exit ? "`n`nScript will be closed." : "" 7 | 8 | SplashTextOff 9 | If (exit) { 10 | MsgBox, 16, Invalid %project% Script Location, % msg 11 | ExitApp 12 | } Else { 13 | Return msg 14 | } 15 | } 16 | Return 17 | } 18 | -------------------------------------------------------------------------------- /lib/PoEScripts_CreateTempFolder.ahk: -------------------------------------------------------------------------------- 1 | PoEScripts_CreateTempFolder(ScriptDir, project) { 2 | ; make sure the script directory is not set to read only 3 | FileSetAttrib, -R, %ScriptDir%, 1 4 | ; make sure no other file in the script directory is set to read only 5 | FileSetAttrib, -R, %ScriptDir%\*.*, 1 6 | ; recreate temp folder 7 | FileRemoveDir, %ScriptDir%\temp, 1 8 | FileCreateDir, %ScriptDir%\temp 9 | 10 | StringTrimLeft, pathNoDrive, ScriptDir, 3 11 | userFolder := "Users\" A_UserName "\" 12 | isInUserFolder := InStr(pathNoDrive, userFolder) 13 | 14 | While !FileExist(ScriptDir "\temp") { 15 | Sleep, 100 16 | FileCreateDir, %ScriptDir%\temp 17 | CreateError := ErrorLevel 18 | ; make sure the temp folder is not read only 19 | FileSetAttrib, -R, %ScriptDir%\temp, 1 20 | 21 | If (CreateError or !FileExist(ScriptDir "\temp")) { 22 | msg := "Directory " ScriptDir "\temp could not be created.`n`n" 23 | msg .= isInUserFolder ? "It seems you're running the script from inside your windows user folder. Windows asking you for admin privileges or simply not having them can interfere with the script in this case.`n`n" : "" 24 | msg .= "You can try again a few times, confirm admin privileges if asked or try running this file as administrator (right-click to open context menu).`n`n" 25 | msg .= "You can also move the script location to somewhere else on your pc, for example " A_ProgramFiles ". This should solve all issues and is considered the best solution." 26 | msg .= "`n`nPlease also check if" ScriptDir "or " ScriptDir "\temp are set to read-only. This shouldn't be the case and will cause the script to fail." 27 | 28 | MsgBox, 5, %project%, % msg 29 | IfMsgBox, Cancel 30 | { 31 | SplashTextOn, , 20, %project%, Exiting script... 32 | Sleep, 2000 33 | SplashTextOff 34 | Return False 35 | } 36 | } 37 | Else { 38 | Return True 39 | } 40 | } 41 | 42 | ; make sure the temp folder is not read only 43 | FileSetAttrib, -R, %ScriptDir%\temp, 1 44 | Return True 45 | } -------------------------------------------------------------------------------- /lib/PoEScripts_Download.ahk: -------------------------------------------------------------------------------- 1 | PoEScripts_Download(url, ioData, ByRef ioHdr, options, useFallback = true, critical = false, binaryDL = false, errorMsg = "", ByRef reqHeadersCurl = "", handleAccessForbidden = true, ByRef returnCurl = false) { 2 | /* 3 | url = download url 4 | ioData = uri encoded postData 5 | ioHdr = array of request headers 6 | options = multiple options separated by newline (currently only "SaveAs:", "Redirect:true/false") 7 | 8 | useFallback = Use UrlDownloadToFile if curl fails, not possible for POST requests or when cookies are required 9 | critical = exit macro if download fails 10 | binaryDL = file download (zip for example) 11 | errorMsg = optional error message, will be added to default message 12 | reqHeadersCurl = returns the returned headers from the curl request 13 | handleAccessForbidden = "true" throws an error message if "403 Forbidden" is returned, "false" prevents it, returning "403 Forbidden" to enable custom error handling 14 | */ 15 | 16 | ; https://curl.haxx.se/download.html -> https://bintray.com/vszakats/generic/curl/ 17 | /* 18 | parse options, create the cURL request and execute it 19 | */ 20 | reqLoops++ 21 | curl := """" A_ScriptDir "\lib\curl.exe"" " 22 | headers := "" 23 | cookies := "" 24 | For key, val in ioHdr { 25 | val := Trim(RegExReplace(val, "i)(.*?)\s*:\s*(.*)", "$1:$2")) 26 | If (RegExMatch(val, "i)^Cookie:(.*)", cookie)) { 27 | cookies .= cookie1 " " 28 | } 29 | } 30 | cookies := StrLen(cookies) ? "-b """ Trim(cookies) """ " : "" 31 | 32 | redirect := "L" 33 | PreventErrorMsg := false 34 | validateResponse := 1 35 | If (StrLen(options)) { 36 | Loop, Parse, options, `n 37 | { 38 | If (RegExMatch(A_LoopField, "i)SaveAs:[ \t]*\K[^\r\n]+", SavePath)) { 39 | commandData .= " " A_LoopField " " 40 | commandHdr .= "" 41 | } 42 | If (RegExMatch(A_LoopField, "i)Redirect:\sFalse")) { 43 | redirect := "" 44 | } 45 | If (RegExMatch(A_LoopField, "i)parseJSON:\sTrue")) { 46 | ignoreRetCodeForJSON := true 47 | } 48 | If (RegExMatch(A_LoopField, "i)PreventErrorMsg")) { 49 | PreventErrorMsg := true 50 | } 51 | If (RegExMatch(A_LoopField, "i)RequestType:(.*)", match)) { 52 | requestType := Trim(match1) 53 | } 54 | If (RegExMatch(A_LoopField, "i)ReturnHeaders:(.*skip.*)")) { 55 | skipRetHeaders := true 56 | } 57 | If (RegExMatch(A_LoopField, "i)ReturnHeaders:(.*append.*)")) { 58 | appendRetHeaders := true 59 | } 60 | If (RegExMatch(A_LoopField, "i)TimeOut:(.*)", match)) { 61 | timeout := Trim(match1) 62 | } 63 | If (RegExMatch(A_LoopField, "i)ValidateResponse:(.*)", match)) { 64 | If (Trim(match1) = "false") { 65 | validateResponse := 0 66 | } 67 | } 68 | } 69 | } 70 | If (not timeout) { 71 | timeout := 20 72 | } 73 | 74 | e := {} 75 | Try { 76 | commandData := "" ; console curl command to return data/content 77 | commandHdr := "" ; console curl command to return headers 78 | If (binaryDL) { 79 | commandData .= " -" redirect "Jkv " ; save as file 80 | If (SavePath) { 81 | commandData .= "-o """ SavePath """ " ; set target destination and name 82 | } 83 | } Else { 84 | commandData .= " -" redirect "ks --compressed " 85 | If (requestType = "GET") { 86 | ;commandHdr .= " -s" redirect " -D - -o /dev/null " ; unix 87 | commandHdr .= " -s" redirect " -D - -o nul " ; windows 88 | } Else { 89 | commandHdr .= " -I" redirect "ks " 90 | } 91 | 92 | If (appendRetHeaders) { 93 | commandData .= " -w '%{http_code}' " 94 | } 95 | } 96 | 97 | If (StrLen(headers)) { 98 | If (not requestType = "GET") { 99 | commandData .= headers 100 | commandHdr .= headers 101 | } 102 | If (StrLen(cookies)) { 103 | commandData .= cookies 104 | commandHdr .= cookies 105 | } 106 | } 107 | If (StrLen(ioData) and not requestType = "GET") { 108 | If (requestType = "POST") { 109 | commandData .= "-X POST " 110 | } 111 | commandData .= "--data """ ioData """ " 112 | } Else If (StrLen(ioData)) { 113 | url := url "?" ioData 114 | } 115 | 116 | If (binaryDL) { 117 | commandData .= "--connect-timeout " timeout " " 118 | commandData .= "--connect-timeout " timeout " " 119 | } Else { 120 | commandData .= "--max-time " timeout " " 121 | commandHdr .= "--max-time " timeout " " 122 | } 123 | ; get data 124 | html := StdOutStream(curl """" url """" commandData) 125 | ;html := ReadConsoleOutputFromFile(curl """" url """" commandData, "commandData") ; alternative function 126 | 127 | If (returnCurl) { 128 | returnCurl := "curl " """" url """" commandData 129 | } 130 | 131 | ; get return headers in seperate request 132 | If (not binaryDL and not skipRetHeaders) { 133 | If (StrLen(ioData) and not requestType = "GET") { 134 | commandHdr := curl """" url "?" ioData """" commandHdr ; add payload to url since you can't use the -I argument with POST requests 135 | } Else { 136 | commandHdr := curl """" url """" commandHdr 137 | } 138 | ioHdr := StdOutStream(commandHdr) 139 | ;ioHrd := ReadConsoleOutputFromFile(commandHdr, "commandHdr") ; alternative function 140 | } Else If (skipRetHeaders) { 141 | commandHdr := curl """" url """" commandHdr 142 | ioHdr := html 143 | } Else { 144 | ioHdr := html 145 | } 146 | 147 | reqHeadersCurl := commandHdr 148 | } Catch e { 149 | 150 | } 151 | 152 | /* 153 | handle any issues 154 | */ 155 | ; check if response has a good status code or is valid JSON (shouldn't be an erroneous response in that case) 156 | goodStatusCode := RegExMatch(ioHdr, "i)HTTP\/1.1 (200 OK|302 Found)") 157 | Try { 158 | isJSON := isObject(JSON.Load(ioHdr)) 159 | } Catch er { 160 | 161 | } 162 | 163 | ;goodStatusCode := RegExMatch(ioHdr, "i)HTTP\/1.1 (200 OK|302 Found)") 164 | If (RegExMatch(ioHdr, "i)HTTP\/1.1 403 Forbidden") and not handleAccessForbidden) { 165 | PreventErrorMsg := true 166 | handleAccessForbidden := "403 Forbidden" 167 | } 168 | If (!binaryDL) { 169 | ; Use fallback download if curl fails 170 | If ((not goodStatusCode or e.what) and useFallback) { 171 | DownloadFallback(url, html, e, critical, ioHdr, PreventErrorMsg) 172 | } Else If (not goodStatusCode and e.what) { 173 | ThrowError(e, false, ioHdr, PreventErrorMsg) 174 | } 175 | } 176 | ; handle binary file downloads 177 | Else If (not e.what) { 178 | ; check returned request headers 179 | ioHdr := ParseReturnedHeaders(ioHdr) 180 | 181 | goodStatusCode := RegExMatch(ioHdr, "i)HTTP\/1.1 (200 OK|302 Found)") 182 | If (not goodStatusCode) { 183 | MsgBox, 16,, % "Error downloading file to " SavePath 184 | Return "Error: Wrong Status" 185 | } 186 | 187 | ; compare file sizes 188 | FileGetSize, sizeOnDisk, %SavePath% 189 | RegExMatch(ioHdr, "i)Content-Length:\s(\d+)(k|m)?", size) 190 | size := Trim(size1) 191 | If (Strlen(size2)) { 192 | size := size2 = "k" ? size * 1024 : size * 1024 * 1024 193 | sizeVariation := Round(size * 99.8 / 100) - size 194 | } 195 | 196 | ; give the comparison some leeway in case of the extracted filesize from the response headers being 197 | ; imprecise (shown in kilobyte/megabyte) 198 | If (sizeVariation) { 199 | If (not (sizeOnDisk > (size - sizeVariation) and sizeOnDisk < (size + sizeVariation))) { 200 | html := "Error: Different Size" 201 | } 202 | } Else { 203 | If (size != sizeOnDisk) { 204 | html := "Error: Different Size" 205 | } 206 | } 207 | } Else { 208 | ThrowError(e, false, ioHdr, PreventErrorMsg) 209 | } 210 | 211 | Return html 212 | } 213 | 214 | ParseReturnedHeaders(output) { 215 | headerGroups := [] 216 | headerGroup := "" 217 | 218 | Pos := 0 219 | While Pos := RegExMatch(output, "is)\[5 bytes data.*?({|$)", match, Pos + (StrLen(match) ? StrLen(match) : 1)) { 220 | headerGroups.push(match) 221 | LastPos := Pos 222 | LastMatch := match 223 | } 224 | 225 | If (not headerGroups.Length()) { 226 | RegExMatch(output, "is).*(HTTP\/1.1.*)", dlStats) 227 | dlStats := dlStats1 228 | headerGroups.push(dlStats) 229 | } Else { 230 | LastPos := LastPos + StrLen(LastMatch) 231 | RegExMatch(output, "is).*", dlStats, LastPos ? LastPos : 0) 232 | } 233 | 234 | i := headerGroups.Length() 235 | Loop, % i { 236 | If (RegExMatch(headerGroups[i], "is)Content-Length")) { 237 | headerGroup := headerGroups[i] 238 | break 239 | } 240 | i-- 241 | } 242 | 243 | out := "" 244 | If (StrLen(headerGroup)) { 245 | headerGroup := RegExReplace(headerGroup, "im)^<|\[5 bytes data\]|^{") 246 | Loop, parse, headerGroup, `n, `r 247 | { 248 | If (StrLen(Trim(A_LoopField))) { 249 | out .= Trim(A_LoopField) 250 | } 251 | } 252 | } Else { 253 | ; workaround for missing content-length 254 | fLength := "" 255 | Loop, parse, dlStats, `n`r 256 | { 257 | If (StrLen(Trim(A_LoopField))) { 258 | If (RegExMatch(Trim(A_LoopField), "^\d*\s*(\d+k?m?).*(\d|\dk|\dm)$", length)) { 259 | fLength := length1 260 | } 261 | } 262 | If (RegExMatch(Trim(A_LoopField), ".*Connection.*left intact.*", length)) { 263 | 264 | } 265 | } 266 | 267 | RegExMatch(output, "i)HTTP\/1.1 (200 OK|302 Found)", code) 268 | out := code "`n" 269 | out .= "Content-Length: " fLength 270 | } 271 | 272 | Return out 273 | } 274 | 275 | ; only works if no post data required/not downloading for example .zip files 276 | DownloadFallback(url, ByRef html, e, critical, errorMsg, PreventErrorMsg = false) { 277 | ErrorLevel := 0 278 | fileName := RandomStr() . ".txt" 279 | 280 | UrlDownloadToFile, %url%, %A_ScriptDir%\temp\%fileName% 281 | If (!ErrorLevel) { 282 | FileRead, html, %A_ScriptDir%\temp\%fileName% 283 | FileDelete, %A_ScriptDir%\temp\%fileName% 284 | } Else If (!PreventErrorMsg) { 285 | SplashTextOff 286 | msg := "Error while downloading <" url "> using UrlDownloadToFile (DownloadFallback)." 287 | errorMsg := StrLen(errorMsg) ? msg "`n`n" errorMsg : msg 288 | ThrowError(e, critical, errorMsg) 289 | } 290 | } 291 | 292 | ThrowError(e, critical = false, errorMsg = "", PreventErrorMsg = false) { 293 | If (PreventErrorMsg) { 294 | Return 295 | } 296 | 297 | msg := "Exception thrown (download)!" 298 | If (e.what) { 299 | msg .= "`n`nwhat: " e.what "`nfile: " e.file "`nline: " e.line "`nmessage: " e.message "`nextra: " e.extra 300 | } 301 | msg := StrLen(errorMsg) ? msg "`n`n" errorMsg : msg 302 | 303 | If (RegExMatch(errorMsg, "i)HTTP\/1.1 403 Forbidden")) { 304 | cookiesRequired := "Access forbidden, a likely reason for this is that necessary cookies are missing.`nYou may have to use" 305 | } 306 | msg := StrLen(cookiesRequired) ? msg "`n`n" cookiesRequired : msg 307 | 308 | If (critical) { 309 | MsgBox, 16,, % msg 310 | } Else { 311 | MsgBox, % msg 312 | } 313 | } 314 | 315 | RandomStr(l = 24, i = 48, x = 122) { ; length, lowest and highest Asc value 316 | Loop, %l% { 317 | Random, r, i, x 318 | s .= Chr(r) 319 | } 320 | s := RegExReplace(s, "\W", "i") ; only alphanum. 321 | 322 | Return, s 323 | } -------------------------------------------------------------------------------- /lib/PoEScripts_DownloadLanguageFiles.ahk: -------------------------------------------------------------------------------- 1 | PoEScripts_DownloadLanguageFiles(ByRef currentLocale, dlAll = false, SplashTitle = "", SplashText = "", onlyParseFiles = false) { 2 | ; onlyParseFiles = skip downloading anything for development purposes (if the data files exist). 3 | currentLocale := PoEScripts_GetClientLanguage() 4 | If (currentLocale = "en" or not currentLocale) { 5 | Return 6 | } 7 | 8 | SplashTextOn, 300, 20, %SplashTitle%, %SplashText% 9 | 10 | lang := PoEScripts_ParseAvailableLanguages(onlyParseFiles) 11 | translationData := {} 12 | 13 | If (dlAll) { 14 | For key, l in lang { 15 | translationData := PoEScripts_DownloadFileSet(key, l, onlyParseFiles) 16 | } 17 | } Else If (not currentLocale = "en" and currentLocale) { 18 | translationData.currentLocale := currentLocale 19 | translationData.localized := PoEScripts_DownloadFileSet(currentLocale, lang[currentLocale], onlyParseFiles) 20 | translationData.default := PoEScripts_DownloadFileSet("en", lang["en"], onlyParseFiles) 21 | } 22 | 23 | If (onlyParseFiles) { 24 | dumpObj := JSON.Dump(translationData) 25 | FileDelete, %A_ScriptDir%\data\lang\lang.json 26 | FileAppend, %dumpObj%, %A_ScriptDir%\data\lang\lang.json 27 | } 28 | 29 | SplashTextOff 30 | Return translationData 31 | } 32 | 33 | PoEScripts_GetClientLanguage() { 34 | iniPath := A_MyDocuments . "\My Games\Path of Exile\" 35 | configs := [] 36 | productionIni := iniPath . "production_Config.ini" 37 | betaIni := iniPath . "beta_Config.ini" 38 | 39 | configs.push(productionIni) 40 | configs.push(betaIni) 41 | If (not FileExist(productionIni) and not FileExist(betaIni)) { 42 | Loop %iniPath%\*.ini 43 | { 44 | configs.push(iniPath . A_LoopFileName) 45 | } 46 | } 47 | 48 | readFile := "" 49 | For key, val in configs { 50 | IniRead, language, %val%, LANGUAGE, language 51 | If (language != "ERROR") { 52 | Return language 53 | } 54 | } 55 | Return false 56 | } 57 | 58 | PoEScripts_DownloadFileSet(short, long, skipDL = false) { 59 | returnObj := {} 60 | prefix := short = "en" ? "www" : short 61 | 62 | files := [] 63 | For key, val in ["stats", "static", "items"] { 64 | files.push(["https://" prefix ".pathofexile.com/api/trade/data/" val, short "_" val ".json", val]) 65 | } 66 | If (short != "en") { 67 | files.push(["http://web.poecdn.com/js/translate." long ".js", short "_basic.json", "basic"]) 68 | } 69 | 70 | ; download (overwrite) data files 71 | ; if downloaded files have a size rename them, overwriting the ones already existing 72 | dir = %A_ScriptDir%\data\lang 73 | If (not FileExist(dir)) { 74 | FileCreateDir, %dir% 75 | } 76 | 77 | Loop % files.MaxIndex() { 78 | url := files[A_Index][1] 79 | file:= files[A_Index][2] 80 | filePath = %dir%\%file% 81 | isJavaScriptFile := RegExMatch(url, ".*\.js$") 82 | 83 | skipDL := FileExist(filePath) and skipDL ? true : false 84 | If (not skipDL) { 85 | console.log("dl") 86 | reqHeaders := [] 87 | reqHeaders.push("Connection: keep-alive") 88 | reqHeaders.push("Cache-Control: max-age=0") 89 | reqHeaders.push("Upgrade-Insecure-Requests: 1") 90 | reqHeaders.push("Accept: */*") 91 | reqHeaders.push("Accept-Language: de,en-US;q=0.7,en;q=0.3") 92 | 93 | ioHdr := reqHeaders 94 | If (InStr(url, "web.poecdn.com")) { 95 | ioHdr.push("Host: web.poecdn.com") 96 | } Else { 97 | ioHdr.push("Host: " prefix ".pathofexile.com") 98 | } 99 | output := PoEScripts_Download(url, postData := "", ioHdr := reqHeaders, "SaveAs: " filePath "_temp", true, false, true) 100 | } 101 | 102 | ; TODO: refactor this unnessecary complicated code 103 | If (skipDL) { 104 | FileGetSize, sizeOnDisk, %filePath% 105 | If (isJavaScriptFile) { 106 | FileRead, jsFile, %filepath% 107 | } 108 | } Else { 109 | FileGetSize, sizeOnDisk, %filePath%_temp 110 | If (isJavaScriptFile) { 111 | FileRead, jsFile, %filepath%_temp 112 | } 113 | FileDelete, %filePath% 114 | } 115 | 116 | If (sizeOnDisk) { 117 | If (isJavaScriptFile and not skipDL) { 118 | jsToObj := {} 119 | JSON := PoEScripts_ConvertJSVariableFileToJSON(jsFile, jsToObj) 120 | FileAppend, %JSON%, %filePath%, utf-8 121 | } Else If (not skipDL) { 122 | FileMove, %filePath%_temp, %filePath% 123 | } 124 | } 125 | FileDelete, %filePath%_temp 126 | 127 | parsedJSON := {} 128 | If (sizeOnDisk) { 129 | FileRead, JSONFile, %filePath% 130 | Try { 131 | If (isJavaScriptFile and not skipDL) { 132 | returnObj[files[A_Index][3]] := jsToObj 133 | } Else { 134 | parsedJSON := JSON.Load(JSONFile) 135 | returnObj[files[A_Index][3]] := parsedJSON.result 136 | } 137 | } Catch e { 138 | ; TODO: improve error handling 139 | MsgBox, % "Failed to parse language file: " filePath 140 | } 141 | } 142 | } 143 | 144 | Return returnObj 145 | } 146 | 147 | PoEScripts_ConvertJSVariableFileToJSON(file, ByRef obj) { 148 | ; it seems that the file contains multiple duplicate entries 149 | ; they either need to be filtered out or the json file needs a different structure 150 | 151 | ; make sure to have one key-value pair per line 152 | objSrc := RegExReplace(file, ";", ";`r`n") 153 | obj := {} 154 | obj.result := [] 155 | 156 | Loop, parse, objSrc, `n, `r 157 | { 158 | If (StrLen(A_LoopField)) { 159 | RegExMatch(Trim(A_LoopField), ".*?\['(.*?)'\]\s+=\s+'(.*?)'.*", keyValuePair) 160 | 161 | Loop, 2 { 162 | keyValuePair%A_Index% := RegExReplace(keyValuePair%A_Index%, """", """") 163 | } 164 | 165 | If (not obj[keyValuePair1] and StrLen(keyValuePair2)) { 166 | _t := {} 167 | _t.default := keyValuePair1 168 | _t.localized := keyValuePair2 169 | obj.result.push(_t) 170 | } 171 | } 172 | } 173 | json := JSON.Dump(obj) 174 | 175 | ; old code to convert the file to valid json 176 | /* 177 | If (false) { 178 | json := file 179 | ; escape some characters 180 | json := RegExReplace(Trim(json), "\\'", "\\'") 181 | json := RegExReplace(Trim(json), """", "\""") 182 | 183 | ; duplicates would need to be removed 184 | If (false) { 185 | ; convert JS object properties to JSON properties 186 | json := RegExReplace(Trim(json), ".*?\['(.*?)'\]\s+=\s+'(.*?)'.*", """$1"":""$2""") 187 | ; add an object definition and wrap properties within curly braces 188 | json := RegExReplace(Trim(json), "s)(.*var.*?;.*?)("".*"")", "{""result"":[{$2}]}") 189 | ; replace linebreaks with , 190 | json := RegExReplace(Trim(json), "s)\r\n", ",") 191 | json := RegExReplace(Trim(json), "s),{2,}", ",") 192 | ; remove trailing garbage 193 | json := RegExReplace(Trim(json), "s)(.*})(.*)", "$1") 194 | } 195 | 196 | ; different structure, numerical index instead of associative keys 197 | If (true) { 198 | ; convert JS object properties to JSON properties 199 | json := RegExReplace(Trim(json), ".*?\['(.*?)'\]\s+=\s+'(.*?)'.*", "{""$1"":""$2""}") 200 | ; add an object definition and wrap properties within curly braces 201 | json := RegExReplace(Trim(json), "s)(.*var.*?;.*?)({.*})", "{""result"":[$2]}") 202 | ; replace linebreaks with , 203 | json := RegExReplace(Trim(json), "s)\r\n", ",") 204 | json := RegExReplace(Trim(json), "s),{2,}", ",") 205 | ; remove trailing garbage 206 | json := RegExReplace(Trim(json), "s)(.*})(.*)", "$1") 207 | } 208 | 209 | ;json := JSON.Dump(obj) 210 | ;console.log(json) 211 | } 212 | */ 213 | 214 | ; Returning this json text and saving it as a file works and produces valid JSON, but 215 | ; for some reason JSON.load() can't parse it though after that without a scriptreload. 216 | Return json 217 | } 218 | 219 | PoEScripts_ParseAvailableLanguages(returnDefaults = false) { 220 | languages := {} 221 | 222 | If (not returnDefaults) { 223 | url := "https://www.pathofexile.com/trade" 224 | options := "" 225 | 226 | reqHeaders := [] 227 | reqHeaders.push("Host: www.pathofexile.com") 228 | reqHeaders.push("Connection: keep-alive") 229 | reqHeaders.push("Cache-Control: max-age=0") 230 | reqHeaders.push("Upgrade-Insecure-Requests: 1") 231 | reqHeaders.push("Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8") 232 | 233 | html := PoEScripts_Download(url, postData, reqHeaders, options, false) 234 | 235 | If (StrLen(html)) { 236 | Pos := 0 237 | While Pos := RegExMatch(html, "i)hreflang=""(\w*)-?(\w*)""", lang, Pos + (StrLen(lang) ? StrLen(lang) : 1)) { 238 | If (lang2) { 239 | StringLower, lang, lang2 240 | } Else { 241 | StringLower, lang, lang1 242 | } 243 | languages[lang] := lang2 ? lang1 "_" lang2 : lang 244 | } 245 | } 246 | } 247 | If (not languages.en) { 248 | languages["br"] := "pt_BR" 249 | languages["de"] := "de_DE" 250 | languages["en"] := "en" 251 | languages["es"] := "es_ES" 252 | languages["fr"] := "fr_FR" 253 | languages["ru"] := "ru_RU" 254 | languages["th"] := "th_TH" 255 | } 256 | 257 | Return languages 258 | } -------------------------------------------------------------------------------- /lib/PoEScripts_FinishUpdate.ahk: -------------------------------------------------------------------------------- 1 | ; ##################################################################################################################### 2 | ; # Finishes the script update 3 | ; # 4 | ; # This has to be done from an external script so that the script directory can be overwritten 5 | ; # without killing the update midway. 6 | ; ##################################################################################################################### 7 | 8 | #SingleInstance force 9 | #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. 10 | #Persistent ; Stay open in background 11 | SetWorkingDir, %A_ScriptDir% 12 | 13 | parentScriptDir = %1% 14 | updateScriptPath = %2% 15 | installPath = %3% 16 | projectName = %4% 17 | scriptName = %5% 18 | debug = %6% 19 | 20 | Try { 21 | RunAsAdmin() 22 | DetectHiddenWindows On 23 | SetTitleMatchMode RegEx 24 | IfWinExist, i)%scriptName%.* ahk_class AutoHotkey 25 | { 26 | WinClose 27 | WinWaitClose, i)%scriptName%.* ahk_class AutoHotkey, , 2 28 | } 29 | 30 | RegExMatch(updateScriptPath, "(.*)\\.*", updateParentDir) 31 | RegExMatch(installPath, "(.*)\\.*", installParentDir) 32 | installFolder := RegExReplace(installPath, "(.*\\)") 33 | renamedUpdatePath := updateParentDir1 "\" installFolder 34 | installParentDir := installParentDir1 35 | 36 | If (debug) { 37 | RunWait, "copyUpdate.bat" "%updateScriptPath%" "%installPath%" "%installFolder%" "%installPath%_tempInstall" "%installFolder%_tempInstall" "1" && pause, , 38 | } Else { 39 | RunWait, "copyUpdate.bat" "%updateScriptPath%" "%installPath%" "%installFolder%" "%installPath%_tempInstall" "%installFolder%_tempInstall", , hide 40 | } 41 | 42 | If (FileExist("exitCode.txt")) { 43 | FileRead, exitCode, exitCode.txt 44 | code := "" 45 | Loop, Parse, exitCode, `n, `r 46 | { 47 | If (StrLen(A_LoopField)) { 48 | code := Trim(A_LoopField) 49 | } 50 | } 51 | 52 | scriptStartFile := RegExReplace(projectName, "i).*-", "Run_") . ".ahk" 53 | 54 | If (code = 1) { 55 | ; do nothing 56 | } Else If (code = 17) { 57 | ; renaming tempInstall to install folder via batch failed, try again with AHK 58 | FileMoveDir, %installPath%_tempInstall, %installPath%, R 59 | If (ErrorLevel) { 60 | ; also failed, use tempInstall to run the script 61 | installPath := %installPath% "_tempInstall" 62 | } 63 | } Else { 64 | MsgBox,,, % "Exception thrown while copying new files to " installPath ". Update failed!`n`n" ParseExitCode(code) 65 | ExitApp 66 | } 67 | } Else { 68 | MsgBox,,, % "Exception thrown while copying new files to " installPath ". Update failed!`n`n Update scripted failed to run." 69 | ExitApp 70 | } 71 | } Catch e { 72 | MsgBox,,, % "Exception thrown while copying new files to " installPath ". Update failed!`n`nwhat: " e.what "`nfile: " e.file "`nline: " e.line "`nmessage: " e.message "`nextra: " e.extra 73 | ExitApp 74 | } 75 | 76 | ; remove 'PoE-' from project name since the start files are named 'Run_ItemInfo/Run_TradeMacro' 77 | scriptStartFile := RegExReplace(projectName, "i).*-", "Run_") . ".ahk" 78 | scriptStartFile := installPath . "\" . scriptStartFile 79 | 80 | Run, "%A_AhkPath%" "%scriptStartFile%" 81 | ExitApp 82 | 83 | RunAsAdmin() { 84 | Loop, %0% ; For each parameter: 85 | { 86 | param := %A_Index% ; Fetch the contents of the variable whose name is contained in A_Index. 87 | params .= A_Space . param 88 | } 89 | ShellExecute := A_IsUnicode ? "shell32\ShellExecute":"shell32\ShellExecuteA" 90 | 91 | If not A_IsAdmin 92 | { 93 | If A_IsCompiled 94 | DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_ScriptFullPath, str, params , str, A_WorkingDir, int, 1) 95 | Else 96 | DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_AhkPath, str, """" . A_ScriptFullPath . """" . A_Space . params, str, A_WorkingDir, int, 1) 97 | ExitApp 98 | } 99 | } 100 | 101 | ParseExitCode(code) { 102 | ; https://ss64.com/nt/robocopy-exit.html 103 | msg := "" 104 | if (code = 17) { 105 | msg := "Install directory could not be emptied. Cancelled update." 106 | } 107 | else if (code = 16) { 108 | msg := "***FATAL ERROR***" 109 | } 110 | else if (code = 15) { 111 | msg := "OKCOPY + FAIL + MISMATCHES + XTRA" 112 | } 113 | else if (code = 14) { 114 | msg := "FAIL + MISMATCHES + XTRA" 115 | } 116 | else if (code = 13) { 117 | msg := "OKCOPY + FAIL + MISMATCHES" 118 | } 119 | else if (code = 12) { 120 | msg := "FAIL + MISMATCHES" 121 | } 122 | else if (code = 11) { 123 | msg := "OKCOPY + FAIL + XTRA" 124 | } 125 | else if (code = 10) { 126 | msg := "FAIL + XTRA" 127 | } 128 | else if (code = 9) { 129 | msg := "OKCOPY + FAIL" 130 | } 131 | else if (code = 8) { 132 | msg := "Some files or directories could not be copied.`n(copy errors occurred and the retry limit was exceeded)." 133 | } 134 | else if (code = 7) { 135 | msg := "Files were copied, a file mismatch was present, and additional files were present." 136 | } 137 | else if (code = 6) { 138 | msg := "Additional files and mismatched files exist. No files were copied and no failures were encountered.`nThis means that the files already exist in the destination directory." 139 | } 140 | else if (code = 5) { 141 | msg := "Some files were copied. Some files were mismatched. No failure was encountered." 142 | } 143 | else if (code = 4) { 144 | msg := "Some Mismatched files or directories were detected." 145 | } 146 | else if (code = 3) { 147 | msg := "Some files were copied. Additional files were present. No failure was encountered." 148 | } 149 | else if (code = 2) { 150 | msg := "Some Extra files or directories were detected. No files were copied." 151 | } 152 | else if (code = 1) { 153 | msg := "One or more files were copied successfully (that is, new files have arrived)." 154 | } 155 | else if (code = 0) { 156 | msg := "No errors occurred, and no copying was done.`nThe source and destination directory trees are completely synchronized." 157 | } 158 | 159 | return msg 160 | } -------------------------------------------------------------------------------- /lib/PoEScripts_HandleUserSettings.ahk: -------------------------------------------------------------------------------- 1 | ; ignore include errors to support two different paths 2 | #Include, *i CalcChecksum.ahk 3 | #Include, *i %A_ScriptDir%\..\..\lib\CalcChecksum.ahk 4 | 5 | #Include, *i JSON.ahk 6 | #Include, *i %A_ScriptDir%\..\..\lib\JSON.ahk 7 | 8 | #Include, *i EasyIni.ahk 9 | #Include, *i %A_ScriptDir%\..\..\lib\EasyIni.ahk 10 | 11 | 12 | PoEScripts_HandleUserSettings(ProjectName, BaseDir, External, sourceDir, scriptDir = "") { 13 | Dir := BaseDir . "\" . ProjectName 14 | 15 | ; check for git files to determine if it's a development version, return a path using the branch name 16 | devBranch := PoEScripts_isDevelopmentVersion(scriptDir) 17 | If (StrLen(devBranch)) { 18 | Dir .= devBranch 19 | } 20 | PoEScripts_CreateDirIfNotExist(Dir) 21 | 22 | ; copy/replace/update files after checking if it's neccessary (files do not exist, files were changed in latest update) 23 | PoEScripts_CopyFiles(sourceDir, Dir, fileList) 24 | Return fileList 25 | } 26 | 27 | PoEScripts_CopyFiles(sourceDir, destDir, ByRef fileList) { 28 | overwrittenFiles := [] 29 | PoEScripts_ConvertOldFiles(sourceDir, destDir, overwrittenFiles) 30 | PoEScripts_CopyFolderContentsRecursive(sourceDir, destDir, overwrittenFiles) 31 | 32 | ; provide data for user notification on what files were updated/replaced and backed up if such 33 | If (overwrittenFiles.Length()) { 34 | fileList := "" 35 | Loop, % overwrittenFiles.Length() { 36 | If (!InStr(fileList, overwrittenFiles[A_Index])) { 37 | fileList .= "- " . overwrittenFiles[A_Index] . "`n" 38 | } 39 | } 40 | } 41 | Return 42 | } 43 | 44 | ; TODO: this is temporary function and must be removed after a few releases 45 | PoEScripts_ConvertOldFiles(sourceDir, destDir, ByRef overwrittenFiles) { 46 | If (FileExist(destDir "\MapModWarnings.txt")) { 47 | PoEScripts_BackupUserFileOnDate(destDir, "MapModWarnings.txt") 48 | PoEScripts_ConvertMapModsWarnings(sourceDir, destDir) 49 | FileDelete, %destDir%\MapModWarnings.txt 50 | overwrittenFiles.Push("MapModWarnings.txt") 51 | } 52 | If (!FileExist(destDir "\AdditionalMacros.ini") and FileExist(destDir "\AdditionalMacros.txt")) { 53 | PoEScripts_BackupUserFileOnDate(destDir, "AdditionalMacros.txt") 54 | PoEScripts_ConvertAdditionalMacrosSettings(destDir) 55 | FileDelete, %destDir%\AdditionalMacros.txt 56 | overwrittenFiles.Push("AdditionalMacros.txt") 57 | } 58 | If (FileExist(destDir "\config_trade.ini")) { 59 | PoeScripts_ConvertOldConfig(sourceDir, destDir, "config_trade.ini", overwrittenFiles) 60 | } 61 | If (FileExist(destDir "\config.ini")) { 62 | PoeScripts_ConvertOldConfig(sourceDir, destDir, "config.ini", overwrittenFiles) 63 | } 64 | if (InStr(FileExist(destDir "\data"), "D")) { 65 | PoEScripts_BackupUserFileOnDate(destDir, "data") 66 | FileRemoveDir, %destDir%\data, 1 67 | } 68 | Return 69 | } 70 | 71 | PoEScripts_ConvertOldConfig(sourceDir, destDir, fileFullName, ByRef overwrittenFiles) { 72 | OldConfigObj := PoEScripts_TrimEndingSpacesInKeys(class_EasyIni(destDir "\" fileFullName)) 73 | if (InStr(OldConfigObj.GetTopComments(), "Converted with PoeScripts_ConvertOldConfig")) { 74 | return 75 | } 76 | if (InStr(OldConfigObj.GetTopComments(), "Based on default file")) { 77 | return 78 | } 79 | PoEScripts_BackupUserFileOnDate(destDir, fileFullName) 80 | if (InStr(fileFullName, "config_trade.ini")) { 81 | OldConfigObj := PoEScripts_RenameKeysTradeConfig(OldConfigObj) 82 | NewConfigObj := class_EasyIni(sourceDir "\" fileFullName) 83 | for sectionName, sectionKeys in NewConfigObj { 84 | if OldConfigObj.HasKey(sectionName) { 85 | for keyName, keyVal in NewConfigObj[sectionName] { 86 | if OldConfigObj[sectionName].HasKey(keyName) { 87 | keyValNew := OldConfigObj[sectionName, keyName] 88 | RegExMatch(keyValNew, """(.*?)""", foundQuotes) 89 | if (foundQuotes1 and InStr(fileFullName, "config_trade.ini")) { 90 | keyValNew := foundQuotes1 91 | } 92 | NewConfigObj.SetKeyVal(sectionName, keyName, keyValNew) 93 | } 94 | } 95 | } 96 | } 97 | } 98 | else{ 99 | NewConfigObj := class_EasyIni(sourceDir "\" fileFullName) 100 | } 101 | FormatTime, ConvertedAt, A_NowUTC, dd-MM-yyyy 102 | NewConfigObj.AddTopComment("Converted with PoeScripts_ConvertOldConfig() on " ConvertedAt " / DO NOT EDIT OR REMOVE THIS COMMENT MANUALLY") 103 | NewConfigObj.Save(destDir "\" fileFullName) 104 | overwrittenFiles.Push(fileFullName) 105 | 106 | Return 107 | } 108 | 109 | PoEScripts_ConvertAdditionalMacrosSettings(destDir) { 110 | FileRead, File_AdditionalMacros, %destDir%\AdditionalMacros.txt 111 | labelList := [] 112 | _Pos := 1 113 | While (_Pos := RegExMatch(File_AdditionalMacros, "i)(global\sAM_.*)", labelStr, _Pos + StrLen(labelStr))) { 114 | labelList.Push(labelStr) 115 | } 116 | AdditionalMacros_INI := class_EasyIni() 117 | AdditionalMacros_INI.AddSection("General") 118 | AdditionalMacros_INI.AddKey("General", "KeyToSCState", 0) 119 | for labelIndex, labelContent in labelList { 120 | labelHotkeys := "" 121 | RegExMatch(labelContent, "(AM_.*?)\s", labelName) 122 | AdditionalMacros_INI.AddSection(labelName1) 123 | RegExMatch(labelContent, "\[(.*)\]", paramStr) 124 | for paramIndex, paramContent in StrSplit(paramStr1, ", ") { 125 | StringReplace, paramContent, paramContent, ",,All 126 | StringReplace, paramContent, paramContent, [,,All 127 | StringReplace, paramContent, paramContent, ],,All 128 | if (paramIndex == 1) { 129 | AdditionalMacros_INI.AddKey(labelName1, "State", paramContent) 130 | } 131 | else if (InStr(labelName1, "KickYourself") and paramIndex == 3){ 132 | AdditionalMacros_INI.AddKey(labelName1, "CharacterName", paramContent) 133 | } 134 | else if (InStr(labelName1, "LookUpAffixes") and paramContent == "^L"){ 135 | labelHotkeys := "^M" 136 | } 137 | else { 138 | if (labelHotkeys == "") { 139 | labelHotkeys := paramContent 140 | } 141 | else { 142 | labelHotkeys .= ", " paramContent 143 | } 144 | } 145 | } 146 | AdditionalMacros_INI.AddKey(labelName1, "Hotkeys", labelHotkeys) 147 | } 148 | FormatTime, ConvertedAt, A_NowUTC, dd-MM-yyyy 149 | AdditionalMacros_INI.AddTopComment("Converted with PoEScripts_ConvertAdditionalMacrosSettings() on " ConvertedAt " / DO NOT EDIT OR REMOVE THIS COMMENT MANUALLY") 150 | AdditionalMacros_INI.Save(destDir "\AdditionalMacros.ini") 151 | Return 152 | } 153 | 154 | PoEScripts_ConvertMapModsWarnings(sourceDir, destDir) { 155 | FileRead, MapModWarnings_TXT, %destDir%\MapModWarnings.txt 156 | MapModWarnings_JSON := JSON.Load(MapModWarnings_TXT) 157 | MapModWarnings_JSON.delete("enable_Warnings") 158 | MapModWarnings_INI := class_EasyIni(sourceDir "\MapModWarnings.ini") 159 | For keyName, keyVal in MapModWarnings_JSON { 160 | MapModWarnings_INI.SetKeyVal("Affixes", keyName, keyVal) 161 | } 162 | FormatTime, ConvertedAt, A_NowUTC, dd-MM-yyyy 163 | MapModWarnings_INI.AddTopComment("Converted with PoEScripts_ConvertMapModsWarnings() on " ConvertedAt " / DO NOT EDIT OR REMOVE THIS COMMENT MANUALLY") 164 | MapModWarnings_INI.Save(destDir "\MapModWarnings.ini") 165 | Return 166 | } 167 | 168 | PoEScripts_CopyFolderContentsRecursive(SourcePath, DestDir, ByRef overwrittenFiles, DoOverwrite = false) { 169 | If (!InStr(FileExist(DestDir), "D")) { 170 | count := 0 171 | Loop, %SourcePath%\*.*, 1, 1 172 | { 173 | count++ 174 | } 175 | If (count > 0) { 176 | FileCreateDir, %DestDir% 177 | } 178 | Else { 179 | Return 180 | } 181 | } 182 | Loop %SourcePath%\*.*, 1 183 | { 184 | If (InStr(FileExist(A_LoopFileFullPath), "D")) { 185 | PoEScripts_CopyFolderContentsRecursive(A_LoopFileFullPath, DestDir "\" A_LoopFileName, overwrittenFiles, DoOverwrite) 186 | } 187 | Else { 188 | fileAction := PoEScripts_GetActionForFile(A_LoopFileFullPath, DestDir) 189 | PoEScripts_DoActionForFile(fileAction, A_LoopFileFullPath, DestDir, overwrittenFiles) 190 | } 191 | } 192 | Return 193 | } 194 | 195 | PoEScripts_CleanFileName(fileName, removeStr="") { 196 | RegExMatch(fileName, "i)(" removeStr ")", removeThis) 197 | fileName_cleaned := RegExReplace(FileName, removeThis, "") 198 | Return fileName_cleaned 199 | } 200 | 201 | PoEScripts_TrimEndingSpacesInKeys(ConfigObject) { 202 | for sectionName, sectionKeys in ConfigObject { 203 | keyNamesList := StrSplit(ConfigObject.GetKeys(sectionName, "|", "C"), "|") 204 | for keyIndex, keyName in keyNamesList { 205 | RegExMatch(keyName, "^(.*?)\s*$", keyNameNew) 206 | ConfigObject.RenameKey(sectionName, keyName, keyNameNew1) 207 | } 208 | } 209 | Return ConfigObject 210 | } 211 | 212 | PoEScripts_RenameKeysTradeConfig(ConfigObject) { 213 | for sectionName, sectionKeys in ConfigObject { 214 | for keyName, keyVal in sectionKeys { 215 | keyNamesList := StrSplit(ConfigObject.GetKeys(sectionName, "|", "C"), "|") 216 | if (sectionName == "Hotkeys" or sectionName == "HotkeyStates") { 217 | for keyIndex, keyName in keyNamesList { 218 | if (sectionName == "Hotkeys") { 219 | RegExMatch(keyName, "i)^(.*?)Hotkey", keyNameNew) 220 | } 221 | if (sectionName == "HotkeyStates") { 222 | RegExMatch(keyName, "i)^(.*?)Enabled", keyNameNew) 223 | } 224 | if (keyNameNew1) { 225 | ConfigObject.RenameKey(sectionName, keyName, keyNameNew1) 226 | } 227 | } 228 | } 229 | } 230 | } 231 | Return ConfigObject 232 | } 233 | 234 | PoEScripts_GetActionForFile(filePath, destDir) { 235 | ; List of possible actions: 236 | ; - skip (=0) 237 | ; - copy (=1) 238 | ; - update (=2) 239 | ; - replace (=3) 240 | SplitPath, filePath, fileFullName, fileDir, fileExt, fileName, fileDrive 241 | If (!RegExMatch(fileExt, "i)bak$")) { 242 | fileFullName_cleaned := PoEScripts_CleanFileName(fileFullName, "_dontOverwrite") 243 | If (!FileExist(DestDir "\" fileFullName_cleaned)) { 244 | Return 1 245 | } 246 | Else { 247 | If (fileFullName == fileFullName_cleaned) { 248 | If (RegExMatch(fileExt, "i)ini$")) { 249 | If (!class_EasyIni(destDir "\" fileFullName).Compare(fileDir "\" fileFullName)) { 250 | Return 2 251 | } 252 | } 253 | Else { 254 | Return 3 255 | } 256 | } 257 | } 258 | } 259 | Return 0 260 | } 261 | 262 | PoEScripts_DoActionForFile(fileAction, filePath, destDir, ByRef overwrittenFiles) { 263 | If (fileAction == 0) { 264 | Return 265 | } 266 | SplitPath, filePath, fileFullName, fileDir, fileExt, fileName, fileDrive 267 | fileFullName_cleaned := PoEScripts_CleanFileName(fileFullName, "_dontOverwrite") 268 | If (fileAction == 1) { 269 | FileCopy, %filePath%, %destDir%\%fileFullName_cleaned%, 1 270 | Return 271 | } 272 | Else { 273 | If (fileAction == 2) { 274 | ; make backup 275 | PoEScripts_BackupUserFileOnDate(destDir, fileFullName) 276 | ; load file into object 277 | destIniObj := class_EasyIni(destDir "\" fileFullName) 278 | ; update object with source file 279 | destIniObj.Update(filePath) 280 | ; TODO: add top comment with update date/script release version? 281 | ; save changes to file 282 | destIniObj.Save(destDir "\" fileFullName) 283 | ;overwrittenFiles.Push(fileFullName) 284 | } 285 | Else If (fileAction == 3) { 286 | ; make backup 287 | PoEScripts_BackupUserFileOnDate(destDir, fileFullName_cleaned) 288 | ; replace file 289 | FileCopy %filePath%, %destDir%\%fileFullName_cleaned%, 1 290 | overwrittenFiles.Push(fileFullName_cleaned) 291 | } 292 | Else { 293 | MsgBox, Unknown file action 294 | Return 295 | } 296 | } 297 | Return 298 | } 299 | 300 | PoEScripts_CreateDirIfNotExist(directory) { 301 | If (!InStr(FileExist(directory), "D")) { 302 | FileCreateDir, %directory% 303 | } 304 | Return 305 | } 306 | 307 | PoEScripts_BackupUserFileOnDate(destDir, fileFullName) 308 | { 309 | if (FileExist(destDir "\" fileFullName)) { 310 | FormatTime, BackupOnDate, A_NowUTC, dd_MM_yyyy 311 | PoEScripts_CreateDirIfNotExist(destDir "\backup") 312 | PoEScripts_CreateDirIfNotExist(destDir "\backup\" BackupOnDate) 313 | if (!InStr(FileExist(destDir "\" fileFullName), "D")) { 314 | FileCopy, %destDir%\%fileFullName%, %destDir%\backup\%BackupOnDate%\%fileFullName%, 1 315 | } 316 | else { 317 | FileCopyDir, %destDir%\%fileFullName%, %destDir%\backup\%BackupOnDate%\%fileFullName%, 1 318 | } 319 | } 320 | Return 321 | } 322 | 323 | PoEScripts_isDevelopmentVersion(directory = "") { 324 | directory := StrLen(directory) ? directory : A_ScriptDir 325 | branch := "" 326 | If (FileExist(directory "\.git")) { 327 | If (FileExist(directory "\.git\HEAD")) { 328 | FileRead, head, %directory%\.git\HEAD 329 | Loop, Parse, head, `n, `r 330 | { 331 | RegExMatch(A_LoopField, "ref:.*\/(.*)", refs) 332 | If (StrLen(refs1)) { 333 | branch := "\dev_" . refs1 334 | } 335 | } 336 | } 337 | } 338 | Return branch 339 | } -------------------------------------------------------------------------------- /lib/PoEScripts_RunAsAdmin.ahk: -------------------------------------------------------------------------------- 1 | PoEScripts_RunAsAdmin() { 2 | Loop, %0% ; For each parameter: 3 | { 4 | param := %A_Index% ; Fetch the contents of the variable whose name is contained in A_Index. 5 | params .= A_Space . param 6 | } 7 | ShellExecute := A_IsUnicode ? "shell32\ShellExecute":"shell32\ShellExecuteA" 8 | 9 | If not A_IsAdmin 10 | { 11 | If A_IsCompiled 12 | DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_ScriptFullPath, str, params , str, A_WorkingDir, int, 1) 13 | Else 14 | DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_AhkPath, str, """" . A_ScriptFullPath . """" . A_Space . params, str, A_WorkingDir, int, 1) 15 | ExitApp 16 | } 17 | } -------------------------------------------------------------------------------- /lib/copyUpdate.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | 3 | set updateScriptPath=%1 4 | set installPath=%2 5 | set installFolder=%3 6 | set tempInstallPath=%4 7 | set tempInstallFolder=%5 8 | set debug=%6 9 | set robocopyExe=%SystemRoot%\System32\robocopy.exe 10 | set findStrExe=%SystemRoot%\System32\findstr.exe 11 | 12 | if %%debug EQU 1 ( 13 | if not defined in_subprocess (cmd /k set in_subprocess=y ^& %0 %*) & exit ) 14 | ) 15 | 16 | if not exist %updateScriptPath% ( 17 | dir /b /a %installPath%"\*" | >nul %findStrExe% "^" && (set extractedFilesExist=1) || (set extractedFilesExist=0) 18 | if %%extractedFilesExist EQU 0 ( 19 | set error="Folder with extracted update files is empty." 20 | set errorL=20 21 | ) else ( 22 | set error="Folder with extracted update files does not exist." 23 | set errorL=19 24 | ) 25 | goto EndScript 26 | ) 27 | 28 | :: create temporary install folder 29 | :: if the installation of new files fails we don't want to have the script deleted completely 30 | if exist %tempInstallPath% ( 31 | rd /s /q %tempInstallPath% 32 | if exist %tempInstallPath% rd /s /q %tempInstallPath% || rem 33 | if exist %tempInstallPath% ( 34 | echo. 35 | echo Executed command: rd /s /q %tempInstallPath% 36 | echo Failed to remove/clear temporary installation folder. 37 | echo. 38 | ) 39 | ) 40 | mkdir %tempInstallPath% 41 | 42 | if not exist %tempInstallPath% ( 43 | set error="Failed to create temporary install folder. Cancelled update." 44 | set errorL=18 45 | goto EndScript 46 | ) 47 | 48 | :: copy new script files to temp install directory 49 | :: https://ss64.com/nt/robocopy-exit.html 50 | echo Executing command: %robocopyExe% %updateScriptPath% %tempInstallPath% /s /NFL /NDL /NJH /NJS /nc /np 51 | %robocopyExe% %updateScriptPath% %tempInstallPath% /s /NFL /NDL /NJH /NJS /nc /np 52 | if %ERRORLEVEL% EQU 16 set errorL=%ERRORLEVEL% & set error="***FATAL ERROR***" & goto EndScript 53 | if %ERRORLEVEL% EQU 15 set errorL=%ERRORLEVEL% & set error="OKCOPY + FAIL + MISMATCHES + XTRA" & goto EndScript 54 | if %ERRORLEVEL% EQU 14 set errorL=%ERRORLEVEL% & set error="FAIL + MISMATCHES + XTRA" & goto EndScript 55 | if %ERRORLEVEL% EQU 13 set errorL=%ERRORLEVEL% & set error="OKCOPY + FAIL + MISMATCHES" & goto EndScript 56 | if %ERRORLEVEL% EQU 12 set errorL=%ERRORLEVEL% & set error="FAIL + MISMATCHES" & goto EndScript 57 | if %ERRORLEVEL% EQU 11 set errorL=%ERRORLEVEL% & set error="OKCOPY + FAIL + XTRA" & goto EndScript 58 | if %ERRORLEVEL% EQU 10 set errorL=%ERRORLEVEL% & set error="FAIL + XTRA" & goto EndScript 59 | if %ERRORLEVEL% EQU 9 set errorL=%ERRORLEVEL% & set error="OKCOPY + FAIL" & goto EndScript 60 | if %ERRORLEVEL% EQU 8 set errorL=%ERRORLEVEL% & set error="FAIL" & goto EndScript 61 | if %ERRORLEVEL% EQU 7 set errorL=%ERRORLEVEL% & set error="OKCOPY + MISMATCHES + XTRA" & goto EndScript 62 | if %ERRORLEVEL% EQU 6 set errorL=%ERRORLEVEL% & set error="MISMATCHES + XTRA" & goto EndScript 63 | if %ERRORLEVEL% EQU 5 set errorL=%ERRORLEVEL% & set error="OKCOPY + MISMATCHES" & goto EndScript 64 | if %ERRORLEVEL% EQU 4 set errorL=%ERRORLEVEL% & set error="MISMATCHES" & goto EndScript 65 | if %ERRORLEVEL% EQU 3 set errorL=%ERRORLEVEL% & set error="OKCOPY + XTRA" & goto EndScript 66 | if %ERRORLEVEL% EQU 2 set errorL=%ERRORLEVEL% & set error="XTRA" & goto EndScript 67 | if %ERRORLEVEL% EQU 1 set errorL=%ERRORLEVEL% & set error="OKCOPY" & goto SwapInstalls 68 | if %ERRORLEVEL% EQU 0 set errorL=%ERRORLEVEL% & set error="No Change" & goto EndScript 69 | 70 | :SwapInstalls 71 | :: delete install folder (old script) and rename temp install folder to install folder 72 | if exist %installPath% ( 73 | rd /s /q %installPath% 74 | if exist %installPath% rd /s /q %installPath% || rem 75 | if exist %installPath% ( 76 | echo. 77 | echo executed command: rd /s /q %installPath% 78 | echo Failed to remove/clear installation folder. 79 | echo. 80 | ) 81 | ) 82 | 83 | if exist %installPath% ( 84 | dir /b /a %installPath%"\*" | >nul %findStrExe% "^" && (set clearInstallDir=0) || set clearInstallDir=1 85 | ) else ( 86 | set clearInstallDir=1 87 | ) 88 | 89 | if %clearInstallDir% EQU 1 ( 90 | echo Executing command: %robocopyExe% %tempInstallPath% %installPath% /E /MOVE /NFL /NDL /NJH /nc /np 91 | %robocopyExe% %tempInstallPath% %installPath% /E /MOVE /NFL /NDL /NJH /nc /np 92 | if %ERRORLEVEL% NEQ 1 ( 93 | echo Swap directories, rename/move temp folder to install folder: 94 | echo. robocopy ERRORLEVEL: %ERRORLEVEL% 95 | echo. temp : %tempInstallPath% 96 | echo. install : %installPath% 97 | echo. 98 | set error2="Failed to rename temp install folder to install folder. Using temp install folder to run the script." 99 | set errorL2=17 100 | goto EndScript 101 | ) else ( 102 | set error2="OKCOPY" 103 | set errorL2=%ERRORLEVEL% 104 | if exist %tempInstallPath% ( 105 | rd /s /q %tempInstallPath% 106 | if exist %tempInstallPath% rd /s /q %tempInstallPath% || rem 107 | if exist %tempInstallPath% ( 108 | echo. 109 | echo Executed command: rd /s /q %tempInstallPath% 110 | echo Cleanup: Failed to clear temporary installation folder. 111 | echo. 112 | ) 113 | ) 114 | ) 115 | ) else ( 116 | set error2="Failed to rename temp install folder to install folder. Using temp install folder to run the script." 117 | set errorL2=17 118 | goto EndScript 119 | ) 120 | goto EndScript 121 | 122 | :EndScript 123 | :: clean directory again 124 | if exist %updateScriptPath% ( 125 | for /f %%i in ('rd /s /q %updateScriptPath%') do set test=%%i 126 | ) 127 | echo - Copy "update files" to "temp install folder": 128 | echo. - Error/Exit Code: %error% 129 | echo. - Errorlevel: %errorL% 130 | echo. 131 | echo - Copy "temp install folder" to "install folder": 132 | echo. - Error/Exit Code: %error2% 133 | echo. - Errorlevel: %errorL2% 134 | echo. 135 | 136 | :: write exit code to file 137 | echo %errorL% >exitCode.txt 138 | 139 | ::pause -------------------------------------------------------------------------------- /lib/curl.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/lib/curl.exe -------------------------------------------------------------------------------- /lib/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "make_release_archive", 3 | "version": "1.0.0", 4 | "description": "creates a zip archive to distribute on github", 5 | "main": "makeReleaseArchive_nodeJS.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "npm install && node makeReleaseArchive_nodeJS.js" 9 | }, 10 | "author": "Eruyome", 11 | "license": "ISC", 12 | "dependencies": { 13 | "archiver": "^1.3.0", 14 | "chalk": "^1.1.3", 15 | "cli-interact": "^0.1.9", 16 | "compare-versions": "^3.0.0", 17 | "extract-zip": "^1.6.0", 18 | "fs-extra": "^2.1.2", 19 | "ini": "^1.3.4", 20 | "inquirer": "^3.0.1", 21 | "install": "^0.8.7", 22 | "npm": "^6.13.4", 23 | "prompt": "^1.0.0", 24 | "request": "^2.79.0", 25 | "simple-git": "^1.66.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/zip.ahk: -------------------------------------------------------------------------------- 1 | /* 2 | Extract2Folder(Zip, Dest="", Filename="") 3 | 4 | Extract contents of a zip file to a folder using Windows Shell 5 | Based on code by shajul 6 | (http://www.autohotkey.com/board/topic/60706-native-zip-and-unzip-xpvista7-ahk-l/) 7 | 8 | Parameters 9 | Zip (required) 10 | If no path is specified then Zip is assumed to be in the Script Folder 11 | Dest (optional) 12 | Name of folder to extract to 13 | If not specified, a folder based on the Zip name is created in the Script Folder 14 | If a full path is not specified, then the specified folder is created in the Script Folder 15 | Filename (optional) 16 | Name of file to extract 17 | If not specified, the entire contents of Zip are extracted 18 | Only works for files in the root folder of Zip 19 | Wildcards not allowed 20 | 21 | Example usage: 22 | Extract2Folder("Test.zip") 23 | Extracts entire contents of Test.zip to a folder named 'Test' in the Script Folder 24 | The 'Test' folder will be created if it doesn't exist 25 | 26 | Extract2Folder("Test.zip",, "MyFile.txt") 27 | Extracts 'MyFile.txt' from the root folder of Test.zip to a folder named 'Test' in the Script Folder 28 | The 'Test' folder will be created if it doesn't exist 29 | 30 | Extract2Folder("Test.zip", "AnotherTest", "MyOtherFile.txt") 31 | Extracts 'MyOtherFile.txt' from the root folder of Test.zip to a folder named 'AnotherTest' in the Script Folder 32 | The 'AnotherTest' folder will be created if it doesn't exist 33 | 34 | Jess Harpur 2013 35 | It works for me on Windows 7 Home Premium SP1 64bit 36 | If it doesn't work for you, feel free to alter the code! 37 | */ 38 | Extract2Folder(Zip, Dest="", Filename="") 39 | { 40 | SplitPath, Zip,, SourceFolder 41 | if ! SourceFolder 42 | Zip := A_ScriptDir . "\" . Zip 43 | 44 | if ! Dest { 45 | SplitPath, Zip,, DestFolder,, Dest 46 | Dest := DestFolder . "\" . Dest . "\" 47 | } 48 | if SubStr(Dest, 0, 1) <> "\" 49 | Dest .= "\" 50 | SplitPath, Dest,,,,,DestDrive 51 | if ! DestDrive 52 | Dest := A_ScriptDir . "\" . Dest 53 | 54 | fso := ComObjCreate("Scripting.FileSystemObject") 55 | If Not fso.FolderExists(Dest) ;http://www.autohotkey.com/forum/viewtopic.php?p=402574 56 | fso.CreateFolder(Dest) 57 | 58 | AppObj := ComObjCreate("Shell.Application") 59 | FolderObj := AppObj.Namespace(Zip) 60 | if Filename { 61 | FileObj := FolderObj.ParseName(Filename) 62 | AppObj.Namespace(Dest).CopyHere(FileObj, 4|16) 63 | } 64 | else 65 | { 66 | FolderItemsObj := FolderObj.Items() 67 | AppObj.Namespace(Dest).CopyHere(FolderItemsObj, 4|16) 68 | } 69 | } -------------------------------------------------------------------------------- /resources/AUTHORS.txt: -------------------------------------------------------------------------------- 1 | mcpower 2 | Immo 3 | olop4444 4 | Aeons 5 | kongyuyu 6 | Fayted 7 | Kislorod 8 | Necrolis 9 | riQQ 10 | D_S 11 | restoutlife 12 | TheFrequency 13 | esunder 14 | dein0s -------------------------------------------------------------------------------- /resources/Version.txt: -------------------------------------------------------------------------------- 1 | ReleaseVersion := "3.5.00" 2 | AHKVersionRequired := "1.1.26" 3 | -------------------------------------------------------------------------------- /resources/ahk/AdditionalMacros.ahk: -------------------------------------------------------------------------------- 1 | ;###########----------------------- Additional Macros -------------------------########### 2 | ;# Use AdditionaMacros.ini in the user folder to enable/disable hotkeys and set a key # 3 | ;# combination. # 4 | ;# # 5 | ;# You shouldn't add your own macros here, but you can add them in the user folders # 6 | ;# subfolder "CustomMacros\". All files there will be appended. # 7 | ;# Please make sure that any issues that you are experiencing aren't related to your own # 8 | ;# macros before reporting them. # 9 | ;# For example, paste the line "^Space::SendInput {Enter}/oos{Enter}" in an ".ahk" file, # 10 | ;# place it in the CustomMacros folder and you have your macro ready. It's that easy. # 11 | ;# # 12 | ;# Hotkeys you can use: https://autohotkey.com/docs/KeyList.htm. # 13 | ;# Autohotkey Quick Reference: https://autohotkey.com/docs/AutoHotkey.htm. # 14 | ;# Using a hotkey in your custom macro that is assigned in this scrip but set to "off" # 15 | ;# won't work since that hotkey exists but is disabled. Use the hotkey command to # 16 | ;# overwrite and enable it: https://autohotkey.com/docs/commands/Hotkey.htm. # 17 | ;# # 18 | ;# Declaring variables or executing code outside of functions, labels or hotkeys won't # 19 | ;# work in AdditionalMacros or your custom macros. Read more about it here: # 20 | ;# https://autohotkey.com/docs/Scripts.htm#auto (script auto-execute section). # 21 | ;# Function calls via hotkeys work though. # 22 | ;# # 23 | ;# AutoHotkey IDE's and Editor setups (NotePad++, Sublime, Vim): # 24 | ;# https://github.com/ahkscript/awesome-AutoHotkey#integrated-development-environment # 25 | ;# # 26 | ;# Curated list of awesome AHK libs, lib distributions, scripts, tools and resources: # 27 | ;# https://github.com/ahkscript/awesome-AutoHotkey # 28 | ;# # 29 | ;# # 30 | ;# AdditionalMacros Wiki entry: # 31 | ;# https://github.com/PoE-TradeMacro/POE-TradeMacro/wiki/AdditionalMacros # 32 | ;###########-------------------------------------------------------------------########### 33 | 34 | AM_Init: 35 | 36 | class AM_Options extends UserOptions { 37 | 38 | } 39 | global AM_Opts := new AM_Options() 40 | 41 | AM_Config := {} 42 | AM_ConfigDefault := class_EasyIni(A_ScriptDir "\resources\default_UserFiles\AdditionalMacros.ini") 43 | AM_ReadConfig(AM_Config) 44 | Sleep, 150 45 | Return 46 | 47 | AM_AssignHotkeys: 48 | If (not AM_Config) { 49 | GoSub, AM_Init 50 | } 51 | ; TODO: Refactor 52 | global AM_CharacterName := AM_Config["KickYourself"].Character 53 | global AM_ChannelName := AM_Config["JoinChannel"].Channel 54 | global AM_HighlightArg1 := AM_Config["HighlightItems"].Arg1 55 | global AM_HighlightArg2 := AM_Config["HighlightItems"].Arg2 56 | global AM_HighlightArg3 := AM_Config["HighlightItems"].Arg3 57 | global AM_HighlightArg4 := AM_Config["HighlightItems"].Arg4 58 | global AM_HighlightArg5 := AM_Config["HighlightItems"].Arg5 59 | global AM_HighlightAltArg1 := AM_Config["HighlightItemsAlt"].Arg1 60 | global AM_HighlightAltArg2 := AM_Config["HighlightItemsAlt"].Arg2 61 | global AM_KeyToSCState := (TradeOpts.KeyToSCState != "") ? TradeOpts.KeyToSCState : AM_Config["General"].General_KeyToSCState 62 | 63 | ; AdditionalMacros hotkeys. 64 | AM_SetHotkeys() 65 | 66 | GoSub, CM_ExecuteCustomMacrosCode_Label 67 | Return 68 | 69 | AM_TogglePOEItemScript_HKey: 70 | TogglePOEItemScript() ; Pause item parsing with the pause key (other macros remain). 71 | Return 72 | 73 | AM_Minimize_HKey: 74 | WinMinimize, A ; Winkey+D minimizes the active PoE window (PoE stays minimized this way). 75 | Return 76 | 77 | AM_HighlightItems_HKey: 78 | HighlightItems(AM_HighlightArg1, AM_HighlightArg2, AM_HighlightArg3, AM_HighlightArg4, AM_HighlightArg5) 79 | ; Ctrl+F fills search bars in the stash or vendor screens with the item's name or info you're hovering over. 80 | ; Function parameters, change if needed or wanted: 81 | ; 1. Use broader terms, default = false. 82 | ; 2. Leave the search field after pasting the search terms, default = true. 83 | Return 84 | 85 | AM_HighlightItemsAlt_HKey: 86 | HighlightItems(AM_HighlightAltArg1, AM_HighlightAltArg2) ; Ctrl+Alt+F uses much broader search terms for the highlight function. 87 | Return 88 | 89 | AM_LookUpAffixes_HKey: 90 | LookUpAffixes() ; Opens poeaffix.net in your browser, navigating to the item that you're hovering over. 91 | Return 92 | 93 | AM_CloseScripts_HKey: 94 | CloseScripts() ; Ctrl+Esc closes all running scripts specified by (and including) ItemInfo or TradeMacro. 95 | Return 96 | 97 | AM_KickYourself_HKey: 98 | ; Ingame names use underscores and never spaces, but you can easily forget that when typing your name in the ini file. 99 | ; Consequently replacing all spaces here. 100 | CharName := StrReplace(AM_CharacterName, " ", "_") 101 | SendInput {Enter}/kick %CharName%{Enter} ; Quickly leave a group by kicking yourself. Only works for one specific character name. 102 | Return 103 | 104 | AM_Hideout_HKey: 105 | SendInput {Enter}/hideout{Enter}{Enter}{Up}{Up}{Esc} ; Go to hideout with F5. Restores the last chat that you were in. 106 | Return 107 | 108 | AM_ScrollTabRight_HKey: 109 | SendInput {Right} ; Ctrl+scroll down scrolls through stash tabs rightward. 110 | Return 111 | AM_ScrollTabLeft_HKey: 112 | SendInput {Left} ; Ctrl+scroll up scrolls through stash tabs leftward. 113 | Return 114 | 115 | AM_ScrollTabRightAlt_HKey: 116 | Send {Right} ; Holding right mouse button+scroll down scrolls through stash tabs rightward 117 | Return 118 | AM_ScrollTabLeftAlt_HKey: 119 | Send {Left} ; Holding right mouse button+scroll up scrolls through stash tabs leftward. 120 | Return 121 | 122 | AM_SendCtrlC_HKey: 123 | SendInput ^c ; Ctrl+right mouse button sends ctrl+c. 124 | Return 125 | 126 | AM_Remaining_HKey: 127 | SendInput {Enter}/remaining{Enter} ; Mobs remaining with F9. 128 | Return 129 | 130 | AM_JoinChannel_HKey: 131 | SendInput {Enter}/%AM_ChannelName%{Enter} ; Join a channel with F10. Default = global 820. 132 | Return 133 | 134 | AM_SetAfkMessage_HKey: 135 | setAfkMessage() ; Pastes afk message to your chat and marks "X" so you can type in the estimated time. 136 | Return 137 | 138 | AM_OpenOnPoEAntiquary_HKey: 139 | OpenItemOnPoEAntiquary() ; Opens an item on http://poe-antiquary.xyz to lookup a price history from last leagues. 140 | Return 141 | 142 | /* 143 | AM_AdvancedItemInfo_HKey: 144 | AdvancedItemInfoExt() ; Opens an item on pathof.info for an advanced affix breakdown. 145 | Return 146 | */ 147 | 148 | AM_AdvItemFilterPreview_HKey: 149 | ShowAdvancedItemFilterFormatting() ; Parses your current loot filter (if a custom filter is being used) and shows a highlighting preview for our item, including information about the mathcing filter rule 150 | Return 151 | 152 | AM_ColorBlindSupport_HKey: 153 | ColorBlindSupport() ; Shows text-based information about an items socket colors or a gems color 154 | Return 155 | 156 | AM_WhoisLastWhisper_HKey: 157 | KeyWait, Ctrl ; Sends "/whois lastWhisperCharacterName" when keys are released (not when pressed). 158 | KeyWait, Alt 159 | SendInput {Enter}{Home}{Del}/whois{Space}{Enter} 160 | Return 161 | 162 | setAfkMessage(){ 163 | T1 := A_Now 164 | T2 := A_NowUTC 165 | EnvSub, T1, %T2%, M 166 | TZD := "UTC +" Round( T1/60, 2 ) 167 | FormatTime, currentTime, A_NowUTC, HH:mm 168 | clipboard := "/afk AFK for about X minutes, since " currentTime " (" TZD "). Leave a message and I'll reply." 169 | 170 | IfWinActive, Path of Exile ahk_class POEWindowClass 171 | { 172 | SendInput {Enter} ^{v} {Home} 173 | Pos := RegExMatch(clipboard, " X ") 174 | If (Pos) { 175 | Loop { 176 | SendInput {Right} 177 | If (A_Index > Pos) { 178 | Break 179 | } 180 | } 181 | Send {Shift Down} 182 | Sleep 100 183 | Send {Right} 184 | Sleep 100 185 | Send {Shift Up} 186 | } 187 | } 188 | } 189 | 190 | AM_SetHotkeys() { 191 | Global AM_Config 192 | 193 | If (AM_Config.General.EnableState) { 194 | For labelIndex, labelName in StrSplit(AM_Config.GetSections("|", "C"), "|") { 195 | If (labelName != "General") { 196 | For labelKeyIndex, labelKeyName in StrSplit(AM_Config[labelName].Hotkeys, ", ") { 197 | If (labelKeyName and labelKeyName != A_Space) { 198 | AM_Config[labelName].State := AM_ConvertState(AM_Config[labelName].State) 199 | stateValue := AM_Config[labelName].State ? "on" : "off" 200 | 201 | VKey := KeyNameToKeyCode(labelKeyName, AM_KeyToSCState) 202 | 203 | ; TODO: Fix hotkeys not being set without restart 204 | If (stateValue = "on" and not AM_Config.General.finishedInit) { 205 | ; set hotkeys on init, only set enabled hotkeys to prevent key conflicts with other macros/applications 206 | AssignHotKey("AM_" labelName "_HKey", VKey, VKey, stateValue) 207 | } Else If (AM_Config.General.finishedInit) { 208 | ; change hotkey states/keys without a restart (currently not working without the restart) 209 | AssignHotKey("AM_" labelName "_HKey", VKey, VKey, stateValue) 210 | } 211 | } 212 | } 213 | } 214 | } 215 | 216 | If (not AM_Config.General.finishedInit) { 217 | AM_Config.General.finishedInit := true 218 | } 219 | } 220 | } 221 | 222 | AM_ReadConfig(ByRef ConfigObj, ConfigDir = "", ConfigFile = "AdditionalMacros.ini") 223 | { 224 | defaultFile := A_ScriptDir . "\resources\default_UserFiles\" . ConfigFile 225 | ConfigDir := StrLen(ConfigDir) < 1 ? userDirectory : ConfigDir ; userDirectory is global 226 | ConfigPath := StrLen(ConfigDir) > 0 ? ConfigDir . "\" . ConfigFile : defaultFile 227 | 228 | ConfigObj := class_EasyIni(ConfigPath) 229 | ConfigObj.Update(defaultFile) 230 | } 231 | 232 | AM_WriteConfig(ConfigDir = "", ConfigFile = "AdditionalMacros.ini") 233 | { 234 | Global AM_Config, AM_ConfigDefault 235 | 236 | ConfigDir := StrLen(ConfigDir) < 1 ? userDirectory : ConfigDir ; userDirectory is global 237 | ConfigPath := ConfigDir . "\" . ConfigFile 238 | 239 | AM_UpdateConfigFromGui(AM_Config, "AM_") 240 | AM_Config.Save(ConfigPath) 241 | AM_SetHotkeys() 242 | } 243 | 244 | AM_UpdateConfigKeyFromGuiControl(key, controlID) { 245 | _get := GuiGet(controlID, "", Error) 246 | return (not Error ? _get : key) 247 | } 248 | 249 | AM_UpdateConfigFromGui(ByRef Config, prefix) { 250 | For section, keys in Config { 251 | For key, val in keys { 252 | controlID := prefix . section "_" key 253 | If (key = "Hotkeys") { 254 | _value := "" 255 | Loop { 256 | _get := AM_GetHotkeyListViewValue(controlID "_" A_Index, Error) 257 | If (not Error) { 258 | _value .= _get ", " 259 | } Else { 260 | Break 261 | } 262 | } 263 | Config.SetKeyVal(section, key, RegExReplace(Trim(_value), "(.*)(,$)", "$1")) 264 | } 265 | ; descriptions come from the default config file, we don't need to save them in the user config 266 | Else If (not RegExMatch(key, "i).*_Description$|^Description$")) { 267 | Config.SetKeyVal(section, key, AM_UpdateConfigKeyFromGuiControl(Config[section][key], controlID)) 268 | } 269 | } 270 | } 271 | } 272 | 273 | AM_ConvertState(state, reverse = false) { 274 | If (reverse) { 275 | state := state = 1 ? "on" : state 276 | state := state = 0 ? "off" : state 277 | } Else { 278 | state := state = "on" ? 1 : state 279 | state := state = "off" ? 0 : state 280 | } 281 | Return state 282 | } 283 | 284 | AM_UpdateSettingsUI() { 285 | Global AM_Config 286 | 287 | _AM_sections := StrSplit(AM_Config.GetSections("|", "C"), "|") 288 | For sectionIndex, sectionName in _AM_sections { ; this enables section sorting 289 | If (sectionName != "General") { 290 | For keyIndex, keyValue in StrSplit(AM_Config[sectionName].Hotkeys, ", ") { 291 | HotKeyID := "AM_" sectionName "_HotKeys_" keyIndex 292 | AM_UpdateHotkeyListView(HotKeyID, keyValue) 293 | } 294 | } 295 | For keyIndex, keyValue in AM_Config[sectionName] { 296 | If (not RegExMatch(keyIndex, "i)^Hotkeys$|^Description$|.*_Description$")) { 297 | ControlID := "AM_" sectionName "_" keyIndex 298 | GuiControl,, %ControlID%, % AM_Config[sectionName][keyIndex] 299 | } 300 | } 301 | } 302 | } 303 | 304 | AM_UpdateHotkeyListView(controlID, value) { 305 | Gui, ListView, %controlID% 306 | LV_Delete(1) 307 | LV_Add("","",value) 308 | } 309 | 310 | AM_GetHotkeyListViewValue(controlID, ByRef Error = false) { 311 | GuiControlGet, _g, , %controlID% 312 | Error := ErrorLevel ? true : false 313 | Gui, ListView, %controlID% 314 | LV_GetText(value, 1, 2) 315 | Return value 316 | } -------------------------------------------------------------------------------- /resources/ahk/Merge_ItemInfo.ahk: -------------------------------------------------------------------------------- 1 | ; #################################################################################################### 2 | ; # This script merges PoE-ItemInfo and AdditionalMacros into one script and executes it. 3 | ; # We also have to set some global variables and pass them to the ItemInfo script. 4 | ; # This is to support using ItemInfo as dependancy for other tools. 5 | ; #################################################################################################### 6 | #Include, %A_ScriptDir%\..\..\lib\PoEScripts_CheckFolderWriteAccess.ahk 7 | #Include, %A_ScriptDir%\..\..\lib\PoEScripts_CompareUserFolderWithScriptFolder.ahk 8 | #Include, %A_ScriptDir%\..\..\lib\PoEScripts_CheckCorrectClientLanguage.ahk 9 | #Include, %A_ScriptDir%\..\..\lib\PoEScripts_CreateTempFolder.ahk 10 | #Include, %A_ScriptDir%\..\..\lib\PoEScripts_HandleUserSettings.ahk 11 | 12 | RunAsAdmin() 13 | arg1 = %1% 14 | scriptDir := FileExist(arg1) ? arg1 : RegExReplace(A_ScriptDir, "(.*)\\[^\\]+\\.*", "$1") 15 | 16 | /* 17 | Set ProjectName to create user settings folder in A_MyDocuments 18 | */ 19 | projectName := "PoE-ItemInfo" 20 | 21 | /* 22 | Check some folder permissions 23 | */ 24 | PoEScripts_CheckFolderWriteAccess(A_MyDocuments . "\" . projectName) 25 | PoEScripts_CheckFolderWriteAccess(scriptDir) 26 | 27 | If (not PoEScripts_CheckCorrectClientLanguage()) { 28 | ExitApp 29 | } 30 | If (!PoEScripts_CreateTempFolder(scriptDir, projectName)) { 31 | ExitApp 32 | } 33 | If (InStr(scriptDir, A_Desktop)) { 34 | 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. 35 | } 36 | 37 | /* 38 | Set some important variables 39 | */ 40 | FilesToCopyToUserFolder := scriptDir . "\resources\default_UserFiles" 41 | overwrittenFiles := PoEScripts_HandleUserSettings(projectName, A_MyDocuments, "", FilesToCopyToUserFolder, scriptDir) 42 | isDevelopmentVersion := PoEScripts_isDevelopmentVersion(scriptDir) 43 | userDirectory := A_MyDocuments . "\" . projectName . isDevelopmentVersion 44 | 45 | PoEScripts_CompareUserFolderWithScriptFolder(userDirectory, scriptDir, projectName) 46 | 47 | /* 48 | merge all scripts into `_ItemInfoMain.ahk` and execute it. 49 | */ 50 | info := ReadFileToMerge(scriptDir "\resources\ahk\POE-ItemInfo.ahk") 51 | addMacros := ReadFileToMerge(scriptDir "\resources\ahk\AdditionalMacros.ahk") 52 | 53 | info := info . "`n`r`n`r" 54 | addMacros := "`n`r#IfWinActive ahk_group PoEWindowGrp" . "`n`r`n`r" . addMacros 55 | addMacros .= AppendCustomMacros(userDirectory) 56 | 57 | CloseScript("ItemInfoMain.ahk") 58 | FileDelete, %scriptDir%\_ItemInfoMain.ahk 59 | FileCopy, %scriptDir%\resources\ahk\POE-ItemInfo.ahk, %scriptDir%\_ItemInfoMain.ahk 60 | 61 | FileAppend, %addMacros% , %scriptDir%\_ItemInfoMain.ahk 62 | 63 | ; set script hidden 64 | FileSetAttrib, +H, %scriptDir%\_ItemInfoMain.ahk 65 | ; pass some parameters to ItemInfo 66 | Run "%A_AhkPath%" "%scriptDir%\_ItemInfoMain.ahk" "%projectName%" "%userDirectory%" "%isDevelopmentVersion%" "%overwrittenFiles%" 67 | 68 | ExitApp 69 | 70 | 71 | ; #################################################################################################### 72 | ; # functions 73 | ; #################################################################################################### 74 | 75 | CloseScript(Name) 76 | { 77 | DetectHiddenWindows On 78 | SetTitleMatchMode RegEx 79 | IfWinExist, i)%Name%.* ahk_class AutoHotkey 80 | { 81 | WinClose 82 | WinWaitClose, i)%Name%.* ahk_class AutoHotkey, , 2 83 | If ErrorLevel 84 | Return "Unable to close " . Name 85 | Else 86 | Return "Closed " . Name 87 | } 88 | Else 89 | Return Name . " not found" 90 | } 91 | 92 | RunAsAdmin() 93 | { 94 | ShellExecute := A_IsUnicode ? "shell32\ShellExecute":"shell32\ShellExecuteA" 95 | If Not A_IsAdmin 96 | { 97 | If A_IsCompiled 98 | DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_ScriptFullPath, str, A_WorkingDir, int, 1) 99 | Else 100 | DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_AhkPath, str, """" . A_ScriptFullPath . """", str, A_WorkingDir, int, 1) 101 | ExitApp 102 | } 103 | } 104 | 105 | AppendCustomMacros(userDirectory) 106 | { 107 | If(!InStr(FileExist(userDirectory "\CustomMacros"), "D")) { 108 | FileCreateDir, %userDirectory%\CustomMacros\ 109 | } 110 | 111 | appendedMacros := "`n`n" 112 | extensions := "txt,ahk" 113 | Loop %userDirectory%\CustomMacros\* 114 | { 115 | If A_LoopFileExt in %extensions% 116 | { 117 | FileRead, tmp, %A_LoopFileFullPath% 118 | appendedMacros .= "; appended custom macro file: " A_LoopFileName " ---------------------------------------------------" 119 | appendedMacros .= "`n" tmp "`n`n" 120 | } 121 | } 122 | 123 | Return appendedMacros 124 | } 125 | 126 | ReadFileToMerge(path, fallbackSrcPath = "") { 127 | fallback := StrLen(fallbackSrcPath) ? "`n`nAs a fallback you can try copying the file manually from """ fallbackSrcPath "" : "" 128 | If (FileExist(path)) { 129 | ErrorLevel := 0 130 | FileRead, file, %path% 131 | If (ErrorLevel = 1) { 132 | ; file does not exist (should be caught already) 133 | Msgbox, 4096, Critical file read error, The file "%path%" doesn't exist. %fallback%`n`nClosing Script... 134 | ExitApp 135 | } Else If (ErrorLevel = 2) { 136 | ; file is locked or inaccessible 137 | Msgbox, 4096, Critical file read error, The file "%path%" is locked or inaccessible.`n`nClosing Script... 138 | ExitApp 139 | } Else If (ErrorLevel = 3) { 140 | ; the system lacks sufficient memory to load the file 141 | Msgbox, 4096, Critical file read error, The system lacks sufficient memory to load the file "%path%".`n`nClosing Script... 142 | ExitApp 143 | } Else { 144 | Return file 145 | } 146 | } Else { 147 | Msgbox, 4096, Critical file read error, The file "%path%" doesn't exist. %fallback%`n`nClosing Script... 148 | ExitApp 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /resources/ahk/jsonData.ahk: -------------------------------------------------------------------------------- 1 | ; Can't get JSON load working inside any Function/Class or in TradeMacroInit 2 | ; Works here, though. 3 | ; Data is available via global variables 4 | ; json scraped with https://github.com/Eruyome/scrapeVariableUniqueItems/ 5 | 6 | #Include, %A_ScriptDir%\lib\JSON.ahk 7 | 8 | ; when using the fallback exe we're missing the parameters passed by the merge script and missed clearing the temp folder 9 | argumentIsMergedScript = %5% 10 | If (argumentIsMergedScript != "isMergedScript") { 11 | FileRemoveDir, %A_ScriptDir%\temp, 1 12 | FileCreateDir, %A_ScriptDir%\temp 13 | } 14 | 15 | ; Parse the unique items data 16 | FileRead, JSONFile, %A_ScriptDir%\data_trade\uniques.json 17 | parsedJSON := JSON.Load(JSONFile) 18 | global TradeUniqueData := parsedJSON.uniques 19 | 20 | ; Parse the unique relic items data 21 | FileRead, JSONFile, %A_ScriptDir%\data_trade\relics.json 22 | parsedJSON := JSON.Load(JSONFile) 23 | global TradeRelicData := parsedJSON.relics 24 | 25 | ; Parse the poe.trade mods 26 | FileRead, JSONFile, %A_ScriptDir%\data_trade\mods.json 27 | parsedJSON := JSON.Load(JSONFile) 28 | global TradeModsData := parsedJSON.mods 29 | 30 | ; Parse currency names (in-game names mapped to poe.trade names) 31 | FileRead, JSONFile, %A_ScriptDir%\data_trade\currencyNames.json 32 | parsedJSON := JSON.Load(JSONFile) 33 | global TradeCurrencyNames := parsedJSON.currencyNames 34 | 35 | ; Parse fallback currency IDs 36 | FileRead, JSONFile, %A_ScriptDir%\data_trade\currencyIDs_Fallback.json 37 | parsedJSON := JSON.Load(JSONFile) 38 | global TradeCurrencyIDsFallback := parsedJSON 39 | 40 | ; Parse the unique items data 41 | FileRead, JSONFile, %A_ScriptDir%\data_trade\currency_tags.json 42 | parsedJSON := JSON.Load(JSONFile) 43 | global TradeCurrencyTags := parsedJSON.tags 44 | 45 | ; Download and parse the current leagues 46 | postData := "" 47 | reqHeaders := [] 48 | ;options := "ReturnHeaders: Skip" 49 | options := "`n" "RequestType: GET" 50 | reqHeaders.push("Host: api.pathofexile.com") 51 | reqHeaders.push("Connection: keep-alive") 52 | reqHeaders.push("Cache-Control: max-age=0") 53 | reqHeaders.push("Content-type: application/x-www-form-urlencoded; charset=UTF-8") 54 | reqHeaders.push("Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8") 55 | reqHeaders.push("User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36") 56 | parsedLeagueJSON := PoEScripts_Download("http://api.pathofexile.com/leagues?type=main", postData, reqHeaders, options, true, true, false, "", reqHeadersCurl) 57 | WriteToLogFile("Requesting leagues from api.pathofexile.com...`n`n" "cURL command:`n" reqHeadersCurl "`n`nAnswer: " reqHeaders, "StartupLog.txt", "PoE-TradeMacro") 58 | FileDelete, %A_ScriptDir%\temp\currentLeagues.json, 1 59 | FileAppend, %parsedLeagueJSON%, %A_ScriptDir%\temp\currentLeagues.json 60 | 61 | errorMsg := "Parsing the league data (json) from the Path of Exile API failed." 62 | errorMsg .= "`nThis should only happen when the servers are down for maintenance." 63 | errorMsg .= "`n`nThe script execution will be stopped, please try again at a later time." 64 | 65 | Try { 66 | test := FileExist(A_ScriptDir "\temp\currentLeagues.json") 67 | If (test) { 68 | FileRead, JSONFile, %A_ScriptDir%\temp\currentLeagues.json 69 | parsedJSON := JSON.Load(JSONFile) 70 | global LeaguesData := parsedJSON 71 | } 72 | Else { 73 | MsgBox, 16, PoE-TradeMacro - Error, %errorMsg% 74 | ExitApp 75 | } 76 | } Catch error { 77 | MsgBox, 16, PoE-TradeMacro - Error, %errorMsg% 78 | ExitApp 79 | } -------------------------------------------------------------------------------- /resources/default_UserFiles/AdditionalMacros.ini: -------------------------------------------------------------------------------- 1 | [General] 2 | KeyToSCState=0 3 | KeyToSCState_Description="Short$ KeyToSC. Long$ " 4 | EnableState=1 5 | EnableState_Description="Short$ Enable AdditionalMacros. Long$ Enables or disables AdditionalMacros completely. `nNeeds a script reload to take effect." 6 | 7 | [TogglePOEItemScript] 8 | ; Pause item parsing with the pause key (other macros remain). 9 | Description=Pause item parsing with the pause key (other macros remain). (Default = Pause). 10 | State=1 11 | Hotkeys=Pause 12 | 13 | [Minimize] 14 | ; Winkey+D minimizes the active PoE window (PoE stays minimized this way). 15 | Description=Winkey+D minimizes the active PoE window (PoE stays minimized this way). (Default = WinKey + D). 16 | State=1 17 | Hotkeys=#D 18 | 19 | [HighlightItems] 20 | ; Ctrl+F fills search bars in the stash or vendor screens with the item's name or info you're hovering over. 21 | ; Needs the coordinates of your hideout mtx stash search bar if you want to search hideout objects. 22 | ; Change behaviour: 23 | ; Arg1 = Use broader terms, default: 0. 24 | ; Arg2 = Leave the search field after pasting the search terms, default: 1. 25 | Description=Fills search bars in the stash or vendor screens with the item's name or info you're hovering over. (Default = Ctrl + F).\n\nNeeds the coordinates of your hideout mtx stash search bar if you want to search\nhideout objects. 26 | State=1 27 | Arg1=0 28 | Arg2=1 29 | Arg3=1 30 | Arg4=1565 31 | Arg5=898 32 | Hotkeys=^F 33 | 34 | [HighlightItemsAlt] 35 | ; Ctrl+Alt+F uses much broader search terms for the highlight function. 36 | ; Change behaviour: 37 | ; Arg1 = Use broader terms, default: 1. 38 | ; Arg2 = Leave the search field after pasting the search terms, default: 1. 39 | Description=Uses much broader search terms for the highlight function. (Default = Ctrl+Alt+F). 40 | State=1 41 | Arg1=1 42 | Arg2=1 43 | Hotkeys=^!F 44 | 45 | [LookUpAffixes] 46 | ; Opens poeaffix.net in your browser, navigating to the item that you're hovering over. 47 | Description=Opens poeaffix.net in your browser, navigating to the item that you're hovering over. (Default = Ctrl + M). 48 | State=1 49 | Hotkeys=^M 50 | 51 | [CloseScripts] 52 | ; Ctrl+Esc closes all running scripts specified by (and including) ItemInfo or TradeMacro. 53 | Description=Closes all running scripts specified by (and including) ItemInfo or TradeMacro. (Default = Ctrl + Esc). 54 | State=0 55 | Hotkeys=^Escape 56 | 57 | [KickYourself] 58 | ; Quickly leave a group by kicking yourself. Only works for one specific character name. 59 | Description=Quickly leave a group by kicking yourself. Only works for one specific character name. (Default = F4). 60 | State=0 61 | Character=Character name 62 | Hotkeys=F4 63 | 64 | [Hideout] 65 | ; Go to hideout with F5. 66 | Description=Go to hideout from towns/other hideouts. (Default = F5). 67 | State=1 68 | Hotkeys=F5 69 | 70 | [ScrollTabRight] 71 | ; Ctrl+scroll down or holding right mouse button+scroll down scrolls through stash tabs rightward. 72 | Description=Scroll through stash tabs rightward. (Default = Ctrl+scroll down or holding right mouse button+scroll down). 73 | State=1 74 | Hotkeys=^WheelDown, ~RButton & WheelDown 75 | 76 | [ScrollTabLeft] 77 | ; Ctrl+scroll up or holding right mouse button+scroll up scrolls through stash tabs leftward. 78 | Description=Scroll through stash tabs leftward. (Default = Ctrl+scroll up or holding right mouse button+scroll up). 79 | State=1 80 | Hotkeys=^WheelUp, ~RButton & WheelUp 81 | 82 | [SendCtrlC] 83 | ; Ctrl+right mouse button sends ctrl+c. 84 | Description=Sends ctrl+c. (Default = Ctrl+right mouse button). 85 | State=0 86 | Hotkeys=^RButton 87 | 88 | [Remaining] 89 | ; Mobs remaining with F9. 90 | Description=Mobs remaining with F9. (Default = F9). 91 | State=0 92 | Hotkeys=F9 93 | 94 | [JoinChannel] 95 | ; Join a channel with F10. Default: global 820. 96 | Description=Join a channel. Default channel: global 820. (Default = F10). 97 | State=0 98 | Hotkeys=F10 99 | Channel=global 820 100 | 101 | [SetAfkMessage] 102 | ; Pastes afk message to your chat and marks "X" so you can type in the estimated time. 103 | Description=Pastes afk message to your chat and marks "X" so you can type in the estimated time. (Default = F11). 104 | State=0 105 | Hotkeys=F11 106 | 107 | [OpenOnPoEAntiquary] 108 | ; Opens an item on http://poe-antiquary.xyz to lookup a price history from past leagues. 109 | Description=Opens an item on http://poe-antiquary.xyz to lookup a price history from past leagues. (Default = Ctrl + Alt + A). 110 | State=1 111 | Hotkeys=^!a 112 | 113 | [AdvItemFilterPreview] 114 | ; Parses your current loot filter (if a custom filter is being used) and shows a highlighting preview for our item, including information about the mathcing filter rule 115 | Description=Shows a preview of your items custom loot filter formatting, including some details about the matching filter rule. (Default = Ctrl + Alt + C). 116 | State=1 117 | Hotkeys=^!c 118 | 119 | [ColorBlindSupport] 120 | ; Shows text-based information about an items socket colors or a gems color 121 | Description=Shows text-based information about an items socket colors or a gems color. (Default = Alt + C). 122 | State=0 123 | Hotkeys=!c 124 | 125 | [WhoisLastWhisper] 126 | ; Sends "/whois lastWhisperCharacterName" when keys are released (not when pressed). 127 | Description=Sends '/whois lastWhisperCharacterName' when keys are released (not when pressed). (Default = Ctrl + Alt + Enter). 128 | State=1 129 | Hotkeys=^!Enter -------------------------------------------------------------------------------- /resources/default_UserFiles/CustomMacros/customMacros_example_dontOverwrite.txt: -------------------------------------------------------------------------------- 1 | /* 2 | Custom macro main file. Don't delete it. Using and including this file is important. 3 | You need this file and the already defined hotkey label, especially if you want to execute any personal code outside of hotkey labels. 4 | 5 | **TLDR**: 6 | You can add your own code below, use the existing Label. 7 | View a formatted description/how to here -> https://github.com/PoE-TradeMacro/POE-TradeMacro/wiki/Custom-Macros . 8 | 9 | */ 10 | 11 | CM_ExecuteCustomMacrosCode_Label: 12 | 13 | Return -------------------------------------------------------------------------------- /resources/default_UserFiles/MapModWarnings.ini: -------------------------------------------------------------------------------- 1 | [Affixes] 2 | ; To disable/enable the entire MapModWarnings functionality use the ItemInfo Settings menu. 3 | MultiDmgWarning=1 4 | EleReflect=1 5 | PhysReflect=1 6 | NoLeech=1 7 | NoRegen=1 8 | LessRecovery=0 9 | TempChains=1 10 | Vulnerability=0 11 | Enfeeble=0 12 | EleWeakness=0 13 | Beyond=0 14 | ManyTotems=0 15 | BurningGround=0 16 | ChilledGround=0 17 | DesecratedGround=0 18 | ShockingGround=0 19 | PlayerDodgeMonstAccu=0 20 | PlayerEleEquilibrium=0 21 | PlayerLessAoE=0 22 | PlayerPointBlank=0 23 | PlayerReducedBlockLessArmour=0 24 | PlayerReducedFlaskCharge=0 25 | PlayerReducedMaxRes=0 26 | BossDmgAtkCastSpeed=0 27 | BossLifeAoE=0 28 | BossTwinned=0 29 | MonstAvoidElementalAilments=0 30 | MonstAvoidPoisonBlindBleed=0 31 | MonstCauseElementalAilments=0 32 | MonstChaosEleRes=0 33 | MonstCritChanceMult=0 34 | MonstExtraEleDmg=0 35 | MonstHexproof=0 36 | MonstHitsIgnite=0 37 | MonstHitsPoison=0 38 | MonstIncrAoE=0 39 | MonstIncrDmg=0 40 | MonstLessCurse=0 41 | MonstMagicBloodlines=0 42 | MonstMoreLife=0 43 | MonstMoveAtkCastSpeed=0 44 | MonstNotSlowedTaunted=0 45 | MonstNotStunned=0 46 | MonstPhysDmgReduction=0 47 | MonstRareNemesis=0 48 | MonstSkillsChain=0 49 | MonstTakeReducedCritDmg=0 50 | MonstTwoAdditionalProj=0 -------------------------------------------------------------------------------- /resources/default_UserFiles/config.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/resources/default_UserFiles/config.ini -------------------------------------------------------------------------------- /resources/fonts/Fontin-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/resources/fonts/Fontin-Bold.ttf -------------------------------------------------------------------------------- /resources/fonts/Fontin-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/resources/fonts/Fontin-Italic.ttf -------------------------------------------------------------------------------- /resources/fonts/Fontin-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/resources/fonts/Fontin-Regular.ttf -------------------------------------------------------------------------------- /resources/fonts/Fontin-SmallCaps.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/resources/fonts/Fontin-SmallCaps.ttf -------------------------------------------------------------------------------- /resources/images/colorPickerPreviewBg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/resources/images/colorPickerPreviewBg.png -------------------------------------------------------------------------------- /resources/images/info.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/resources/images/info.ico -------------------------------------------------------------------------------- /resources/images/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/resources/images/info.png -------------------------------------------------------------------------------- /resources/images/poe-bw.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/resources/images/poe-bw.ico -------------------------------------------------------------------------------- /resources/images/poe-web.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/resources/images/poe-web.ico -------------------------------------------------------------------------------- /resources/images/poe.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/resources/images/poe.ico -------------------------------------------------------------------------------- /resources/images/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aRTy42/POE-ItemInfo/d1b2400e632769bfdfb408af26bd74cbdcd7e643/resources/images/splash.png -------------------------------------------------------------------------------- /resources/tests/Test_WinHTTPRequest.ahk: -------------------------------------------------------------------------------- 1 | #SingleInstance force 2 | #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. 3 | #Persistent ; Stay open in background 4 | 5 | SetWorkingDir, %A_ScriptDir% 6 | #Include, %A_ScriptDir%\..\..\lib\JSON.ahk 7 | #Include, %A_ScriptDir%\..\..\lib\Class_Console.ahk 8 | #Include, %A_ScriptDir%\..\..\lib\DebugPrintArray.ahk 9 | 10 | FileRemoveDir, %A_ScriptDir%\test_temp, 1 11 | FileCreateDir, %A_ScriptDir%\test_temp 12 | 13 | Class_Console("console",0,335,600,900,,,,9) 14 | console.show() 15 | 16 | urls := ["https://api.github.com/repos/PoE-TradeMacro/PoE-TradeMacro/releases", "http://poe.trade", "http://poe.trade/search/seridonomosure"] 17 | 18 | Loop, % urls.MaxIndex() { 19 | HttpObj := ComObjCreate("WinHttp.WinHttpRequest.5.1") 20 | url := urls[A_Index] 21 | 22 | console.log("---------------------------------------------------`nDownload test with url : " url) 23 | 24 | UrlDownloadToFile, %url%, %A_ScriptDir%\test_temp\urlDownloadToFile%A_Index%_output.txt 25 | If (!ErrorLevel) { 26 | FileRead, file, %A_ScriptDir%\test_temp\urlDownloadToFile%A_Index%_output.txt 27 | console.log("Testing UrlDownloadToFile: No errors.`n Output saved in: " A_ScriptDir "\test_temp\urlDownloadToFile" A_Index "_output.txt" "`nContent Length: " StrLen(file)) 28 | } Else { 29 | console.log("Testing UrlDownloadToFile: Failed.`nTried saving output to " A_ScriptDir "\test_temp\urlDownloadToFile" A_Index "_output.txt") 30 | } 31 | Encoding := "utf-8" 32 | 33 | 34 | HttpObj.Open("GET",url) 35 | HttpObj.SetRequestHeader("Content-type","application/html") 36 | HttpObj.Send("") 37 | HttpObj.WaitForResponse() 38 | 39 | ; Test with catching errors 40 | Try { 41 | If Encoding { 42 | oADO := ComObjCreate("adodb.stream") 43 | oADO.Type := 1 44 | oADO.Mode := 3 45 | oADO.Open() 46 | oADO.Write(HttpObj.ResponseBody) 47 | oADO.Position := 0 48 | oADO.Type := 2 49 | oADO.Charset := Encoding 50 | html := oADO.ReadText() 51 | oADO.Close() 52 | } 53 | If (StrLen(html) > 0) { 54 | console.log("First test downloading to variable using WinHTTP adodb.stream successful. (Catching Errors)" "`nContent Length: " StrLen(html)) 55 | } Else { 56 | console.log("First test downloading to variable using WinHTTP adodb.stream returned an empty string.") 57 | } 58 | } Catch e { 59 | console.log("Exception thrown!`n`nwhat: " e.what "`nfile: " e.file "`nline: " e.line "`nmessage: " e.message "`nextra: " e.extra) 60 | } 61 | 62 | 63 | ; Test without catching errors 64 | If Encoding { 65 | oADO := ComObjCreate("adodb.stream") 66 | oADO.Type := 1 67 | oADO.Mode := 3 68 | oADO.Open() 69 | oADO.Write(HttpObj.ResponseBody) 70 | oADO.Position := 0 71 | oADO.Type := 2 72 | oADO.Charset := Encoding 73 | html := oADO.ReadText() 74 | oADO.Close() 75 | } 76 | 77 | If (StrLen(html) > 0) { 78 | console.log("Second test downloading to variable using WinHTTP adodb.stream successful. (Not catching Errors)" "`nContent Length: " StrLen(html)) 79 | } Else { 80 | console.log("Second test downloading to variable using WinHTTP adodb.stream returned an empty string.") 81 | } 82 | console.log("-----------------------------------------") 83 | } --------------------------------------------------------------------------------