Full Version : XMLSOCKETS
xmlspawner >>Q&A >>XMLSOCKETS
<< Prev | Next >>
Hanse46- 04-13-2008
Okay, to add new recipies, do I just copy:

CODE
public enum Recipes { UnbakedMeatPie } public static void Initialize()
{
//
// define the recipes and their use requirements
//
// ideally, you have a definition for every Recipes enum. Although it isnt absolutely necessary,
// if it isnt defined here, it will not be available for use
AddRecipe(
(int)Recipes.UnbakedMeatPie, // makes an uncooked meat pie
0,30,20, // str, dex, int requirements
new SkillName [] { SkillName.Cooking }, // skill requirement list
new int [] { 30 }, // minimum skill levels
new Type [] {typeof(BowlFlour), typeof(Pitcher), typeof(RawRibs), typeof(Garlic), typeof(Carrot) }, // ingredient list // ingredient list
new int [] { 1, 1, 2, 1, 4 }, // quantities
new string [] { null, "IsFull=true & Content=#Milk", null, null, null } // additional property tests
);
}
public override void DoTransmute(Mobile from, Recipe r)
{
if(r == null || from == null) return;
Recipes rid = (Recipes) r.RecipeID;
switch(rid)
{
case Recipes.UnbakedMeatPie:
{
// take the ingredients
ConsumeAll();
// add the pie
DropItem(new UnbakedMeatPie());
break;
}
}

and then add the new one under the old or do I need to create a seperate script for each?
ArteGordon- 04-14-2008
take a look at the bagofresources.cs script. It has 3 recipes. To add a recipe to MagicBasket.cs you would add them to the script in the same way.
You can always add your own custom transmutation containers with their own recipes.