Jump to content
Sign in to follow this  
Jake

SoulPlay Kumalo's Wolf Boner

Recommended Posts

Script buys wolf bones from Pikkupstix summoning shop then uses directly on edgeville altar for cheap prayer experience.  Pretty bare bones script, could use some paint, and maybe an option to choose what prayer level to stop at. Will be on the SDN eventually.

 

import xobot.script.ActiveScript;
import xobot.script.Manifest;
import xobot.script.methods.*;
import xobot.script.methods.tabs.Inventory;
import xobot.script.util.Time;
import xobot.script.util.Timer;
import xobot.script.wrappers.Widget;
import xobot.script.wrappers.WidgetChild;
import xobot.script.wrappers.interactive.GameObject;
import xobot.script.wrappers.interactive.Item;
import xobot.script.wrappers.interactive.NPC;

/**
 * Author: Jacob
 * Date: 9/7/2018.
 */
@Manifest(authors = { "Kumalo" }, name = "Wolf Boner", version = 1.0D, description = "Cheaply trains prayer")

public class Boner extends ActiveScript {

    private final int PIKKUPSTIX = 6970,
                      BONE = 2859,
                      ALTAR = 409;

    private final Timer timer = new Timer();

    @Override
    public boolean onStart() {
        return true;
    }


    @Override
    public int loop() {
        int boneCount;
        if ((boneCount = Inventory.getCount(BONE)) > 0) {
            GameObject altar = GameObjects.getNearest(ALTAR);
            Item bone = Inventory.getItem(BONE);
            if (altar != null && bone != null) {
                bone.interact("use");
                Time.sleep(100);
                altar.interact("use-with");
                if (Time.sleep(() -> Players.getMyPlayer().getAnimation() != -1, 6000)) {
                    //scrapped this idea
                    //Time.sleep(3600 * boneCount);

                    timer.setEndIn(3650 * boneCount);
                    while (Inventory.Contains(BONE) && timer.isRunning()) {
                        Time.sleep(50);
                    }
                }
            } else {
                Game.teleport("edgeville");
                Time.sleep(5500);
            }
        } else if (Shop.isOpen()) {
            Shop.buy(BONE, 28);
            Time.sleep(() -> Inventory.Contains(BONE), 5000);
        } else {
            NPC npc = NPCs.getNearest(PIKKUPSTIX);
            if (npc != null) {
                npc.interact("trade");
                Time.sleep(() -> Shop.isOpen(), 6000);
            } else {
                Game.teleport("summoning obelisk");
                Time.sleep(5500);
            }
        }
        return 100;
    }
}

 

Share this post


Link to post
Share on other sites
On 3/16/2019 at 6:15 AM, betatoxin said:

"file not found" could you repost please?

 

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
Sign in to follow this  

×