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.

>C< Prayer potion drinker

Featured Replies

>C< Prayer potion drinker

4EG1pKu.png

 

Basic script that drinks prayer potions when prayer points have reached desired prayer point to re-pot at.

Script will prioritise lower doses first. (E.g: Will drink a potion with 1 dose before a potion with 3 doses). 

If inventory contains no doses of prayer potion it will stop.

Also supports an option to drink Super restores instead!

 

Download:

http://www.mediafire.com/file/gdcmv404p9k1drc/Castro - Prayer potion drinker v0.3.jar

 

Source:

https://pastebin.com/VT4V6iDx

 

 

Older versions:

 

Old downloads:

Old sources:

 

Edited by Castro_
Added an option for Super restores

Did you just make this within like 5minutes? haha

  • Author
1 minute ago, Severide said:

Did you just make this within like 5minutes? haha

Was bored and saw someone wanted one so I thought I'd do it :xboge:

Just now, Castro_ said:

Was bored and saw someone wanted one so I thought I'd do it :xboge:

Jesus, quick off the mark, good job man!

nice, personally i use randomised prayer drinking values like below but nice release:

if (getSkills().getDynamic(PRAYER) < prayerValue) {
    pray();//pray
}
public void pray() {
    Filter<Item> prayPotionFilter = item -> item.getName().contains("Prayer");
    Item prayPotion = getInventory().getItem(prayPotionFilter);
    int a = getSkills().getDynamic(PRAYER);
    if (prayPotion.interact("Drink")) { //attack
        new ConditionalSleep(3000, 300) { //sleep for 3 seconds or until the condition is true
            @Override
            public boolean condition() throws InterruptedException {
                return getSkills().getDynamic(PRAYER) > a;
            }
        }.sleep();
    }
    prayerValue = random((int)(getSkills().getStatic(PRAYER) *0.2), (int)(getSkills().getStatic(PRAYER) *0.7));
}
  • Author
Just now, scriptersteve said:

nice, personally i use randomised prayer drinking values like below but nice release:


if (getSkills().getDynamic(PRAYER) < prayerValue) {
    pray();//pray
}

public void pray() {
    Filter<Item> prayPotionFilter = item -> item.getName().contains("Prayer");
    Item prayPotion = getInventory().getItem(prayPotionFilter);
    int a = getSkills().getDynamic(PRAYER);
    if (prayPotion.interact("Drink")) { //attack
        new ConditionalSleep(3000, 300) { //sleep for 3 seconds or until the condition is true
            @Override
            public boolean condition() throws InterruptedException {
                return getSkills().getDynamic(PRAYER) > a;
            }
        }.sleep();
    }
    prayerValue = random((int)(getSkills().getStatic(PRAYER) *0.2), (int)(getSkills().getStatic(PRAYER) *0.7));
}

Thank you! and I was thinking about adding randomisation, I may do in the future :P

6 minutes ago, Castro_ said:

Thank you! and I was thinking about adding randomisation, I may do in the future :P

Nw, there are a few different ways to add randomisation, i quite liked the above as it means it's different for each account running the script rather than hard coding say 10 to 30

Your logic for selecting which pot to drink could be simplified:

Optional<Item> prayerPotion = Arrays.stream(getInventory().getItems())
	.filter(item -> item != null && item.getName().startsWith("Prayer potion"))
	.min(Comparator.comparing(Item::getName));

if (prayerPotion.isPresent()) {
    Item pot = prayerPotion.get();
}

 

17 minutes ago, jonny1179 said:

Your logic for selecting which pot to drink could be simplified:


Optional<Item> prayerPotion = Arrays.stream(getInventory().getItems())
	.filter(item -> item != null && item.getName().startsWith("Prayer potion"))
	.min(Comparator.comparing(Item::getName));

if (prayerPotion.isPresent()) {
    Item pot = prayerPotion.get();
}

 

 

Does that get the first item starting with Prayer potion? ty

8 minutes ago, H0rn said:

 

Does that get the first item starting with Prayer potion? ty

This gets the prayer potion with the lowest dose first, cause it's ordered by name. Prayer pot(1) comes before Prayer pot(2)

5 minutes ago, nosepicker said:

This gets the prayer potion with the lowest dose first, cause it's ordered by name. Prayer pot(1) comes before Prayer pot(2)

Awesome, this can come in useful for other things. ty mate

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.