khi Tradeskills - Tradeskills Macro with Ini File Support

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

Kaitain
a ghoul
a ghoul
Posts: 109
Joined: Fri Oct 10, 2003 1:49 pm

khi Tradeskills - Tradeskills Macro with Ini File Support

Post by Kaitain » Sun May 02, 2004 8:05 am

Summary:
khiTS is a macro for automatically doing tradeskill combines using recipes saved in an ini file.

Notes:
I've got the macro working pretty well now but it is not totally complete.

Please post any problems you have and I'll try to fix them as quickly as possible, usually the bugs that directly affect me are the ones that get fixed first.

!!!!WARNING!!!!
You mush have the following in your Recipes.ini file:

[Recipes]
Test=True

Or it won't find the recipes file, I was CTD'ing from buffer overflow using just ${Ini[recipes.ini]} since it now returns all the headings instead of just the first one.

Credits:
Thanks go out to DKAA for the insperation to write this, my original was strongly based on his tradeskill combine macro. Also thanks to Diggler for the creation of the original ini file format and his wife for the hard work she put in entering a large number of recipes, and finally to everyone that has entered thier own recipes on my website.


Setup:

Save the recipes.ini file to your macro directory. I will be updating that to use item id's shortly to avoid duplicates, but will allow aliases so you can call a recipe whatever you want.


Usage:

/macro khits "RecipeName" ["options"]

Code: Select all

|**

    khiTS.mac
    
    Author:     Kaitain Heavy Industries
    Date:       30 Apr 04
    Version:    2.2.2.14
    
    Description:
    Performs tradeskill combines using recipes supplied in an ini file
    
    Credits:
    Inspired by Dont_Know_At_All's Trade Skills macro - The status report idea is completely stolen from him (but rewritten by me)
    Ini file uses the format created by Diggler (this will eventually being changed to a new format using item id's)
   
    Notes:
    * Updated to use MQ2DataVars
    * This is a complete overhaul of the whole macro in addition changing it to work with MQ2Data and MQ2DataVars
    * You should be able to simply rename "sub main" to "sub khiTS" if you want to use this as an included file.
    * No longer destroys tools or components used to do combines when destroy-results is enabled.
    * This is a BIG macro and may be slow as hell on older computers.

   Usage:
   /macro khits <recipe_name> <options>

   Example:
   /macro khits bits "show-stats=0 destroy=0 abort-on-tell=0 end-on-trivial=0 silent-mode=0"

**|


#event SkillTrivial "You can no longer advance your skill from making this item" 
#event SkillUp "You have become better at" 
#event SkillFailure "You lacked the skills" 
#event SkillSuccess "You have fashioned the items together to create something new" 
#event FullInventory "There was no place to put that" 
#event CombineError "You cannot combine these items in this container type!" 
#chat tell 
#define INIPATH "recipes.ini"

| ***** Tweek this to your computer, if you get a lot of an item in the combine container, increase this number
#define COMBINE_DELAY 4

| Main entry point
sub Main
    /echo 
    /echo 
    /echo *****************************************
    /echo khiTs: Tradeskills running : ${Time}
    /echo *****************************************
    /echo


    | Check for no parameters or help
    /if (${Defined[Param0]}==FALSE || ${String[${Param0}].Upper.Equal[HELP]}) { 
        /call displayHelp
        /call clearCursor ${iDestroyResults}
        /endmacro    
    }

    | Variable declarations
    
    | Recipe info
    
    | The name of the combination being done, this is used to look up the recipe in the recipe.ini file
    /declare recipeName         string  local   NOT_SET
    | container in which the recipe will be made
    /declare containerName      string  local   NOT_SET   
    | Loop variable, which component we are getting the name of
    /declare iCompLoop          int     local   1
    | The name of the current component we're getting
    /declare currentComp        string  local   NOT_SET   
    | Make sure we have that recipe in the ini file
    /declare recipeCheck        string  local   NOT_SET   

    | Settings                          : "abort-on-tell=0 destroy-results=0 end-on-trivial=0 show-stats=0 silent-mode=0"
    | Stops the macro if someone sends you a tell
    /declare abortOnTell        int     local   0   
    | How many itmes the user has requested be made
    /declare makeThisMany       int     local   0  
    | Display when you succed, get skillups, fail, etc.
    /declare showStats          int     local   0
    | Keeps MQ window spam to a minimum
    /declare silentMode         int     local   0

    | GenPurpParms
    /declare slotNumber         int     local   1
    | For looping through containers
   
    | Only declare outer variables once, this is in case you use this as an include 
    /if (${Defined[components]}==FALSE) {
        | Recipe info
        
        | Array of components used to make the recipe
        /declare components[10]     string  outer
        | Container in which the recipe will be made
        /declare containerNum       string  outer   NOT_SET  
        | The number of components in this recipe
        /declare iCompCount         int     outer   0

        /declare bCombineDone       bool    outer   FALSE
        /declare bSkillTrivial      bool    outer   FALSE

        | Settings
        | Destroys the results of a combine (but not any items used in the combine)
        /declare iDestroyResults     int     outer   0  

        | Stops the macro when you can no longer get skillups from doing the combine
        /declare iEndOnTrivial       int     outer   0

        | Skillup info
        | How many times you've tried a combination
        /declare iSkillAttempts      int     outer   0  
        | How many times it worked
        /declare iSkillSuccess       int     outer   0
        | How many times it didn't work
        /declare iSkillFailure       int     outer   0
        | How many skill points you have received
        /declare iSkillUps           int     outer   0
        
        | The results of what we are making
        /declare sResults           string  outer   NOT_SET

    } else {
        | Clean out the last components used, this is in case we have not cleared the variables or are using this as an include
        /deletevar components
        /declare components[10]
    }
        
    | Read the settings

    |Get requested recipe's name
    /varset recipeName ${Param0}
    
    | If there is only one parameter, then there are no options
    /echo khiTS: Reading parameters
    /if (${Defined[Param1]}==TRUE) {
    
        /call parseArguments "abort-on-tell" "${Param1}"
        /varset abortOnTell ${Macro.Return}
        
        /call parseArguments "destroy-results" "${Param1}"
        /varset iDestroyResults ${Macro.Return}
        
        /call parseArguments "end-on-trivial" "${Param1}"
        /varset iEndOnTrivial ${Macro.Return}

        |/call parseArguments "make-this-many" "${Param1}"
        |/varset makeThisMany ${Macro.Return}

        /call parseArguments "show-stats" "${Param1}"
        /varset showStats ${Macro.Return}

        /call parseArguments "silent-mode" "${Param1}"
        /varset silentMode ${Macro.Return}
        
    } else {
        
        | Default settings
        /varset abortOnTell     0
        /varset iDestroyResults 0
        /varset iEndOnTrivial   0
        /varset showStats       0
        /varset silentMode      0
    }


    
    | *** Get recipe container and ingredients
    
    | Make sure the recipe file exists (the recipes thing is a fix for a bug in the Ini function)
    /varset recipeCheck ${Ini[INIPATH,recipes]} 
    /if (${recipeCheck.Equal[NULL]}) {
        /echo khiTS Error: Recipe file not found
        /echo Path = INIPATH\recipe.ini
        /goto :khiTSCleanUpMacro
    }


    | Make sure this recipe exists in the recipe.ini file
    /varset recipeCheck ${Ini[INIPATH,${recipeName}]}
    /if (${recipeCheck.Equal[NULL]}) {
        /echo khiTS Error: Recipe not found 
        /echo Recipe name = ${recipeName}
        /goto :khiTSCleanUpMacro
    }

    | Get the container name
    /varset containerName ${Ini[INIPATH,${recipeName},Cont]}
    /if (${containerName.Equal[NULL]}) {
        /echo khiTS Error: Error in ini file for this recipe, no container is specified 
        /echo Recipe name = ${RecipeName}
        /goto :khiTSCleanUpMacro
    }
 
    | Read the ingredients for the recipe from the ini file
    /varset iCompLoop 0
    :khiTSReadComponentsLoop
    /varset currentComp ${Ini[INIPATH,${recipeName},Comp${iCompLoop}]}
    /if (${String[${currentComp}].NotEqual[null]}) {
        /varcalc iCompLoop ${iCompLoop}+1
        /varset components[${iCompLoop}] ${currentComp}
        /goto :khiTSReadComponentsLoop
    }
    /varset iCompCount ${iCompLoop}
   
    | Find the combine container number
    /if (${containerName.Equal[Enviro]}) {
        /if (${Window[Enviro].Open}==FALSE) {
            /echo khiTS Error: You must have the enviromental container open first (${Window[Enviro].Open})
            /goto :khiTSCleanUpMacro
        }
        /varset containerNum e
    } else {
        | Not an enviromental container so find the container's pack number, this is how we will refer to it from now on
        /varset containerNum ${FindItem[=${containerName}].InvSlot.ID}
        /if (${containerNum}) {
            /varcalc containerNum ${containerNum}-21
            /varset containerNum ${containerNum.Arg[0,.]}
        } else {
            | Didn't find the container
            /echo khiTS Error: Could not find container in your inventory (x)
            /echo       Contanier name = ${containerName}
            /goto :khiTSCleanUpMacro
        }
        
    }
    :khiTSFoundContainerNum
    
   
    | Open inventory if not open
    /echo khiTS: Opening inventory and containers
    /if (${Window[Inventory].Open}==FALSE) {
        /windowstate inventory open
    }

    | Open all packs if they aren't already - you have to handle arranging them and you have to have "use ctrl-r-click" set properly - for now
    /for slotNumber 1 to 8
        /if (${Window[Pack${slotNumber}].Open}==FALSE) {
            /itemnotify pack${slotNumber} rightmouseup
        }
    /next slotNumber

    | Remove anything from the cursor if needed
    /call clearCursor ${iDestroyResults}

    | Clear the combine pack
    /call cleanPack ${containerNum}

    | If you can't clean out the pack - exit
    /if (${Macro.Return}==FALSE) {
        /echo khiTS Error: Unable to clean out pack (${containerNum})
        /return
    }
    
    :khiTSCombineLoop
        |/echo combine loop
        | Delete or Save items depending on settings
        /call clearCursor ${iDestroyResults}
        
        /if (${sResults.Equal[NOT_SET]}) {
            /echo khiTS: Making ${recipeName}
        } else {
            /echo khiTS: Making ${sResults} - Count = ${FindItemCount[${sResults}]}
        }        
        
        
        | Move ingredients to container
        /call addComponents
        /if (${Macro.Return}==FALSE) {
            /echo khiTS Error: Component not found
            /goto :khiTSCleanUpMacro
        }
        
        | Combine
        /varset bCombineDone FALSE
        /varcalc iSkillAttempts ${iSkillAttempts}+1
        :DoCombineLoop
        |/echo Combining
        /delay COMBINE_DELAY
        /call clearCursor ${iDestroyResults}
        /if (${String[${containerNum}].Equal[e]}) {
            /combine enviro
        } else {
            /combine pack${containerNum}
        }
        | needs this delay here to make sure the combine is finished, you may need to tweek this to your computer/connection 10 should be safe, I can get away with 7
        /delay COMBINE_DELAY
       
        | Keep track of what we've done - these events are called individually so they do not conflict with a parent macro if this macro is used as an included file
        /doevents SkillTrivial
        /doevents SkillUp
        /doevents SkillFailure
        /doevents SkillSuccess
        /doevents CombineError
        /doevents FullInventory
        /doevents tell
        
        /if (!${bCombineDone}) {
            /goto :DoCombineLoop
        }
        
        | See if we have made enough
        |/if (${String[${makeThisMany}].Equal[${iSkillSuccess}]}) {
        |    /goto :khiTSCleanUpMacro
        |}

        /goto :khiTSCombineLoop


    | The macro is ending, clean up
    :khiTSCleanUpMacro
    | /mqpause      
    | Delete or Save items depending on settings - Just in case
    /call clearCursor ${iDestroyResults}
    /call cleanPack ${containerNum}
    /call DisplayStats 
    /endmacro
    
/return

| Removes anything on the cursor. If DestroyResults is 1, then it will destroy anything not in the components array
sub clearCursor(int DestroyResults)
    |/echo Destroy Results = ${DestroyResults}
    :khiTSClearCursorLoop
    /delay 5
    | Is there anything on the cursor?
    /if (${String[${Cursor}].NotEqual[Null]}) {
        /if (${DestroyResults}==1) {
            | Make sure the item on the cursor is not something we want to save
            /for saveCount 1 to 10
                /if (${components[${iCompLoop}].Equal[${Cursor.Name}]) {
                    /autoinv
                    /goto :khiTSClearCursorLoop
                }
            /next saveCount
            | Whatever is on the cursor wasn't in the save list
            /destroy
         } else {
            /autoinv
        }
 
        /goto :khiTSClearCursorLoop
    }
/return

| Finds the value of an argument in a parameter string
sub parseArgument(string sArgument,string sParameters)
    
    /declare iArgNum    int     local   
    | Loop variable
    /declare sArgValue  string  local   
    | Save the current arg
    
    /for iArgNum 1 to 10
    
        /if (${sParameters.Arg[${iArgNum}, ].Left[-2].Equal[${sArgument}]}) {
            /varset sArgValue ${sParameters.Arg[${iArgNum}, ].Right[1]}
            /goto :FoundArg
        }
    
    /next iArgNum
    :FoundArg
    
/return sArgValue



Sub DisplayStats 
    /echo
    /echo khiTS: Stat display - Not Completely done
    /echo ================================
    /echo Attempts: ${iSkillAttempts}
    /echo Successes: ${iSkillSuccess}
    /echo Faliures: ${iSkillFailure}
    /echo Skill Ups: ${iSkillUps}
    
/return

Sub Event_Chat 
    /if ($String[${abt}].Equal[TRUE]}) { 
        /echo khiTS: Got a tell, pausing. 
        /press mqpause 
    } 
/return 

Sub Event_CombineError
    /echo khiTS: Combine Error - Oh shit, it's all fucked up
    /call cleanPack ${containerNum}
    /call clearCursor ${iDestroyResults}
    /endmacro 
/return 

Sub Event_FullInventory 
    /echo khiTS Error: Your inventory is full, ending macro.
    /call DisplayStats 
    /endmacro
/return 

Sub Event_SkillFailure 
    /varcalc iSkillFailure ${iSkillFailure}+1
    /varset bCombineDone TRUE
/return 

Sub Event_SkillSuccess 
    /if (${sResults.Equal[NOT_SET]}) {
        :WaitForIt
        /delay 5
        /varset sResults ${Cursor.Name}
        /if (${sResults.Equal[NULL]}) /goto :WaitForIt
    }    
    /varcalc iSkillSuccess ${iSkillSuccess}+1
    /varset bCombineDone TRUE
/return 

Sub Event_SkillUp
    /varcalc iSkillUps ${iSkillUps}+1

/return 

Sub Event_SkillTrivial 
    
    /if (!${bSkillTrivial}) {
        /echo khiTS: Skill is trivial
        /varset bSkillTrivial TRUE
    }
    
    
    /if (${iEndOnTrivial}==1) {
        /call DisplayStats 
        /call cleanPack ${containerNum}
        /call clearCursor ${iDestroyResults}
        /endmacro
    }
/return 

| Return the number of free slots in your inventory or a container
sub freeInventory(int PackNumber,string ItemName)
    
    | ItemName   - If you are looking for free inventory available for a specific item give an item name
    | PackNumber - If you want to look in just one pack for an item, give a pack number
    
    
    | How many slots are available  
    /declare freeSlots  int     local   0 
    | Used for looping through inventory pack nunbers
    /declare iPack      int     local   1
    | Used for looping through pack slots
    /declare iSlot      int     local   1
    | Used with iPack to limit checking the contents of just one pack
    /declare startPack  int     local   1
    | Used with iPack to limit checking the contents of just one pack
    /declare EndPack    int     local   8

    | If no pack number is given, we need to define it and set it to null so we don't error out later
    /if (!${Defined[PackNumber]}) {
        /declare PackNumber local NULL
     }

    | Are we looking at an enviromental container or in our inventory
    /if (${String[${PackNumber}].Equal[e]}) {
    
        /if (${Window[Enviro].Open}==NULL) {
            /echo freeInventory Error: You must have the enviromental container open before testing it for available space
            /return -1
        }
    
        /if (${Defined[ItemName]}) {
            /echo freeInventory Error: Currently this sub does not support checking for stackable ItemName space in an enviromental container
            /return -1
        }
        
        | This is REALLY crappy and slow, but right now there is no way (that I know of) to examine the contents of an enviromental container
        /for iPack 0 to 9 
            /shiftkey /click left enviro ${iPack}
            /if (${Cursor.ID}==NULL) {
                /varcalc freeSlots ${freeSlots}+1
            } else {
                /click left enviro ${iPack}
            }
        /next iPack
        
    } else {
        | Not enviromental container
        
        | If a pack number was given, only look in that one pack
        /if (${String[${PackNumber}].NotEqual[Null]}) {
            /varset startPack   ${PackNumber}
            /varset EndPack     ${PackNumber}
        }
        
        /for iPack ${startPack} to ${EndPack}
            | /echo iPack = ${iPack}
            | Check to see if there is a bag in this slot
            /if (${Me.Inventory[Pack${iPack}].Container}==0) {
                | No bag, see if there is anything
                /if (${String[${Me.Inventory[21+${iPack}]}].Equal[Me]}) {
                    | Nothing in this slot
                    /if (${Defined[ItemName]}) {
                        | /echo Empty Pack slot
                        /varadd freeSlost 20
                    } else {
                        /varadd freeSlots 1
                    }
                } else {
                    | See if this ItemName is what we are looking for, and see if there is free stackable space
                    /if (${Defined[ItemName]}) {
                        | /echo Name = ${Me.Inventory[21+${iPack}].Name} : iPack = ${iPack}
                        if (${Me.Inventory[21+${iPack}].Name.Equal[${ItemName}]}) {
                            | See how many stackable slots are available
                            /if (${Me.Inventory[21+${iPack}].Stackable}) {
                                /varcalc freeSlots ${freeSlots}+(20-${Me.Inventory[21+${iPack}].Stack})
                            }
                        }
                    
                    } 
                }
            } else {
                | This is a bag
                
                | Are we looking for item space or just free space
                /if (${Defined[ItemName]}) {

                    /for iSlot 1 to ${Me.Inventory[Pack${iPack}].Container} 
                        | /echo Looking at item: ${Me.Inventory[Pack${iPack}].Item[${iSlot}].Name}
                        | /echo ItemName = ${ItemName}
                        /if (${Me.Inventory[Pack${iPack}].Item[${iSlot}].Name.Equal[${ItemName}]}) {
                            | /echo Found item ${ItemName}
                            | Make sure it's stackable
                            /if (${Me.Inventory[Pack${iPack}].Item[${iSlot}].Stackable}) {
                                /varcalc freeSlots ${freeSlots}+(20-${Me.Inventory[Pack${iPack}].Item[${iSlot}].Stack})
                            }
                        } else {
                            /if (${String[${Me.Inventory[Pack${iPack}].Item[${iSlot}]}].Equal[null]}) {
                                /varcalc freeSlots ${freeSlots}+20
                            }
                        }
                    /next iSlot
                    
                } else {
                    | This is a bag, but item name is not given
                    /varcalc freeSlots ${freeSlots}+(${Me.Inventory[Pack${iPack}].Container}-${Me.Inventory[Pack${iPack}].Items})
                }
                
            }
        /next iPack
    }
    
/return ${freeSlots}


| Remove everything from a pack and puts in in your inventory
sub cleanPack(string PackNumber)
    /echo khiTS: Cleaning out pack
    /declare iSlot      int local   
    | Used for looping through pack slots
    /declare iCount     int local   
    | How many freeslots are in the bag

    /if (${String[${PackNumber}].Equal[e]}) {
        /echo clearing enviro
        |This is REALLY crappy and slow, but right now there is no way (that I know of) to examine the contents of an enviromental container
        /for iSlot 1 to 10 
            /shiftkey /itemnotify enviro${iSlot} leftmouseup
            /call clearCursor ${iDestroyResults}
        /next iSlot
    
    } else {
        
        | Can't empty a non-pack duh!
        /if (${Me.Inventory[Pack${PackNumber}].Container}==0) {
            /return
        }

        /for iSlot 1 to ${Me.Inventory[Pack${PackNumber}].Container}
            | Quit if the pack is empty
            /if (${Me.Inventory[Pack${PackNumber}].Container}==0) {
                /return TRUE
            }

            /if (${Me.Inventory[Pack${PackNumber}].Item[${iSlot}].ID}!=NULL) {
                /varset iCount ${Me.Inventory[Pack${PackNumber}].Items}
                /shiftkey /itemnotify in pack${PackNumber} ${iSlot} leftmouseup
                /call clearCursor ${iDestroyResults}
                | Make sure we aren't just putting it back in the same bag
                /if (${Me.Inventory[Pack${PackNumber}].Items}==${iCount}) {
                    /echo CleanPack Error: Unable to empty pack.
                    /return FALSE
                }
            }
        /next iSlot
    }
    /delay 5
    /echo Done Cleaning pack
/return TRUE

| Put the components needed into the container
sub addComponents
    |/echo khiTS: Adding Components
    /delay 5
    /declare iPack      int		local   
    | Used for looping through inventory pack nunbers
    /declare iSlot      int		local   
    | Used for looping through pack slots
    /declare compNum    int		local   
    | Loop integer
    /declare combSlot   int		local   
    | The slot number in the combine container to put the next item
    
    /varset combSlot 1
    
    /for compNum 1 to ${iCompCount}
        | /echo components[${compNum}] = ${components[${compNum}]} : Length = ${components[${compNum}].Length}
        /if (${components[${compNum}].Length}==0) {
            | Didn't fail, so must have passed
            /return TRUE
        }
        | Find the item - can't use ${FindItem[]} because I want to ignore anything in the combine container
        /for iPack 1 to 8
            | Don't look in the container we are using to do the combine
            /if (${String[${iPack}].NotEqual[${containerNum}]}) {
                | Look inside bags
                /if (${Me.Inventory[Pack${iPack}].Container}>0) {
                    /for iSlot 1 to ${Me.Inventory[Pack${iPack}].Container}
                         | Does this item match the component
                        /if (${components[${compNum}].Equal[${Me.Inventory[Pack${iPack}].Item[${iSlot}].Name}]}) {
                            /call AddComp ${Me.Inventory[Pack${iPack}].Item[${iSlot}].InvSlot.ID} ${containerNum} ${combSlot}
                            /if (!${Macro.Return}) {
                            	/return FALSE
                            }
                        	/varcalc combSlot ${combSlot}+1                          
							/goto :FoundItem                    
                        }
                    /next iSlot
                } else {
                    | Handle stuff not in bags
                    /if (${components[${compNum}].Equal[${Me.Inventory[21+${iPack}]}]}) {
                        /call AddComp (21+${iPack}) ${containerNum} ${combSlot}
                        /if (!${Macro.Return}) {
                        	/return FALSE
                        }
                       	/varcalc combSlot ${combSlot}+1                          
                        /goto :FoundItem                    
                    }
                }
                
            }
        /next iPack

        | Didn't find the item
        /echo khiTS addComponents: Couldn't find component: ${components[${compNum}]}
        /return FALSE

        :FoundItem

    /next compNum

/return TRUE



sub AddComp(int InvSlotNum,string CombinePackNumber,int CombineSlotNumber) 
    | InvSlotNum			- The slot in which the item exists
    | CombinePackNumber - Destination pack number, e for enviro
    | CombineSlotNumber - Destination slot number
    |/echo InvSlotNum = ${InvSlotNum}
    |/echo CombinePackNumber = ${CombinePackNumber}
    |/echo CombineSlotNumber = ${CombineSlotNumber}
    
    /if (!${Defined[InvSlotNum]} || !${Defined[CombinePackNumber]} || !${Defined[CombineSlotNumber]}) {
    	/echo AddComp Error: You must specify the component's InvSlotNum.ID, the container number, and the container slot in which to put the compents
    	/echo Syntax: /call AddComp <InvSlotNum> <Pack Number> <Slot Number in Pack>
    	/return FALSE
    }

	| Check container to see if it is full
	/if (${CombinePackNumber.Equal[e]}) {
		| No way I know of to check enviro containers for space - but I'm ignorant so...
	} else {
		/if (${Me.Inventory[pack${CombinePackNumber}].Container}-${Me.Inventory[pack${CombinePackNumber}].Items}==0) {
			/echo AddComp Error: Unable to add this item to the container, it is full
			/return FALSE
		}
	}

	:FindEmptySlot
	| /echo CombineSlot = ${CombineSlotNumber}
    /if (${CombinePackNumber.Equal[e]}) {
    	/if (${CombineSlotNumber}>10) {
    		/echo AddComp Error: Unable to find and empty slot in enviro container, it is full
    		/return FALSE
    	}
    } else {
    	/if (${CombineSlotNumber}>${Me.Inventory[pack${CombinePackNumber}].Container}) {
    		/echo AddComp Error: Unable to find and empty slot in this container, it is full
    		/return FALSE
    	}
    }
    | See if there's anything in the slot in which we are trying to put the combine component
    /if (${CombinePackNumber.Equal[e]}) {
        /itemnotify in enviro ${CombineSlotNumber} leftmouseup 
        | Make sure the cursor is clear, otherwise something was in that slot
        /if (${Cursor.ID}!=NULL) {
	        /itemnotify in enviro ${CombineSlotNumber} leftmouseup 
			/varcalc CombineSlotNumber ${CombineSlotNumber}+1
			/varset CombineSlotNumber ${String[${CombineSlotNumber}].Arg[0,.]}
	    	/goto :FindEmptySlot
        }
    } else {
    	/if (${Me.Inventory[pack${CombinePackNumber}].Item[${CombineSlotNumber}].ID}!=NULL) {
			/varcalc CombineSlotNumber ${CombineSlotNumber}+1
			/varset CombineSlotNumber ${String[${CombineSlotNumber}].Arg[0,.]}
	    	/goto :FindEmptySlot
    	}
    }
	
	| Slot is empty, so go ahead and put item into it
	| Found it, pick it up and move it to the combine container
    /ctrlkey /itemnotify ${InvSlotNum} leftmouseup
    | /echo ComponentName = ${ComponentName}
    | /echo CombinePackNumber = ${CombinePackNumber}
    /if (${String[${CombinePackNumber}].Equal[e]}) {
        /itemnotify in enviro ${CombineSlotNumber} leftmouseup 
    } else {
    	/itemnotify in pack${CombinePackNumber} ${CombineSlotNumber} leftmouseup
    }
    

/return TRUE

| Explain to the user how to use the macro
sub displayHelp

    /echo Syntax:   /macro khiTS "<recipe name>" "<options>"
    /echo Example:  /macro khiTS "bits" "show-stats=0 destroy=0 abort-on-tell=0 end-on-trivial=0" 
    /echo - 
    /echo MAKE SURE THAT
    /echo * Recipe.ini is in your macro folder, or INIPATH points to your recipe.ini file
    /echo * Inventory is open. 
    /echo * All your containers are open. 
    /echo * Nothing crosses over each other, all windows (bags, inventory, buttons) must be free. 
    /echo * Your windos positions are saved (by closing them and opening them again after they have been moved). 
    /echo - 
    /echo Options:
    /echo -------- 
    /echo * show-stats 
    /echo -- Syntax: show-stats=1|0 
    /echo -- Example: show-stats=0 
    /echo -- Shows combine statistics. 
    /echo -- Set to 1 for show showing stats, 0 to leave out the stats. 
    /echo -- Default set to 1 (show stats). 
    /echo - 
    /echo * destroy 
    /echo -- Syntax: destroy=1|0 
    /echo -- Example: destroy=1 
    /echo -- Tells the macro wether end-result is destroyed or kept. 
    /echo -- Set to 1 for destroying end-result, 1 to keep end-result. 
    /echo -- Default set to 0 (keep end-result). 
    /echo - 
    /echo * abort-on-tell 
    /echo -- Syntax: abort-on-tell=1|0 
    /echo -- Example: abort-on-tell=1 
    /echo -- Tell the macro wether it should /endmacro when recieving a tell. 
    /echo -- Set to 1 for ending macro on tells, 0 to ignore tells. 
    /echo -- Default set to 0 (ignore tells). 
    /echo - 
    /echo * end-on-trivial 
    /echo -- Syntax: end-on-trivial=1|0 
    /echo -- Example: end-on-trivial=1 
    /echo -- Tell the macro wether it should stop combines when recieving a trivial message. 
    /echo -- Set to 1 for ending macro on trivial, 0 to ignore trivial. 
    /echo -- Default set to 0 (ignore trivial). 
    /echo - 
    /echo * combines 
    /echo -- Syntax: combine=# 
    /echo -- Example: combine=100 
    /echo -- The number of successfull combines you want made (or till no more components are available). 
    /echo -- Set to 0 for unlimited combines (or till no more components are available), or to the wanted amount. 
    /echo -- Default set to 0 (unlimited). 
    /echo - 
    /echo * default 
    /echo -- Syntax: default 
    /echo -- Tell the macro to use all default settings, any other options set will be ignored and defaults will be used. 
/return
See following post for recipes.ini file
Last edited by Kaitain on Wed May 05, 2004 1:09 pm, edited 5 times in total.

Kaitain
a ghoul
a ghoul
Posts: 109
Joined: Fri Oct 10, 2003 1:49 pm

Recipes.Ini

Post by Kaitain » Sun May 02, 2004 8:06 am

[Recipes]
Test=True

[Accuracy]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Blue Vervain Bulb
Comp2=Fenugreek

[acorn]
Cont=Enviro
Comp0=Misty Acorn
Comp1=Water Flask

[AcornOil]
Cont=Enviro
Comp0=Misty Acorn
Comp1=Water Flask

[acryliabits]
Cont=Enviro
Comp0=Small Piece Of Acrylia
Comp1=Small Piece Of Acrylia
Comp2=Water Flask

[acryliasheet]
Cont=Enviro
Comp0=Block Of Acrylia Ore
Comp1=Smithy Hammer
Comp2=Water Flask

[Adrenaline]
Cont=Medicine Bag
Comp0=Comfrey
Comp1=Dhea

[Adr]
Cont=Medicine Bag
Comp0=Comfrey
Comp1=Dhea

[Adroitness]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Blue Vervain Bulb
Comp2=Sage Leaf

[advancedpoisonvial]
Cont=Enviro
Comp0=High Quality Firing Sheet
Comp1=Unfired Advanced Poison Vial

[advancedpropulsionunit]
Cont=Enviro
Comp0=Coiled Spring
Comp1=Firewater
Comp2=Saltpeter
Comp3=Tinkered Catapult

[Ale]
Cont=Enviro
Comp0=Barley
Comp1=Cask
Comp2=Malt
Comp3=Water Flask

[Ant]
Cont=Medicine Bag
Comp0=Celandine Herb
Comp1=Sumbul

[Antibody]
Cont=Medicine Bag
Comp0=Blue Vervain Bulb
Comp1=Maidenhair Fern
Comp2=Mullein

[AntiWeight]
Cont=Medicine Bag
Comp0=Hydrangea
Comp1=Sumbul

[ApricotMarmalade]
Cont=spit
Comp0=Frosting
Comp1=Frosting
Comp2=Frosting
Comp3=Fruit

[aqualung]
Cont=Enviro
Comp0=Fine Coral Mesh
Comp1=Fresh Fish
Comp2=Gnomish Bolts
Comp3=Metal Rod
Comp4=Metal Twine
Comp5=Silk Lined Steel Helm

[AquaticHaunt]
Cont=Medicine Bag
Comp0=Hydrangea
Comp1=Jatamasi

[Arrow102Triv]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Hooked Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[Arrow36Triv]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Medium Groove Nocks
Comp3=Several Round Cut Fletchings

[Arrow46Triv]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Parabolic Cut Fletchings

[Arrow56Triv]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Several Round Cut Fletchings
Comp3=Small Groove Nocks

[Arrow68Triv]
Cont=Fletching Kit
Comp0=Bundled Bone Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[Arrow82Triv]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Shield Cut Fletchings

[arrowz]
Cont=Planar Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Set Of Ceramic Arrow Vanes

[artisanseal]
Cont=Enviro
Comp0=Mounted Black Sapphire
Comp1=Mounted Blue Diamond
Comp2=Mounted Diamond
Comp3=Mounted Jacinth
Comp4=Small Block Of Clay
Comp5=Vial Of Purified Mana
Comp6=Water Flask

[ashafts]
Cont=Enviro
Comp0=Arrow Shaft Mold
Comp1=Small Brick Of Acrylia Ore
Comp2=Water Flask

[AshenDye]
Cont=Enviro
Comp0=Ashweed
Comp1=Water Flask

[Assailing]
Cont=Medicine Bag
Comp0=Bugbane
Comp1=Cyclop's Eye

[BA1]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Sage Leaf
Comp2=Sumbul

[BA2]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Elderberry
Comp2=Sage Leaf

[BA3]
Cont=Medicine Bag
Comp0=Briar Thistle
Comp1=Figwort
Comp2=Sage Leaf

[BA4]
Cont=Medicine Bag
Comp0=Agrimony
Comp1=Briar Thistle
Comp2=Clover
Comp3=Dhea
Comp4=Sage Leaf

[baas]
Cont=Enviro
Comp0=Arrow Shaft Mold
Comp1=Small Brick Of Acrylia Ore
Comp2=Water Flask

[BandedGorget]
Cont=Enviro
Comp0=Gorget Mold
Comp1=Sheet Metal
Comp2=Water Flask

[BandedHelm]
Cont=Enviro
Comp0=Helm Mold
Comp1=Sheet Metal
Comp2=Sheet Metal
Comp3=Water Flask

[BandedMail]
Cont=Enviro
Comp0=Mail Sectional Mold
Comp1=Sheet Metal
Comp2=Sheet Metal
Comp3=Sheet Metal
Comp4=Water Flask

[Barbarian]
Cont=Medicine Bag
Comp0=Barbarian Meat
Comp1=Wormwood

[baseprototype]
Cont=Enviro
Comp0=Grease
Comp1=Pinion
Comp2=Steel Ball Bearing
Comp3=Steel Casing

[BDP]
Cont=Enviro
Comp0=Blue Diamond
Comp1=Jar Of Acid

[BearCreamFillet]
Cont=spit
Comp0=Creamy Fennel Sauce
Comp1=Filleted Bear

[bearfilletcream]
Cont=Enviro
Comp0=Creamy Fennel Sauce
Comp1=Filleted Bear

[BearFillets]
Cont=spit
Comp0=Bear Meat
Comp1=Filleting Knife

[bits]
Cont=Enviro
Comp0=Small Piece Of Ore
Comp1=Small Piece Of Ore
Comp2=Water Flask

[bdust]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Imbued Emerald
Comp2=Jar Of Acid

[BlockMQOre]
Cont=Enviro
Comp0=Large Brick Of Medium Quality Ore
Comp1=Large Brick Of Medium Quality Ore
Comp2=Large Brick Of Medium Quality Ore
Comp3=Water Flask

[bluediamondpowder]
Cont=Enviro
Comp0=Blue Diamond
Comp1=Jar Of Acid

[boarchops]
Cont=Collapsible Spit
Comp0=Boar Meat
Comp1=Garnish
Comp2=Spices

[bogjuice]
Cont=Enviro
Comp0=Bottle
Comp1=Snake Scales
Comp2=Water Flask

[BoneField]
Cont=Medicine Bag
Comp0=Heliotrope
Comp1=Sandlewood

[Bracelet]
Cont=Kit
Comp0=System.collections.arraylist
Comp1=System.collections.arraylist

[BreadedStormSalmon]
Cont=Collapsible Spit
Comp0=Bread Crumbs
Comp1=Garnish
Comp2=Jug Of Sauces
Comp3=Storm Salmon

[BreathlessMist]
Cont=Medicine Bag
Comp0=A Cork
Comp1=Cave Algea
Comp2=Empty Vial
Comp3=Oakmoss
Comp4=Sage Leaf
Comp5=Woundwart

[brick]
Cont=Enviro
Comp0=Brick
Comp1=Brick
Comp2=Water Flask

[bucket]
Cont=Enviro
Comp0=Bucket Mold
Comp1=Metal Bits
Comp2=Metal Bits
Comp3=Water Flask

[C1WHA]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Hooked Arrowheads
Comp2=Medium Groove Nocks
Comp3=Several Round Cut Fletchings

[C1WS]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Large Groove Nocks
Comp2=Several Round Cut Fletchings
Comp3=Silver Tipperd Arrowheads

[C1WSA]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Large Groove Nocks
Comp2=Several Round Cut Fletchings
Comp3=Silver Tipped Arrowheads

[C2SSA]
Cont=Planar Fletching Kit
Comp0=Bundled Steel Arrow Shafts
Comp1=Several Parabolic Cut Fletchings
Comp2=Silver Tipped Arrowheads
Comp3=Small Groove Nocks

[C2WPA]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Several Parabolic Cut Fletchings
Comp3=Small Groove Nocks

[C4BHA]
Cont=Fletching Kit
Comp0=Bundled Bone Arrow Shafts
Comp1=Hooked Arrowheads
Comp2=Medium Groove Nocks
Comp3=Set Of Wooden Arrow Vanes

[c5wp]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Set Of Bone Arrow Vanes

[C6sta]
Cont=Collapsible Fletching Kit
Comp0=Bundled Wooded Arrow Shafts
Comp1=Medium Groove Nocks
Comp2=Set Of Ceramic Arrow Vanes
Comp3=Silver Tiped Arrowheads

[C6WP]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Set Of Ceramic Arrow Vanes

[CA1]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Benzoin
Comp2=Sumbul

[CA2]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Benzoin
Comp2=Elderberry

[CA3]
Cont=Medicine Bag
Comp0=Benzoin
Comp1=Briar Thistle
Comp2=Figwort

[CA4]
Cont=Medicine Bag
Comp0=Agrimony
Comp1=Benzoin
Comp2=Briar Thistle
Comp3=Clover
Comp4=Dhea

[CalcifiedSteelBracer]
Cont=Enviro
Comp0=Bone Temper
Comp1=Medium Quality Folded Sheet Metal
Comp2=Plate Bracer Mold
Comp3=Smithy Hammer
Comp4=Superb Leather Padding
Comp5=Water Flask

[cdrb]
Cont=Enviro
Comp0=Darkwood Bow Staff
Comp1=Silk String
Comp2=Whittling Blade

[CelestialEss]
Cont=Collapsible Mortar And Pestle
Comp0=Celestial Solvent
Comp1=The Scent Of Marr

[celestialessance]
Cont=Collapsible Mortar And Pestle
Comp0=Celestial Solvent
Comp1=Words Of The Ethereal

[CelestialEssence]
Cont=Mixing Bowl
Comp0=Celestial Solvent
Comp1=The Scent Of Marr

[Cess]
Cont=Mixing Bowl
Comp0=Celestial Solvent
Comp1=The Scent Of Marr

[ctemp]
Cont=enviro
Comp0=Blue Diamond Powder
Comp1=Purified Water

[celestialtemp]
Cont=Enviro
Comp0=Blue Diamond Powder
Comp1=Purified Water

[celestialtemper]
Cont=Enviro
Comp0=Blue Diamond Powder
Comp1=Purified Water

[CEPrex]
Cont=pestle
Comp0=Celestial Solvent
Comp1=Tears Of Prexus

[ceramic]
Cont=Fletching Kit
Comp0=Bundled Ceramic Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[CERathe]
Cont=pestle
Comp0=Celestial Solvent
Comp1=Essence Of Rathe

[CERo]
Cont=pestle
Comp0=Celestial Solvent
Comp1=Essence Of Ro

[CERZ]
Cont=pestle
Comp0=Celestial Solvent
Comp1=Glove Of Rallos Zek

[CEs]
Cont=pestle
Comp0=Celestial Solvent
Comp1=The Scent Of Marr

[cessence]
Cont=Enviro
Comp0=Celestial Solvent
Comp1=The Scent Of Marr

[CEXeg]
Cont=pestle
Comp0=Celestial Solvent
Comp1=Wing Of Xegony

[CharmingDeceit]
Cont=Medicine Bag
Comp0=Mugwart
Comp1=Undead Froglok Tongue

[Cheese]
Cont=Mixing Bowl
Comp0=Bottle Of Milk
Comp1=Bottle Of Milk
Comp2=Dairy Spoon
Comp3=Rennet

[class1-102]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Hooked Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[class1-135]
Cont=Enviro
Comp0=Bundled Ceramic Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[class1-16]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[class1-182]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Large Groove Nocks
Comp2=Several Round Cut Fletchings
Comp3=Silver Tipped Arrowheads

[class1-36]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Medium Groove Nocks
Comp3=Several Round Cut Fletchings

[class1-56]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Several Round Cut Fletchings
Comp3=Small Groove Nocks

[class1-68]
Cont=Enviro
Comp0=Bundled Bone Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[class3-82]
Cont=Enviro
Comp0=Bundled Bone Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Shield Cut Fletchings

[class4-122]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Set Of Wooden Arrow Vanes

[class5-162]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Set Of Bone Arrow Vanes

[class6-202]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Set Of Ceramic Arrow Vanes

[CLining]
Cont=Enviro
Comp0=Quality Firing Sheet
Comp1=Unfired Ceramic Lining

[ClumpOfDough]
Cont=Collapsible Mixing Bowl
Comp0=Basilisk Eggs
Comp1=Bottle Of Milk
Comp2=Cup Of Flour

[CodOil]
Cont=Brew Barrel
Comp0=Cobalt Cod
Comp1=Water Flask

[Cohesion]
Cont=Medicine Bag
Comp0=Blue Vervain Bulb
Comp1=Fenugreek
Comp2=Sage Leaf

[Cold]
Cont=Medicine Bag
Comp0=Allspice
Comp1=Birthwart
Comp2=Blue Vervain Bulb

[Concealment]
Cont=Medicine Bag
Comp0=Burdock Root
Comp1=Empty Vial
Comp2=Mystic Ash
Comp3=Swamp Vine

[Concentration]
Cont=Medicine Bag
Comp0=Violet Tri-tube
Comp1=Yerbhimba

[cookingdevice]
Cont=Enviro
Comp0=Blue Diamond
Comp1=Branch Of Sylvan Oak
Comp2=Cogs
Comp3=Gears
Comp4=Grease
Comp5=Sprockets

[Corpal]
Cont=Medicine Bag
Comp0=Evil Eye Eyestalk
Comp1=Horehound

[Cream]
Cont=mixing
Comp0=Benzoin
Comp1=Bottle Of Milk
Comp2=Bottle Of Milk
Comp3=Dairy Spoon

[CreamyFennel]
Cont=mixing
Comp0=Cream
Comp1=Cup Of Flour
Comp2=Fennel

[csa]
Cont=Enviro
Comp0=Chunk Of Condensed Shadow
Comp1=File
Comp2=Water Flask

[curedmask]
Cont=Enviro
Comp0=Heady Kiola
Comp1=Mask Pattern
Comp2=Silk Swatch

[CuredSilkMask]
Cont=Planar Sewing Kit
Comp0=Heady Kiola
Comp1=Mask Pattern
Comp2=Silk Swatch

[DA1]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Birthwart
Comp2=Sumbul

[DA2]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Birthwart
Comp2=Elderberry

[DA3]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Briar Thistle
Comp2=Figwort

[DA4]
Cont=Medicine Bag
Comp0=Agrimony
Comp1=Birthwart
Comp2=Briar Thistle
Comp3=Clover
Comp4=Dhea

[dairyspoon]
Cont=Enviro
Comp0=Metal Bits
Comp1=Metal Bits
Comp2=Scaler Mold
Comp3=Water Flask

[DarkElf]
Cont=Medicine Bag
Comp0=Dark Elf Parts
Comp1=Wormwood

[darkwoodbow]
Cont=Enviro
Comp0=Darkwood Bow Staff
Comp1=Hemp Twine
Comp2=Standard Bow Cam
Comp3=Standard Bow Cam

[DBKaladimC]
Cont=Enviro
Comp0=Fermenting Dust
Comp1=Kaladim Constitutional
Comp2=Kaladim Constitutional
Comp3=Purified Water

[DEndurance]
Cont=Medicine Bag
Comp0=Beltherium Bark
Comp1=Blade Leaf

[dish]
Cont=Enviro
Comp0=Casserole Dish Sketch
Comp1=Ceramic Lining
Comp2=Large Block Of Clay
Comp3=Water Flask

[dough]
Cont=mixing
Comp0=egg
Comp1=flour
Comp2=milk

[Dristilate]
Cont=Medicine Bag
Comp0=A Chant Rock
Comp1=Firiona Drixie Dust
Comp2=Stoneleer Emerald Plume

[Dulsehound]
Cont=Medicine Bag
Comp0=Balm Leaves
Comp1=Hill Giant Toes

[dustemerald]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Imbued Emerald
Comp2=Jar Of Acid

[Dwarf]
Cont=Medicine Bag
Comp0=Dwarf Meat
Comp1=Wormwood

[DWFur]
Cont=Vale Sewing Kit
Comp0=Embroidering Needle
Comp1=Patch Of Dire Wolf Fur
Comp2=Patch Of Dire Wolf Fur
Comp3=Patch Of Dire Wolf Fur

[DWPatch]
Cont=Vale Sewing Kit
Comp0=Embroidering Needle
Comp1=Tuft Of Dire Wolf Fur
Comp2=Tuft Of Dire Wolf Fur
Comp3=Tuft Of Dire Wolf Fur

[dye]
Cont=Enviro
Comp0=Plant Shoot
Comp1=Water Flask

[DyeVial]
Cont=Enviro
Comp0=Quality Firing Sheet
Comp1=Unfired Dye Vial

[eamber]
Cont=Planar Jeweler's Kit
Comp0=Amber
Comp1=Electrum Bar

[ehs]
Cont=Enviro
Comp0=Elm Bow Staff
Comp1=Metal Bits
Comp2=Shears Mold
Comp3=Water Flask

[ElmShears]
Cont=Enviro
Comp0=Elm Bow Staff
Comp1=Metal Bits
Comp2=Shears Mold
Comp3=Water Flask

[emal]
Cont=Planar Jeweler's Kit
Comp0=Electrum Bar
Comp1=Malachite

[ENeedle]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Metal Bits
Comp2=Needle Mold
Comp3=Water Flask

[Erudite]
Cont=Medicine Bag
Comp0=Erudite Meat
Comp1=Wormwood

[Ethira]
Cont=Medicine Bag
Comp0=Hyssop
Comp1=Lady's Mantle

[evbits]
Cont=Enviro
Comp0=Coldain Velium Temper
Comp1=Small Piece Of Velium
Comp2=Small Piece Of Velium
Comp3=Spell: Enchant Velium

[fayshak]
Cont=Enviro
Comp0=Cask
Comp1=Dwarven Ale
Comp2=Elven Wine
Comp3=Gnomish Spirits
Comp4=Mead

[FermentedYarrow]
Cont=Brew Barrel
Comp0=Water Flask
Comp1=Yarrow

[Fetid Essence]
Cont=Brew Barrel
Comp0=Fishing Grubs
Comp1=Water Flask

[fetidessence]
Cont=Enviro
Comp0=Fishing Grubs
Comp1=Water Flask

[file]
Cont=Enviro
Comp0=File Mold
Comp1=Metal Bits
Comp2=Water Flask

[filletbear]
Cont=Enviro
Comp0=Bear Meat
Comp1=Filleting Knife

[fire]
Cont=Enviro
Comp0=firing
Comp1=unfired

[Fish Rolls]
Cont=Spit
Comp0=Bat Wing
Comp1=Fresh Fish

[fishrolls]
Cont=Enviro
Comp0=Bat Wing
Comp1=Fresh Fish

[fishwine]
Cont=Enviro
Comp0=Bottle
Comp1=Fresh Fish
Comp2=Grapes
Comp3=Water Flask

[flamelesslantern]
Cont=Enviro
Comp0=Firewater
Comp1=Large Lantern
Comp2=Metal Twine

[FleetingLanguor]
Cont=Medicine Bag
Comp0=Burdock Root
Comp1=White Wolf Skin

[fletch]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Medium Groove Nocks
Comp2=Set Of Cermaic Arrow Vanes
Comp3=Silver Tipped Arrowheads

[fletting knife]
Cont=Enviro
Comp0=Metal Bits
Comp1=Metal Bits
Comp2=Metal Bits
Comp3=Scaler Mold
Comp4=Water Flask

[FPBracer]
Cont=Enviro
Comp0=Leather Padding
Comp1=Medium Quality Folded Sheet Metal
Comp2=Plate Bracer Mold
Comp3=Smithy Hammer
Comp4=Water Flask

[Frost]
Cont=Medicine Bag
Comp0=Heliotrope
Comp1=Oakmoss

[FrostEssence]
Cont=Enviro
Comp0=Frost Turnip
Comp1=Water Flask

[FrostInsurgency]
Cont=Medicine Bag
Comp0=Bistort
Comp1=Polar Bear Skin

[GAccuracy]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Fenugreek
Comp2=Valerian Bulb

[GAdroitness]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Sage Leaf
Comp2=Valerian Bulb

[GAntibody]
Cont=Medicine Bag
Comp0=Maidenhair Fern
Comp1=Mullein
Comp2=Valerian Bulb

[Gate]
Cont=Medicine Bag
Comp0=Heliotrope
Comp1=Heliotrope
Comp2=Heliotrope

[gator]
Cont=Collapsible Mixing Bowl
Comp0=Gator Meat
Comp1=Jar Of Acid
Comp2=Mandrake Root

[gcarn]
Cont=Planar Jeweler's Kit
Comp0=Carnelian
Comp1=Gold Bar

[GCohesion]
Cont=Medicine Bag
Comp0=Fenugreek
Comp1=Sage Leaf
Comp2=Valerian Bulb

[GCold]
Cont=Medicine Bag
Comp0=Allspice
Comp1=Birthwart
Comp2=Valerian Bulb

[GConcentration]
Cont=Medicine Bag
Comp0=Duskglow Vine
Comp1=Violet Tri-tube

[GHeat]
Cont=Medicine Bag
Comp0=Benzoin
Comp1=Sage Leaf
Comp2=Valerian Bulb

[GiantHalibutSteak]
Cont=Enviro
Comp0=Giant Halibut
Comp1=Jug Of Sauces

[gmal]
Cont=Planar Jeweler's Kit
Comp0=Gold Bar
Comp1=Malachite

[GMInfusion]
Cont=Medicine Bag
Comp0=Sickle Leaf
Comp1=Yerbhimba

[GNegation]
Cont=Medicine Bag
Comp0=Mercury
Comp1=Mystic Ash
Comp2=Mystic Ash

[Gnome]
Cont=Medicine Bag
Comp0=Gnome Meat
Comp1=Wormwood

[GnomishBoils]
Cont=Medicine Bag
Comp0=Bat Fur
Comp1=Eyebright

[GNull]
Cont=Medicine Bag
Comp0=Fenugreek
Comp1=Mandrake Root
Comp2=Valerian Bulb

[GoldBlackPearl]
Cont=Planar Jeweler's Kit
Comp0=Black Pearl
Comp1=Gold Bar

[GoldFireEmerald]
Cont=Planar Jeweler's Kit
Comp0=Fire Emerald
Comp1=Gold Bar

[GoldFireOpal]
Cont=Planar Jeweler's Kit
Comp0=Fire Opal
Comp1=Gold Bar

[GoldRuby]
Cont=Planar Jeweler's Kit
Comp0=Gold Bar
Comp1=Ruby

[GoldSapphire]
Cont=Planar Jeweler's Kit
Comp0=Gold Bar
Comp1=Sapphire

[goldstaramulet]
Cont=Planar Jeweler's Kit
Comp0=Gold Bar
Comp1=Star Rose Quartz

[GoldStarRuby]
Cont=Planar Jeweler's Kit
Comp0=Gold Bar
Comp1=Star Ruby

[gopal]
Cont=Planar Jeweler's Kit
Comp0=Gold Bar
Comp1=Opal

[GorgingToxin]
Cont=Medicine Bag
Comp0=Boneset
Comp1=Giant Wasp Venom Sac

[GPower]
Cont=Medicine Bag
Comp0=Fenugreek
Comp1=Lucerne
Comp2=Valerian Bulb

[GPurity]
Cont=Medicine Bag
Comp0=Lucerne
Comp1=Night Shade
Comp2=Valerian Bulb

[GraveyardDust]
Cont=Medicine Bag
Comp0=Dragonwart
Comp1=Fire Giant Toes

[GRejuvenation]
Cont=Medicine Bag
Comp0=Agrimony
Comp1=Lucerne
Comp2=Sage Leaf

[grobb]
Cont=Enviro
Comp0=Cask
Comp1=Cork
Comp2=Corking Device
Comp3=Liquidised Gator
Comp4=Liquidised Rat
Comp5=Liquidised Snake
Comp6=Malt
Comp7=Soda Water

[GrobbLM]
Cont=Brew Barrel
Comp0=Cask
Comp1=Cork
Comp2=Corking Device
Comp3=Liquidised Gator
Comp4=Liquidised Rat
Comp5=Liquidised Snake
Comp6=Malt
Comp7=Soda Water

[GrobbMeat]
Cont=Enviro
Comp0=Cask
Comp1=Cork
Comp2=Corking Device
Comp3=Liquidised Gator
Comp4=Liquidised Rat
Comp5=Liquidised Snake
Comp6=Malt
Comp7=Soda Water

[GStability]
Cont=Medicine Bag
Comp0=Lucerne
Comp1=Sage Leaf
Comp2=Valerian Bulb

[GTRibbon]
Cont=Collapsible Sewing Kit
Comp0=Elm Handled Shears
Comp1=Gold Ribbon
Comp2=Jaggedpine Dye

[Gukta]
Cont=Medicine Bag
Comp0=Froglok Blood
Comp1=Wormwood

[Gulon]
Cont=Medicine Bag
Comp0=Figwort
Comp1=Lightstone

[GVigor]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Lucerne
Comp2=Valerian Bulb

[GWRibbon]
Cont=Planar Sewing Kit
Comp0=Gold Ribbon
Comp1=Hickory Handled Shears
Comp2=Steam Dye

[HalasMeatPies]
Cont=Enviro
Comp0=Bear Fillet In Cream
Comp1=Clump Of Dough
Comp2=Clump Of Dough
Comp3=Lion Fillet In Cream
Comp4=Mammoth Fillet In Cream
Comp5=Pie Tin
Comp6=Sage Leaf
Comp7=Wolf Fillet In Cream

[HalfElf]
Cont=Medicine Bag
Comp0=Half Elf Meat
Comp1=Wormwood

[Halfling]
Cont=Medicine Bag
Comp0=Halfling Parts
Comp1=Wormwood

[handbear]
Cont=Collapsible Sewing Kit
Comp0=Backpack Pattern
Comp1=High Quality Bear Skin

[handrock]
Cont=Collapsible Sewing Kit
Comp0=Backpack Pattern
Comp1=High Quality Rockhopper Hide

[harrowhead]
Cont=Enviro
Comp0=File
Comp1=Small Brick Of Ore
Comp2=Small Brick Of Ore
Comp3=Small Brick Of Ore
Comp4=Water Flask

[HawkEye]
Cont=Medicine Bag
Comp0=Star Reach Clover
Comp1=Tri-fern Leaf

[heady]
Cont=Enviro
Comp0=Bottle
Comp1=Packet Of Kiola Sap
Comp2=Packet Of Kiola Sap
Comp3=Water Flask

[HeadyK]
Cont=Enviro
Comp0=Bottle
Comp1=Packet Of Kiola Sap
Comp2=Packet Of Kiola Sap
Comp3=Water Flask

[Heat]
Cont=Medicine Bag
Comp0=Benzoin
Comp1=Blue Vervain Bulb
Comp2=Sage Leaf

[Herosandwitch]
Cont=Enviro
Comp0=Dressing
Comp1=Hero Parts
Comp2=Loaf Of Bread
Comp3=Smoked Hero Parts
Comp4=Spiced Hero Parts
Comp5=Vegetables

[HighElf]
Cont=Medicine Bag
Comp0=High Elf Parts
Comp1=Wormwood

[HightoMedHopperHide]
Cont=Planar Sewing Kit
Comp0=High Quality Rockhopper Hide
Comp1=Skinning Knife

[HQRings]
Cont=Enviro
Comp0=File
Comp1=Large Brick Of High Quality Ore
Comp2=Water Flask

[HQSealedVial]
Cont=Enviro
Comp0=High Quality Cat Pelt
Comp1=Sealed Vial Sketch
Comp2=Small Block Of Clay
Comp3=Water Flask

[Human]
Cont=Medicine Bag
Comp0=Human Parts
Comp1=Wormwood

[Iksar]
Cont=Medicine Bag
Comp0=Iksar Meat
Comp1=Wormwood

[infusedPT]
Cont=Enviro
Comp0=Celestial Temper
Comp1=Platinum Thread

[ipt]
Cont=Enviro
Comp0=Celestial Temper
Comp1=Platinum Thread



[JaggedpineDye]
Cont=Enviro
Comp0=Plant Shoot
Comp1=Water Flask

[jasperGE]
Cont=Jeweler's Kit
Comp0=Gold Bar
Comp1=Jasper

[JordMeatPie]
Cont=Collapsible Spit
Comp0=Clump Of Dough
Comp1=Jord Meat
Comp2=Pie Tin

[JumjumCake]
Cont=spit
Comp0=Cake Round
Comp1=Clump Of Dough
Comp2=Frosting
Comp3=Jumjum Stalk
Comp4=Winter Chocolate

[JumjumSalad]
Cont=mixing
Comp0=Fennel
Comp1=Jumjum Stalk
Comp2=Lettuce
Comp3=Vegetables

[JumjumSpicedBeer]
Cont=Enviro
Comp0=Barley
Comp1=Bottle
Comp2=Hops
Comp3=Jumjum Stalk
Comp4=Spices
Comp5=Water Flask

[JusticeFruitPie]
Cont=Collapsible Spit
Comp0=Celestial Essence
Comp1=Celestial Essence
Comp2=Clump Of Dough
Comp3=Frosting
Comp4=Justice Fruit
Comp5=Muffin Tin

[KaladimC]
Cont=Brew Barrel
Comp0=A Strange Dark Fungus
Comp1=Bottle
Comp2=Celestial Essence
Comp3=Cork
Comp4=Corking Device
Comp5=Fermented Yarrow
Comp6=Soda Water
Comp7=Underfoot Mushroom

[KilvaFlame]
Cont=Medicine Bag
Comp0=Clover
Comp1=Clubmoss
Comp2=Jatamasi

[KilvaFlesh]
Cont=Medicine Bag
Comp0=Clubmoss
Comp1=Jatamasi

[Kithar]
Cont=Medicine Bag
Comp0=Echinacea
Comp1=Lady's Mantle

[lantern]
Cont=Enviro
Comp0=Bottle
Comp1=Lantern Casing Mold
Comp2=Metal Bits
Comp3=Water Flask

[laqopal]
Cont=Collapsible Jeweler's Kit
Comp0=Jar Of Lacquer
Comp1=Opal

[large]
Cont=Enviro
Comp0=Glass Shard
Comp1=Large Block Of Clay
Comp2=Large Bowl Sketch
Comp3=Water Flask

[largemqore]
Cont=Enviro
Comp0=Small Brick Of Medium Quality Ore
Comp1=Small Brick Of Medium Quality Ore
Comp2=Small Brick Of Medium Quality Ore
Comp3=Water Flask

[lbco]
Cont=Enviro
Comp0=Large Brick Of Acrylia Ore
Comp1=Smithing Chisel

[leatherfoot]
Cont=Vale Sewing Kit
Comp0=Acorn Oil
Comp1=Infused Platinum Thread
Comp2=Infused Platinum Thread
Comp3=Infused Platinum Thread
Comp4=Woven Dire Wolf Fur
Comp5=Woven Dire Wolf Fur
Comp6=Woven Dire Wolf Fur
Comp7=Woven Dire Wolf Fur

[LeatherPaddingBear]
Cont=Planar Sewing Kit
Comp0=Low Quality Bear Skin
Comp1=Silk Thread

[LeatherPaddingCat]
Cont=Planar Sewing Kit
Comp0=Low Quality Cat Pelt
Comp1=Silk Thread

[LeatherPaddingHopper]
Cont=Planar Sewing Kit
Comp0=Low Quality Rockhopper Hide
Comp1=Shade Silk Thread

[Lining]
Cont=Enviro
Comp0=System.collections.arraylist
Comp1=System.collections.arraylist
Comp2=System.collections.arraylist

[LionCreamFillet]
Cont=spit
Comp0=Creamy Fennel Sauce
Comp1=Filleted Lion

[LionFillets]
Cont=spit
Comp0=Filleting Knife
Comp1=Lion Meat

[LOETunic]
Cont=Enviro
Comp0=Chainmail Tunic Pattern
Comp1=Electrum Bar
Comp2=High Quality Metal Rings
Comp3=High Quality Metal Rings
Comp4=High Quality Metal Rings
Comp5=Smithy Hammer
Comp6=Water Flask

[LowQBear]
Cont=Planar Sewing Kit
Comp0=Medium Quality Bear Skin
Comp1=Quiver Pattern

[LowQCat]
Cont=Planar Sewing Kit
Comp0=Medium Quality Cat Pelt
Comp1=Skinning Knife

[LowQWolf]
Cont=Planar Sewing Kit
Comp0=Medium Quality Wolf Skin
Comp1=Skinning Knife

[LRejuvenation]
Cont=Medicine Bag
Comp0=Lucerne
Comp1=Sage Leaf
Comp2=Yarrow

[MammothCreamFillet]
Cont=spit
Comp0=Creamy Fennel Sauce
Comp1=Filleted Mammoth

[mammothfillets]
Cont=Enviro
Comp0=Filleting Knife
Comp1=Mammoth Meat

[mantle]
Cont=Enviro
Comp0=Heady Kiola
Comp1=Heady Kiola
Comp2=Heady Kiola
Comp3=Heady Kiola
Comp4=Shoulderpad Pattern
Comp5=Silk Swatch
Comp6=Vial Of Viscous Mana

[MAptitude]
Cont=Medicine Bag
Comp0=Duskglow Vine
Comp1=Yerbhimba

[MarmaladeSandwich]
Cont=mixing
Comp0=Apricot Marmalade
Comp1=Loaf Of Bread

[MatureCheese]
Cont=mixing
Comp0=Bottle Of Milk
Comp1=Bottle Of Milk
Comp2=Dairy Spoon
Comp3=Rennet

[mbits]
Cont=Enviro
Comp0=Small Piece Of Ore
Comp1=Small Piece Of Ore
Comp2=Water Flask

[Mead]
Cont=Enviro
Comp0=Cask
Comp1=Hops
Comp2=Malt
Comp3=Yeast

[mechlockpick]
Cont=Enviro
Comp0=Gears
Comp1=Lockpicks
Comp2=Rat Ears
Comp3=Sprockets

[medium]
Cont=Enviro
Comp0=Block Of Clay
Comp1=Medium Bowl Sketch
Comp2=Water Flask

[medium quality sheets of metal]
Cont=Enviro
Comp0=Block Of Medium Quality Ore
Comp1=Smithy Hammer
Comp2=Water Flask

[MedQBear]
Cont=Large Sewing Kit
Comp0=High Quality Bear Skin
Comp1=Skinning Knife

[MedQCat]
Cont=Large Sewing Kit
Comp0=High Quality Cat Pelt
Comp1=Skinning Knife

[MedQWolf]
Cont=Large Sewing Kit
Comp0=High Quality Wolf Skin
Comp1=Skinning Knife

[MedtoLowHopperHide]
Cont=Planar Sewing Kit
Comp0=Medium Quality Rockhopper Hide
Comp1=Skinning Knife

[melt]
Cont=Enviro
Comp0=Bear Meat
Comp1=Cheese
Comp2=Loaf Of Bread
Comp3=Non-stick Frying Pan

[MInfusion]
Cont=Medicine Bag
Comp0=Sickle Leaf
Comp1=Sickle Leaf

[mini]
Cont=Enviro
Comp0=Cask
Comp1=Malt
Comp2=Malt
Comp3=Malt
Comp4=Short Beer
Comp5=Short Beer
Comp6=Water Flask
Comp7=Water Flask
Comp8=Yeast

[MinoBrew]
Cont=Enviro
Comp0=Cask
Comp1=Malt
Comp2=Malt
Comp3=Malt
Comp4=Short Beer
Comp5=Short Beer
Comp6=Water Flask
Comp7=Water Flask
Comp8=Yeast

[Minotar heros brew]
Cont=Brew Barrel
Comp0=Cask
Comp1=Malt
Comp2=Malt
Comp3=Malt
Comp4=Short Beer
Comp5=Short Beer
Comp6=Water Flask
Comp7=Water Flask
Comp8=Yeast

[mistletemp]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Elven Wine
Comp2=Mistletoe

[MistWolf]
Cont=Medicine Bag
Comp0=A Cork
Comp1=Bistort
Comp2=Empty Vial
Comp3=Saprophytic Moss
Comp4=Wolf Blood
Comp5=Wolf Blood
Comp6=Woundwart

[MistyThicketPicnic]
Cont=Enviro
Comp0=Jumjum Salad
Comp1=Jumjum Spiced Beer
Comp2=Marmalade Sandwich
Comp3=Mature Cheese
Comp4=Picnic Basket
Comp5=Royal Mints
Comp6=Slice Of Jumjum Cake
Comp7=Slice Of Jumjum Cake

[mountbd]
Cont=Planar Jeweler's Kit
Comp0=Blue Diamond
Comp1=Velium Bar
Comp2=Velium Bar

[mountdiamond]
Cont=Planar Jeweler's Kit
Comp0=Diamond
Comp1=Velium Bar
Comp2=Velium Bar

[mountjacinth]
Cont=Planar Jeweler's Kit
Comp0=Jacinth
Comp1=Velium Bar
Comp2=Velium Bar

[mountsap]
Cont=Planar Jeweler's Kit
Comp0=Black Sapphire
Comp1=Velium Bar
Comp2=Velium Bar

[MQoreconvert]
Cont=Enviro
Comp0=Small Brick Of Medium Quality Ore
Comp1=Small Brick Of Medium Quality Ore
Comp2=Small Brick Of Medium Quality Ore
Comp3=Water Flask

[MQSealedVial]
Cont=Enviro
Comp0=Medium Quality Cat Pelt
Comp1=Sealed Vial Sketch
Comp2=Small Block Of Clay
Comp3=Water Flask

[MQSheet]
Cont=Enviro
Comp0=Block Of Medium Quality Ore
Comp1=Smithy Hammer
Comp2=Water Flask

[mrings]
Cont=Enviro
Comp0=File
Comp1=Large Brick Of Ore
Comp2=Water Flask

[Null]
Cont=Medicine Bag
Comp0=Blue Vervain Bulb
Comp1=Fenugreek
Comp2=Mandrake Root

[OCCoif]
Cont=Enviro
Comp0=Chainmail Coif Pattern
Comp1=High Quality Metal Rings
Comp2=High Quality Metal Rings
Comp3=Silver Bar
Comp4=Smithy Hammer
Comp5=Water Flask

[OCTunic]
Cont=Enviro
Comp0=Chainmail Tunic Pattern
Comp1=High Quality Metal Rings
Comp2=High Quality Metal Rings
Comp3=High Quality Metal Rings
Comp4=Silver Bar
Comp5=Smithy Hammer
Comp6=Water Flask

[Ogre]
Cont=Medicine Bag
Comp0=Ogre Meat
Comp1=Wormwood

[Ol' Tujim's Fierce Brew]
Cont=Barrel
Comp0=Barley
Comp1=Cask
Comp2=Hops
Comp3=Malt
Comp4=Yeast

[OltujimsFB]
Cont=Enviro
Comp0=Barley
Comp1=Cask
Comp2=Hops
Comp3=Malt
Comp4=Yeast

[OpalSlush]
Cont=Medicine Bag
Comp0=Gorge Moss
Comp1=Pouch Of Dust
Comp2=Sponge Mushroom

[opalstein]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Ceramic Lining Sketch
Comp2=Lacquered Opal
Comp3=Large Block Of Magic Clay
Comp4=Sculpting Tools
Comp5=Water Flask

[PA1]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Night Shade
Comp2=Sumbul

[PA2]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Elderberry
Comp2=Night Shade

[PA3]
Cont=Medicine Bag
Comp0=Briar Thistle
Comp1=Figwort
Comp2=Night Shade

[PA4]
Cont=Medicine Bag
Comp0=Agrimony
Comp1=Briar Thistle
Comp2=Clover
Comp3=Dhea
Comp4=Night Shade

[PatchworkCloakCat]
Cont=Large Sewing Kit
Comp0=Cloak Pattern
Comp1=Ruined Cat Pelt

[pattymelt]
Cont=Enviro
Comp0=Bear Meat
Comp1=Cheese
Comp2=Loaf Of Bread
Comp3=Non-stick Frying Pan

[PBRibbon]
Cont=Enviro
Comp0=Ashen Dye
Comp1=Elm Handled Shears
Comp2=Platinum Ribbon

[PDye]
Cont=Enviro
Comp0=Glaze Lacquer
Comp1=Prism Shard

[perpetualairpump]
Cont=Enviro
Comp0=Coiled Spring
Comp1=Cured Leather Tubing
Comp2=Gears
Comp3=Steel Ball Bearing
Comp4=Vial Of Gases

[perpetualsteampump]
Cont=Enviro
Comp0=Coiled Spring
Comp1=Cured Leather Tubing
Comp2=Gears
Comp3=Steel Ball Bearing
Comp4=Water Flask

[picnic]
Cont=Collapsible Sewing Kit
Comp0=Steel Boning
Comp1=Woven Mandrake

[PicnicBasket]
Cont=Large Sewing Kit
Comp0=Steel Boning
Comp1=Woven Mandrake

[planarsteelbolts]
Cont=Enviro
Comp0=Brick Of Immaculate Steel
Comp1=Cam Parts Mold
Comp2=File

[planarwindbolts]
Cont=Enviro
Comp0=Cam Parts Mold
Comp1=Chunk Of Wind Metal
Comp2=File

[platjasper]
Cont=Planar Jeweler's Kit
Comp0=Jasper
Comp1=Platinum Bar

[PlatLapis]
Cont=Planar Jeweler's Kit
Comp0=Lapis Lazuli
Comp1=Platinum Bar

[PlatMala]
Cont=Planar Jeweler's Kit
Comp0=Malachite
Comp1=Platinum Bar

[PoTE]
Cont=Medicine Bag
Comp0=Faerie Wing
Comp1=Yebamante

[Power]
Cont=Medicine Bag
Comp0=Blue Vervain Bulb
Comp1=Fenugreek
Comp2=Lucerne

[poweredgloves]
Cont=Enviro
Comp0=Firewater
Comp1=Gears
Comp2=Metal Twine
Comp3=Sprockets
Comp4=Steel Lined Gloves

[PTRibbon]
Cont=Enviro
Comp0=Elm Handled Shears
Comp1=Jaggedpine Dye
Comp2=Platinum Ribbon

[purifiedwater]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Water Flask
Comp2=Water Flask

[Purity]
Cont=Medicine Bag
Comp0=Blue Vervain Bulb
Comp1=Lucerne
Comp2=Night Shade

[Purwater]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Water Flask
Comp2=Water Flask

[pvial]
Cont=Enviro
Comp0=High Quality Firing Sheet
Comp1=Unfired Poison Vial

[PWRibbon]
Cont=Planar Sewing Kit
Comp0=Elm Handled Shears
Comp1=Platinum Ribbon
Comp2=Steam Dye

[QeynosAT]
Cont=Brew Barrel
Comp0=Bayle's Delight
Comp1=Celestial Essence
Comp2=Cream
Comp3=Eucalyptus Leaf
Comp4=Flask
Comp5=Tea Leaves
Comp6=Water

[QoK]
Cont=Medicine Bag
Comp0=Erudition Vine
Comp1=Tanaan Ginko

[Quiver]
Cont=Planar Sewing Kit
Comp0=High Quality Cat Pelt
Comp1=Quiver Pattern

[rat]
Cont=Collapsible Mixing Bowl
Comp0=Jar Of Acid
Comp1=Mandrake Root
Comp2=Rat Meat

[regruameat]
Cont=Enviro
Comp0=Crab Cracker
Comp1=Regrua Claws

[Rejuvenation]
Cont=Medicine Bag
Comp0=Figwort
Comp1=Lucerne
Comp2=Sage Leaf

[roseplatring]
Cont=Planar Jeweler's Kit
Comp0=Platinum Bar
Comp1=Star Rose Quartz

[RoyalMints]
Cont=mixing
Comp0=Eucalyptus Leaf
Comp1=Frosting

[SacredTunareSilk]
Cont=Large Sewing Kit
Comp0=Blessed Dust Of Tunare
Comp1=Celestial Essence
Comp2=Silk Swatch

[STSilk]
Cont=Large Sewing Kit
Comp0=Blessed Dust Of Tunare
Comp1=Celestial Essence
Comp2=Silk Swatch

[sbco]
Cont=Enviro
Comp0=Small Piece Of Acrylia
Comp1=Small Piece Of Acrylia
Comp2=Small Piece Of Acrylia
Comp3=Water Flask

[sblockclay]
Cont=Enviro
Comp0=Block Of Clay
Comp1=Water Flask

[scarn]
Cont=Planar Jeweler's Kit
Comp0=Carnelian
Comp1=Silver Bar

[Serpent]
Cont=Medicine Bag
Comp0=Eucalyptus Leaf
Comp1=Fennel

[ShadeSilkThread]
Cont=Planar Sewing Kit
Comp0=Shadeling Silk
Comp1=Shadeling Silk

[Shadeweaver]
Cont=Medicine Bag
Comp0=Comfrey
Comp1=Figwort
Comp2=Heliotrope

[shadowheads]
Cont=Enviro
Comp0=Chunk Of Condensed Shadow
Comp1=File
Comp2=Water Flask

[sheetmetal]
Cont=Enviro
Comp0=Small Brick Of Ore
Comp1=Small Brick Of Ore
Comp2=Water Flask

[shortale]
Cont=Enviro
Comp0=Barley
Comp1=Cask
Comp2=Hops
Comp3=Water Flask

[Shumar]
Cont=Medicine Bag
Comp0=Horehound
Comp1=Vampire Dust

[sickleblade]
Cont=Enviro
Comp0=Blessed Dust Of Tunare
Comp1=Celestial Essence
Comp2=Curved Blade Mold
Comp3=Emerald
Comp4=Mistletoe Temper
Comp5=Sheet Metal
Comp6=Smithy Hammer

[sicklehilt]
Cont=Enviro
Comp0=Blessed Dust Of Tunare
Comp1=Celestial Essence
Comp2=Hilt Mold
Comp3=Mistletoe Temper
Comp4=Ruby
Comp5=Sheet Metal
Comp6=Smithy Hammer

[sicklepommel]
Cont=Enviro
Comp0=Blessed Dust Of Tunare
Comp1=Celestial Essence
Comp2=Mistletoe Temper
Comp3=Pommel Mold
Comp4=Sapphire
Comp5=Sheet Metal
Comp6=Smithy Hammer

[SilkBandage]
Cont=Vale Sewing Kit
Comp0=Silk Thread
Comp1=Silk Thread

[SilkCord]
Cont=Planar Sewing Kit
Comp0=Silk Thread
Comp1=Silk Thread
Comp2=Silk Thread

[SilkGLoves]
Cont=Large Sewing Kit
Comp0=Glove Pattern
Comp1=Silk Swatch

[SilkSwatch]
Cont=Large Sewing Kit
Comp0=Spider Silk
Comp1=Spider Silk

[SilkThread]
Cont=Planar Sewing Kit
Comp0=Spiderling Silk
Comp1=Spiderling Silk

[SimpleBelt]
Cont=Large Sewing Kit
Comp0=Simple Belt Pattern
Comp1=Yard Of Rough Cloth

[Skullale]
Cont=Enviro
Comp0=Cyclops Skull
Comp1=Short Beer
Comp2=Spices
Comp3=Vinegar

[smal]
Cont=Planar Jeweler's Kit
Comp0=Malachite
Comp1=Silver Bar

[Smith248Triv]
Cont=Enviro
Comp0=Banded Boot Mold
Comp1=Humming Luclinite Mallet
Comp2=Humming Orb
Comp3=Swirling Shadows
Comp4=Swirling Shadows
Comp5=Vah Shir Anvil
Comp6=Water Flask

[smokehero]
Cont=Enviro
Comp0=Hero Parts
Comp1=Smoker
Comp2=Spices

[snake]
Cont=Collapsible Mixing Bowl
Comp0=Jar Of Acid
Comp1=Mandrake Root
Comp2=Snake Meat

[soda]
Cont=Enviro
Comp0=Soda
Comp1=Water Flask

[SolsticeRobe]
Cont=Enviro
Comp0=Embroidering Needle
Comp1=Gem Studded Chain
Comp2=Sacred Tunare Silk
Comp3=Sacred Tunare Silk
Comp4=Sacred Tunare Silk
Comp5=Tunic Pattern

[SRobe]
Cont=Large Sewing Kit
Comp0=Embroidering Needle
Comp1=Gem Studded Chain
Comp2=Sacred Tunare Silk
Comp3=Sacred Tunare Silk
Comp4=Sacred Tunare Silk
Comp5=Tunic Pattern


[Soluan]
Cont=Medicine Bag
Comp0=Vetiver Root
Comp1=Werewolf Pelt

[SoR]
Cont=Medicine Bag
Comp0=Fire Drake Scale
Comp1=Vox's Dust

[SoulIncorp]
Cont=Medicine Bag
Comp0=Feather
Comp1=Stinging Nettle

[SOW]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Fenugreek
Comp2=Wolf Blood

[spicehero]
Cont=Enviro
Comp0=Hero Parts
Comp1=Jug Of Sauces
Comp2=Spices
Comp3=Vinegar

[SpiritShield]
Cont=Medicine Bag
Comp0=Clover
Comp1=Clubmoss
Comp2=Sumbul

[SpiritShift]
Cont=Medicine Bag
Comp0=Mercury
Comp1=Mystic Ash
Comp2=Sumbul

[spoon]
Cont=Enviro
Comp0=Metal Bits
Comp1=Metal Bits
Comp2=Scaler Mold
Comp3=Water Flask

[Spurn]
Cont=Medicine Bag
Comp0=Reucoat Herb
Comp1=Zombie Skin

[spyglass]
Cont=Enviro
Comp0=Bottle
Comp1=Collapsible Fishing Pole
Comp2=Metal Rod
Comp3=Metal Twine
Comp4=Reflective Shard

[srobe]
Cont=Collapsible Sewing Kit
Comp0=Embroidering Needle
Comp1=Gem Studded Chain
Comp2=Sacred Tunare Silk
Comp3=Sacred Tunare Silk
Comp4=Sacred Tunare Silk
Comp5=Tunic Pattern

[ssilk]
Cont=Large Sewing Kit
Comp0=Spiderling Silk
Comp1=Spiderling Silk

[STAA]
Cont=Planar Fletching Kit
Comp0=Bundled Acrylia Arrow Shafts
Comp1=Condensed Shadow Arrowheads
Comp2=Several Shield Cut Fletchings
Comp3=Small Groove Nocks

[Stability]
Cont=Medicine Bag
Comp0=Blue Vervain Bulb
Comp1=Lucerne
Comp2=Sage Leaf

[stalkingprobe]
Cont=Enviro
Comp0=Bottle
Comp1=Firewater
Comp2=Gears
Comp3=Gears
Comp4=Metal Rod

[standardbowcam]
Cont=Enviro
Comp0=Gears
Comp1=Gnomish Bolts
Comp2=Grease

[starroseneck]
Cont=Planar Jeweler's Kit
Comp0=Enchanted Electrum Bar
Comp1=Star Rose Quartz

[Steel]
Cont=Enviro
Comp0=File
Comp1=Small Brick Of Ore
Comp2=Water Flask

[SteelBoning]
Cont=Enviro
Comp0=File
Comp1=Small Brick Of Ore
Comp2=Water Flask

[steelpa]
Cont=Fletching Kit
Comp0=Bundled Steel Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[StingingWort]
Cont=Medicine Bag
Comp0=Balm Leaves
Comp1=Ice Giant Toes

[StormSalmonFilet]
Cont=Collapsible Spit
Comp0=Jug Of Sauces
Comp1=Storm Salmon

[Studded]
Cont=Planar Jeweler's Kit
Comp0=Emerald
Comp1=Ruby
Comp2=Sapphire
Comp3=Worked Silver Chain

[StudMaskBear]
Cont=Large Sewing Kit
Comp0=Mask Pattern
Comp1=Medium Quality Bear Skin
Comp2=Studs

[StudMaskCat]
Cont=Large Sewing Kit
Comp0=Mask Pattern
Comp1=Medium Quality Cat Pelt
Comp2=Studs

[StudMaskWolf]
Cont=Large Sewing Kit
Comp0=Mask Pattern
Comp1=Medium Quality Wolf Skin
Comp2=Studs

[studs]
Cont=Enviro
Comp0=File
Comp1=Metal Bits
Comp2=Metal Bits
Comp3=Metal Bits
Comp4=Water Flask

[SurefallRTJ]
Cont=Brew Barrel
Comp0=Air-sealed Arador
Comp1=Celestial Essence
Comp2=Surefall Sap

[Swamp]
Cont=Medicine Bag
Comp0=Bladderwrack
Comp1=Heliotrope

[SwirlingLiquid]
Cont=Medicine Bag
Comp0=Dristilate
Comp1=Opal Slush

[telescopiceyepatch]
Cont=Enviro
Comp0=Gnomish Bolts
Comp1=Low Quality Dire Wolf Fur
Comp2=Reflective Shard
Comp3=Velium Lens

[Test]
Cont=Test
Comp0=Test
Comp1=Test

[thermalcloak]
Cont=Enviro
Comp0=Firewater
Comp1=Metal Rod
Comp2=Tattered Gnomish Cloak

[tinkeredcatapult]
Cont=Enviro
Comp0=Firewater
Comp1=Gears
Comp2=Metal Twine
Comp3=Shaped Ashwood Recurve Bow
Comp4=Sprockets

[Titan]
Cont=Medicine Bag
Comp0=Maliak Leaf
Comp1=Tri-fern Leaf

[TMercury]
Cont=Medicine Bag
Comp0=Comfrey
Comp1=Mercury

[topazear]
Cont=Enviro
Comp0=Gold Bar
Comp1=Topaz

[Troll]
Cont=Medicine Bag
Comp0=Troll Parts
Comp1=Wormwood

[Tunare]
Cont=Enviro
Comp0=Blessed Dust Of Tunare
Comp1=Celestial Essence
Comp2=Silk Swatch

[Turtle]
Cont=Medicine Bag
Comp0=Clubmoss
Comp1=Sumbul

[ucd]
Cont=Enviro
Comp0=Casserole Dish Sketch
Comp1=Ceramic Lingin
Comp2=Large Block Of Clay
Comp3=Water Flask

[ucl]
Cont=Pottery Wheel
Comp0=Ceramic Lining Sketch
Comp1=Small Block Of Clay
Comp2=Water Flask

[UCWB]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Lacquered Opal
Comp2=Sculpting Tools
Comp3=Small Block Of Clay
Comp4=Vial Of Cloudy Mana
Comp5=Water Flask

[UFCass]
Cont=Enviro
Comp0=Casserole Dish Sketch
Comp1=Ceramic Lining
Comp2=Large Block Of Clay
Comp3=Water Flask

[UFCLining]
Cont=Enviro
Comp0=Ceramic Lining Sketch
Comp1=Small Block Of Clay
Comp2=Water Flask

[UFMedBowl]
Cont=Enviro
Comp0=Block Of Clay
Comp1=Medium Bowl Sketch
Comp2=Water Flask

[UFMedJar]
Cont=Enviro
Comp0=Block Of Clay
Comp1=Medium Jar Sketch
Comp2=Water Flask

[UndeadRecourse]
Cont=Medicine Bag
Comp0=Damlana
Comp1=Warbone Chips

[Unfired Casserole Dish]
Cont=Pottery Wheel
Comp0=Casserole Dish Sketch
Comp1=Ceramic Lining
Comp2=Large Block Of Clay
Comp3=Water Flask

[Unfired Small Container]
Cont=Pottery Wheel,
Comp0=Block Of Clay
Comp1=Small Jar Sketch
Comp2=Water Flask

[unfirelargebowl]
Cont=Enviro
Comp0=Glass Shard
Comp1=Large Block Of Clay
Comp2=Large Bowl Sketch
Comp3=Water Flask

[UnlifeAwareness]
Cont=Medicine Bag
Comp0=Elderberry
Comp1=Fennel

[unplanarstein]
Cont=Enviro
Comp0=Block Of Tanaan Clay
Comp1=Ceramic Lining Sketch
Comp2=Sculpting Tools
Comp3=Tainted Planar Essence
Comp4=Water Flask

[uvial]
Cont=Enviro
Comp0=Low Quality Wolf Skin
Comp1=Small Block Of Clay
Comp2=Vial Sketch
Comp3=Water Flask

[VahShir]
Cont=Medicine Bag
Comp0=Vah Shir Meat
Comp1=Wormwood

[Vampire]
Cont=Medicine Bag
Comp0=Feverfew
Comp1=Griffon Feathers

[VannToeStew]
Cont=Collapsible Spit
Comp0=Bottle Of Milk
Comp1=Spices
Comp2=Vann Toes

[veliumbits]
Cont=Enviro
Comp0=Coldain Velium Temper
Comp1=Small Piece Of Velium
Comp2=Small Piece Of Velium

[veliumsheet]
Cont=Enviro
Comp0=Block Of Velium
Comp1=Coldain Velium Temper
Comp2=Velium Smithy Hammer

[veliumstuds]
Cont=Enviro
Comp0=Coldain Velium Temper
Comp1=File
Comp2=Velium Bits
Comp3=Velium Bits
Comp4=Velium Bits

[veltemper]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Celestial Essence
Comp2=Celestial Essence
Comp3=Celestial Essence
Comp4=Coldain Heater

[VialPDye]
Cont=Enviro
Comp0=Dye Vial
Comp1=Prismatic Dye

[Vigor]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Blue Vervain Bulb
Comp2=Lucerne

[voil]
Cont=Enviro
Comp0=Vegetables
Comp1=Water Flask

[Vox]
Cont=Medicine Bag
Comp0=Froglok Leg
Comp1=Sea Spirit

[WeightlessMist]
Cont=Medicine Bag
Comp0=A Cork
Comp1=Birthwart
Comp2=Comfrey
Comp3=Deep Cavern Fungus
Comp4=Empty Vial
Comp5=Figwort
Comp6=Hydrangea

[WF]
Cont=Spit
Comp0=Filleting Knife
Comp1=Wolf Meat

[WinterChocolate]
Cont=mixing
Comp0=Brownie Parts
Comp1=Frosting
Comp2=Frosting

[WolfCreamFillet]
Cont=spit
Comp0=Creamy Fennel Sauce
Comp1=Filleted Wolf

[WolvesBlood]
Cont=Medicine Bag
Comp0=High Quality Wolf Skin
Comp1=Sticklewart

[WoodElf]
Cont=Medicine Bag
Comp0=Wood Elf Parts
Comp1=Wormwood

[worked]
Cont=Enviro
Comp0=Enchanted Silver Bar
Comp1=Metal Bits
Comp2=Water Flask

[woven]
Cont=Collapsible Sewing Kit
Comp0=Mandrake Root
Comp1=Mandrake Root

[WovenMandrake]
Cont=Large Sewing Kit
Comp0=Mandrake Root
Comp1=Mandrake Root

[Wrackbane]
Cont=Medicine Bag
Comp0=Mammoth Meat
Comp1=Woundwart

[WuMantle]
Cont=Planar Sewing Kit
Comp0=Heady Kiola
Comp1=Heady Kiola
Comp2=Heady Kiola
Comp3=Heady Kiola
Comp4=Shoulderpad Pattern
Comp5=Silk Swatch
Comp6=Vial Of Viscous Mana

[wupants]
Cont=Enviro
Comp0=Heady Kiola
Comp1=Heady Kiola
Comp2=Heady Kiola
Comp3=Heady Kiola
Comp4=Pant Pattern
Comp5=Silk Swatch
Comp6=Silk Swatch
Comp7=Silk Swatch
Comp8=Vial Of Viscous Mana

[WuSleeve]
Cont=Planar Sewing Kit
Comp0=Heady Kiola
Comp1=Heady Kiola
Comp2=Heady Kiola
Comp3=Heady Kiola
Comp4=Silk Swatch
Comp5=Silk Swatch
Comp6=Sleeve Pattern
Comp7=Vial Of Viscous Mana

[WuTunic]
Cont=Enviro
Comp0=Heady Kiola
Comp1=Heady Kiola
Comp2=Heady Kiola
Comp3=Heady Kiola
Comp4=Silk Swatch
Comp5=Silk Swatch
Comp6=Silk Swatch
Comp7=Tunic Pattern
Comp8=Vial Of Viscous Mana

[YewLeafTannin]
Cont=Brew Barrel
Comp0=Water Flask
Comp1=Yew Leaf

robdawg
a ghoul
a ghoul
Posts: 114
Joined: Tue Mar 23, 2004 11:54 am
Contact:

...

Post by robdawg » Mon May 03, 2004 1:43 pm

I kept having a problem with the "file check" part of this script.

However, I just commented out the recipes.ini file check and it worked fine after that. If you are to dumb NOT to have the recipes.ini file, you should not be using this macro OR this program.
ROBDAWG

[url=http://www.seathound.com]Seat Hound[/url]
[url=http://www.sportsrumormill.com]Sports Rumor Mill[/url]
[url=http://www.packerforum.com]Packer Forum[/url]

Preocts
a snow griffon
a snow griffon
Posts: 312
Joined: Thu Jan 29, 2004 1:02 pm

Post by Preocts » Mon May 03, 2004 2:19 pm

Wow :shock: This macro is just dandy.


::runs and hides::

Kaitain
a ghoul
a ghoul
Posts: 109
Joined: Fri Oct 10, 2003 1:49 pm

Issue with ${ini}

Post by Kaitain » Tue May 04, 2004 2:56 pm

I was having problems with buffer overflow when using ${Ini[filename]} so I added:

[Recipes]
test=true

To the recipes.ini file, if you don't have this it will crash you... sorry I should have mentioned that. I'll add that to the top.

booger
orc pawn
orc pawn
Posts: 10
Joined: Tue Nov 18, 2003 2:42 pm

Post by booger » Thu May 06, 2004 12:17 pm

I cant get the macro to continue running if I fail the first combine. it just clears the container and ends.

I also get a subroutine pareseArguments wasn't found @ line 139 when I try to run it with options.

Code: Select all

/call parseArguments "abort-on-tell" "${Param1}" 

thanks again for the conversion and macro

edit: spelling

User avatar
Tel0net
orc pawn
orc pawn
Posts: 14
Joined: Wed May 05, 2004 1:07 pm
Location: California
Contact:

Post by Tel0net » Fri May 07, 2004 4:08 pm

Code: Select all


| Finds the value of an argument in a parameter string
sub parseArgument(string sArgument,string sParameters)

Your sub is called parseArgument

Code: Select all

/call parseArguments
You called parseArguments

Simply adding an S to sub parseArgument or removing the S's off of /call parseArguments will fix it

:D
MOO goes the Cow and WOOT goes the Tel0net

draco
a ghoul
a ghoul
Posts: 145
Joined: Thu Jan 29, 2004 7:06 pm
Contact:

Post by draco » Mon May 10, 2004 10:59 pm

I have always loved this macro. I am thinking of a possible mod to search by container type.

FOr example:
If cont=Sewing Kit
the macro would look for one of Large Deluxe Planar Colasable, and use which ever one you had?

Any ideas? is this doable? I'm still converting My other macros. I'll look at it and give a suggestion.

TiredOne
decaying skeleton
decaying skeleton
Posts: 1
Joined: Sun May 09, 2004 8:40 pm

Post by TiredOne » Wed May 12, 2004 1:25 pm

The macro is great. I'm having one problem though. The macro itself runs and does combines like it is supposed to, but it doesn't seem to be reading/parsing the optional parameters (i.e. "end-on-trivial".) I've tried several different parameters and it seems to ignore all of them. I get no errors or odd messages, it simply doesn't do what the optional parameters should cause it to do.

I had already found the argument vs arguments typo and fixed that, but it still didn't cause the parameters to function properly. I simply don't get the error message now. I've tried stepping through this code myself to see where it's going wrong, but between the new data changes and the complexity of this macro, it is beyond my meager coding skills. Any help with troubleshooting this would be greatly appreciated.

P.S. Kaitain, while looking for the problem with the options, I also noticed a discrepancy or two involving the format/syntax of the options in the code. For example, in one part, it lists it as "destory=..." and in another "destroy-results=..."

amml
a lesser mummy
a lesser mummy
Posts: 68
Joined: Thu Apr 22, 2004 4:55 pm

Post by amml » Fri May 14, 2004 7:13 am

Love it, great for skilling up brewing too with the hero brew :)

amml
a lesser mummy
a lesser mummy
Posts: 68
Joined: Thu Apr 22, 2004 4:55 pm

Post by amml » Sat May 15, 2004 5:31 am

if i try the minotar heros brew, it find recipe and everything, but it stops and sais cant find brew barrel in inentory... how can i make it work?

Oid
a snow griffon
a snow griffon
Posts: 416
Joined: Thu Oct 17, 2002 3:26 am
Contact:

Post by Oid » Sat May 15, 2004 6:41 am

Well first off, the recipe should say enviro for the cointainer, and i believe you n eed to have it open at start, anyways, thats what i did....

Well written macro, but for some reason, it is very very slow imo.
Smokey the Lax says only you can prevent reproduction.

amml
a lesser mummy
a lesser mummy
Posts: 68
Joined: Thu Apr 22, 2004 4:55 pm

Post by amml » Sat May 15, 2004 6:56 am

kk i guess ill try that, in the meantime i just made some combines till i had one that was lucky so i learned the recipe and used that:

Code: Select all

| - tradeskill.ma
| - By: amml
| - v 1.0
| 
| This is a simple script that will do your tradeskill combines and 
| autoinventories the stuff you want and destroys the stuff you dont want (eg 
| when making herow brew dsetryoing the alternate product)


#Event new "You have fashioned the items together"
#Event End "You are missing" 



sub Main 
   :button 
  /delay 1sec
  /click left 
  /doevents

  :LootIt 
    /destroy
    /delay 5 
    /newif (${Cursor.ID}) /goto :LootIT
    /goto :button 
/return 

Sub Event_End 
   /keypress esc 
   /keypress esc 
  /endmacro 
/return 

Sub Event_Adv 
   /keypress esc 
   /keypress esc 
  /endmacro 
/return 
Although i think my events are out of date lol, gota check that hehe, anyway ill try it again then with your tip, thx...

Kizzy
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sun May 16, 2004 3:40 am

New to this

Post by Kizzy » Sun May 16, 2004 4:06 am

I read and re-read the post.

As a test I added...

[CrabMeat]
Cont=Mixing Bowl
Comp0=1 lb. Saltwater Crab

to the recipes.ini

(also added..) to the top
[Recipes]
Test=True

I am getting an error or crashing the EQclient.

Syntax used is
/macro khits CrabMeat "with all options in example in code, except trivial=1 cause I'm just making the meat."

Only the one component in the mixing bowl is needed.

Guessing it should just add 1 (1 lb. Saltwater Crab)
and do the combine. But still a no go.

Also with the options I do use it doesn't always crash the client, just get a ton of errors that I myself will learn in due time I hope.

Whats my next move to fix this?

Exact output message::

/macro khits CrabMeat "show-stats=0 destroy=0 abort-on-tell=0 end-on-trivial=1 silent-mode=0"
[MQ2]
[MQ2]
[MQ2] ******************************
[MQ2] khiTS: Tradeskills runnng : 04:03:06
[MQ2]*******************************

/delay array failed. To declare an Array use:/declare name[si
<type> <scope> <default element value>
khits.mac@81 (Main): /declare components array | Array of
components used to make the recipe
Example: /declare MyStringArray[25] string local
ARRAY-UNDEFINED-ELEMENT
khits@81 (main): /declare components array | Array of
components used to make the recipe
[MQ2] khiTS: Reading parameters
Subroutine parseArguments wasn't found
khits.mac@116 (Main): /call parseArguments "abort-on-t
"@Param1"
The current macro has ended.


I appologize if its something simple on my end. Trying to be has detailed as possible and won't be able to decypher this for at least a few weeks. Thank you so much for the code though. Very impressive and kind to share.

draco
a ghoul
a ghoul
Posts: 145
Joined: Thu Jan 29, 2004 7:06 pm
Contact:

Include file version

Post by draco » Wed May 26, 2004 10:14 pm

I have made an include file version of this macro. I have loved and have been using this version and the pre-MQData version for months.
Minor Changes:

Recent changes added a define called khitsDebug to be able to mute all the output. Merged with Kellewic's speed optimizations.
Changed all instances of /endmacro to a return with an Error value so as not to cause to outer script to end.
Added a check in the add Comp loop to verify the only one of a stackable item was on the cursor and if so /autoinv the items and try again.
I was having a problem with picking up multiple when I tweaked down the combine delay to 2.
I also removed the clearCursor call from within the doCombine loop. I was getting a race condition where. The Cursor was being cleared before the event would fire and the Success Event would hang waiting for something to be placed on the cursor.


I pulled the code to open packs out to a sub routine and wrote a close packs routine, so they could be called from a Main routine.

Code: Select all


|**

    khiTS.inc

    Author:		Kaitain Heavy Industries
    Date:       5 June 04
    Version:   3.0.2i

    Description:
    Performs tradeskill combines using recipes supplied in an ini file

    Credits:
	Draco reorganized the code to make it more callable and a general TradeSkill library also added a small
		.mac file, so that there need only be one set of code.
	Kellewic fixed some bugs and enchanced to overall performance
    Draco converted this to an include
    Kaitain Heavy Industries Version 2.2.2.14 converted to include
    Inspired by Dont_Know_At_All's Trade Skills macro - The status report idea is completely stolen from him (but rewritten by me)
    Ini file uses the format created by Diggler (this will eventually being changed to a new format using item id's)

    Notes:
    * Updated to use MQ2DataVars
    * This is a complete overhaul of the whole macro in addition changing it to work with MQ2Data and MQ2DataVars
    * You should be able to simply rename "sub main" to "sub khiTS" if you want to use this as an included file.
    * No longer destroys tools or components used to do combines when destroy-results is enabled.
    * This is a BIG macro and may be slow as hell on older computers.

   Usage:
   #include khits.inc

   .
   .
   .
   /call Make  <recipe_name> <options>

   Example:
   /call Make khits bits "show-stats=0 destroy=0 abort-on-tell=0 end-on-trivial=0 silent-mode=0"
   Ported to Inc by Draco
**|


#event SkillTrivial "You can no longer advance your skill from making this item#*#"
#event SkillUps "You have become better at #1#! (#2#)"
#event SkillFailure "You lacked the skills#*#"
#event SkillSuccess "You have fashioned the items together to create something new#*#"
#event FullInventory "There was no place to put that#*#"
#event CombineError "You cannot combine these items in this container type!"

#chat tell

#define INIPATH "recipes.ini"

#define COMBINE_SUCCESS         0
#define COMBINE_FAILED         1
#define COMBINE_ERROR         2
#define COMBINE_INVENTORY_FULL   3
#define COMBINE_TRIVIAL         4

| ***** Tweek this to your computer, if you get a lot of an item in the combine container, increase this number
#define COMBINE_DELAY 2

#define khitsDebug 0

| Main entry point
sub Make
    /if (khitsDebug==1) /echo
    /if (khitsDebug==1) /echo
    /if (khitsDebug==1) /echo  *****************************************
    /if (khitsDebug==1) /echo  khiTs: Tradeskills running : ${Time}
    /if (khitsDebug==1) /echo  *****************************************
    /if (khitsDebug==1) /echo


    | Check for no parameters or help
    /if (${Defined[Param0]}==FALSE || ${Param0.Upper.Equal[HELP]}) {
        /call displayHelp
        /call clearCursor ${iDestroyResults}
        /endmacro
    }

    | Recipe info

    | The name of the combination being done, this is used to look up the recipe in the recipe.ini file
    /declare recipeName         string  local   NOT_SET

    | container in which the recipe will be made
    /declare containerName      string  local   NOT_SET

    | Loop variable, which component we are getting the name of
    /declare iCompLoop          int     local   1

    | The name of the current component we're getting
    /declare currentComp        string  local   NOT_SET

    | Make sure we have that recipe in the ini file
    /declare recipeCheck        string  local   NOT_SET

    | Settings (see end of this file for list of settings)
    | Stops the macro if someone sends you a tell
    /declare abortOnTell        int     local   0

    | How many itmes the user has requested be made
    /declare makeThisMany       int     local   0

    | Display when you succed, get skillups, fail, etc.
    /declare showStats          int     local   0

    | Keeps MQ window spam to a minimum
    /declare silentMode         int     local   0

    | For looping through containers
    /declare slotNumber         int     local   1



    | Only declare outer variables once, this is in case you use this as an include
   /if (!${Defined[components]}) {
        | Array of components used to make the recipe
        /declare components[10]     string  outer

        | Container in which the recipe will be made
        /declare containerNum       string  outer   NOT_SET

        | The number of components in this recipe
        /declare iCompCount         int     outer   0

        /declare bCombineDone       bool    outer   FALSE
        /declare bSkillTrivial      bool    outer   FALSE

        | Settings
        | Destroys the results of a combine (but not any items used in the combine)
        /declare iDestroyResults     int     outer   0

        | Stops the macro when you can no longer get skillups from doing the combine
        /declare iEndOnTrivial       int     outer   0

        | Skillup info
        | How many times you've tried a combination
        /declare iSkillAttempts      int     outer   0

        | How many times it worked
        /declare iSkillSuccess       int     outer   0

        | How many times it didn't work
        /declare iSkillFailure       int     outer   0

        | How many skill points you have received
        /declare iSkillUps           int     outer   0

        | Skill level to stop at
        /declare iStopAtSkillLevel    int     outer    0

        | The results of what we are making
        /declare sResults           string  outer   NOT_SET
        /declare sUsing            string   outer   NOT_SET


		| Exit and Return Flags added by Draco
		/declare combineResult int outer 0
		/declare cleanUpAndExit int outer 0
   		/declare combineErrorCounter int outer 0

    } else {
        | Clean out the last components used, this is in case we have not cleared the variables or are using this as an include
        /deletevar components
        /declare components[10]
    }

    | Read the settings

    |Get requested recipe's name
    /varset recipeName ${Param0}

    | If there is only one parameter, then there are no options
    /if (khitsDebug==1) /echo  khiTS: Reading parameters
    /if (${Defined[Param1]}==TRUE) {
       /declare tmp int local
       /declare parms int local ${Macro.Params}
       /declare parmString string local
       /varcalc parms ${parms}-1

      /for tmp 1 to ${parms}
         /varset parmString ${parmString} ${Param${tmp}}
      /next tmp

        /call parseArguments "abort-on-tell" "${parmString}"
        /varset abortOnTell ${Macro.Return}

        /call parseArguments "destroy-results" "${parmString}"
        /varset iDestroyResults ${Macro.Return}

        /call parseArguments "end-on-trivial" "${parmString}"
        /varset iEndOnTrivial ${Macro.Return}

        /call parseArguments "make-this-many" "${parmString}"
        /varset makeThisMany ${Macro.Return}

        /call parseArguments "silent-mode" "${parmString}"
        /varset silentMode ${Macro.Return}

        /call parseArguments "show-stats" "${parmString}"
        /varset showStats ${Macro.Return}

        /call parseArguments "stop-at-skill-level" "${parmString}"
        /varset iStopAtSkillLevel ${Macro.Return}
    }

    | *** Get recipe container and ingredients

    | Make sure the recipe file exists (the recipes thing is a fix for a bug in the Ini function)
    /varset recipeCheck ${Ini[INIPATH,recipes]}
    /if (${recipeCheck.Equal[NULL]}) {
        /echo khiTS Error: Recipe file not found
        /echo Path = INIPATH
        /goto :khiTSCleanUpMacro
    }


    | Make sure this recipe exists in the recipe.ini file
    /varset recipeCheck ${Ini[INIPATH,${recipeName}]}
    /if (${recipeCheck.Equal[NULL]}) {
        /echo khiTS Error: Recipe not found
        /echo Recipe name = ${recipeName}
        /goto :khiTSCleanUpMacro
    }

    | Get the container name
    /varset containerName ${Ini[INIPATH,${recipeName},Cont]}
    /if (${containerName.Equal[NULL]}) {
        /echo khiTS Error: Error in ini file for this recipe, no container is specified
        /echo Recipe name = ${RecipeName}
        /goto :khiTSCleanUpMacro
    }

    | Read the ingredients for the recipe from the ini file
    /varset iCompLoop 0
    :khiTSReadComponentsLoop
    /varset currentComp ${Ini[INIPATH,${recipeName},Comp${iCompLoop}]}
   /if (${currentComp.NotEqual[NULL]}) {
        /varcalc iCompLoop ${iCompLoop}+1
        /varset components[${iCompLoop}] ${currentComp}
        /goto :khiTSReadComponentsLoop
    }
    /varset iCompCount ${iCompLoop}

    | Find the combine container number
    /if (${containerName.Equal[Enviro]}) {
        /if (${Window[Enviro].Open}==FALSE) {
            /echo khiTS Error: You must have the enviromental container open first (${Window[Enviro].Open})
            /goto :khiTSCleanUpMacro
        }
        /varset containerNum e
    } else {
        | Not an enviromental container so find the container's pack number, this is how we will refer to it from now on
        /varset containerNum ${FindItem[=${containerName}].InvSlot.ID}
        /if (${containerNum}) {
            /varcalc containerNum ${containerNum}-21
            /varset containerNum ${containerNum.Arg[0,.]}
        } else {
            | Didn't find the container
            /echo khiTS Error: Could not find container in your inventory (x)
            /echo       Contanier name = ${containerName}
            /goto :khiTSCleanUpMacro
        }

    }
    :khiTSFoundContainerNum

    /if (khitsDebug==1) /echo  Opening containers
    | Open all packs if they aren't already - you have to handle arranging them and you have to have "use ctrl-r-click" set properly - for now
    /for slotNumber 1 to 8
       /if (!${Window[Pack${slotNumber}].Open}) {
            /itemnotify pack${slotNumber} rightmouseup
        }
    /next slotNumber

    | Remove anything from the cursor if needed
    /call clearCursor ${iDestroyResults}

    | Clear the combine pack
    /call cleanPack ${containerNum}

    | If you can't clean out the pack - exit
    /if (!${Macro.Return}) {
        /echo khiTS Error: Unable to clean out pack (${containerNum})
        /return
    }

    :khiTSCombineLoop
        | Delete or Save items depending on settings
        /call clearCursor ${iDestroyResults}

        /if (${sResults.Equal[NOT_SET]}) {
            /if (khitsDebug==1) /echo  khiTS: Making ${recipeName}
        } else {
            /if (khitsDebug==1) /echo  khiTS: Making ${sResults} - Count = ${iSkillSuccess}
        }

        | Move ingredients to container
        /call addComponents
        /if (!${Macro.Return}) {
            /echo khiTS Error: Component not found
            /goto :khiTSCleanUpMacro
        }

        | Combine
        /varset bCombineDone FALSE
        /varcalc iSkillAttempts ${iSkillAttempts}+1
        :DoCombineLoop

        /if (${String[${containerNum}].Equal[e]}) {
            /combine enviro
        } else {
            /combine pack${containerNum}
        }
        | needs this delay here to make sure the combine is finished, you may need to tweek this to your computer/connection 10 should be safe, I can get away with 7
        /delay COMBINE_DELAY

        | Keep track of what we've done - these events are called individually so they do not conflict with a parent macro if this macro is used as an included file
        /doevents SkillTrivial
        /doevents SkillUps
        /doevents SkillFailure
        /doevents SkillSuccess
        /doevents CombineError
        /doevents FullInventory
        /doevents tell

         /if (${cleanUpAndExit}==1)   /goto :khiTSCleanUpMacro
        /if (!${bCombineDone})      /goto :DoCombineLoop

        /varset combineErrorCounter 0

        | See if we have made enough
        /if (${makeThisMany} > 0 && ${makeThisMany} == ${iSkillSuccess}) {
            /goto :khiTSCleanUpMacro
        }

        /goto :khiTSCombineLoop

    | The macro is ending, clean up
    :khiTSCleanUpMacro
      | Delete or Save items depending on settings - Just in case
      /call clearCursor ${iDestroyResults}
      /call cleanPack ${containerNum}
      /call DisplayStats
      /call resetKhits

/return ${combineResult}


Sub resetKhits
	|It would be more efficient to just initialize the var
	|rather than delete and re-declare everytime. But today is a lazy day.

	/varset combineResult 0
	/varset cleanUpAndExit 0
	/varset combineErrorCounter 0

	/deletevar components
	/declare components[10]
	| Container in which the recipe will be made
	/varset containerNum  NOT_SET

	| The number of components in this recipe
	/varset iCompCount     0

	/varset bCombineDone   FALSE
	/varset bSkillTrivial  FALSE

	| Settings
	| Destroys the results of a combine (but not any items used in the combine)
	/varset iDestroyResults  0

	| Stops the macro when you can no longer get skillups from doing the combine
	/varset iEndOnTrivial  0

	| Skillup info
	| How many times you've tried a combination
	/varset iSkillAttempts  0

	| How many times it worked
	/varset iSkillSuccess    0

	| How many times it didn't work
	/varset iSkillFailure 0

	| How many skill points you have received
	/varset iSkillUps   0

	| Skill level to stop at
	/varset iStopAtSkillLevel  0

	| The results of what we are making
	/varset sResults   NOT_SET
	/varset sUsing   NOT_SET

/return



| Removes anything on the cursor. If DestroyResults is 1, then it will destroy anything not in the components array
sub clearCursor(int DestroyResults)
   /declare saveCount int local

    :khiTSClearCursorLoop
    /delay 2 ${Cursor.ID}

    | Is there anything on the cursor?
    /if (${Cursor.ID}) {
        /if (${DestroyResults}==1) {
            | Make sure the item on the cursor is not something we want to save
            /for saveCount 1 to 10
                /if (${components[${saveCount}].Equal[${Cursor.Name}]}) {
                   /if (khitsDebug==1) /echo  -- Saving ${components[${saveCount}]} to inventory
                    /autoinv
                    /goto :khiTSClearCursorLoop
                }
            /next saveCount

            | Whatever is on the cursor wasn't in the save list
            /if (khitsDebug==1) /echo  -- Destroying ${Cursor.Name}
            /destroy
        } else {
            /autoinv
        }

        /goto :khiTSClearCursorLoop
    }
/return


| Finds the value of an argument in a parameter string
sub parseArguments(string sArgument,string sParameters)
    /declare iArgNum    int     local
    /declare sArgValue  string  local

    /for iArgNum 1 to ${sParameters.Count[=]}
       /if (${sParameters.Arg[${iArgNum}, ].Left[${sArgument.Length}].Equal[${sArgument}]}) {
          /declare tmp int local ${sArgument.Length}
          /varcalc tmp (${tmp}+1)*-1

          /varset sArgValue ${sParameters.Arg[${iArgNum}, ].Right[${tmp}]}
          /return ${sArgValue}
       }
    /next iArgNum
/return ${sArgValue}


Sub DisplayStats
	/if (${showStats}) {
		/echo
		/echo khiTS: Stat display - Not Completely done
		/echo ================================
		/echo Attempts: ${iSkillAttempts}
		/echo Successes: ${iSkillSuccess}
		/echo Faliures: ${iSkillFailure}
		/echo Skill Ups: ${iSkillUps}

		/if (${Me.Skill[${sUsing}]}) {
		   /echo Skill Level: ${Me.Skill[${sUsing}]}
		} else {
		   /echo Skill Level: Unknown
		}
	}
/return


Sub Event_Chat(string type, string sender, string text)
    /if (${String[${abt}].Equal[TRUE]} && ${type.Equal[tell]} ) {
        /echo khiTS: Got a tell, pausing.
        /if (!${Defined[pauseTimer]}) /declare pauseTimer timer outer
        /varset pauseTimer 600
      :TellPause
         /if (${Spawn[gm]}) {
           /if (!${Me.Sitting})   /docommand /sit
           /docommand /camp desktop
           /call mqout "GM in Zone! Logging out"
           /endmacro
         }

        /if (${pauseTimer < 1}) /return
        /goto :TellPause
        /mqpause
    }
/return


Sub Event_CombineError
    /varcalc combineErrorCounter ${combineErrorCounter}+1
    /if (khitsDebug==1) /echo  khiTS: Combine Error: ${combineErrorCounter}

    /if (${combineErrorCounter} < 3) {
       /call cleanPack ${containerNum}
       /call clearCursor ${iDestroyResults}
       /varset bCombineDone TRUE
   } else {
       /varset combineResult COMBINE_ERROR
       /varset cleanUpAndExit 1
   }
/return


Sub Event_FullInventory
    /echo khiTS Error: Your inventory is full, ending macro.
    /call DisplayStats
    /varset combineResult COMBINE_INVENTORY_FULL
    /varset cleanUpAndExit 1
/return


Sub Event_SkillFailure
    /varcalc iSkillFailure ${iSkillFailure}+1
    /varset bCombineDone TRUE
    /varset combineResult COMBINE_FAILED
/return


Sub Event_SkillSuccess
   /declare MaxWaitCount timer local 100
    /if (${sResults.Equal[NOT_SET]}) {
        :WaitForIt
        /delay 2
        /if (khitsDebug==1) /echo  Success: Waiting for Result: ${Cursor.Name} ${MaxWaitCount}
        /if (!${Cursor.ID} && !${MaxWaitCount} == 0) /goto :WaitForIt
        /if (${Cursor.ID})   /varset sResults ${Cursor.Name}
    }

    /varcalc iSkillSuccess ${iSkillSuccess}+1
    /varset bCombineDone TRUE
    /varset combineResult COMBINE_SUCCESS
/return


Sub Event_SkillUps
   /varset sUsing ${Param1}
    /varcalc iSkillUps ${iSkillUps}+1

    /if (${iStopAtSkillLevel} > 0 && ${iStopAtSkillLevel} == ${Param2}) {
        /call DisplayStats
        /call cleanPack ${containerNum}
        /call clearCursor ${iDestroyResults}
        /varset cleanUpAndExit 1
    }
/return


Sub Event_SkillTrivial
    /if (!${bSkillTrivial}) {
        /echo khiTS: Skill is trivial
        /varset bSkillTrivial TRUE
    }

    /if (${iEndOnTrivial} == 1) {
        /call DisplayStats
        /call cleanPack ${containerNum}
        /call clearCursor ${iDestroyResults}
        /varset cleanUpAndExit 1
    }

    /varset combineResult COMBINE_TRIVIAL
/return


Sub OpenPacks
   /declare slotNumber int local
   | Open inventory if not open
    /if (khitsDebug==1) /echo  khiTS: Opening inventory and containers
	    /if (${Window[Inventory].Open}==FALSE) {
	        /windowstate inventory open
	    }



    | Open all packs if they aren't already - you have to handle arranging them and you have to have "use ctrl-r-click" set properly - for now
    /for slotNumber 1 to 8
        /if (${Window[Pack${slotNumber}].Open}==FALSE) {
            /itemnotify pack${slotNumber} rightmouseup
        }
    /next slotNumber
/return

Sub ClosePacks
      /declare slotNumber int local
       | Open inventory if not open
       /if (khitsDebug==1) /echo  khiTS: Closing inventory and containers
       /if (${Window[Inventory].Open}==FALSE) {
           /windowstate inventory open
       }

       | Open all packs if they aren't already - you have to handle arranging them and you have to have "use ctrl-r-click" set properly - for now
       /for slotNumber 1 to 8
           /if (${Window[Pack${slotNumber}].Open}==TRUE) {
               /itemnotify pack${slotNumber} rightmouseup
           }
       /next slotNumber

       /windowstate inventory close

/return


| Remove everything from a pack and puts in in your inventory
sub cleanPack(string PackNumber)
    /if (khitsDebug==1) /echo  khiTS: Cleaning out pack: ${PackNumber}

    | Used for looping through pack slots
    /declare iSlot      int local

    | How many freeslots are in the bag
    /declare iCount     int local

    /if (${PackNumber.Equal[e]}) {
        /if (khitsDebug==1) /echo  clearing enviro
        |This is REALLY crappy and slow, but right now there is no way (that I know of) to examine the contents of an enviromental container
        | It's faster now that it doesn't call itemnotify and clearCursor on empty slots (kellewic)
        /for iSlot 1 to 10
           /if (${InvSlot[enviro${iSlot}].Item.ID}) {
               /shiftkey /itemnotify enviro${iSlot} leftmouseup
               /call clearCursor ${iDestroyResults}
           }
        /next iSlot
    } else {
      /if (khitsDebug==1) /echo  "Cleaning out ${PackNumber}"
        | Can't empty a non-pack duh!
        /if (${Me.Inventory[Pack${PackNumber}].Container}==0) {
            /echo No pack in slot
            /return
        }

        /for iSlot 1 to ${Me.Inventory[Pack${PackNumber}].Container}
            | Quit if the pack is empty
            /if (${Me.Inventory[Pack${PackNumber}].Container}==0) {
                /return TRUE
            }

            /if (khitsDebug==1) /echo  Clearing Pack${PackNumber} Slot:${iSlot} Item: ${Me.Inventory[Pack${PackNumber}].Item[${iSlot}]}

            /if (${Me.Inventory[Pack${PackNumber}].Item[${iSlot}].ID} != NULL) {
                /varset iCount ${Me.Inventory[Pack${PackNumber}].Items}

                /shiftkey /itemnotify in pack${PackNumber} ${iSlot} leftmouseup
                /call clearCursor ${iDestroyResults}

                | Make sure we aren't just putting it back in the same bag
                /if (${Me.Inventory[Pack${PackNumber}].Items}==${iCount}) {
                    /echo CleanPack Error: Unable to empty pack.
                    /return FALSE
                }
            }
        /next iSlot
    }

    /delay 2
    /if (khitsDebug==1) /echo  Done Cleaning pack
/return TRUE


| Put the components needed into the container
Sub addComponents
    /delay 2

    /declare iPack      int      local
    | Used for looping through inventory pack nunbers

    /declare iSlot      int      local
    | Used for looping through pack slots

    /declare compNum    int      local
    | Loop integer

    /declare combSlot   int      local
    | The slot number in the combine container to put the next item

    /varset combSlot 1

    /for compNum 1 to ${iCompCount}
        /if (khitsDebug==1) /echo  components[${compNum}] = ${components[${compNum}]} : Length = ${components[${compNum}].Length}
        /if (${components[${compNum}].Length}==0) {
            | Didn't fail, so must have passed
            /return TRUE
        }

        | Find the item
        /for iPack 1 to 8
            | Don't look in the container we are using to do the combine
            /if (${String[${iPack}].NotEqual[${containerNum}]}) {
                | Look inside bags
                /if (${Me.Inventory[Pack${iPack}].Container} > 0) {
                    /for iSlot 1 to ${Me.Inventory[Pack${iPack}].Container}
                         | Does this item match the component
                        /if (${components[${compNum}].Equal[${Me.Inventory[Pack${iPack}].Item[${iSlot}].Name}]}) {
                            /call AddComp ${Me.Inventory[Pack${iPack}].Item[${iSlot}].InvSlot.ID} ${containerNum} ${combSlot}
                     /if (!${Macro.Return})   /return FALSE
                     /varcalc combSlot ${combSlot}+1
                     /goto :FoundItem
                        }
                    /next iSlot
                } else {
                    | Handle stuff not in bags
                    /if (${components[${compNum}].Equal[${Me.Inventory[21+${iPack}]}]}) {
                        /call AddComp (21+${iPack}) ${containerNum} ${combSlot}
                        /if (!${Macro.Return})   /return FALSE
                        /varcalc combSlot ${combSlot}+1
                        /goto :FoundItem
                    }
                }
            }
        /next iPack

        | Didn't find the item
        /echo khiTS addComponents: Couldn't find component: ${components[${compNum}]}
        /return FALSE

        :FoundItem
    /next compNum

/return TRUE


sub AddComp(int InvSlotNum,string CombinePackNumber,int CombineSlotNumber)
    | InvSlotNum         - The slot in which the item exists
    | CombinePackNumber - Destination pack number, e for enviro
    | CombineSlotNumber - Destination slot number
    |/echo InvSlotNum = ${InvSlotNum}
    |/echo CombinePackNumber = ${CombinePackNumber}
    |/echo CombineSlotNumber = ${CombineSlotNumber}

   /declare failCount int local 0

    /if (!${Defined[InvSlotNum]} || !${Defined[CombinePackNumber]} || !${Defined[CombineSlotNumber]}) {
       /echo AddComp Error: You must specify the component's InvSlotNum.ID, the container number, and the container slot in which to put the compents
       /echo Syntax: /call AddComp <InvSlotNum> <Pack Number> <Slot Number in Pack>
       /return FALSE
    }

   | Check container to see if it is full
   /if (${CombinePackNumber.Equal[e]}) {
      | No way I know of to check enviro containers for space - but I'm ignorant so...
   } else {
      /if (${Me.Inventory[pack${CombinePackNumber}].Container}-${Me.Inventory[pack${CombinePackNumber}].Items}==0) {
         /echo AddComp Error: Unable to add this item to the container, it is full
         /return FALSE
      }
   }

   :FindEmptySlot
    /if (${CombinePackNumber.Equal[e]}) {
       /if (${CombineSlotNumber}>10) {
          /echo AddComp Error: Unable to find and empty slot in enviro container, it is full
          /return FALSE
       }
    } else {
       /if (${CombineSlotNumber}>${Me.Inventory[pack${CombinePackNumber}].Container}) {
          /echo AddComp Error: Unable to find and empty slot in this container, it is full
          /return FALSE
       }
    }
    | See if there's anything in the slot in which we are trying to put the combine component
    /if (${CombinePackNumber.Equal[e]}) {
        /itemnotify in enviro ${CombineSlotNumber} leftmouseup
        | Make sure the cursor is clear, otherwise something was in that slot
        /if (${Cursor.ID}!=NULL) {
           /itemnotify in enviro ${CombineSlotNumber} leftmouseup
         /varcalc CombineSlotNumber ${CombineSlotNumber}+1
         /varset CombineSlotNumber ${String[${CombineSlotNumber}].Arg[0,.]}
          /goto :FindEmptySlot
        }
    } else {
       /if (${Me.Inventory[pack${CombinePackNumber}].Item[${CombineSlotNumber}].ID}!=NULL) {
         /varcalc CombineSlotNumber ${CombineSlotNumber}+1
         /varset CombineSlotNumber ${String[${CombineSlotNumber}].Arg[0,.]}
          /goto :FindEmptySlot
       }
    }
  :PickUpItem
   | Slot is empty, so go ahead and put item into it
   | Found it, pick it up and move it to the combine container
    /ctrlkey /itemnotify ${InvSlotNum} leftmouseup
    |Check to see if cursor has multiple a stack.
    /if (${Cursor.Stack}>1 && ${failCount}<3) {
      /autoinv
      /varcalc failCount ${failCount}+1
      /goto :PickUpItem
   }

    /if (${String[${CombinePackNumber}].Equal[e]}) {
        /itemnotify in enviro ${CombineSlotNumber} leftmouseup
    } else {
       /itemnotify in pack${CombinePackNumber} ${CombineSlotNumber} leftmouseup
    }

/return TRUE


| Explain to the user how to use the macro
sub displayHelp
    /echo Syntax:   /macro khiTS "<recipe name>" "<options>"
    /echo Example:  /macro khiTS "bits" "show-stats=0 destroy=0 abort-on-tell=0 end-on-trivial=0"
    /echo -
    /echo MAKE SURE THAT
    /echo * Recipe.ini is in your macro folder, or INIPATH points to your recipe.ini file
    /echo * Inventory is open.
    /echo * All your containers are open.
    /echo * Nothing crosses over each other, all windows (bags, inventory, buttons) must be free.
    /echo * Your windos positions are saved (by closing them and opening them again after they have been moved).
    /echo -
    /echo Options:
    /echo --------
    /echo * show-stats
    /echo -- Syntax: show-stats=1|0
    /echo -- Example: show-stats=0
    /echo -- Shows combine statistics.
    /echo -- Set to 1 for show showing stats, 0 to leave out the stats.
    /echo -- Default set to 1 (show stats).
    /echo -
    /echo * destroy-results
    /echo -- Syntax: destroy-results=1|0
    /echo -- Example: destroy-results=1
    /echo -- Tells the macro wether end-result is destroyed or kept.
    /echo -- Set to 1 for destroying end-result, 1 to keep end-result.
    /echo -- Default set to 0 (keep end-result).
    /echo -
    /echo * abort-on-tell
    /echo -- Syntax: abort-on-tell=1|0
    /echo -- Example: abort-on-tell=1
    /echo -- Tell the macro wether it should /endmacro when recieving a tell.
    /echo -- Set to 1 for ending macro on tells, 0 to ignore tells.
    /echo -- Default set to 0 (ignore tells).
    /echo -
    /echo * end-on-trivial
    /echo -- Syntax: end-on-trivial=1|0
    /echo -- Example: end-on-trivial=1
    /echo -- Tell the macro wether it should stop when recieving a trivial message.
    /echo -- Set to 1 for ending macro on trivial, 0 to ignore trivial.
    /echo -- Default set to 0 (ignore trivial).
    /echo -
    /echo * make-this-many
    /echo -- Syntax: make-this-many=#
    /echo -- Example: make-this-many=100
    /echo -- The number of successfull combines you want made (or till no more components are available).
    /echo -- Set to 0 for unlimited combines (or till no more components are available), or to the wanted amount.
    /echo -- Default set to 0 (unlimited).
    /echo -
    /echo * stop-at-skill-level
    /echo -- Syntax: stop-at-skill-level=###
    /echo -- Example: stop-at-skill-level=123
    /echo -- Tell the macro to stop when a certain skill level is reached.
    /echo -- Default set to 0 (do not stop at any skill level)
    /echo -
    /echo * default
    /echo -- Syntax: default
    /echo -- Tell the macro to use all default settings, any other options set will be ignored and defaults will be used.
/return
Here is the main. I use when I want it to act just like khits.mac.

Code: Select all

|khits.mac

#include khits.inc


Sub Main(string recipe, string options)
	/call Make ${recipe} ${options}
	/call ClosePacks
/endmacro

Last edited by draco on Wed Jun 30, 2004 10:47 pm, edited 1 time in total.