Jump to content
  • 0
Dittymasta

Prayer Points

Question

I'm currently trying to add a Strategy that'll check to see if a players prayer is below a threshold and am currently struggling to find the right class for it. Does anyone know what directory I could find methods for accessing the Prayer point tracker?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 1
/**
 * Reads the Prayer Interface message to get current points
 * 
 * @author Emmastone
 * @return the amount of prayer points
 */
public int getPrayer() {
    String prayer = Interfaces.getInterface(687).getMessage().substring(0, 2);

    if (prayer.contains("/")) {
        return Integer.parseInt(prayer.substring(0, 1));
    } else {
        return Integer.parseInt(prayer);
    }
}

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, EmmaStone said:
/**
 * Reads the Prayer Interface message to get current points
 * 
 * @author Emmastone
 * @return the amount of prayer points
 */
public int getPrayer() {
    String prayer = Interfaces.getInterface(687).getMessage().substring(0, 2);

    if (prayer.contains("/")) {
        return Integer.parseInt(prayer.substring(0, 1));
    } else {
        return Integer.parseInt(prayer);
    }
}

You also can use Skill.getCurrentLevel(PRAYER) < not sure if syntax is correct. 

Share this post


Link to post
Share on other sites
  • 0
13 hours ago, EmmaStone said:
/**
 * Reads the Prayer Interface message to get current points
 * 
 * @author Emmastone
 * @return the amount of prayer points
 */
public int getPrayer() {
    String prayer = Interfaces.getInterface(687).getMessage().substring(0, 2);

    if (prayer.contains("/")) {
        return Integer.parseInt(prayer.substring(0, 1));
    } else {
        return Integer.parseInt(prayer);
    }
}

Thank you very much! This is gonna be the next thing I add to my arcade script!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×