RandomTesting/Get-RelicDropPrices.ps1
#load in functions and $relic from utilities file . .\utilities.ps1 # Function to take in a relic name and return the prices of the drops function Get-RelicDropPrices { param( [string]$relicName, [hashtable]$Relics, [hashtable]$ItemData ) $partInfo = @() Foreach($drop in $Relics[$relicName].drops) { #The item property would be something like "Carrier Prime" and the part property would be like "Chassis Blueprint" $partName = "$($drop.item) $($drop.Part)" $partPrices = Get-AveragePrice -partName (Convert-PartName $partName) $partInfo += [PSCustomObject]@{ Name = $partName Listed48Hours = $partPrices[0] Closed48Hours = $partPrices[1] Status = if([string]::IsNullOrEmpty($ItemData[$partname].Vaulted)){""}else{"Vaulted"} JunkPlat = [math]::round([Double]($ItemData[$partname].DucatValue) / 7.5) DucatValue = $ItemData[$partname].DucatValue } } $partInfo | sort-object -Property Listed48Hours -Descending | Format-Table } #Get-RelicDropPrices -relicName "Lith A1" -Relics $Relics -ItemData $ItemData |