Jarvis101 75 Report post Posted November 23, 2013 (edited) Not sure if you started work on crafting orbs... but I got bored and threw something together. //Code for crafting //usage of namespace using namespace std; //main controllers (gui elements) bool has_craftables; bool craft; int current_roll; int max_rolls; //Crafting settings (config elements) bool alchemy; bool fusing; bool socketing; bool chaos; bool regal; bool chrome; bool exalt; //Crafting commands (eg. in config, use [Alch] == "true" bool alch; bool fuse; bool socket; bool Croll; bool Rroll; bool color; bool ex; //function declarations bool init(); bool load_craft(); void start_craft(); main()//The item parse { if(!init()) { //handle error if(!load_craft()) { //handle error } } else { if(craft == true) { start_craft(); } } } bool init() { bool flag = true; bool loadfilecheck = true; //Place holder for the function used to load the settings //initializing unused variables has_craftables = false; craft = false; max_rolls = 0; //This would be where you load crafting setting if(!loadfilecheck) { //error message here flag = false; } return flag; } bool load_craft() { //This is where you load the config file } void start_craft() { if(has_craftables == true) { while(current_roll < max_rolls) { if(alchemy == true) { //check item against craft parameters and set the variable to true if a true match is found if(alch == true) { //go to stash //find orb //craft current_roll++; } } if(regal == true) { //check item against craft parameters and set the variable to true if a true match is found if(Rroll == true) { //go to stash //find orb // current_roll++; } } if(chaos == true) { //check item against craft parameters and set the variable to true if a true match is found if(Croll == true) { //go to stash //find orb //craft current_roll++; } } if(socketing == true) { //check item against craft parameters and set the variable to true if a true match is found if(socket == true) { //go to stash //find orb //craft current_roll++; } } if(fusing == true) { //check item against craft parameters and set the variable to true if a true match is found if(fuse == true) { //go to stash //find orb //craft current_roll++; } } if(chrome == true) { //check item against craft parameters and set the variable to true if a true match is found if(color == true) { //go to stash //find orb //craft current_roll++; } } if(exalt == true) { //check item against craft parameters and set the variable to true if a true match is found if(ex == true) { //go to stash //find orb //craft current_roll++; } } } } } Edited November 23, 2013 by Jarvis101 Quote Share this post Link to post Share on other sites
alkpone 1000000 Report post Posted November 23, 2013 Nice try You forget to specify the Item we want to roll ^^. Behind this, need for a hard regex handling. Also logic handling the result of the craft to stash it or sell it or reroll it. Quote Share this post Link to post Share on other sites
Jarvis101 75 Report post Posted November 23, 2013 (edited) I was thinking of when the bot id's the item, it checks its stats vs a crafting config. The result would be checked against a pickit. example : Item gets id'd, checks if it is to be sold, if so, run through craft check. loop process until crafting tries are used up. But yeah, I can see a dozen problems with this code. Wrote it last night after being up for 20 hours. Edited November 23, 2013 by Jarvis101 Quote Share this post Link to post Share on other sites
f1ndm3h 3 Report post Posted December 21, 2013 Very interesting Quote Share this post Link to post Share on other sites