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

Switching attack style

Featured Replies

I searched in the API but I cant find it.

I wanna create that my script swtiches attackstyle at a certain level. Like attack is <10 switch to defence, defence is <10 switch to strength.

thank you in advance <3

You have to click the widget, there isn't an api method. Look at the configs when you change attack styles manually, and that should help :)

Don't quote me on this, but from what I've seen in the api, you'll first need to get the configs for the attack style.

i believe this is '43' and values range from 0 upwards, 0 being attack, then you need to get the widget id's for the given style you want to switch and write a piece of code for it.

        int currentAttackStyle = getConfigs().get(43);

        if (currentAttackStyle == 0 && getSkills().getDynamic(Skill.ATTACK) > 10) {
            // current attack style is 'attack' and our player has an attack level higher then 10
            // this is where you now want to perform widget interactions to change the given attack style to one of your choice.
        }

 

Should be enough information here for you to accomplish what you need, I'd also advise you taking a look at: 

 it's a very helpful resource.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

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.