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.

Amulet of Glory Check

Featured Replies

Not sure if this works for a amulet of glory check as it was working earlier but for some reason isnt now.

 

Spoiler

public final String[] amuletOfGlory = {"Amulet of glory(6)", "Amulet of glory(5)", "Amulet of glory(4)",
        "Amulet of glory(3)", "Amulet of glory(2)", "Amulet of glory(1)"
};

public void checkGlory() throws InterruptedException {
    if (!getEquipment().isWearingItem(EquipmentSlot.AMULET, String.valueOf(amuletOfGlory))) {
        if (getEquipment().isWearingItem(EquipmentSlot.AMULET)) {
            getEquipment().unequip(EquipmentSlot.AMULET);
        } else {
            if (!getInventory().contains("Amulet of glory(6)")) {
                if (!getBank().isOpen()) {
                    bank();
                    getBank().withdraw("Amulet of glory(6)", 1);
                    getBank().close();
                }
            } else {
                getInventory().interact("Wear", "Amulet of glory(6)");
            }
        }
    }
    else {
        bank();
    }
}

private void bank() throws InterruptedException {
        getBank().open();
        getBank().depositAll();
}

 

  • Author
38 minutes ago, Juggles said:

Use a lambda expression instead. 

I use the string in a different class too

should i change both of them to lamdas

does the expression not work with the string

 

Edited by donaldchen34

11 minutes ago, donaldchen34 said:

I use the string in a different class too

should i change both of them to lamdas

does the expression not work with the string

 

I would just do

!getEquipment().contains(f->f.getName.contains("Amulet of glory(") {

 

  • Author
9 minutes ago, Juggles said:

I would just do


!getEquipment().contains(f->f.getName.contains("Amulet of glory(") {

 

Didnt even think about including the ( after the glory

On 11/10/2018 at 12:01 AM, donaldchen34 said:

Not sure if this works for a amulet of glory check as it was working earlier but for some reason isnt now.

 

  Hide contents


public final String[] amuletOfGlory = {"Amulet of glory(6)", "Amulet of glory(5)", "Amulet of glory(4)",
        "Amulet of glory(3)", "Amulet of glory(2)", "Amulet of glory(1)"
};

public void checkGlory() throws InterruptedException {
    if (!getEquipment().isWearingItem(EquipmentSlot.AMULET, String.valueOf(amuletOfGlory))) {
        if (getEquipment().isWearingItem(EquipmentSlot.AMULET)) {
            getEquipment().unequip(EquipmentSlot.AMULET);
        } else {
            if (!getInventory().contains("Amulet of glory(6)")) {
                if (!getBank().isOpen()) {
                    bank();
                    getBank().withdraw("Amulet of glory(6)", 1);
                    getBank().close();
                }
            } else {
                getInventory().interact("Wear", "Amulet of glory(6)");
            }
        }
    }
    else {
        bank();
    }
}


private void bank() throws InterruptedException {
        getBank().open();
        getBank().depositAll();
}

 

String.valueOf(amuletOfGlory)

^ This does not do what you seem to think it does

Instead, do:

if (!getEquipment().isWearingItemThatContains(EquipmentSlot.AMULET, amuletOfGlory))) {

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.