xG00BERx
I was wondering where all the Recipe information is located!!??! I Seriously cannot find it using search.... Nothing but commands for giving it and for the special bags that drop them but nothing on how they work etc... Thanks
public static RecipeScroll GetRecipe(Array list)
{
var recipes = new int[list.Length];
int index = 0;
int mid = -1;
foreach (int i in list)
{
int val = i - (i / 100) * 100;
if (val >= 50 && mid == -1)
{
mid = index;
}
recipes[index] = i;
index += 1;
}
if (list.Length == 0) // empty list
{
return null;
}
if (mid == -1) // only lesser recipes in list
{
return new RecipeScroll(recipes[Utility.Random(list.Length)]);
}
if (mid == 0) // only greater recipes in list
{
if (Utility.RandomDouble() < 0.01)
{
return new RecipeScroll(recipes[Utility.Random(list.Length)]);
}
}
else
{
if (Utility.RandomDouble() < 0.01)
{
return new RecipeScroll(recipes[Utility.RandomMinMax(mid, list.Length - 1)]);
}
return new RecipeScroll(recipes[Utility.Random(mid)]);
}
return null;
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.