Start with the container open in experiment mode. Put "recipe.ini" in the same dir.
Code: Select all
|| Combine.mac by Groo Mar 8, 2004
#event FullInventory "There was no place to put that"
#event CombineError "You cannot combine these items in this container type!"
#chat tell
Sub Main
/declare Container global
/declare PackCode global
/declare Component array
/declare i global
/call readIni "@Param0"
:Begin
/call ClearCursor
/for i 0 to 9
/call AddComp "@Component(@i)" @i
/next i
/call DoCombine
/goto :Begin
/return
Sub readIni(RecipeName)
/echo Running @RecipeName recipe
/if "$ini("recipes.ini","@RecipeName")"=="" {
/echo Recipe @RecipeName not found
/endmacro
}
/varset Container "$ini("recipes.ini","@RecipeName","Cont")"
/for i 0 to 7
/if "$pack(@i,name)"=="@Container" /varset Container "pack @i"
/next i
/if "@Container"=="Enviro" {
/varset PackCode "e"
} else {
/varset PackCode $right(1, @Container)
}
/for i 0 to 9
/varset Component(@i) "$ini("recipes.ini","@RecipeName","Comp@i")"
/next i
/return
sub ClearCursor
:Loop
/if $cursor()==NULL /return
/autoinv
/delay 2
/doevents
/goto :Loop
/return
sub DoCombine
:Loop
/click left @Container combine experiment
/delay 5
/doevents
/if $pack(@PackCode,empty)==FALSE /goto :Loop
/delay 5
/return
sub AddComp(CompName, PackSlot)
/if "@CompName"=="NOTFOUND" /return
/sendkey down ctrl
:Loop
/finditem "@CompName"
/if $find()==FALSE {
/echo Could not find @CompName in inventory
/beep
/sendkey up ctrl
/endmacro
}
/if $cursor()==NULL /goto :Loop
/click left @Container @PackSlot experiment
/sendkey up ctrl
/return
Sub Event_CombineError
/endmacro
/return
Sub Event_FullInventory
/endmacro
/return
Code: Select all
------------- Haversack ------------
[AcornOil]
Cont=Enviro
Comp0=Misty Acorn
Comp1=Water Flask
[InfusedPT]
Cont=Enviro
Comp0=Celestial Temper
Comp1=Platinum Thread
[CelestialTemper]
Cont=Enviro
Comp0=Blue Diamond Powder
Comp1=Purified Water
[BlueDiamondPowder]
Cont=Enviro
Comp0=Blue Diamond
Comp1=Jar Of Acid
[PurifiedWater]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Water Flask
Comp2=Water Flask
[CE]
Cont=Mortar And Pestle
Comp0=Celestial Solvent
Comp1=The Scent Of Marr
[WovenFur]
Cont=Vale Sewing Kit
Comp0=Patch of Dire Wolf Fur
Comp1=Patch of Dire Wolf Fur
Comp2=Patch of Dire Wolf Fur
Comp3=Embroidering Needle
[PatchFur]
Cont=Vale Sewing Kit
Comp0=Tuft of Dire Wolf Fur
Comp1=Tuft of Dire Wolf Fur
Comp2=Tuft of Dire Wolf Fur
Comp3=Embroidering Needle
------------- Steel Arrow ------------
[steelarrow]
Cont=Surefall Fletching Kit
Comp0=Small Groove Nocks
Comp1=Steel Arrowheads
Comp2=Steel Arrowshafts
Comp3=Steel Fletch
[steelshaft]
Cont=Enviro
Comp0=Arrow Shaft Mold
Comp1=Large Brick Of Steel
Comp2=File
Comp3=Mark of Karana
Comp4=Water Flask
[steelfletch]
Cont=Enviro
Comp0=Small Brick Of Steel
Comp1=Steel Working Knife
Comp2=Mark of Karana
[steelarrowhead]
Cont=Enviro
Comp0=Small Brick Of Steel
Comp1=File
Comp2=Water Flask
Comp3=Mark of Karana
[bits]
Cont=Enviro
Comp0=Small Piece Of Ore
Comp1=Small Piece Of Ore
Comp2=Water Flask

