Update: Here is the interface for the class that I have so far, this looks to be semi-final, let me know asap about missing features
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
'Recipe class: Coded by Darkfire for EQ2, suppose it could be used for other
' crafting things. Interface is as follows, don't fret about version numbers
' all future releases will be backwards compatible.
'Properties (all properties are read only, unless specified)
'
' Name - the name of the finished item, with no quality clarifiers (shaped, etc)
'
' Level - the skill level of the recipie. 0 for primary ingredients
'
' Skill - the skill used in this rec, Chemistry, etc. returns string
'
' numParts - the total number of ingredients, including fuel and primary, will be 0
' if the entry is a primary ingredient
'
' Parts - returns an array of all ingredients. returns an array of objects, not just names
' note, ingredients may be recipies all their own, check before assuming
'
' merSell - the price that the NPC SELLS the item for - 0 is not availible
'
' merBuy - the price that the NPC BUYS the item for. 0 is NO-VALUE
'
' makeCost - returns an array: array(0) is the cost of the parts that can be
' bought from merchants. from 1 to UBound - 1 consists of a list of items
' that cannot be bought from merchants
'
' estProfit - returns output just like makeCost, but array(0) is the estimated
' profit if everything was bought from NPC, and sold to NPC. the other elements need
' to be gotten
'
' fromBook - the name of the book that scribes the recipie, may not be avalible, so
' USE ERROR CHECKING
'
' Sellable - True unless NO-VALUE
' Buyable - True if buyable from NPC
' isRec - True if it is a recipe (false if its a primary ingredient)
' isIng - Inverse of isRec
'Methods
'
' Load(FileName, RecipieName) - Loads the specified entry from a file, returns the name
' on a successful load, "NoFile" on file not found, "NoEntry" on file found, but entry doenst exist
'
' Save(FileName, RefFileName) - Adds entry to FileName, optionally putting a reference in RefFileName
' Pass "" as RefFileName for no reference entries
'