Here is a 'concept' script that shows how one might iterate through all recipes on a given character and output information about those recipes to a file.
Code:
function main()
{
variable int i = 1
variable string FileName = "../Extensions/eq2RecipeInfoDatabase.txt"
; Open up the recipe window initially. That loads up most of the recipe information
EQ2Execute /toggletradeskills
wait 10
EQ2Execute /toggletradeskills
echo Please standby. This may take a few minutes...
redirect -append ${FileName} echo Total Number of Recipes: ${Me.NumRecipes}\n-----\n
do
{
; Check to see if the information is already loaded into the client. If not, pull up
; an 'examine' window to obtain the information.
if (${Me.Recipe[${i}].PrimaryComponent.Length} == 0)
{
Me.Recipe[${i}]:Examine
wait 2
EQ2Execute /close_top_window
wait 2
}
; Now you can process the information as you see fit. Here is a few examples:
redirect -append ${FileName} echo Recipe Number: ${i}
redirect -append ${FileName} echo Name: ${Me.Recipe[${i}].Name}
redirect -append ${FileName} echo Description: ${Me.Recipe[${i}].Description}
redirect -append ${FileName} echo PrimaryComponent: ${Me.Recipe[${i}].PrimaryComponent}
redirect -append ${FileName} echo Build Component 1: ${Me.Recipe[${i}].BuildComponent1.Name} (Quantity: ${Me.Recipe[${i}].BuildComponent1.Quantity})\n\n
; ...and so forth. The wiki has been updated at http://www.ismods.com/wiki/index.php/ISXEQ2:recipe_%28Data_Type%29 so as to include
; all of the new 'recipe' datatype members.
}
while ${i:Inc} <= ${Me.NumRecipes}
echo Finished!
}