Jump to content
Parabot - Bot for Ikov, DreamScape, SoulPlay, RuneWild, and more
  • 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...