Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //First we'll create some kind of general method to call to start crafting in general
- CraftingStart(int[] IngredientID, int ProcessID){
- //here we are creating this method and the int[] creates an array that we can use to store the ItemIDs of all the items we'll use in creafting
- //this will reference the database we'd use
- for(int i = 0; i > IngredientID.length; i++){
- ingredientList.setIngredients(getIngredientInfo(IngredientID.(i)));
- }
- //here we're going through each itemID from the table that would be sent through in the function's call (CraftingStart) and finding what they are
- //while also creating an ingredientList which will store them in a different way than an array to let us interact with the information a bit better
- Recipe recipeFinder(ingredientList, ProcessID, getCraftingLevel(Account.Character.Crafting.ProcessID.Level));
- //here we'll be use the provided information from above as well as going back into the database to check the character's crafting level to find out what
- //they're looking to craft and creating a custom made Recipe.
- ItemCreate(itemName,recipe,modifiers)
- //ItemCreate would create an instance of the object Item which will then create a unqiue id for the object, and will allow us to populate the object's info.
- //to explain more you'd need to know about object oriented programming which you dont right now
- //now an example of what you've provided >sword thing
- CraftingStart({12,26,28,40},8); //here i've made up values for the items > wood is 12, aluminium is 26, steel is 28 and leather is 40 - 8 is tool creation process
- //the code will then go through and get the stats of the items for use in crafting > e.g wood id 12 is mahogany with high weight and strenght so would apply X modifier to the craft
- recipeFinder({12,26,28,40},8,21);
- ItemCreate(recipe.getItemName,recipe.getRecipe,recipe.getModifiers){
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement