What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

nishalp

Member
Joined
Sep 13, 2014
Messages
177
From a Plugin, is there any exposed interface to set the amount of Normal Quality and / or High Quality for each of the ingredients? I am able to select the recipe. Just cant seem to find a way to select the ingredient amounts.
 
Here is a small snippet from how the old Lisbeth handled Nq/Hq mats:

Code:
            var synth = new Synthesize();
            uint rcipeId = CraftContext.Current.Recipe.Id;
            synth.RecipeId = rcipeId;

            int matNumbers = Database.Recipes.First(r => r.Id == rcipeId).Ingredients
                .Count(i => !CharacterStatus.ShardIds.Contains(i.Id));

            var mats = new int[matNumbers];
            for (int i = 0; i < mats.Length; i++)
            {
                mats[i] = LisbethSettings.Instance.UseHqMatsFirst ? -1 : -2;
            }

            synth.HQMats = mats;

            bool result = false;
            try { result = await synth.StartCrafting(); }
            catch { Logger.LogError("The Synthesize exception was thrown."); }

            if (!result) { return false; }

            Logger.Log("Remaining Amount: {0}", CraftContext.Current.Amount
                - CharacterStatus.GetItemAmount(CraftContext.Current.ItemId));

            return true;

Synthesize() is a ProfileBehavior class/object from ff14bot.NeoProfiles.Tags
By creating an instance of Synthesize, you can then customize all the properties normally found in an Orderbot profile and open the crafting window with it's StartCrafting() function
 
Perfect. Thanks for that.

Here is a small snippet from how the old Lisbeth handled Nq/Hq mats:

Code:
            var synth = new Synthesize();
            uint rcipeId = CraftContext.Current.Recipe.Id;
            synth.RecipeId = rcipeId;

            int matNumbers = Database.Recipes.First(r => r.Id == rcipeId).Ingredients
                .Count(i => !CharacterStatus.ShardIds.Contains(i.Id));

            var mats = new int[matNumbers];
            for (int i = 0; i < mats.Length; i++)
            {
                mats[i] = LisbethSettings.Instance.UseHqMatsFirst ? -1 : -2;
            }

            synth.HQMats = mats;

            bool result = false;
            try { result = await synth.StartCrafting(); }
            catch { Logger.LogError("The Synthesize exception was thrown."); }

            if (!result) { return false; }

            Logger.Log("Remaining Amount: {0}", CraftContext.Current.Amount
                - CharacterStatus.GetItemAmount(CraftContext.Current.ItemId));

            return true;

Synthesize() is a ProfileBehavior class/object from ff14bot.NeoProfiles.Tags
By creating an instance of Synthesize, you can then customize all the properties normally found in an Orderbot profile and open the crafting window with it's StartCrafting() function
 
So I tried the following from the Reborn Console. It gets all the data and ingredients and things. Looking at the listbeth code its just setting the prefer NQ or HQ mats as -1 or -2 for each ingredient into a int array for the number of ingredients in the recipe. This recipe has 4 ingredients however when I run this, I get no error but it does not set the material amount in the UI or start to synch. Output is below from this script. Any ideas?

Code:
ClearLog();
var r = CraftingManager.CurrentRecipe;
Log(r.CurrentLocaleName);
var mats = new int[4]; 

foreach (var i in r.Ingredients)
{
	Log("{0},{1},{2},{3},{4},{5}", i.HqInInventory, i.HqSelected, i.ItemId, i.NormalInInventory, i.NqSelected, i.TotalNeeded);
}
var synth = new ff14bot.NeoProfiles.Tags.Synthesize(); 
synth.RecipeId = CraftingManager.CurrentRecipeId; 
mats[0]=-1;
mats[1]=-1;
mats[2]=-1;
mats[3]=-1;
synth.HQMats = mats;
synth.StartCrafting();

Output from running:
Sohm Al Tart
0,0,12893,44,3,3
109,0,4848,0,0,1
102,0,4852,0,0,1
0,0,12881,2,2,2
0,0,0,0,0,0
0,0,0,0,0,0
 
Back
Top