├── .gitattributes ├── .gitignore ├── Clickit Rules ├── (Default) Quest Objects.txt └── Blank.txt ├── CustomItem.cs ├── FullRareSetManager.cs ├── ImGuiExtension.cs ├── Misc.cs ├── Mouse.cs ├── PickIt.cs ├── PickIt.csproj ├── PickIt.sln ├── PickItSettings.cs ├── Pickit Rules ├── (Default) Ignore.txt ├── (Default) Magic.txt ├── (Default) Normal.txt ├── (Default) Rare.txt ├── (Default) Unique.txt └── Backup │ ├── (Default) Non Unique-Rares.txt │ ├── (Default) Rares.txt │ └── (Default) Uniques.txt ├── Properties └── AssemblyInfo.cs ├── README.md └── packages.config /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc 262 | 263 | # KDiff3 264 | *.orig -------------------------------------------------------------------------------- /Clickit Rules/(Default) Quest Objects.txt: -------------------------------------------------------------------------------- 1 | #Metadata/Chests/QuestObjects/RhoaChest 2 | #Metadata/QuestObjects/WaterCave/GlyphWall 3 | #Metadata/Chests/QuestChests/Fairgraves/AllFlameSlaveGirl 4 | #Metadata/Chests/QuestChests/Helena/PoisonCart 5 | #Metadata/QuestObjects/Spikes/SpikeBlockageButton 6 | Metadata/Monsters/IncaShadowBoss/IncaBossSpawner 7 | #Metadata/Chests/QuestChests/Tolman/TolmanChair 8 | #Metadata/QuestObjects/Sewers/SewersLockedDoor 9 | #Metadata/Chests/QuestChests/Victario/Stash 10 | #Metadata/Chests/QuestChests/Dialla/RibbonSpoolChest 11 | #Metadata/Chests/QuestChests/Dialla/SulphiteChest 12 | #Metadata/QuestObjects/Sewers/BioWall 13 | #Metadata/QuestObjects/EpicDoor/EpicDoorLock 14 | #Metadata/QuestObjects/Act4/DeshretSpirit 15 | #Metadata/Chests/QuestChests/Vilenta/SupplyChest 16 | #Metadata/Chests/QuestChests/Ossuary/PurityBox 17 | #Metadata/Terrain/Act5/Area6/Objects/Ossuary_BossSwitch 18 | #Metadata/Chests/QuestChests/Reliquary/RelicCase 19 | #Metadata/Terrain/Act5/Area8/Objects/ArenaSocket 20 | #Metadata/Chests/QuestChests/BlackFlagChest 21 | #Metadata/QuestObjects/Act6/BlackCrest_BeaconLever 22 | #Metadata/QuestObjects/Act6/BlackCrest_BeaconInteract 23 | #Metadata/Chests/QuestChests/MaligaroMapChest 24 | #Metadata/Chests/QuestObjects/Fireflies/FireflyChest 25 | 26 | ## This might actually hit everything i want it to hit 27 | QuestObject 28 | QuestChests -------------------------------------------------------------------------------- /Clickit Rules/Blank.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DetectiveSquirrel/Pickit/33e31b10a43d42b123abec8444677ea3a2969f6b/Clickit Rules/Blank.txt -------------------------------------------------------------------------------- /CustomItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using ExileCore; 5 | using ExileCore.PoEMemory; 6 | using ExileCore.PoEMemory.Components; 7 | using ExileCore.PoEMemory.Elements; 8 | using ExileCore.PoEMemory.MemoryObjects; 9 | using ExileCore.Shared.Enums; 10 | using Map = ExileCore.PoEMemory.Components.Map; 11 | 12 | namespace PickIt 13 | { 14 | public class CustomItem 15 | { 16 | public Func IsTargeted; 17 | public bool IsValid; 18 | 19 | public CustomItem(LabelOnGround item, FilesContainer fs, float distance, Dictionary weightsRules, bool isMetamorphItem = false) 20 | { 21 | if (isMetamorphItem) 22 | { 23 | IsMetaItem = true; 24 | LabelOnGround = item; 25 | Distance = distance; 26 | var itemItemOnGround = item.ItemOnGround; 27 | var worldIcon = itemItemOnGround?.GetComponent(); 28 | if (worldIcon == null) return; 29 | //var groundItem = worldItem.ItemEntity; 30 | WorldIcon = worldIcon; 31 | GroundItem = itemItemOnGround; 32 | Path = GroundItem?.Path; 33 | 34 | if (Path != null && Path.Length < 1) 35 | { 36 | DebugWindow.LogMsg($"World2: {worldIcon.Address:X} P: {Path}", 2); 37 | DebugWindow.LogMsg($"Ground2: {GroundItem.Address:X} P {Path}", 2); 38 | return; 39 | } 40 | 41 | IsTargeted = () => 42 | { 43 | var isTargeted = itemItemOnGround.GetComponent()?.isTargeted; 44 | return isTargeted != null && (bool)isTargeted; 45 | }; 46 | 47 | var baseItemType = fs.BaseItemTypes.Translate(Path); 48 | 49 | if (baseItemType != null) 50 | { 51 | ClassName = baseItemType.ClassName; 52 | BaseName = baseItemType.BaseName; 53 | Width = baseItemType.Width; 54 | Height = baseItemType.Height; 55 | if (weightsRules.TryGetValue(BaseName, out var w)) Weight = w; 56 | if (ClassName.StartsWith("Heist")) IsHeist = true; 57 | } 58 | 59 | IsValid = true; 60 | } 61 | else 62 | { 63 | isMetamorphItem = false; 64 | LabelOnGround = item; 65 | Distance = distance; 66 | var itemItemOnGround = item.ItemOnGround; 67 | var worldItem = itemItemOnGround?.GetComponent(); 68 | if (worldItem == null) return; 69 | var groundItem = worldItem.ItemEntity; 70 | GroundItem = groundItem; 71 | Path = groundItem?.Path; 72 | if (GroundItem == null) return; 73 | 74 | if (Path != null && Path.Length < 1) 75 | { 76 | DebugWindow.LogMsg($"World: {worldItem.Address:X} P: {Path}", 2); 77 | DebugWindow.LogMsg($"Ground: {GroundItem.Address:X} P {Path}", 2); 78 | return; 79 | } 80 | 81 | IsTargeted = () => itemItemOnGround?.GetComponent()?.isTargeted == true; 82 | 83 | var baseItemType = fs.BaseItemTypes.Translate(Path); 84 | 85 | if (baseItemType != null) 86 | { 87 | ClassName = baseItemType.ClassName; 88 | BaseName = baseItemType.BaseName; 89 | Width = baseItemType.Width; 90 | Height = baseItemType.Height; 91 | if (weightsRules.TryGetValue(BaseName, out var w)) Weight = w; 92 | if (ClassName.StartsWith("Heist")) IsHeist = true; 93 | } 94 | 95 | var WeaponClass = new List 96 | { 97 | "One Hand Mace", 98 | "Two Hand Mace", 99 | "One Hand Axe", 100 | "Two Hand Axe", 101 | "One Hand Sword", 102 | "Two Hand Sword", 103 | "Thrusting One Hand Sword", 104 | "Bow", 105 | "Claw", 106 | "Dagger", 107 | "Rune Dagger", 108 | "Sceptre", 109 | "Staff", 110 | "Wand" 111 | }; 112 | 113 | if (GroundItem.HasComponent()) 114 | { 115 | var quality = GroundItem.GetComponent(); 116 | Quality = quality.ItemQuality; 117 | } 118 | 119 | if (GroundItem.HasComponent()) 120 | { 121 | var @base = GroundItem.GetComponent(); 122 | IsElder = @base.isElder; 123 | IsShaper = @base.isShaper; 124 | IsHunter = @base.isHunter; 125 | IsRedeemer = @base.isRedeemer; 126 | IsCrusader = @base.isCrusader; 127 | IsWarlord = @base.isWarlord; 128 | } 129 | 130 | if (GroundItem.HasComponent()) 131 | { 132 | var mods = GroundItem.GetComponent(); 133 | Rarity = mods.ItemRarity; 134 | IsIdentified = mods.Identified; 135 | ItemLevel = mods.ItemLevel; 136 | IsFractured = mods.HaveFractured; 137 | IsVeiled = mods.ItemMods.Any(m => m.DisplayName.Contains("Veil")); 138 | } 139 | 140 | if (GroundItem.HasComponent()) 141 | { 142 | var sockets = GroundItem.GetComponent(); 143 | IsRGB = sockets.IsRGB; 144 | Sockets = sockets.NumberOfSockets; 145 | LargestLink = sockets.LargestLinkSize; 146 | } 147 | 148 | if (GroundItem.HasComponent()) 149 | { 150 | IsWeapon = true; 151 | } 152 | 153 | MapTier = GroundItem.HasComponent() ? GroundItem.GetComponent().Tier : 0; 154 | IsValid = true; 155 | } 156 | 157 | } 158 | 159 | public string BaseName { get; } = ""; 160 | public string ClassName { get; } = ""; 161 | public LabelOnGround LabelOnGround { get; } 162 | public float Distance { get; } 163 | public Entity GroundItem { get; } 164 | 165 | public MinimapIcon WorldIcon { get;} 166 | public int Height { get; } 167 | public bool IsElder { get; } 168 | public bool IsIdentified { get; } 169 | public bool IsRGB { get; } 170 | public bool IsShaper { get; } 171 | public bool IsHunter { get; } 172 | public bool IsRedeemer { get; } 173 | public bool IsCrusader { get; } 174 | public bool IsWarlord { get; } 175 | public bool IsHeist { get; } 176 | public bool IsVeiled { get; } 177 | public bool IsWeapon { get; } 178 | public int ItemLevel { get; } 179 | public int LargestLink { get; } 180 | public int MapTier { get; } 181 | public string Path { get; } 182 | public int Quality { get; } 183 | public ItemRarity Rarity { get; } 184 | public int Sockets { get; } 185 | public int Width { get; } 186 | public bool IsFractured { get; } 187 | public int Weight { get; set; } 188 | public bool IsMetaItem { get; set; } 189 | 190 | 191 | public override string ToString() 192 | { 193 | return $"{BaseName} ({ClassName}) W: {Weight} Dist: {Distance}"; 194 | } 195 | } 196 | } 197 | -------------------------------------------------------------------------------- /FullRareSetManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace PickIt 9 | { 10 | public class FRSetManagerPublishInformation 11 | { 12 | public int GatheredWeapons { get; set; } 13 | public int GatheredHelmets { get; set; } 14 | public int GatheredBodyArmors { get; set; } 15 | public int GatheredGloves { get; set; } 16 | public int GatheredBoots { get; set; } 17 | public int GatheredBelts { get; set; } 18 | public int GatheredAmulets { get; set; } 19 | public int GatheredRings { get; set; } 20 | public int WantedSets { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /ImGuiExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows.Forms; 6 | using ExileCore; 7 | using ExileCore.Shared.Nodes; 8 | using ImGuiNET; 9 | using SharpDX; 10 | using ImGuiVector2 = System.Numerics.Vector2; 11 | using ImGuiVector4 = System.Numerics.Vector4; 12 | 13 | namespace Random_Features.Libs 14 | { 15 | public class ImGuiExtension 16 | { 17 | 18 | // Int Sliders 19 | public static int IntSlider(string labelString, int value, int minValue, int maxValue) 20 | { 21 | var refValue = value; 22 | ImGui.SliderInt(labelString, ref refValue, minValue, maxValue); 23 | return refValue; 24 | } 25 | 26 | public static int IntSlider(string labelString, string sliderString, int value, int minValue, int maxValue) 27 | { 28 | var refValue = value; 29 | ImGui.SliderInt(labelString, ref refValue, minValue, maxValue); 30 | return refValue; 31 | } 32 | 33 | public static int IntSlider(string labelString, RangeNode setting) 34 | { 35 | var refValue = setting.Value; 36 | ImGui.SliderInt(labelString, ref refValue, setting.Min, setting.Max); 37 | return refValue; 38 | } 39 | 40 | public static int IntSlider(string labelString, string sliderString, RangeNode setting) 41 | { 42 | var refValue = setting.Value; 43 | ImGui.SliderInt(labelString, ref refValue, setting.Min, setting.Max); 44 | return refValue; 45 | } 46 | 47 | // float Sliders 48 | public static float FloatSlider(string labelString, float value, float minValue, float maxValue) 49 | { 50 | var refValue = value; 51 | ImGui.SliderFloat(labelString, ref refValue, minValue, maxValue, "%.00f", 1f); 52 | return refValue; 53 | } 54 | 55 | public static float FloatSlider(string labelString, float value, float minValue, float maxValue, float power) 56 | { 57 | var refValue = value; 58 | ImGui.SliderFloat(labelString, ref refValue, minValue, maxValue, "%.00f", power); 59 | return refValue; 60 | } 61 | 62 | public static float FloatSlider(string labelString, string sliderString, float value, float minValue, float maxValue) 63 | { 64 | var refValue = value; 65 | ImGui.SliderFloat(labelString, ref refValue, minValue, maxValue, $"{sliderString}: {value}", 1f); 66 | return refValue; 67 | } 68 | 69 | public static float FloatSlider(string labelString, string sliderString, float value, float minValue, float maxValue, float power) 70 | { 71 | var refValue = value; 72 | ImGui.SliderFloat(labelString, ref refValue, minValue, maxValue, $"{sliderString}: {value}", power); 73 | return refValue; 74 | } 75 | 76 | public static float FloatSlider(string labelString, RangeNode setting) 77 | { 78 | var refValue = setting.Value; 79 | ImGui.SliderFloat(labelString, ref refValue, setting.Min, setting.Max, "%.00f", 1f); 80 | return refValue; 81 | } 82 | 83 | public static float FloatSlider(string labelString, RangeNode setting, float power) 84 | { 85 | var refValue = setting.Value; 86 | ImGui.SliderFloat(labelString, ref refValue, setting.Min, setting.Max, "%.00f", power); 87 | return refValue; 88 | } 89 | 90 | public static float FloatSlider(string labelString, string sliderString, RangeNode setting) 91 | { 92 | var refValue = setting.Value; 93 | ImGui.SliderFloat(labelString, ref refValue, setting.Min, setting.Max, $"{sliderString}: {setting.Value}", 1f); 94 | return refValue; 95 | } 96 | 97 | public static float FloatSlider(string labelString, string sliderString, RangeNode setting, float power) 98 | { 99 | var refValue = setting.Value; 100 | ImGui.SliderFloat(labelString, ref refValue, setting.Min, setting.Max, $"{sliderString}: {setting.Value}", power); 101 | return refValue; 102 | } 103 | 104 | // Color Pickers 105 | public static Color ColorPicker(string labelName, Color inputColor) 106 | { 107 | var color = inputColor.ToVector4(); 108 | var colorToVect4 = new ImGuiVector4(color.X, color.Y, color.Z, color.W); 109 | if (ImGui.ColorEdit4(labelName, ref colorToVect4, ImGuiColorEditFlags.AlphaBar)) return new Color(colorToVect4.X, colorToVect4.Y, colorToVect4.Z, colorToVect4.W); 110 | return inputColor; 111 | } 112 | 113 | // Checkboxes 114 | public static bool Checkbox(string labelString, bool boolValue) 115 | { 116 | ImGui.Checkbox(labelString, ref boolValue); 117 | return boolValue; 118 | } 119 | 120 | public static bool Checkbox(string labelString, bool boolValue, out bool outBool) 121 | { 122 | ImGui.Checkbox(labelString, ref boolValue); 123 | outBool = boolValue; 124 | return boolValue; 125 | } 126 | 127 | // Hotkey Selector 128 | public static IEnumerable KeyCodes() => Enum.GetValues(typeof(Keys)).Cast(); 129 | 130 | // Tooltip Hover 131 | public static void ToolTipWithText(string text, string desc) 132 | { 133 | ImGui.SameLine(); 134 | ImGui.TextDisabled(text); 135 | if (ImGui.IsItemHovered(ImGuiHoveredFlags.AnyWindow)) 136 | { 137 | ImGui.SetTooltip(desc); 138 | } 139 | } 140 | 141 | public static int ComboBox(string sideLabel, int currentSelectedItem, List objectList) 142 | { 143 | ImGui.Combo(sideLabel, ref currentSelectedItem, objectList.ToArray(), objectList.Count); 144 | 145 | return currentSelectedItem; 146 | } 147 | public static string ComboBox(string sideLabel, string currentSelectedItem, List objectList, ImGuiComboFlags comboFlags = ImGuiComboFlags.HeightRegular) 148 | { 149 | if (ImGui.BeginCombo(sideLabel, currentSelectedItem, comboFlags)) 150 | { 151 | var refObject = currentSelectedItem; 152 | for (var n = 0; n < objectList.Count; n++) 153 | { 154 | var isSelected = refObject == objectList[n]; 155 | if (ImGui.Selectable(objectList[n], isSelected)) return objectList[n]; 156 | if (isSelected) ImGui.SetItemDefaultFocus(); 157 | } 158 | 159 | ImGui.EndCombo(); 160 | } 161 | 162 | return currentSelectedItem; 163 | } 164 | public static string ComboBox(string sideLabel, string currentSelectedItem, List objectList, out bool didChange, ImGuiComboFlags comboFlags = ImGuiComboFlags.HeightRegular) 165 | { 166 | if (ImGui.BeginCombo(sideLabel, currentSelectedItem, comboFlags)) 167 | { 168 | var refObject = currentSelectedItem; 169 | for (var n = 0; n < objectList.Count; n++) 170 | { 171 | var isSelected = refObject == objectList[n]; 172 | if (ImGui.Selectable(objectList[n], isSelected)) 173 | { 174 | didChange = true; 175 | return objectList[n]; 176 | } 177 | if (isSelected) ImGui.SetItemDefaultFocus(); 178 | } 179 | 180 | ImGui.EndCombo(); 181 | } 182 | 183 | didChange = false; 184 | return currentSelectedItem; 185 | } 186 | 187 | public static string InputText(string label, string currentValue, uint maxLength, ImGuiInputTextFlags flags) 188 | { 189 | byte[] buff = new byte[maxLength]; 190 | if (!String.IsNullOrEmpty(currentValue)) 191 | { 192 | byte[] currentValueBytes = Encoding.UTF8.GetBytes(currentValue); 193 | Array.Copy(currentValueBytes, buff, currentValueBytes.Length); 194 | } 195 | ImGui.InputText(label, buff, maxLength, flags); 196 | return Encoding.Default.GetString(buff).TrimEnd('\0'); 197 | } 198 | 199 | public static Keys HotkeySelector(string buttonName, Keys currentKey) 200 | { 201 | var open = true; 202 | if (ImGui.Button(buttonName)) 203 | { 204 | ImGui.OpenPopup(buttonName); 205 | open = true; 206 | } 207 | 208 | if (ImGui.BeginPopupModal(buttonName, ref open, (ImGuiWindowFlags)35)) 209 | { 210 | if (Input.GetKeyState(Keys.Escape)) 211 | { 212 | ImGui.CloseCurrentPopup(); 213 | ImGui.EndPopup(); 214 | } 215 | else 216 | { 217 | foreach (var key in Enum.GetValues(typeof(Keys))) 218 | { 219 | var keyState = Input.GetKeyState((Keys)key); 220 | if (keyState) 221 | { 222 | currentKey = (Keys)key; 223 | ImGui.CloseCurrentPopup(); 224 | break; 225 | } 226 | } 227 | } 228 | 229 | ImGui.Text($" Press new key to change '{currentKey}' or Esc for exit."); 230 | 231 | ImGui.EndPopup(); 232 | } 233 | 234 | return currentKey; 235 | } 236 | 237 | // ImColor_HSV Maker 238 | public static ImGuiVector4 ImColor_HSV(float h, float s, float v) 239 | { 240 | ImGui.ColorConvertHSVtoRGB(h, s, v, out var r, out var g, out var b); 241 | return new ImGuiVector4(r, g, b, 255); 242 | } 243 | 244 | public static ImGuiVector4 ImColor_HSV(float h, float s, float v, float a) 245 | { 246 | ImGui.ColorConvertHSVtoRGB(h, s, v, out var r, out var g, out var b); 247 | return new ImGuiVector4(r, g, b, a); 248 | } 249 | 250 | // Color menu tabs 251 | public static void ImGuiExtension_ColorTabs(string idString, int height, IReadOnlyList settingList, ref int selectedItem, ref int uniqueIdPop) 252 | { 253 | var newcontentRegionArea = new System.Numerics.Vector2(); 254 | newcontentRegionArea = ImGuiNative.igGetContentRegionAvail(); 255 | var boxRegion = new ImGuiVector2(newcontentRegionArea.X, height); 256 | if (ImGui.BeginChild(idString, boxRegion, true, ImGuiWindowFlags.HorizontalScrollbar)) 257 | { 258 | for (var i = 0; i < settingList.Count; i++) 259 | { 260 | ImGui.PushID(uniqueIdPop); 261 | var hue = 1f / settingList.Count * i; 262 | ImGui.PushStyleColor(ImGuiCol.Button, ImColor_HSV(hue, 0.6f, 0.6f, 0.8f)); 263 | ImGui.PushStyleColor(ImGuiCol.ButtonHovered, ImColor_HSV(hue, 0.7f, 0.7f, 0.9f)); 264 | ImGui.PushStyleColor(ImGuiCol.ButtonActive, ImColor_HSV(hue, 0.8f, 0.8f, 1.0f)); 265 | ImGui.PushStyleVar(ImGuiStyleVar.FrameRounding, 3.0f); 266 | ImGui.PushStyleVar(ImGuiStyleVar.FramePadding, 2.0f); 267 | if (i > 0) ImGui.SameLine(); 268 | if (ImGui.Button(settingList[i])) selectedItem = i; 269 | uniqueIdPop++; 270 | ImGui.PopStyleVar(); 271 | ImGui.PopStyleColor(3); 272 | ImGui.PopID(); 273 | } 274 | 275 | } 276 | ImGui.EndChild(); 277 | } 278 | 279 | public static void SpacedTextHeader(string text) 280 | { 281 | ImGui.Spacing(); 282 | ImGui.Separator(); 283 | ImGui.Spacing(); 284 | ImGui.Text(text); 285 | ImGui.Separator(); 286 | ImGui.Spacing(); 287 | } 288 | 289 | //Spacing 290 | public static void Spacing(int amount) 291 | { 292 | for (var i = 0; i < amount; i++) 293 | ImGui.Spacing(); 294 | } 295 | 296 | //End Columns 297 | public static void EndColumn() 298 | { 299 | ImGui.Columns(1, null, false); 300 | } 301 | 302 | public static void ToolTip(string desc) 303 | { 304 | ImGui.SameLine(); 305 | ImGui.TextDisabled("(?)"); 306 | if (ImGui.IsItemHovered(ImGuiHoveredFlags.None)) 307 | { 308 | ImGui.SetTooltip(desc); 309 | } 310 | } 311 | } 312 | } -------------------------------------------------------------------------------- /Misc.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Net; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | using System.Windows.Forms; 7 | using System.Windows.Forms.VisualStyles; 8 | using ExileCore; 9 | using ExileCore.PoEMemory.Components; 10 | using ExileCore.PoEMemory.MemoryObjects; 11 | using ExileCore.Shared.Enums; 12 | using SharpDX; 13 | 14 | namespace PickIt 15 | { 16 | public class Misc 17 | { 18 | 19 | public static bool CanFitInventory(CustomItem groundItem) 20 | { 21 | return FindSpotInventory(groundItem) != new Vector2(-1, -1); 22 | } 23 | 24 | /* Container.FindSpot(item) 25 | * Finds a spot available in the buffer to place the item. 26 | */ 27 | public static Vector2 FindSpotInventory(CustomItem item) 28 | { 29 | var location = new Vector2(-1, -1); 30 | var InventorySlots = PickIt.Controller.inventorySlots; 31 | var inventoryItems = PickIt.Controller.InventoryItems.InventorySlotItems; 32 | var width = 12; 33 | var height = 5; 34 | 35 | if (InventorySlots == null) 36 | return location; 37 | 38 | for (var yCol = 0; yCol < height - (item.Height - 1); yCol++) 39 | for (var xRow = 0; xRow < width - (item.Width - 1); xRow++) 40 | { 41 | var success = 0; 42 | 43 | for (var xWidth = 0; xWidth < item.Width; xWidth++) 44 | for (var yHeight = 0; yHeight < item.Height; yHeight++) 45 | if (InventorySlots[yCol + yHeight, xRow + xWidth] == 0) 46 | success++; 47 | else if (inventoryItems.Any(x => 48 | x.PosX == xRow && x.PosY == yCol && CanItemBeStacked(item, x) == StackableItem.Can)) 49 | success++; 50 | 51 | if (success >= item.Height * item.Width) return new Vector2(xRow, yCol); 52 | } 53 | 54 | return location; 55 | } 56 | 57 | public static StackableItem CanItemBeStacked(CustomItem item, ServerInventory.InventSlotItem inventoryItem) 58 | { 59 | // return false if not the same item 60 | if (item.GroundItem.Path != inventoryItem.Item.Path) 61 | return StackableItem.Cannot; 62 | 63 | // return false if the items dont have the Stack component 64 | // probably only need to do it on one item but for smoll brain reasons...here we go 65 | if (!item.GroundItem.HasComponent() || !inventoryItem.Item.HasComponent()) 66 | return StackableItem.Cannot; 67 | 68 | var itemStackComp = item.GroundItem.GetComponent(); 69 | var inventoryItemStackComp = inventoryItem.Item.GetComponent(); 70 | 71 | if (inventoryItemStackComp.Size == inventoryItemStackComp.Info.MaxStackSize) 72 | return StackableItem.Cannot; 73 | 74 | return StackableItem.Can; 75 | } 76 | 77 | public enum StackableItem 78 | { 79 | Cannot, 80 | Can 81 | } 82 | 83 | public static int[,] GetContainer2DArray(ServerInventory containerItems) 84 | { 85 | var containerCells = new int[containerItems.Rows, containerItems.Columns]; 86 | 87 | try 88 | { 89 | foreach (var item in containerItems.InventorySlotItems) 90 | { 91 | var itemSizeX = item.SizeX; 92 | var itemSizeY = item.SizeY; 93 | var inventPosX = item.PosX; 94 | var inventPosY = item.PosY; 95 | for (var y = 0; y < itemSizeY; y++) 96 | for (var x = 0; x < itemSizeX; x++) 97 | containerCells[y + inventPosY, x + inventPosX] = 1; 98 | } 99 | 100 | return containerCells; 101 | } 102 | catch (Exception e) 103 | { 104 | // ignored 105 | PickIt.Controller.LogMessage(e.ToString(), 5); 106 | } 107 | 108 | return containerCells; 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /Mouse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Runtime.InteropServices; 4 | using System.Threading; 5 | using ExileCore.Shared; 6 | using SharpDX; 7 | 8 | namespace PickIt 9 | { 10 | public class Mouse 11 | { 12 | public const int MOUSEEVENTF_MOVE = 0x0001; 13 | public const int MouseeventfLeftdown = 0x02; 14 | public const int MouseeventfLeftup = 0x04; 15 | public const int MouseeventfMiddown = 0x0020; 16 | public const int MouseeventfMidup = 0x0040; 17 | public const int MouseeventfRightdown = 0x0008; 18 | public const int MouseeventfRightup = 0x0010; 19 | public const int MouseEventWheel = 0x800; 20 | 21 | // 22 | private const int MovementDelay = 10; 23 | private const int ClickDelay = 1; 24 | 25 | [DllImport("user32.dll")] 26 | public static extern bool SetCursorPos(int x, int y); 27 | 28 | [DllImport("user32.dll")] 29 | private static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo); 30 | 31 | [DllImport("user32.dll")] 32 | public static extern bool BlockInput(bool fBlockIt); 33 | 34 | /// 35 | /// Sets the cursor position relative to the game window. 36 | /// 37 | /// 38 | /// 39 | /// 40 | /// 41 | public static bool SetCursorPos(int x, int y, RectangleF gameWindow) 42 | { 43 | return SetCursorPos(x + (int) gameWindow.X, y + (int) gameWindow.Y); 44 | } 45 | 46 | /// 47 | /// Sets the cursor position to the center of a given rectangle relative to the game window 48 | /// 49 | /// 50 | /// 51 | /// 52 | public static bool SetCurosPosToCenterOfRec(RectangleF position, RectangleF gameWindow) 53 | { 54 | return SetCursorPos((int) (gameWindow.X + position.Center.X), (int) (gameWindow.Y + position.Center.Y)); 55 | } 56 | 57 | /// 58 | /// Retrieves the cursor's position, in screen coordinates. 59 | /// 60 | /// See MSDN documentation for further information. 61 | [DllImport("user32.dll")] 62 | public static extern bool GetCursorPos(out Point lpPoint); 63 | 64 | public static SharpDX.Point GetCursorPosition() 65 | { 66 | GetCursorPos(out var lpPoint); 67 | return lpPoint; 68 | } 69 | 70 | public static void LeftMouseDown() 71 | { 72 | mouse_event(MouseeventfLeftdown, 0, 0, 0, 0); 73 | } 74 | 75 | public static void LeftMouseUp() 76 | { 77 | mouse_event(MouseeventfLeftup, 0, 0, 0, 0); 78 | } 79 | 80 | public static void RightMouseDown() 81 | { 82 | mouse_event(MouseeventfRightdown, 0, 0, 0, 0); 83 | } 84 | 85 | public static void RightMouseUp() 86 | { 87 | mouse_event(MouseeventfRightup, 0, 0, 0, 0); 88 | } 89 | 90 | public static void SetCursorPosAndLeftClick(Vector2 coords, int extraDelay) 91 | { 92 | var posX = (int) coords.X; 93 | var posY = (int) coords.Y; 94 | SetCursorPos(posX, posY); 95 | Thread.Sleep(MovementDelay + extraDelay); 96 | mouse_event(MouseeventfLeftdown, 0, 0, 0, 0); 97 | Thread.Sleep(ClickDelay); 98 | mouse_event(MouseeventfLeftup, 0, 0, 0, 0); 99 | } 100 | 101 | public static void SetCursorPosAndLeftOrRightClick(Vector2 coords, int extraDelay, bool leftClick = true) 102 | { 103 | var posX = (int) coords.X; 104 | var posY = (int) coords.Y; 105 | SetCursorPos(posX, posY); 106 | Thread.Sleep(MovementDelay + extraDelay); 107 | 108 | if (leftClick) 109 | LeftClick(ClickDelay); 110 | else 111 | RightClick(ClickDelay); 112 | } 113 | 114 | public static void LeftClick(int extraDelay) 115 | { 116 | LeftMouseDown(); 117 | if (extraDelay > 0) Thread.Sleep(ClickDelay); 118 | LeftMouseUp(); 119 | } 120 | 121 | public static void RightClick(int extraDelay) 122 | { 123 | RightMouseDown(); 124 | Thread.Sleep(ClickDelay); 125 | RightMouseUp(); 126 | } 127 | 128 | public static void VerticalScroll(bool forward, int clicks) 129 | { 130 | if (forward) 131 | mouse_event(MouseEventWheel, 0, 0, clicks * 120, 0); 132 | else 133 | mouse_event(MouseEventWheel, 0, 0, -(clicks * 120), 0); 134 | } 135 | //////////////////////////////////////////////////////////// 136 | 137 | [StructLayout(LayoutKind.Sequential)] 138 | public struct Point 139 | { 140 | public int X; 141 | public int Y; 142 | 143 | public static implicit operator SharpDX.Point(Point point) 144 | { 145 | return new SharpDX.Point(point.X, point.Y); 146 | } 147 | } 148 | 149 | #region MyFix 150 | 151 | private static void SetCursorPosition(float x, float y) 152 | { 153 | SetCursorPos((int) x, (int) y); 154 | } 155 | 156 | public static Vector2 GetCursorPositionVector() 157 | { 158 | var currentMousePoint = GetCursorPosition(); 159 | return new Vector2(currentMousePoint.X, currentMousePoint.Y); 160 | } 161 | 162 | public static void SetCursorPosition(Vector2 end) 163 | { 164 | var cursor = GetCursorPositionVector(); 165 | var stepVector2 = new Vector2(); 166 | var step = (float) Math.Sqrt(Vector2.Distance(cursor, end)) * 1.618f; 167 | if (step > 275) step = 240; 168 | stepVector2.X = (end.X - cursor.X) / step; 169 | stepVector2.Y = (end.Y - cursor.Y) / step; 170 | var fX = cursor.X; 171 | var fY = cursor.Y; 172 | 173 | for (var j = 0; j < step; j++) 174 | { 175 | fX += +stepVector2.X; 176 | fY += stepVector2.Y; 177 | SetCursorPosition(fX, fY); 178 | Thread.Sleep(2); 179 | } 180 | } 181 | 182 | public static void SetCursorPosAndLeftClickHuman(Vector2 coords, int extraDelay) 183 | { 184 | SetCursorPosition(coords); 185 | Thread.Sleep(MovementDelay + extraDelay); 186 | LeftMouseDown(); 187 | Thread.Sleep(MovementDelay + extraDelay); 188 | LeftMouseUp(); 189 | } 190 | 191 | public static void SetCursorPos(Vector2 vec) 192 | { 193 | SetCursorPos((int) vec.X, (int) vec.Y); 194 | } 195 | 196 | public static void MoveCursorToPosition(Vector2 vec) 197 | { 198 | SetCursorPos((int) vec.X, (int) vec.Y); 199 | MouseMove(); 200 | } 201 | 202 | public static float speedMouse; 203 | 204 | public static IEnumerator SetCursorPosHuman(Vector2 vec) 205 | { 206 | var step = (float) Math.Sqrt(Vector2.Distance(GetCursorPositionVector(), vec)) * speedMouse / 20; 207 | 208 | if (step > 6) 209 | { 210 | for (var i = 0; i < step; i++) 211 | { 212 | var vector2 = Vector2.SmoothStep(GetCursorPositionVector(), vec, i / step); 213 | SetCursorPos((int) vector2.X, (int) vector2.Y); 214 | yield return new WaitTime(1); 215 | } 216 | } 217 | else 218 | SetCursorPos(vec); 219 | } 220 | 221 | public static IEnumerator LeftClick() 222 | { 223 | LeftMouseDown(); 224 | yield return new WaitTime(2); 225 | LeftMouseUp(); 226 | } 227 | 228 | public static void MouseMove() 229 | { 230 | mouse_event(MOUSEEVENTF_MOVE, 0, 0, 0, 0); 231 | } 232 | 233 | #endregion 234 | } 235 | } 236 | -------------------------------------------------------------------------------- /PickIt.cs: -------------------------------------------------------------------------------- 1 | using ExileCore; 2 | using ExileCore.PoEMemory; 3 | using ExileCore.PoEMemory.Components; 4 | using ExileCore.PoEMemory.MemoryObjects; 5 | using ExileCore.Shared; 6 | using ExileCore.Shared.Enums; 7 | using ExileCore.Shared.Helpers; 8 | using ImGuiNET; 9 | using Random_Features.Libs; 10 | using SharpDX; 11 | using System; 12 | using System.Collections; 13 | using System.Collections.Generic; 14 | using System.Diagnostics; 15 | using System.IO; 16 | using System.Linq; 17 | using System.Windows.Forms; 18 | using Newtonsoft.Json; 19 | using Input = ExileCore.Input; 20 | using nuVector2 = System.Numerics.Vector2; 21 | 22 | namespace PickIt 23 | { 24 | public class PickIt : BaseSettingsPlugin 25 | { 26 | private const string PickitRuleDirectory = "Pickit Rules"; 27 | private readonly List _entities = new List(); 28 | private readonly Stopwatch _pickUpTimer = Stopwatch.StartNew(); 29 | private readonly Stopwatch DebugTimer = Stopwatch.StartNew(); 30 | private readonly WaitTime toPick = new WaitTime(1); 31 | private readonly WaitTime wait1ms = new WaitTime(1); 32 | private readonly WaitTime wait2ms = new WaitTime(2); 33 | private readonly WaitTime wait3ms = new WaitTime(3); 34 | private readonly WaitTime waitForNextTry = new WaitTime(1); 35 | private Vector2 _clickWindowOffset; 36 | private HashSet _magicRules; 37 | private HashSet _normalRules; 38 | private HashSet _rareRules; 39 | private HashSet _uniqueRules; 40 | private HashSet _ignoreRules; 41 | private Dictionary _weightsRules = new Dictionary(); 42 | private WaitTime _workCoroutine; 43 | public DateTime buildDate; 44 | private uint coroutineCounter; 45 | private Vector2 cursorBeforePickIt; 46 | private bool FullWork = true; 47 | private Element LastLabelClick; 48 | public string MagicRuleFile; 49 | private WaitTime mainWorkCoroutine = new WaitTime(5); 50 | public string NormalRuleFile; 51 | private Coroutine pickItCoroutine; 52 | public string RareRuleFile; 53 | private WaitTime tryToPick = new WaitTime(7); 54 | public string UniqueRuleFile; 55 | private WaitTime waitPlayerMove = new WaitTime(10); 56 | private List _customItems = new List(); 57 | public int[,] inventorySlots { get; set; } = new int[0,0]; 58 | public ServerInventory InventoryItems { get; set; } 59 | public static PickIt Controller { get; set; } 60 | 61 | 62 | public FRSetManagerPublishInformation FullRareSetManagerData = new FRSetManagerPublishInformation(); 63 | 64 | public PickIt() 65 | { 66 | Name = "Pickit"; 67 | } 68 | 69 | public string PluginVersion { get; set; } 70 | private List PickitFiles { get; set; } 71 | 72 | public override bool Initialise() 73 | { 74 | Controller = this; 75 | pickItCoroutine = new Coroutine(MainWorkCoroutine(), this, "Pick It"); 76 | Core.ParallelRunner.Run(pickItCoroutine); 77 | pickItCoroutine.Pause(); 78 | DebugTimer.Reset(); 79 | Settings.MouseSpeed.OnValueChanged += (sender, f) => { Mouse.speedMouse = Settings.MouseSpeed.Value; }; 80 | _workCoroutine = new WaitTime(Settings.ExtraDelay); 81 | Settings.ExtraDelay.OnValueChanged += (sender, i) => _workCoroutine = new WaitTime(i); 82 | LoadRuleFiles(); 83 | //LoadCustomItems(); 84 | return true; 85 | } 86 | 87 | // bad idea to add hard coded pickups. 88 | private void LoadCustomItems() 89 | { 90 | _customItems.Add("Treasure Key"); 91 | _customItems.Add("Silver Key"); 92 | _customItems.Add("Golden Key"); 93 | _customItems.Add("Flashpowder Keg"); 94 | _customItems.Add("Divine Life Flask"); 95 | _customItems.Add("Quicksilver Flask"); 96 | _customItems.Add("Stone of Passage"); 97 | } 98 | 99 | private IEnumerator MainWorkCoroutine() 100 | { 101 | while (true) 102 | { 103 | yield return FindItemToPick(); 104 | 105 | coroutineCounter++; 106 | pickItCoroutine.UpdateTicks(coroutineCounter); 107 | yield return _workCoroutine; 108 | } 109 | } 110 | 111 | public override void DrawSettings() 112 | { 113 | Settings.ShowInventoryView.Value = ImGuiExtension.Checkbox("Show Inventory Slots", Settings.ShowInventoryView.Value); 114 | Settings.MoveInventoryView.Value = ImGuiExtension.Checkbox("Moveable Inventory Slots", Settings.MoveInventoryView.Value); 115 | 116 | Settings.PickUpKey = ImGuiExtension.HotkeySelector("Pickup Key: " + Settings.PickUpKey.Value.ToString(), Settings.PickUpKey); 117 | Settings.LeftClickToggleNode.Value = ImGuiExtension.Checkbox("Mouse Button: " + (Settings.LeftClickToggleNode ? "Left" : "Right"), Settings.LeftClickToggleNode); 118 | Settings.LeftClickToggleNode.Value = ImGuiExtension.Checkbox("Return Mouse To Position Before Click", Settings.ReturnMouseToBeforeClickPosition); 119 | Settings.GroundChests.Value = ImGuiExtension.Checkbox("Click Chests If No Items Around", Settings.GroundChests); 120 | Settings.PickupRange.Value = ImGuiExtension.IntSlider("Pickup Radius", Settings.PickupRange); 121 | Settings.ChestRange.Value = ImGuiExtension.IntSlider("Chest Radius", Settings.ChestRange); 122 | Settings.ExtraDelay.Value = ImGuiExtension.IntSlider("Extra Click Delay", Settings.ExtraDelay); 123 | Settings.MouseSpeed.Value = ImGuiExtension.FloatSlider("Mouse speed", Settings.MouseSpeed); 124 | Settings.TimeBeforeNewClick.Value = ImGuiExtension.IntSlider("Time wait for new click", Settings.TimeBeforeNewClick); 125 | //Settings.OverrideItemPickup.Value = ImGuiExtension.Checkbox("Item Pickup Override", Settings.OverrideItemPickup); ImGui.SameLine(); 126 | //ImGuiExtension.ToolTip("Override item.CanPickup\n\rDO NOT enable this unless you know what you're doing!"); 127 | Settings.LazyLooting.Value = ImGuiExtension.Checkbox("Use Lazy Looting", Settings.LazyLooting); 128 | Settings.LazyLootingPauseKey.Value = ImGuiExtension.HotkeySelector("Pause lazy looting for 2 sec: " + Settings.LazyLootingPauseKey.Value, Settings.LazyLootingPauseKey); 129 | 130 | var tempRef = false; 131 | if (ImGui.CollapsingHeader("Pickit Rules", ImGuiTreeNodeFlags.Framed | ImGuiTreeNodeFlags.DefaultOpen)) 132 | { 133 | if (ImGui.Button("Reload All Files")) LoadRuleFiles(); 134 | Settings.NormalRuleFile = ImGuiExtension.ComboBox("Normal Rules", Settings.NormalRuleFile, PickitFiles, out tempRef); 135 | if (tempRef) _normalRules = LoadPickit(Settings.NormalRuleFile); 136 | Settings.MagicRuleFile = ImGuiExtension.ComboBox("Magic Rules", Settings.MagicRuleFile, PickitFiles, out tempRef); 137 | if (tempRef) _magicRules = LoadPickit(Settings.MagicRuleFile); 138 | Settings.RareRuleFile = ImGuiExtension.ComboBox("Rare Rules", Settings.RareRuleFile, PickitFiles, out tempRef); 139 | if (tempRef) _rareRules = LoadPickit(Settings.RareRuleFile); 140 | Settings.UniqueRuleFile = ImGuiExtension.ComboBox("Unique Rules", Settings.UniqueRuleFile, PickitFiles, out tempRef); 141 | if (tempRef) _uniqueRules = LoadPickit(Settings.UniqueRuleFile); 142 | Settings.WeightRuleFile = ImGuiExtension.ComboBox("Weight Rules", Settings.WeightRuleFile, PickitFiles, out tempRef); 143 | if (tempRef) _weightsRules = LoadWeights(Settings.WeightRuleFile); 144 | Settings.IgnoreRuleFile = ImGuiExtension.ComboBox("Ignore Rules", Settings.IgnoreRuleFile, PickitFiles, out tempRef); 145 | if (tempRef) _ignoreRules = LoadPickit(Settings.IgnoreRuleFile); 146 | } 147 | 148 | if (ImGui.CollapsingHeader("Item Logic", ImGuiTreeNodeFlags.Framed | ImGuiTreeNodeFlags.DefaultOpen)) 149 | { 150 | if (ImGui.TreeNode("Influence Types")) 151 | { 152 | Settings.ShaperItems.Value = ImGuiExtension.Checkbox("Shaper Items", Settings.ShaperItems); 153 | Settings.ElderItems.Value = ImGuiExtension.Checkbox("Elder Items", Settings.ElderItems); 154 | Settings.HunterItems.Value = ImGuiExtension.Checkbox("Hunter Items", Settings.HunterItems); 155 | Settings.CrusaderItems.Value = ImGuiExtension.Checkbox("Crusader Items", Settings.CrusaderItems); 156 | Settings.WarlordItems.Value = ImGuiExtension.Checkbox("Warlord Items", Settings.WarlordItems); 157 | Settings.RedeemerItems.Value = ImGuiExtension.Checkbox("Redeemer Items", Settings.RedeemerItems); 158 | Settings.FracturedItems.Value = ImGuiExtension.Checkbox("Fractured Items", Settings.FracturedItems); 159 | Settings.VeiledItems.Value = ImGuiExtension.Checkbox("Veiled Items", Settings.VeiledItems); 160 | ImGui.Spacing(); 161 | ImGui.TreePop(); 162 | } 163 | 164 | if (ImGui.TreeNode("Links/Sockets/RGB")) 165 | { 166 | Settings.RGB.Value = ImGuiExtension.Checkbox("RGB Items", Settings.RGB); 167 | Settings.RGBWidth.Value = ImGuiExtension.IntSlider("Maximum Width##RGBWidth", Settings.RGBWidth); 168 | Settings.RGBHeight.Value = ImGuiExtension.IntSlider("Maximum Height##RGBHeight", Settings.RGBHeight); 169 | ImGui.Spacing(); 170 | ImGui.Spacing(); 171 | ImGui.Spacing(); 172 | Settings.TotalSockets.Value = ImGuiExtension.IntSlider("##Sockets", Settings.TotalSockets); 173 | ImGui.SameLine(); 174 | Settings.Sockets.Value = ImGuiExtension.Checkbox("Sockets", Settings.Sockets); 175 | Settings.LargestLink.Value = ImGuiExtension.IntSlider("##Links", Settings.LargestLink); 176 | ImGui.SameLine(); 177 | Settings.Links.Value = ImGuiExtension.Checkbox("Links", Settings.Links); 178 | ImGui.Separator(); 179 | ImGui.TreePop(); 180 | } 181 | 182 | if (ImGui.TreeNode("Overrides")) 183 | { 184 | Settings.UseWeight.Value = ImGuiExtension.Checkbox("Use Weight", Settings.UseWeight); 185 | Settings.IgnoreScrollOfWisdom.Value = ImGuiExtension.Checkbox("Ignore Scroll Of Wisdom", Settings.IgnoreScrollOfWisdom); 186 | Settings.PickUpEverything.Value = ImGuiExtension.Checkbox("Pickup Everything", Settings.PickUpEverything); 187 | Settings.AllDivs.Value = ImGuiExtension.Checkbox("All Divination Cards", Settings.AllDivs); 188 | Settings.AllCurrency.Value = ImGuiExtension.Checkbox("All Currency", Settings.AllCurrency); 189 | Settings.AllUniques.Value = ImGuiExtension.Checkbox("All Uniques", Settings.AllUniques); 190 | Settings.QuestItems.Value = ImGuiExtension.Checkbox("Quest Items", Settings.QuestItems); 191 | Settings.Maps.Value = ImGuiExtension.Checkbox("##Maps", Settings.Maps); 192 | ImGui.SameLine(); 193 | if (ImGui.TreeNode("Maps")) 194 | { 195 | Settings.MapTier.Value = ImGuiExtension.IntSlider("Lowest Tier", Settings.MapTier); 196 | Settings.UniqueMap.Value = ImGuiExtension.Checkbox("All Unique Maps", Settings.UniqueMap); 197 | Settings.MapFragments.Value = ImGuiExtension.Checkbox("Fragments", Settings.MapFragments); 198 | ImGui.Spacing(); 199 | ImGui.TreePop(); 200 | } 201 | 202 | Settings.GemQuality.Value = ImGuiExtension.IntSlider("##Gems", "Lowest Quality", Settings.GemQuality); 203 | ImGui.SameLine(); 204 | Settings.Gems.Value = ImGuiExtension.Checkbox("Gems", Settings.Gems); 205 | 206 | Settings.FlasksQuality.Value = ImGuiExtension.IntSlider("##Flasks", "Lowest Quality", Settings.FlasksQuality); 207 | ImGui.SameLine(); 208 | Settings.Flasks.Value = ImGuiExtension.Checkbox("Flasks", Settings.Flasks); 209 | ImGui.Separator(); 210 | ImGui.TreePop(); 211 | } 212 | Settings.HeistItems.Value = ImGuiExtension.Checkbox("Heist Items", Settings.HeistItems); 213 | 214 | Settings.Rares.Value = ImGuiExtension.Checkbox("##Rares", Settings.Rares); 215 | ImGui.SameLine(); 216 | if (ImGui.TreeNode("Rares##asd")) 217 | { 218 | Settings.RareJewels.Value = ImGuiExtension.Checkbox("Jewels", Settings.RareJewels); 219 | Settings.RareRingsilvl.Value = ImGuiExtension.IntSlider("##RareRings", "Lowest iLvl", Settings.RareRingsilvl); 220 | ImGui.SameLine(); 221 | Settings.RareRings.Value = ImGuiExtension.Checkbox("Rings", Settings.RareRings); 222 | Settings.RareAmuletsilvl.Value = ImGuiExtension.IntSlider("##RareAmulets", "Lowest iLvl", Settings.RareAmuletsilvl); 223 | ImGui.SameLine(); 224 | Settings.RareAmulets.Value = ImGuiExtension.Checkbox("Amulets", Settings.RareAmulets); 225 | Settings.RareBeltsilvl.Value = ImGuiExtension.IntSlider("##RareBelts", "Lowest iLvl", Settings.RareBeltsilvl); 226 | ImGui.SameLine(); 227 | Settings.RareBelts.Value = ImGuiExtension.Checkbox("Belts", Settings.RareBelts); 228 | Settings.RareGlovesilvl.Value = ImGuiExtension.IntSlider("##RareGloves", "Lowest iLvl", Settings.RareGlovesilvl); 229 | ImGui.SameLine(); 230 | Settings.RareGloves.Value = ImGuiExtension.Checkbox("Gloves", Settings.RareGloves); 231 | Settings.RareBootsilvl.Value = ImGuiExtension.IntSlider("##RareBoots", "Lowest iLvl", Settings.RareBootsilvl); 232 | ImGui.SameLine(); 233 | Settings.RareBoots.Value = ImGuiExtension.Checkbox("Boots", Settings.RareBoots); 234 | Settings.RareHelmetsilvl.Value = ImGuiExtension.IntSlider("##RareHelmets", "Lowest iLvl", Settings.RareHelmetsilvl); 235 | ImGui.SameLine(); 236 | Settings.RareHelmets.Value = ImGuiExtension.Checkbox("Helmets", Settings.RareHelmets); 237 | Settings.RareArmourilvl.Value = ImGuiExtension.IntSlider("##RareArmours", "Lowest iLvl", Settings.RareArmourilvl); 238 | ImGui.SameLine(); 239 | Settings.RareArmour.Value = ImGuiExtension.Checkbox("Armours", Settings.RareArmour); 240 | ImGui.Spacing(); 241 | ImGui.Spacing(); 242 | ImGui.Spacing(); 243 | Settings.RareShieldilvl.Value = ImGuiExtension.IntSlider("##Shields", "Lowest iLvl", Settings.RareShieldilvl); 244 | ImGui.SameLine(); 245 | Settings.RareShield.Value = ImGuiExtension.Checkbox("Shields", Settings.RareShield); 246 | Settings.RareShieldWidth.Value = ImGuiExtension.IntSlider("Maximum Width##RareShieldWidth", Settings.RareShieldWidth); 247 | Settings.RareShieldHeight.Value = ImGuiExtension.IntSlider("Maximum Height##RareShieldHeight", Settings.RareShieldHeight); 248 | ImGui.Spacing(); 249 | ImGui.Spacing(); 250 | ImGui.Spacing(); 251 | Settings.RareWeaponilvl.Value = ImGuiExtension.IntSlider("##RareWeapons", "Lowest iLvl", Settings.RareWeaponilvl); 252 | ImGui.SameLine(); 253 | Settings.RareWeapon.Value = ImGuiExtension.Checkbox("Weapons", Settings.RareWeapon); 254 | Settings.RareWeaponWidth.Value = ImGuiExtension.IntSlider("Maximum Width##RareWeaponWidth", Settings.RareWeaponWidth); 255 | Settings.RareWeaponHeight.Value = ImGuiExtension.IntSlider("Maximum Height##RareWeaponHeight", Settings.RareWeaponHeight); 256 | if (ImGui.TreeNode("Full Rare Set Manager Integration##FRSMI")) 257 | { 258 | ImGui.BulletText("You must use github.com/DetectiveSquirrel/FullRareSetManager in order to utilize this section\nThis will determine what items are still needed to be picked up\nfor the chaos recipe, it uses FRSM's count to check this.'"); 259 | ImGui.Spacing(); 260 | Settings.FullRareSetManagerOverride.Value = ImGuiExtension.Checkbox("Override Rare Pickup with Full Rare Set Managers' needed pieces", Settings.FullRareSetManagerOverride); 261 | 262 | Settings.FullRareSetManagerOverrideAllowIdentifiedItems.Value = ImGuiExtension.Checkbox("Pickup Identified items?", Settings.FullRareSetManagerOverrideAllowIdentifiedItems); 263 | ImGui.Spacing(); 264 | ImGui.Spacing(); 265 | ImGui.BulletText("Set the number you wish to pickup for Full Rare Set Manager overrides\nDefault: -1\n-1 will disable these overrides"); 266 | ImGui.Spacing(); 267 | Settings.FullRareSetManagerPickupOverrides.Weapons = ImGuiExtension.IntSlider("Max Weapons(s)##FRSMOverrides1", Settings.FullRareSetManagerPickupOverrides.Weapons, -1, 100); 268 | Settings.FullRareSetManagerPickupOverrides.Helmets = ImGuiExtension.IntSlider("Max Helmets##FRSMOverrides2", Settings.FullRareSetManagerPickupOverrides.Helmets, -1, 100); 269 | Settings.FullRareSetManagerPickupOverrides.BodyArmors = ImGuiExtension.IntSlider("Max Body Armors##FRSMOverrides3", Settings.FullRareSetManagerPickupOverrides.BodyArmors, -1, 100); 270 | Settings.FullRareSetManagerPickupOverrides.Gloves = ImGuiExtension.IntSlider("Max Gloves##FRSMOverrides4", Settings.FullRareSetManagerPickupOverrides.Gloves, -1, 100); 271 | Settings.FullRareSetManagerPickupOverrides.Boots = ImGuiExtension.IntSlider("Max Boots##FRSMOverrides5", Settings.FullRareSetManagerPickupOverrides.Boots, -1, 100); 272 | Settings.FullRareSetManagerPickupOverrides.Belts = ImGuiExtension.IntSlider("Max Belts##FRSMOverrides6", Settings.FullRareSetManagerPickupOverrides.Belts, -1, 100); 273 | Settings.FullRareSetManagerPickupOverrides.Amulets = ImGuiExtension.IntSlider("Max Amulets##FRSMOverrides7", Settings.FullRareSetManagerPickupOverrides.Amulets, -1, 100); 274 | Settings.FullRareSetManagerPickupOverrides.Rings = ImGuiExtension.IntSlider("Max Ring Sets##FRSMOverrides8", Settings.FullRareSetManagerPickupOverrides.Rings, -1, 100); 275 | ImGui.Spacing(); 276 | ImGui.Spacing(); 277 | ImGui.BulletText("Set the ilvl Min/Max you wish to pickup for Full Rare Set Manager overrides\nIt is up to you how to use these two features\nit does not change how FullRareSetManager counts its sets.\nDefault: -1\n-1 will disable these overrides"); 278 | ImGui.Spacing(); 279 | Settings.FullRareSetManagerPickupOverrides.MinItemLevel = ImGuiExtension.IntSlider("Minimum Item Level##FRSMOverrides9", Settings.FullRareSetManagerPickupOverrides.MinItemLevel, -1, 100); 280 | Settings.FullRareSetManagerPickupOverrides.MaxItemLevel = ImGuiExtension.IntSlider("Max Item Level##FRSMOverrides10", Settings.FullRareSetManagerPickupOverrides.MaxItemLevel, -1, 100); 281 | ImGui.TreePop(); 282 | } 283 | ImGui.TreePop(); 284 | 285 | } 286 | } 287 | } 288 | 289 | private DateTime DisableLazyLootingTill { get; set; } 290 | 291 | public override Job Tick() 292 | { 293 | InventoryItems = GameController.Game.IngameState.ServerData.PlayerInventories[0].Inventory; 294 | inventorySlots = Misc.GetContainer2DArray(InventoryItems); 295 | DrawIgnoredCellsSettings(); 296 | if (Input.GetKeyState(Settings.LazyLootingPauseKey)) DisableLazyLootingTill = DateTime.Now.AddSeconds(2); 297 | if (Input.GetKeyState(Keys.Escape)) pickItCoroutine.Pause(); 298 | 299 | if (Input.GetKeyState(Settings.PickUpKey.Value) || 300 | CanLazyLoot()) 301 | { 302 | DebugTimer.Restart(); 303 | 304 | if (pickItCoroutine.IsDone) 305 | { 306 | var firstOrDefault = Core.ParallelRunner.Coroutines.FirstOrDefault(x => x.OwnerName == nameof(PickIt)); 307 | 308 | if (firstOrDefault != null) 309 | pickItCoroutine = firstOrDefault; 310 | } 311 | 312 | pickItCoroutine.Resume(); 313 | FullWork = false; 314 | } 315 | else 316 | { 317 | if (FullWork) 318 | { 319 | pickItCoroutine.Pause(); 320 | DebugTimer.Reset(); 321 | } 322 | } 323 | 324 | if (DebugTimer.ElapsedMilliseconds > 300) 325 | { 326 | FullWork = true; 327 | //LogMessage("Error pick it stop after time limit 300 ms", 1); 328 | DebugTimer.Reset(); 329 | } 330 | //Graphics.DrawText($@"PICKIT :: Debug Tick Timer ({DebugTimer.ElapsedMilliseconds}ms)", new Vector2(100, 100), FontAlign.Left); 331 | //DebugTimer.Reset(); 332 | 333 | return null; 334 | } 335 | 336 | 337 | 338 | //TODO: Make function pretty 339 | 340 | private void DrawIgnoredCellsSettings() 341 | { 342 | if (!Settings.ShowInventoryView.Value) 343 | return; 344 | 345 | var _opened = true; 346 | 347 | var MoveableFlag = ImGuiWindowFlags.NoScrollbar | 348 | ImGuiWindowFlags.NoTitleBar | 349 | ImGuiWindowFlags.NoFocusOnAppearing | ImGuiWindowFlags.NoSavedSettings; 350 | 351 | var NonMoveableFlag = ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoBackground | 352 | ImGuiWindowFlags.NoTitleBar | 353 | ImGuiWindowFlags.NoInputs | 354 | ImGuiWindowFlags.NoFocusOnAppearing | ImGuiWindowFlags.NoSavedSettings; 355 | 356 | ImGui.SetNextWindowPos(Settings.InventorySlotsVector2, ImGuiCond.Always, nuVector2.Zero); 357 | 358 | if (ImGui.Begin($"{Name}", ref _opened, 359 | Settings.MoveInventoryView.Value ? MoveableFlag : NonMoveableFlag)) 360 | { 361 | var _numb = 1; 362 | for (var i = 0; i < 5; i++) 363 | for (var j = 0; j < 12; j++) 364 | { 365 | var toggled = Convert.ToBoolean(inventorySlots[i, j]); 366 | if (ImGui.Checkbox($"##{_numb}IgnoredCells", ref toggled)) inventorySlots[i, j] ^= 1; 367 | 368 | if ((_numb - 1) % 12 < 11) ImGui.SameLine(); 369 | 370 | _numb += 1; 371 | } 372 | 373 | if (Settings.MoveInventoryView.Value) 374 | Settings.InventorySlotsVector2 = ImGui.GetWindowPos(); 375 | 376 | ImGui.End(); 377 | } 378 | } 379 | 380 | public bool InCustomList(HashSet checkList, CustomItem itemEntity, ItemRarity rarity) 381 | { 382 | if (checkList.Contains(itemEntity.BaseName) && !_ignoreRules.Contains(itemEntity.BaseName) && itemEntity.Rarity == rarity) 383 | return true; 384 | if (checkList.Contains(itemEntity.ClassName) && !_ignoreRules.Contains(itemEntity.ClassName) && itemEntity.Rarity == rarity) 385 | return true; 386 | return false; 387 | } 388 | 389 | public bool OverrideChecks(CustomItem item) 390 | { 391 | try 392 | { 393 | if (_ignoreRules.Contains(item.BaseName) || _ignoreRules.Contains(item.ClassName)) 394 | return false; 395 | 396 | #region Currency 397 | 398 | if (Settings.AllCurrency && item.ClassName.EndsWith("Currency")) 399 | { 400 | return !item.Path.Equals("Metadata/Items/Currency/CurrencyIdentification", StringComparison.Ordinal) || 401 | !Settings.IgnoreScrollOfWisdom; 402 | } 403 | 404 | #endregion 405 | 406 | #region Shaper & Elder 407 | 408 | if (Settings.ElderItems) 409 | { 410 | if (item.IsElder) 411 | return true; 412 | } 413 | 414 | if (Settings.ShaperItems) 415 | { 416 | if (item.IsShaper) 417 | return true; 418 | } 419 | 420 | if (Settings.FracturedItems) 421 | { 422 | if (item.IsFractured) 423 | return true; 424 | } 425 | 426 | #endregion 427 | 428 | 429 | if (Settings.HeistItems) 430 | { 431 | if (item.IsHeist) 432 | return true; 433 | } 434 | 435 | #region Influenced 436 | 437 | if (Settings.HunterItems) 438 | { 439 | if (item.IsHunter) 440 | return true; 441 | } 442 | 443 | if (Settings.RedeemerItems) 444 | { 445 | if (item.IsRedeemer) 446 | return true; 447 | } 448 | 449 | if (Settings.CrusaderItems) 450 | { 451 | if (item.IsCrusader) 452 | return true; 453 | } 454 | 455 | if (Settings.WarlordItems) 456 | { 457 | if (item.IsWarlord) 458 | return true; 459 | } 460 | 461 | if (Settings.VeiledItems) 462 | { 463 | if (item.IsVeiled) 464 | return true; 465 | } 466 | 467 | #endregion 468 | 469 | #region Rare Overrides 470 | 471 | if (Settings.Rares && item.Rarity == ItemRarity.Rare) 472 | { 473 | var setData = FullRareSetManagerData; 474 | var maxSetWanted = setData.WantedSets; 475 | var maxPickupOverides = Settings.FullRareSetManagerPickupOverrides; 476 | 477 | if (Settings.FullRareSetManagerOverride.Value && 478 | (maxPickupOverides.MinItemLevel > -1 ? item.ItemLevel >= maxPickupOverides.MinItemLevel : item.ItemLevel >= 60) && 479 | (maxPickupOverides.MaxItemLevel > -1 ? item.ItemLevel <= maxPickupOverides.MaxItemLevel : item.ItemLevel <= 74)) 480 | { 481 | 482 | if (item.IsIdentified && !Settings.FullRareSetManagerOverrideAllowIdentifiedItems.Value) 483 | return false; 484 | 485 | if (Settings.RareRings && item.ClassName == "Ring" && setData.GatheredRings < (maxPickupOverides.Rings > -1 ? maxPickupOverides.Rings : maxSetWanted)) return true; 486 | if (Settings.RareAmulets && item.ClassName == "Amulet" && setData.GatheredAmulets < (maxPickupOverides.Amulets > -1 ? maxPickupOverides.Amulets : maxSetWanted)) return true; 487 | if (Settings.RareBelts && item.ClassName == "Belt" && setData.GatheredBelts < (maxPickupOverides.Belts > -1 ? maxPickupOverides.Belts : maxSetWanted)) return true; 488 | if (Settings.RareGloves && item.ClassName == "Gloves" && setData.GatheredGloves < (maxPickupOverides.Gloves > -1 ? maxPickupOverides.Gloves : maxSetWanted)) return true; 489 | if (Settings.RareBoots && item.ClassName == "Boots" && setData.GatheredBoots < (maxPickupOverides.Boots > -1 ? maxPickupOverides.Boots : maxSetWanted)) return true; 490 | if (Settings.RareHelmets && item.ClassName == "Helmet" && setData.GatheredHelmets < (maxPickupOverides.Helmets > -1 ? maxPickupOverides.Helmets : maxSetWanted)) return true; 491 | if (Settings.RareArmour && item.ClassName == "Body Armour" && setData.GatheredBodyArmors < (maxPickupOverides.BodyArmors > -1 ? maxPickupOverides.BodyArmors : maxSetWanted)) return true; 492 | if (Settings.RareWeapon && item.IsWeapon && setData.GatheredWeapons < (maxPickupOverides.Weapons > -1 ? maxPickupOverides.Weapons : maxSetWanted)) 493 | if (item.Width <= Settings.RareWeaponWidth && item.Height <= Settings.RareWeaponHeight) return true; 494 | 495 | } 496 | else 497 | { 498 | if (Settings.RareRings && item.ClassName == "Ring" && item.ItemLevel >= Settings.RareRingsilvl) return true; 499 | if (Settings.RareAmulets && item.ClassName == "Amulet" && item.ItemLevel >= Settings.RareAmuletsilvl) return true; 500 | if (Settings.RareBelts && item.ClassName == "Belt" && item.ItemLevel >= Settings.RareBeltsilvl) return true; 501 | if (Settings.RareGloves && item.ClassName == "Gloves" && item.ItemLevel >= Settings.RareGlovesilvl) return true; 502 | if (Settings.RareBoots && item.ClassName == "Boots" && item.ItemLevel >= Settings.RareBootsilvl) return true; 503 | if (Settings.RareHelmets && item.ClassName == "Helmet" && item.ItemLevel >= Settings.RareHelmetsilvl) return true; 504 | if (Settings.RareArmour && item.ClassName == "Body Armour" && item.ItemLevel >= Settings.RareArmourilvl) return true; 505 | 506 | if (Settings.RareWeapon && item.IsWeapon && item.ItemLevel >= Settings.RareWeaponilvl) 507 | if (item.Width <= Settings.RareWeaponWidth && item.Height <= Settings.RareWeaponHeight) return true; 508 | } 509 | 510 | if (Settings.RareShield && item.ClassName == "Shield" && item.ItemLevel >= Settings.RareShieldilvl) 511 | if (item.Width <= Settings.RareShieldWidth && item.Height <= Settings.RareShieldHeight) 512 | return true; 513 | 514 | if (Settings.RareJewels && (item.ClassName == "Jewel" || item.ClassName == "AbyssJewel")) return true; 515 | } 516 | 517 | #endregion 518 | 519 | #region Sockets/Links/RGB 520 | 521 | if (Settings.Sockets && item.Sockets >= Settings.TotalSockets.Value) return true; 522 | if (Settings.Links && item.LargestLink >= Settings.LargestLink) return true; 523 | if (Settings.RGB && item.IsRGB && item.Width <= Settings.RGBWidth && item.Height <= Settings.RGBHeight) return true; 524 | 525 | #endregion 526 | 527 | #region Divination Cards 528 | 529 | if (Settings.AllDivs && item.ClassName == "DivinationCard") return true; 530 | 531 | #endregion 532 | 533 | #region Maps 534 | 535 | if (Settings.Maps && item.MapTier >= Settings.MapTier.Value) return true; 536 | if (Settings.Maps && Settings.UniqueMap && item.MapTier >= 1 && item.Rarity == ItemRarity.Unique) return true; 537 | if (Settings.Maps && Settings.MapFragments && item.ClassName == "MapFragment") return true; 538 | 539 | #endregion 540 | 541 | #region Quest Items 542 | 543 | if (Settings.QuestItems && item.ClassName == "QuestItem") return true; 544 | 545 | #endregion 546 | 547 | #region Qualiity Rules 548 | 549 | if (Settings.Gems && item.Quality >= Settings.GemQuality.Value && item.ClassName.Contains("Skill Gem")) return true; 550 | if (Settings.Flasks && item.Quality >= Settings.FlasksQuality.Value && item.ClassName.Contains("Flask")) return true; 551 | 552 | #endregion 553 | 554 | #region Uniques 555 | 556 | if (Settings.AllUniques && item.Rarity == ItemRarity.Unique) return true; 557 | 558 | #endregion 559 | 560 | #region Custom Rules 561 | if (item.BaseName.Contains("Watchstone")) 562 | return true; 563 | if (item.BaseName.Contains("Incubator")) 564 | return true; 565 | if (item.BaseName.Contains(" Seed")) 566 | return true; 567 | if (item.BaseName.Contains(" Grain")) 568 | return true; 569 | if (item.BaseName.Contains(" Bulb")) 570 | return true; 571 | #endregion 572 | } 573 | catch (Exception e) 574 | { 575 | LogError($"{nameof(OverrideChecks)} error: {e}"); 576 | } 577 | 578 | return false; 579 | } 580 | 581 | public bool DoWePickThis(CustomItem itemEntity) 582 | { 583 | if (!itemEntity.IsValid) 584 | return false; 585 | 586 | var pickItemUp = false; 587 | 588 | 589 | #region Force Pickup All 590 | 591 | if (Settings.PickUpEverything) 592 | { 593 | return true; 594 | } 595 | 596 | #endregion 597 | 598 | #region Rarity Rule Switch 599 | 600 | switch (itemEntity.Rarity) 601 | { 602 | case ItemRarity.Normal: 603 | if (_normalRules != null) 604 | { 605 | if (InCustomList(_normalRules, itemEntity, itemEntity.Rarity)) 606 | pickItemUp = true; 607 | } 608 | 609 | break; 610 | case ItemRarity.Magic: 611 | if (_magicRules != null) 612 | { 613 | if (InCustomList(_magicRules, itemEntity, itemEntity.Rarity)) 614 | pickItemUp = true; 615 | } 616 | 617 | break; 618 | case ItemRarity.Rare: 619 | if (_rareRules != null) 620 | { 621 | if (InCustomList(_rareRules, itemEntity, itemEntity.Rarity)) 622 | pickItemUp = true; 623 | } 624 | 625 | break; 626 | case ItemRarity.Unique: 627 | if (_uniqueRules != null) 628 | { 629 | if (InCustomList(_uniqueRules, itemEntity, itemEntity.Rarity)) 630 | pickItemUp = true; 631 | } 632 | 633 | break; 634 | } 635 | 636 | #endregion 637 | 638 | #region Override Rules 639 | 640 | if (OverrideChecks(itemEntity)) pickItemUp = true; 641 | 642 | #endregion 643 | 644 | #region Metamorph 645 | 646 | if (itemEntity.IsMetaItem) 647 | { 648 | pickItemUp = true; 649 | } 650 | 651 | #endregion 652 | 653 | return pickItemUp; 654 | } 655 | public override void ReceiveEvent(string eventId, object args) 656 | { 657 | if (!Settings.Enable.Value) return; 658 | 659 | if (eventId == "frsm_display_data") 660 | { 661 | 662 | var argSerialised = JsonConvert.SerializeObject(args); 663 | FullRareSetManagerData = JsonConvert.DeserializeObject(argSerialised); 664 | } 665 | } 666 | 667 | private IEnumerator FindItemToPick() 668 | { 669 | if (!GameController.Window.IsForeground()) yield break; 670 | var window = GameController.Window.GetWindowRectangleTimeCache; 671 | var rect = new RectangleF(window.X, window.X, window.X + window.Width, window.Y + window.Height); 672 | var playerPos = GameController.Player.GridPos; 673 | 674 | List currentLabels; 675 | var morphPath = "Metadata/MiscellaneousObjects/Metamorphosis/MetamorphosisMonsterMarker"; 676 | 677 | if (Settings.UseWeight) 678 | { 679 | currentLabels = GameController.Game.IngameState.IngameUi.ItemsOnGroundLabelsVisible 680 | .Where(x => x.Address != 0 && 681 | x.ItemOnGround?.Path != null && 682 | x.IsVisible && x.Label.GetClientRectCache.Center.PointInRectangle(rect) && 683 | x.CanPickUp && (x.MaxTimeForPickUp.TotalSeconds <= 0) || x.ItemOnGround?.Path == morphPath) 684 | .Select(x => new CustomItem(x, GameController.Files, 685 | x.ItemOnGround.DistancePlayer, _weightsRules, x.ItemOnGround?.Path == morphPath)) 686 | .OrderByDescending(x => x.Weight).ThenBy(x => x.Distance).ToList(); 687 | } 688 | else 689 | { 690 | currentLabels = GameController.Game.IngameState.IngameUi.ItemsOnGroundLabelsVisible 691 | .Where(x => x.Address != 0 && 692 | x.ItemOnGround?.Path != null && 693 | x.IsVisible && x.Label.GetClientRectCache.Center.PointInRectangle(rect) && 694 | x.CanPickUp && (x.MaxTimeForPickUp.TotalSeconds <= 0) || x.ItemOnGround?.Path == morphPath) 695 | .Select(x => new CustomItem(x, GameController.Files, 696 | x.ItemOnGround.DistancePlayer, _weightsRules, x.ItemOnGround?.Path == morphPath)) 697 | .OrderBy(x => x.Distance).ToList(); 698 | } 699 | 700 | GameController.Debug["PickIt"] = currentLabels; 701 | var rectangleOfGameWindow = GameController.Window.GetWindowRectangleTimeCache; 702 | rectangleOfGameWindow.Inflate(-36, -36); 703 | var pickUpThisItem = currentLabels.FirstOrDefault(x => 704 | DoWePickThis(x) && x.Distance < Settings.PickupRange && x.GroundItem != null && 705 | rectangleOfGameWindow.Intersects(new RectangleF(x.LabelOnGround.Label.GetClientRectCache.Center.X, 706 | x.LabelOnGround.Label.GetClientRectCache.Center.Y, 3, 3)) && Misc.CanFitInventory(x)); 707 | 708 | if (Input.GetKeyState(Settings.PickUpKey.Value) || 709 | CanLazyLoot() && ShouldLazyLoot(pickUpThisItem)) 710 | { 711 | yield return TryToPickV2(pickUpThisItem); 712 | FullWork = true; 713 | } 714 | } 715 | 716 | /// 717 | /// LazyLoot item independent checks 718 | /// 719 | /// 720 | private bool CanLazyLoot() 721 | { 722 | if (!Settings.LazyLooting) return false; 723 | if (DisableLazyLootingTill > DateTime.Now) return false; 724 | 725 | return true; 726 | } 727 | 728 | /// 729 | /// LazyLoot item dependent checks 730 | /// 731 | /// 732 | /// 733 | private bool ShouldLazyLoot(CustomItem item) 734 | { 735 | var itemPos = item.LabelOnGround.ItemOnGround.Pos; 736 | var playerPos = GameController.Player.Pos; 737 | if (Math.Abs(itemPos.Z - playerPos.Z) > 50) return false; 738 | var dx = itemPos.X - playerPos.X; 739 | var dy = itemPos.Y - playerPos.Y; 740 | if (dx * dx + dy * dy > 275 * 275) return false; 741 | 742 | if (item.IsElder || item.IsFractured || item.IsShaper || 743 | item.IsHunter || item.IsCrusader || item.IsRedeemer || item.IsWarlord || item.IsHeist) 744 | return true; 745 | 746 | if (item.Rarity == ItemRarity.Rare && item.Width * item.Height > 1) return false; 747 | 748 | return true; 749 | } 750 | 751 | private IEnumerator TryToPickV2(CustomItem pickItItem) 752 | { 753 | if (!pickItItem.IsValid) 754 | { 755 | FullWork = true; 756 | //LogMessage("PickItem is not valid.", 5, Color.Red); 757 | yield break; 758 | } 759 | 760 | var centerOfItemLabel = pickItItem.LabelOnGround.Label.GetClientRectCache.Center; 761 | var rectangleOfGameWindow = GameController.Window.GetWindowRectangleTimeCache; 762 | 763 | var oldMousePosition = Mouse.GetCursorPositionVector(); 764 | _clickWindowOffset = rectangleOfGameWindow.TopLeft; 765 | rectangleOfGameWindow.Inflate(-36, -36); 766 | centerOfItemLabel.X += rectangleOfGameWindow.Left; 767 | centerOfItemLabel.Y += rectangleOfGameWindow.Top; 768 | if (!rectangleOfGameWindow.Intersects(new RectangleF(centerOfItemLabel.X, centerOfItemLabel.Y, 3, 3))) 769 | { 770 | FullWork = true; 771 | //LogMessage($"Label outside game window. Label: {centerOfItemLabel} Window: {rectangleOfGameWindow}", 5, Color.Red); 772 | yield break; 773 | } 774 | 775 | var tryCount = 0; 776 | 777 | while (tryCount < 3) 778 | { 779 | var completeItemLabel = pickItItem.LabelOnGround?.Label; 780 | 781 | if (completeItemLabel == null) 782 | { 783 | if (tryCount > 0) 784 | { 785 | //LogMessage("Probably item already picked.", 3); 786 | yield break; 787 | } 788 | 789 | //LogError("Label for item not found.", 5); 790 | yield break; 791 | } 792 | 793 | //while (GameController.Player.GetComponent().isMoving) 794 | //{ 795 | // yield return waitPlayerMove; 796 | //} 797 | var clientRect = completeItemLabel.GetClientRect(); 798 | 799 | var clientRectCenter = clientRect.Center; 800 | 801 | var vector2 = clientRectCenter + _clickWindowOffset; 802 | 803 | if (!rectangleOfGameWindow.Intersects(new RectangleF(vector2.X, vector2.Y, 3, 3))) 804 | { 805 | FullWork = true; 806 | //LogMessage($"x,y outside game window. Label: {centerOfItemLabel} Window: {rectangleOfGameWindow}", 5, Color.Red); 807 | yield break; 808 | } 809 | 810 | Mouse.MoveCursorToPosition(vector2); 811 | yield return wait2ms; 812 | 813 | if (pickItItem.IsTargeted()) 814 | yield return Mouse.LeftClick(); 815 | 816 | yield return toPick; 817 | tryCount++; 818 | } 819 | 820 | tryCount = 0; 821 | 822 | while (GameController.Game.IngameState.IngameUi.ItemsOnGroundLabelsVisible.FirstOrDefault( 823 | x => x.Address == pickItItem.LabelOnGround.Address) != null && tryCount < 6) 824 | { 825 | tryCount++; 826 | //yield return waitForNextTry; 827 | } 828 | 829 | //yield return waitForNextTry; 830 | 831 | // Mouse.MoveCursorToPosition(oldMousePosition); 832 | } 833 | 834 | #region (Re)Loading Rules 835 | 836 | private void LoadRuleFiles() 837 | { 838 | var PickitConfigFileDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Plugins", "Compiled", nameof(PickIt), 839 | PickitRuleDirectory); 840 | 841 | if (!Directory.Exists(PickitConfigFileDirectory)) 842 | { 843 | Directory.CreateDirectory(PickitConfigFileDirectory); 844 | return; 845 | } 846 | 847 | var dirInfo = new DirectoryInfo(PickitConfigFileDirectory); 848 | 849 | PickitFiles = dirInfo.GetFiles("*.txt").Select(x => Path.GetFileNameWithoutExtension(x.Name)).ToList(); 850 | _normalRules = LoadPickit(Settings.NormalRuleFile); 851 | _magicRules = LoadPickit(Settings.MagicRuleFile); 852 | _rareRules = LoadPickit(Settings.RareRuleFile); 853 | _uniqueRules = LoadPickit(Settings.UniqueRuleFile); 854 | _weightsRules = LoadWeights(Settings.WeightRuleFile); 855 | _ignoreRules = LoadPickit(Settings.IgnoreRuleFile); 856 | } 857 | 858 | public HashSet LoadPickit(string fileName) 859 | { 860 | var hashSet = new HashSet(StringComparer.OrdinalIgnoreCase); 861 | 862 | if (fileName == string.Empty) 863 | { 864 | return hashSet; 865 | } 866 | 867 | var pickitFile = $@"{DirectoryFullName}\{PickitRuleDirectory}\{fileName}.txt"; 868 | 869 | if (!File.Exists(pickitFile)) 870 | { 871 | return hashSet; 872 | } 873 | 874 | var lines = File.ReadAllLines(pickitFile); 875 | 876 | foreach (var x in lines.Where(x => !string.IsNullOrWhiteSpace(x) && !x.StartsWith("#"))) 877 | { 878 | hashSet.Add(x.Trim()); 879 | } 880 | 881 | LogMessage($"PICKIT :: (Re)Loaded {fileName}", 5, Color.GreenYellow); 882 | return hashSet; 883 | } 884 | 885 | public Dictionary LoadWeights(string fileName) 886 | { 887 | var result = new Dictionary(); 888 | var filePath = $@"{DirectoryFullName}\{PickitRuleDirectory}\{fileName}.txt"; 889 | if (!File.Exists(filePath)) return result; 890 | 891 | var lines = File.ReadAllLines(filePath); 892 | 893 | foreach (var x in lines.Where(x => !string.IsNullOrEmpty(x) && !x.StartsWith("#") && x.IndexOf('=') > 0)) 894 | { 895 | try 896 | { 897 | var s = x.Split('='); 898 | if (s.Length == 2) result[s[0].Trim()] = int.Parse(s[1]); 899 | } 900 | catch (Exception e) 901 | { 902 | DebugWindow.LogError($"{nameof(PickIt)} => Error when parse weight."); 903 | } 904 | } 905 | 906 | LogMessage($"PICKIT :: (Re)Loaded {fileName}", 5, Color.Cyan); 907 | return result; 908 | } 909 | 910 | public override void OnPluginDestroyForHotReload() 911 | { 912 | pickItCoroutine.Done(true); 913 | } 914 | 915 | #endregion 916 | 917 | #region Adding / Removing Entities 918 | 919 | public override void EntityAdded(Entity Entity) 920 | { 921 | } 922 | 923 | public override void EntityRemoved(Entity Entity) 924 | { 925 | } 926 | 927 | #endregion 928 | } 929 | } 930 | -------------------------------------------------------------------------------- /PickIt.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {286EB4C6-31A1-4B8E-BF5A-83F9591AE322} 8 | Library 9 | Properties 10 | PickIt 11 | PickIt 12 | v4.8 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | ..\..\..\..\PoeHelper\Plugins\Compiled\PickIt\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | ..\..\Compiled\PickIt\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | true 35 | ..\..\PoeHelper\Plugins\Compiled\DevTree\ 36 | DEBUG;TRACE 37 | full 38 | x64 39 | prompt 40 | MinimumRecommendedRules.ruleset 41 | 42 | 43 | bin\x64\Release\ 44 | TRACE 45 | true 46 | pdbonly 47 | x64 48 | prompt 49 | MinimumRecommendedRules.ruleset 50 | 51 | 52 | 53 | ..\..\..\ExileCore.dll 54 | False 55 | 56 | 57 | False 58 | ..\..\..\ImGui.NET.dll 59 | False 60 | 61 | 62 | 63 | packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll 64 | False 65 | 66 | 67 | packages\SharpDX.4.2.0\lib\net45\SharpDX.dll 68 | False 69 | 70 | 71 | packages\SharpDX.Mathematics.4.2.0\lib\net45\SharpDX.Mathematics.dll 72 | False 73 | 74 | 75 | 76 | 77 | 78 | 79 | packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll 80 | False 81 | 82 | 83 | C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Windows.Forms.dll 84 | False 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /PickIt.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29020.237 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PickIt", "PickIt.csproj", "{286EB4C6-31A1-4B8E-BF5A-83F9591AE322}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x64 = Debug|x64 12 | Release|Any CPU = Release|Any CPU 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {286EB4C6-31A1-4B8E-BF5A-83F9591AE322}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {286EB4C6-31A1-4B8E-BF5A-83F9591AE322}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {286EB4C6-31A1-4B8E-BF5A-83F9591AE322}.Debug|x64.ActiveCfg = Debug|x64 19 | {286EB4C6-31A1-4B8E-BF5A-83F9591AE322}.Debug|x64.Build.0 = Debug|x64 20 | {286EB4C6-31A1-4B8E-BF5A-83F9591AE322}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {286EB4C6-31A1-4B8E-BF5A-83F9591AE322}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {286EB4C6-31A1-4B8E-BF5A-83F9591AE322}.Release|x64.ActiveCfg = Release|x64 23 | {286EB4C6-31A1-4B8E-BF5A-83F9591AE322}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {23DCFB9B-8808-4717-910D-76D8510298F8} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /PickItSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | using System.Windows.Forms; 3 | using ExileCore.Shared.Interfaces; 4 | using ExileCore.Shared.Nodes; 5 | 6 | namespace PickIt 7 | { 8 | public class PickItSettings : ISettings 9 | { 10 | public PickItSettings() 11 | { 12 | Enable = new ToggleNode(false); 13 | PickUpKey = Keys.F1; 14 | PickupRange = new RangeNode(600, 1, 1000); 15 | ChestRange = new RangeNode(500, 1, 1000); 16 | ExtraDelay = new RangeNode(0, 0, 200); 17 | Sockets = new ToggleNode(true); 18 | TotalSockets = new RangeNode(6, 1, 6); 19 | Links = new ToggleNode(true); 20 | LargestLink = new RangeNode(6, 1, 6); 21 | RGB = new ToggleNode(true); 22 | RGBWidth = new RangeNode(2, 1, 2); 23 | RGBHeight = new RangeNode(4, 1, 4); 24 | AllDivs = new ToggleNode(true); 25 | AllCurrency = new ToggleNode(true); 26 | IgnoreScrollOfWisdom = new ToggleNode(true); 27 | AllUniques = new ToggleNode(true); 28 | Maps = new ToggleNode(true); 29 | UniqueMap = new ToggleNode(true); 30 | MapFragments = new ToggleNode(true); 31 | MapTier = new RangeNode(1, 1, 16); 32 | QuestItems = new ToggleNode(true); 33 | Gems = new ToggleNode(true); 34 | GemQuality = new RangeNode(1, 0, 20); 35 | Flasks = new ToggleNode(true); 36 | FlasksQuality = new RangeNode(1, 0, 20); 37 | GroundChests = new ToggleNode(false); 38 | ShaperItems = new ToggleNode(true); 39 | ElderItems = new ToggleNode(true); 40 | HunterItems = new ToggleNode(true); 41 | VeiledItems = new ToggleNode(true); 42 | RedeemerItems = new ToggleNode(true); 43 | CrusaderItems = new ToggleNode(true); 44 | WarlordItems = new ToggleNode(true); 45 | FracturedItems = new ToggleNode(true); 46 | HeistItems = new ToggleNode(true); 47 | Rares = new ToggleNode(true); 48 | RareJewels = new ToggleNode(true); 49 | RareRings = new ToggleNode(true); 50 | RareRingsilvl = new RangeNode(1, 0, 100); 51 | RareAmulets = new ToggleNode(true); 52 | RareAmuletsilvl = new RangeNode(1, 0, 100); 53 | RareBelts = new ToggleNode(true); 54 | RareBeltsilvl = new RangeNode(1, 0, 100); 55 | RareGloves = new ToggleNode(false); 56 | RareGlovesilvl = new RangeNode(1, 0, 100); 57 | RareBoots = new ToggleNode(false); 58 | RareBootsilvl = new RangeNode(1, 0, 100); 59 | RareHelmets = new ToggleNode(false); 60 | RareHelmetsilvl = new RangeNode(1, 0, 100); 61 | RareWeapon = new ToggleNode(false); 62 | RareWeaponWidth = new RangeNode(2, 1, 2); 63 | RareWeaponHeight = new RangeNode(4, 1, 4); 64 | RareWeaponilvl = new RangeNode(1, 0, 100); 65 | RareArmour = new ToggleNode(false); 66 | RareArmourilvl = new RangeNode(1, 0, 100); 67 | RareShield = new ToggleNode(false); 68 | RareShieldilvl = new RangeNode(1, 0, 100); 69 | RareShieldWidth = new RangeNode(2, 1, 2); 70 | RareShieldHeight = new RangeNode(4, 1, 4); 71 | FullRareSetManagerOverrideAllowIdentifiedItems = new ToggleNode(false); 72 | PickUpEverything = new ToggleNode(false); 73 | NormalRuleFile = string.Empty; 74 | MagicRuleFile = string.Empty; 75 | RareRuleFile = string.Empty; 76 | UniqueRuleFile = string.Empty; 77 | WeightRuleFile = string.Empty; 78 | IgnoreRuleFile = string.Empty; 79 | LeftClickToggleNode = new ToggleNode(true); 80 | OverrideItemPickup = new ToggleNode(false); 81 | MouseSpeed = new RangeNode(1, 0, 30); 82 | } 83 | 84 | public ToggleNode Enable { get; set; } 85 | public HotkeyNode PickUpKey { get; set; } 86 | public RangeNode PickupRange { get; set; } 87 | public RangeNode ChestRange { get; set; } 88 | public RangeNode ExtraDelay { get; set; } 89 | public ToggleNode ShaperItems { get; set; } 90 | public ToggleNode ElderItems { get; set; } 91 | public ToggleNode HunterItems { get; set; } 92 | public ToggleNode VeiledItems { get; set; } 93 | public ToggleNode CrusaderItems { get; set; } 94 | public ToggleNode WarlordItems { get; set; } 95 | public ToggleNode RedeemerItems { get; set; } 96 | public ToggleNode FracturedItems { get; set; } 97 | public ToggleNode HeistItems { get; set; } 98 | public ToggleNode Rares { get; set; } 99 | public ToggleNode RareJewels { get; set; } 100 | public ToggleNode RareRings { get; set; } 101 | public RangeNode RareRingsilvl { get; set; } 102 | public ToggleNode RareAmulets { get; set; } 103 | public RangeNode RareAmuletsilvl { get; set; } 104 | public ToggleNode RareBelts { get; set; } 105 | public RangeNode RareBeltsilvl { get; set; } 106 | public ToggleNode RareGloves { get; set; } 107 | public RangeNode RareGlovesilvl { get; set; } 108 | public ToggleNode RareBoots { get; set; } 109 | public RangeNode RareBootsilvl { get; set; } 110 | public ToggleNode RareHelmets { get; set; } 111 | public RangeNode RareHelmetsilvl { get; set; } 112 | public ToggleNode RareArmour { get; set; } 113 | public RangeNode RareArmourilvl { get; set; } 114 | public ToggleNode RareShield { get; set; } 115 | public RangeNode RareShieldilvl { get; set; } 116 | public RangeNode RareShieldWidth { get; set; } 117 | public RangeNode RareShieldHeight { get; set; } 118 | public ToggleNode RareWeapon { get; set; } 119 | public RangeNode RareWeaponWidth { get; set; } 120 | public RangeNode RareWeaponHeight { get; set; } 121 | public RangeNode RareWeaponilvl { get; set; } 122 | public ToggleNode FullRareSetManagerOverrideAllowIdentifiedItems { get; set; } 123 | public EmptyNode LinkSocketRgbEmptyNode { get; set; } 124 | public ToggleNode Sockets { get; set; } 125 | public RangeNode TotalSockets { get; set; } 126 | public ToggleNode Links { get; set; } 127 | public RangeNode LargestLink { get; set; } 128 | public ToggleNode RGB { get; set; } 129 | public RangeNode RGBWidth { get; set; } 130 | public RangeNode RGBHeight { get; set; } 131 | public EmptyNode AllOverridEmptyNode { get; set; } 132 | public ToggleNode PickUpEverything { get; set; } 133 | public ToggleNode AllDivs { get; set; } 134 | public ToggleNode AllCurrency { get; set; } 135 | public ToggleNode IgnoreScrollOfWisdom { get; set; } 136 | public ToggleNode AllUniques { get; set; } 137 | public ToggleNode Maps { get; set; } 138 | public RangeNode MapTier { get; set; } 139 | public ToggleNode UniqueMap { get; set; } 140 | public ToggleNode MapFragments { get; set; } 141 | public ToggleNode Gems { get; set; } 142 | public RangeNode GemQuality { get; set; } 143 | public ToggleNode Flasks { get; set; } 144 | public RangeNode FlasksQuality { get; set; } 145 | public ToggleNode QuestItems { get; set; } 146 | public ToggleNode GroundChests { get; set; } 147 | public ToggleNode LeftClickToggleNode { get; set; } 148 | public ToggleNode OverrideItemPickup { get; set; } 149 | public string NormalRuleFile { get; set; } 150 | public string MagicRuleFile { get; set; } 151 | public string RareRuleFile { get; set; } 152 | public string UniqueRuleFile { get; set; } 153 | public string WeightRuleFile { get; set; } 154 | public string IgnoreRuleFile { get; set; } 155 | public ToggleNode MoveInventoryView { get; set; } = new ToggleNode(false); 156 | public ToggleNode ShowInventoryView { get; set; } = new ToggleNode(true); 157 | public Vector2 InventorySlotsVector2 { get; set; } = new Vector2(0,0); 158 | public RangeNode MouseSpeed { get; set; } 159 | public ToggleNode ReturnMouseToBeforeClickPosition { get; set; } = new ToggleNode(true); 160 | public RangeNode TimeBeforeNewClick { get; set; } = new RangeNode(500, 0, 1500); 161 | public ToggleNode UseWeight { get; set; } = new ToggleNode(false); 162 | public ToggleNode LazyLooting { get; set; } = new ToggleNode(false); 163 | public HotkeyNode LazyLootingPauseKey { get; set; } = new HotkeyNode(Keys.Space); 164 | 165 | public ToggleNode FullRareSetManagerOverride { get; set; } = new ToggleNode(false); 166 | public FRSMOverrides FullRareSetManagerPickupOverrides { get; set; } = new FRSMOverrides(); 167 | 168 | public class FRSMOverrides 169 | { 170 | public int Weapons { get; set; } = -1; 171 | public int Helmets { get; set; } = -1; 172 | public int BodyArmors { get; set; } = -1; 173 | public int Gloves { get; set; } = -1; 174 | public int Boots { get; set; } = -1; 175 | public int Belts { get; set; } = -1; 176 | public int Amulets { get; set; } = -1; 177 | public int Rings { get; set; } = -1; 178 | 179 | public int MinItemLevel { get; set; } = 60; 180 | public int MaxItemLevel { get; set; } = 74; 181 | } 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /Pickit Rules/(Default) Ignore.txt: -------------------------------------------------------------------------------- 1 | # Names are BaseName OR ClassName 2 | -------------------------------------------------------------------------------- /Pickit Rules/(Default) Magic.txt: -------------------------------------------------------------------------------- 1 | # Names are ItemBaseName 2 | 3 | ############ 4 | # Currency # 5 | ############ 6 | 7 | # Full # 8 | Exalted Orb 9 | Chaos Orb 10 | Mirror of Kalandra 11 | Albino Rhoa Feather 12 | Perandus Coin 13 | 14 | # Sextants 15 | Journeyman Cartographer's Sextant 16 | Master Cartographer's Sextant 17 | 18 | # Shards # 19 | Ancient Shard 20 | Exalted Shard 21 | Horizon Shard 22 | Mirror Shard 23 | 24 | Harbinger's Shard 25 | 26 | # Splinters 27 | Splinter of Chayula 28 | 29 | #Divination Cards 30 | Chaos Disposition 31 | 32 | # Labyrinth # 33 | Treasure Key 34 | Golden Key 35 | 36 | Opal Ring 37 | Steel Ring -------------------------------------------------------------------------------- /Pickit Rules/(Default) Normal.txt: -------------------------------------------------------------------------------- 1 | # Names are ItemBaseName 2 | 3 | ############ 4 | # Currency # 5 | ############ 6 | 7 | # Full # 8 | Exalted Orb 9 | Chaos Orb 10 | Mirror of Kalandra 11 | Albino Rhoa Feather 12 | Perandus Coin 13 | 14 | # Nets # 15 | Bestiary Orb 16 | Imprinted Bestiary Orb 17 | Reinforced Iron Net 18 | Reinforced Rope Net 19 | Reinforced Steel Net 20 | Simple Iron Net 21 | Simple Rope Net 22 | Simple Steel Net 23 | Strong Iron Net 24 | Strong Rope Net 25 | Strong Steel Net 26 | Thaumaturgical Net 27 | 28 | # Sextants 29 | Journeyman Cartographer's Sextant 30 | Master Cartographer's Sextant 31 | 32 | # Shards # 33 | Ancient Shard 34 | Exalted Shard 35 | Horizon Shard 36 | Mirror Shard 37 | 38 | Harbinger's Shard 39 | 40 | # Splinters 41 | Splinter of Chayula 42 | 43 | #Divination Cards 44 | Chaos Disposition 45 | 46 | # Labyrinth # 47 | Treasure Key 48 | Golden Key -------------------------------------------------------------------------------- /Pickit Rules/(Default) Rare.txt: -------------------------------------------------------------------------------- 1 | # Names are ItemBaseName 2 | 3 | Opal Ring 4 | Steel Ring -------------------------------------------------------------------------------- /Pickit Rules/(Default) Unique.txt: -------------------------------------------------------------------------------- 1 | # Names are ItemBaseName 2 | 3 | ##################### 4 | # Unique Item Bases # 5 | ##################### 6 | 7 | # Rings 8 | Unset Ring 9 | Sage's Robe 10 | Crimson Jewel 11 | Cobalt Jewel 12 | Prismatic Jewel 13 | Viridian Jewel -------------------------------------------------------------------------------- /Pickit Rules/Backup/(Default) Non Unique-Rares.txt: -------------------------------------------------------------------------------- 1 | # Names are ItemBaseName 2 | 3 | ############ 4 | # Currency # 5 | ############ 6 | 7 | # Full # 8 | Exalted Orb 9 | Chaos Orb 10 | Mirror of Kalandra 11 | Albino Rhoa Feather 12 | Perandus Coin 13 | 14 | # Sextants 15 | Journeyman Cartographer's Sextant 16 | Master Cartographer's Sextant 17 | 18 | # Shards # 19 | Ancient Shard 20 | Exalted Shard 21 | Horizon Shard 22 | Mirror Shard 23 | 24 | Harbinger's Shard 25 | 26 | # Splinters 27 | Splinter of Chayula 28 | 29 | #Divination Cards 30 | Chaos Disposition 31 | 32 | # Labyrinth # 33 | Treasure Key 34 | Golden Key -------------------------------------------------------------------------------- /Pickit Rules/Backup/(Default) Rares.txt: -------------------------------------------------------------------------------- 1 | # Names are ItemBaseName -------------------------------------------------------------------------------- /Pickit Rules/Backup/(Default) Uniques.txt: -------------------------------------------------------------------------------- 1 | # Names are ItemBaseName 2 | 3 | ##################### 4 | # Unique Item Bases # 5 | ##################### 6 | 7 | # Rings 8 | Unset Ring 9 | Sage's Robe 10 | Crimson Jewel 11 | Cobalt Jewel 12 | Prismatic Jewel 13 | Viridian Jewel -------------------------------------------------------------------------------- /Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("PickIt")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("PickIt")] 12 | [assembly: AssemblyCopyright("Copyright © 2019")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("286eb4c6-31a1-4b8e-bf5a-83f9591ae322")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PickIt 2 | -------------------------------------------------------------------------------- /packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | --------------------------------------------------------------------------------