Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Understanding Configs

Featured Replies

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 smile.png

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

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...

 

 

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.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.