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; } } |