Jump to content

Fire RuneEr [F2P Fire Runecrafter]


Recommended Posts

Posted (edited)

Fire Runeer

 

Features

- Crafts fire runes out of pure essence in Al-Kharid 

- Banks Fire runes, withdraws Pure essence, repeat

- Script currently will NOT logout after all Pure essence are gone but should sit at bank till 5 min log

 

To run script

- Have FIXED mode enabled

- Pure essence in bank

- Fire tiara equip

- Standing in Al-Kharid bank with Tiara equip & Pure ess in inventory OR no pure ess in inventory

 

Report bug format

- Whats bot doing?: 

- Whats logger say?:

- Does problem happen all the time?:

 

Pictures

https://imgur.com/dEm00la

https://imgur.com/QGKdI8o

https://imgur.com/rUFp0kY

 

Download

Fire RuneEr

 

Source code

Spoiler

import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.map.constants.Banks;
import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.utility.ConditionalSleep;

import java.awt.*;
import java.util.concurrent.TimeUnit;


@ScriptManifest(name = "Firecrafter", logo = "", version = 1, author = "Imthabawse", info = "Makes Fire runes and banks")

public class Firecrafter extends Script {


    private long timeBegan;
    private long timeRan;
    private int beginningXp;
    private int currentXp;
    private int xpGained;
    private int currentLevel;
    private int beginningLevel;
    private int levelsGained;
    private double nextLevelXp;
    private double xpTillNextLevel;
    private long timeTNL;

    private int xpPerHour;
    final int[] XP_TABLE =
            {
                    0, 0, 83, 174, 276, 388, 512, 650, 801, 969, 1154,
                    1358, 1584, 1833, 2107, 2411, 2746, 3115, 3523, 3973, 4470, 5018,
                    5624, 6291, 7028, 7842, 8740, 9730, 10824, 12031, 13363, 14833,
                    16456, 18247, 20224, 22406, 24815, 27473, 30408, 33648, 37224,
                    41171, 45529, 50339, 55649, 61512, 67983, 75127, 83014, 91721,
                    101333, 111945, 123660, 136594, 150872, 166636, 184040, 203254,
                    224466, 247886, 273742, 302288, 333804, 368599, 407015, 449428,
                    496254, 547953, 605032, 668051, 737627, 814445, 899257, 992895,
                    1096278, 1210421, 1336443, 1475581, 1629200, 1798808, 1986068,
                    2192818, 2421087, 2673114, 2951373, 3258594, 3597792, 3972294,
                    4385776, 4842295, 5346332, 5902831, 6517253, 7195629, 7944614,
                    8771558, 9684577, 10692629, 11805606, 13034431, 200000000
            };



    private Area PortalArea = new Area(2578, 4844, 2569, 4854);
    private Area RuinsArea = new Area(3312, 3250, 3307, 3253);


    private void bank() throws InterruptedException {
        Entity portal = getObjects().closest(PortalArea, "Portal");

        if(getInventory().contains("Fire rune") && !myPlayer().isAnimating() && !myPlayer().isMoving() && portal != null) {
            log("Teleporting out..");
            portal.interact("Use");
            new ConditionalSleep(5000) {
                @Override
                public boolean condition() {
                    return myPlayer().isAnimating() && RuinsArea.contains(myPlayer());
                }
            }.sleep();
        }
        if(getInventory().contains("Fire rune") && !myPlayer().isMoving()) {
            log("Walking to bank..");
            getWalking().webWalk(Banks.AL_KHARID);
            new ConditionalSleep(5000) {
                @Override
                public boolean condition() {
                    return Banks.AL_KHARID.contains(myPlayer());
                }
            }.sleep();
        }
        if(Banks.AL_KHARID.contains(myPlayer()) && getInventory().contains("Fire rune")) {
            log("Banking..");
            getBank().open();
            sleep(random(800,1200));
            getBank().depositAll();
            sleep(random(825,1125));
            getBank().withdrawAll("Pure essence");
            sleep(random(700,900));
            getBank().close();
            new ConditionalSleep(5000) {
                @Override
                public boolean condition() {
                    return getInventory().contains("Pure essence");
                }
            }.sleep();
        }else if(Banks.AL_KHARID.contains(myPlayer()) && !getInventory().contains("Pure essence")) {
            getBank().open();
            sleep(random(800,1200));
            getBank().withdrawAll("Pure essence");
            sleep(random(825,1125));
            getBank().close();
            new ConditionalSleep(5000) {
                @Override
                public boolean condition() {
                    return getInventory().contains("Pure essence");
                }
            }.sleep();
        }
    }



    private void craft() {

        Entity ruins = getObjects().closest("Mysterious ruins");
        Entity altar = getObjects().closest("Altar");

        if (!RuinsArea.contains(myPlayer()) && !PortalArea.contains(myPlayer()) && !myPlayer().isAnimating() && !myPlayer().isMoving()) {
            log("Walking to ruins..");
            getWalking().webWalk(RuinsArea);
            new ConditionalSleep(5000) {
                @Override
                public boolean condition() {
                    return RuinsArea.contains(myPlayer());
                }
            }.sleep();
        }
        if (!myPlayer().isAnimating() && RuinsArea.contains(myPlayer()) && ruins != null && ruins.interact("Enter")) {
            log("Entering");
            new ConditionalSleep(5000) {
                @Override
                public boolean condition() {
                    return PortalArea.contains(myPlayer()) && myPlayer().isVisible();
                }
            }.sleep();
        }
        if (!myPlayer().isAnimating() && PortalArea.contains(myPlayer()) && altar != null && altar.interact("Craft-rune")) {
            log("Crafting runes..");
            new ConditionalSleep(5000) {
                @Override
                public boolean condition() {
                    return myPlayer().isAnimating() && getInventory().contains("Fire rune");
                }
            }.sleep();
        }
    }




    @Override
    public void onStart() {
        log("Welcome to Fire RuneER by: Imthabawse");

        timeBegan = System.currentTimeMillis();
        beginningXp = skills.getExperience(Skill.RUNECRAFTING);
        beginningLevel = skills.getStatic(Skill.RUNECRAFTING);
        timeTNL = 0;

    }



    @Override
    public int onLoop() throws InterruptedException {
        if(getInventory().contains("Pure essence")) {
            craft();
        }else{
            bank();
        }

        return 500;
    }


    @Override
    public void onPaint(Graphics2D g) {
        Font font = new Font("Java Kick BTN",Font.BOLD,16);
        g.setFont(font);
        g.setColor(Color.RED);
        timeRan = System.currentTimeMillis() - this.timeBegan;
        g.drawString("-Fire RuneEr V1-",12,210);
        g.drawString(ft(timeRan), 12, 235);
        currentXp = skills.getExperience(Skill.RUNECRAFTING);
        xpGained = currentXp - beginningXp;
        g.drawString("Exp Gained: " + xpGained, 12, 250);
        currentLevel = skills.getStatic(Skill.RUNECRAFTING);
        levelsGained = currentLevel - beginningLevel;
        g.drawString("Start Level: " + beginningLevel, 12,265);
        g.drawString("Current Level: " + currentLevel, 12,280);
        g.drawString("Levels Gained: " + levelsGained, 12, 295);
        g.drawString("Time Till Level: " + ft(timeTNL), 12,325);
        currentXp = skills.getExperience(Skill.RUNECRAFTING);
        currentLevel = skills.getStatic(Skill.RUNECRAFTING);
        xpGained = currentXp - beginningXp;
        xpPerHour = (int)( xpGained / ((System.currentTimeMillis() - this.timeBegan) / 3600000.0D));
        nextLevelXp = XP_TABLE[currentLevel + 1];
        xpTillNextLevel = nextLevelXp - currentXp;

        if (xpGained >= 1)
        {
            timeTNL = (long) ((xpTillNextLevel / xpPerHour) * 3600000);
        }
    }

    private String ft(long duration)
    {
        String res = "";
        long days = TimeUnit.MILLISECONDS.toDays(duration);
        long hours = TimeUnit.MILLISECONDS.toHours(duration)
                - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration));
        long minutes = TimeUnit.MILLISECONDS.toMinutes(duration)
                - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS
                .toHours(duration));
        long seconds = TimeUnit.MILLISECONDS.toSeconds(duration)
                - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS
                .toMinutes(duration));
        if (days == 0) {
            res = (hours + ":" + minutes + ":" + seconds);
        } else {
            res = (days + ":" + hours + ":" + minutes + ":" + seconds);
        }
        return res;
    }
}

 

Edited by Imthabawse

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...