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.

projectile/animation based prayer switching

Featured Replies

	public void projectilePrayerSwitch() {

    	for (Projectile p : projectiles.getAll()) {
    		
    	    if (p.getId() == 2176) {
    			log("NPC attacked with magic!");
    			prayer.set(PrayerButton.PROTECT_FROM_MAGIC, true);
    			
    	    } else if (p.getId() == 2178) {
    			log("NPC attacked with ranged!");
    			prayer.set(PrayerButton.PROTECT_FROM_MISSILES, true);
    	    		}
    		}
	}

and animations

public void animationPrayerSwitch() {

    // Iterate over all NPCs
    for (NPC npc : npcs.getAll()) {

        // Get the current animation ID of the NPC
        int animationId = npc.getAnimation();
        
        // Check if the NPC is attacking with magic
        if (animationId == 711) {
            log("NPC attacked with magic!");
            // Activate Protect from Magic
            prayer.set(PrayerButton.PROTECT_FROM_MAGIC, true);
        } 

        // Check if the NPC is attacking with ranged
        else if (animationId == 249 || animationId == 250) {
            log("NPC attacked with ranged!");
            // Activate Protect from Missiles
            prayer.set(PrayerButton.PROTECT_FROM_MISSILES, true);
        }
    }
}

Edited by xlDino

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.