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.

Cannot activate prayer

Featured Replies

	private void pray() throws InterruptedException {
                //open prayer tab
		if (!getTabs().open(Tab.PRAYER)) {
			getTabs().open(Tab.PRAYER);
		} else {
                       
                        //flick rapid heal prayer
			getPrayer().set(PrayerButton.RAPID_HEAL, true);
			sleep(random(500,1000));
			getPrayer().set(PrayerButton.RAPID_HEAL, false);
                        
                        //update the last prayer time to check when to pray again
			lastPray = System.currentTimeMillis();
		}
	}

Hi,

 

I am trying to make a simple rapid heal script for NMZ, but for some reason I can't activate the prayer. It would just open the prayer tap and hover over it. The lastPray would update, so I know that the script does go through the else statement.

 

Thanks.

	private void pray() throws InterruptedException {
		//open prayer tab
		if (!getTabs().open(Tab.PRAYER)) {
			getTabs().open(Tab.PRAYER);
		} else {
			//flick rapid heal prayer
			RS2Widget rapidHeal = getWidgets().get(541,11);
			if(rapidHeal != null && rapidHeal.isVisible()){
				rapidHeal.interact("Activate");
				sleep(random(500,1000));
				rapidHeal.interact("Deactivate");
				lastPray = System.currentTimeMillis();
			}
		}
	}

I got it to work using widget. 

Have you tried the new Prayer API update in .108? Make sure to also compile on the new version.

  • Author

Have you tried the new Prayer API update in .108? Make sure to also compile on the new version.

The new Prayer API update did fixed it. can you explain what is the advantages and disadvantages of using the Prayer API vs using widget? Right now i'm using the Prayer API because I think it is simply more reliable.

Edited by AlphaBeta

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.