Better Warcraft Gear through Powershell Recurrsion

My warlock has reached 80. He has just about all the regular quest rewards that one can get through soloing the area. Now comes the long haul of playing the more advanced group areas of the game, except even my best quested gear wasn't cutting it for some of the lowest heroic dungeons.

So, using a combination of MaxDPS and the Gear Wishlist, I determined that the best tailored outfit would be the Ebonweave Robe. This tailored purple item would be a great step up in the current item I have equipped.

Unfortunately for one of my guilde tailors to make this for me is going to require some serious materials "mats". Just exactly what it would require, I wasn't so sure. So, knowing this is possible via a script, I developed the following. It reads a simple list of ingredients from a CSV (attached below). It then takes the ingredients of those ingredients (Bolt of Imbued Frostweave = requires infinite dust and a bolt of frostweave, etc.). It then creates a list of the raw ingredients to make this robe.

In case your are curious, they are:
Raw materials for Ebonweave Robe

  • Frostweave x 60
  • Infinite Dust x 12
  • Frostweave x 80
  • Infinite Dust x 16
  • Eternal Shadow x 16
  • Eternium Thread x 1
  • Frozen Orb x 1

function get-ingredientfor([string]$item, [int]$multi) {       
        $Needed = $csv | ?{$_.item -eq $item}  
        if ($needed -ne $null) {
                $needed | % {                  
                        if ($_.ingredient -ne "") {get-ingredientfor $_.ingredient ($multi * $_.count)}
                        else {                         
                                Write-Host $item "x" $multi
                        }
                }
        } else {
                #return $item
                Write-Host $item "x" $multi
        }
}


$csv = Import-Csv -path c:\ebonweaverobe.csv
$Wish = "Ebonweave Robe"
Write-Host "Raw materials for" $wish
get-ingredientfor $Wish 1

AttachmentSize
ebonweaverobe.csv435 bytes

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <blockquote> <center> <hr> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <drupal6>, <html>, <java>, <javascript>, <php>, <posh>.

More information about formatting options