Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.osbot.rs07.api.map.Position;
- import org.osbot.rs07.api.model.NPC;
- import org.osbot.rs07.api.model.RS2Object;
- import org.osbot.rs07.api.ui.RS2Widget;
- import org.osbot.rs07.api.ui.Tab;
- import org.osbot.rs07.script.Script;
- import org.osbot.rs07.script.ScriptManifest;
- @ScriptManifest(author = "Caleb", info = "Sacrafises bones", logo = "", name = "Rimmy Altar", version = 0)
- public class main extends Script {
- RS2Object Altar = getObjects().closest("Altar");
- RS2Widget HouseOptions = getWidgets().get(261, 78);
- RS2Widget LeaveHouse = getWidgets().get(370, 18);
- NPC Phials = npcs.closest("Phials");
- Position Store = new Position(2949, 3213, 0);
- @Override
- public int onLoop() throws InterruptedException {
- if(myPlayer().getLocalX() >= 6000) {
- DoBones();
- } else {
- RunBones();
- }
- return 250;
- }
- private void RunBones() throws InterruptedException {
- if(!getInventory().contains(536)) {
- if(getInventory().contains(537)) {
- if(Phials.isVisible()) {
- if(getInventory().isItemSelected()){
- Phials.interact("Use");
- sleep(random(400,800));
- }else{
- getInventory().interact("Use", 537);
- }
- }else {
- getWalking().walk(Store);
- }
- }
- }
- }
- private void DoBones() throws InterruptedException {
- if(Altar != null) {
- if(!myPlayer().isAnimating()) {
- if(getInventory().contains("Dragon bones")) {
- if(getInventory().isItemSelected()){
- Altar.interact("Use");
- sleep(random(400,800));
- }else{
- getInventory().interact("Use", "Dragon bones");
- }
- }else {
- LeaveHouse();
- }
- }
- }
- }
- private void LeaveHouse() throws InterruptedException {
- getTabs().open(Tab.SETTINGS);
- if(LeaveHouse.isVisible()) {
- LeaveHouse.interact("Leave House");
- sleep(1000);
- }else{
- HouseOptions.interact("View House Options");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement