TheWind Posted December 7, 2016 Share Posted December 7, 2016 Hi, I haven't posted much on here, but I've been active in the chatbox from time to time. I have been attempting to make a script that completes three quests (Cook's Assistant, Doric's Quest, and Goblin Diplomacy) all automated. The main problems I've come across so far is the organization of all the code and determining when certain actions should occur. I've tried to take into account many possibilities when starting the script so evidently I have had to write many conditions. I feel that understanding what configs are and how they can be used would be very beneficial for me to simplify a lot of these conditions. From what I've been able to ascertain they can be used to determine what stage of a quest you are on. The only information I could find related to configs in the api was the Configs api page itself: http://osbot.org/api/org/osbot/rs07/api/Configs.html The only other thing I've been able to find relating to configs is the Configs option in OSBot: http://prntscr.com/dgokzc How can I get the config values for a certain quest? An example as to how they could be used would also be nice Quote Link to comment Share on other sites More sharing options...
Team Cape Posted December 8, 2016 Share Posted December 8, 2016 if(configs.get(quest val) == a given value) { you're on this part of the quest } you get the configs manually with the client and doing the quests yourself 1 Quote Link to comment Share on other sites More sharing options...
TheWind Posted December 8, 2016 Author Share Posted December 8, 2016 Thank you for the help! Quote Link to comment Share on other sites More sharing options...
Juggles Posted December 8, 2016 Share Posted December 8, 2016 Building off of what TeamCape said. if(configs.get(quest val) == a given value) { you're on this part of the quest }quest val never changes. It is the same number for that quest. For example, Cook's assistant could be #5 so it will always be 5. a given value is the number that changes for each part of that specific quest. For example, if you are doing Cook's assistant, before you start it, it will == 0, but after you start it, it will == 1. So while doing a quest, you can do something like if(configs.get(5) == 0) { //start quest } else if(configs.get(5) == 1) { //give NPC the items } else if etc... Quote Link to comment Share on other sites More sharing options...
Vilius Posted December 8, 2016 Share Posted December 8, 2016 Building off of what TeamCape said. if(configs.get(quest val) == a given value) { you're on this part of the quest } quest val never changes. It is the same number for that quest. For example, Cook's assistant could be #5 so it will always be 5. a given value is the number that changes for each part of that specific quest. For example, if you are doing Cook's assistant, before you start it, it will == 0, but after you start it, it will == 1. So while doing a quest, you can do something like if(configs.get(5) == 0) { //start quest } else if(configs.get(5) == 1) { //give NPC the items } else if etc... Instead of doing if(...){ ... }else if(...){ ... } You should use: switch(getConfigs().get(5)){ case 1: //do stuff break; case 2: //do stuff break; } Just my two cents. 2 Quote Link to comment Share on other sites More sharing options...