Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

NMZ Flicker

Featured Replies

Will flick "Rapid Heal", drink overloads when necessary and will drink 1-2 absorption sips after every overload sip. Make sure that you start the bot when you're inside the arena, you've guzzled your rock cakes and fully set up your character to be ready for combat (1HP, standing in corner, ready to flick). Sorry about the poor/messy quality but I whipped it up in 15 or so minutes, but I've been using it all day and it works perfectly. Enjoy!

 
 
(Shitty XP because this is while I was debugging the script.)
 
xFVKrHP.png
import com.google.common.base.Stopwatch;
import org.osbot.rs07.api.ui.PrayerButton;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.time.LocalTime;
import java.util.concurrent.TimeUnit;

/**
 * @author lare96 <http://github.org/lare96>
 */
@ScriptManifest(logo = "", name = "NmzFlicker", author = "lare96", version = 1.0, info = "Will flick HP and pot overloads/absorbs.") public final class NmzFlicker
    extends Script {

    private final Stopwatch watch = Stopwatch.createStarted();
    private String status = "Idle...";
    private int sipAbsortption = 0;

    @Override
    public void onStart() {
        experienceTracker.start(Skill.ATTACK);
        experienceTracker.start(Skill.DEFENCE);
        experienceTracker.start(Skill.STRENGTH);
    }

    @Override
    public int onLoop() throws InterruptedException {
        if (!combat.isAutoRetaliateOn() && !prayer.isActivated(PrayerButton.RAPID_HEAL)) {
            status = "Turning on auto-retaliate...";
            combat.toggleAutoRetaliate(true);
            return random(1000, 1500);
        }

        if (skills.getDynamic(Skill.HITPOINTS) == 51 && !prayer
            .isActivated(PrayerButton.RAPID_HEAL) && sipAbsortption == 0) {
            status = "Drinking Overload potion...";
            for (int i = 1; i < 5; i++) {
                if (inventory.contains("Overload (" + i + ")")) {
                    inventory.interact("Drink", "Overload (" + i + ")");
                    break;
                }
            }
            sipAbsortption = random(1, 2);
            return random(1000, 1500);
        }

        if (sipAbsortption > 0 && !prayer.isActivated(PrayerButton.RAPID_HEAL)) {
            status = "Drinking Absorption potion...";
            for (int i = 1; i < 5; i++) {
                if (inventory.contains("Absorption (" + i + ")")) {
                    inventory.interact("Drink", "Absorption (" + i + ")");
                    break;
                }
            }
            sipAbsortption--;
            return random(1000, 1500);
        }

        if (prayer.isActivated(PrayerButton.RAPID_HEAL)) {
            status = "Flicking \"Rapid Heal\" off...";
            prayer.set(PrayerButton.RAPID_HEAL, false);
        } else {
            status = "Flicking \"Rapid Heal\" on...";
            prayer.set(PrayerButton.RAPID_HEAL, true);
            return random(50, 100);
        }
        return random(3000, 15_000);
    }

    @Override
    public void onPaint(Graphics2D g) {
        g.setColor(Color.WHITE);
        g.setFont(new Font("Myriad Pro", Font.BOLD, 16));
        g.drawString("NmzFlicker [By Lare96]", 7, 225);
        g.setFont(new Font("Myriad Pro", Font.PLAIN, 14));
        g.drawString("Time Running: " + LocalTime.ofSecondOfDay(watch.elapsed(TimeUnit.SECONDS)).toString(), 7, 245);
        g.drawString("Status: " + status, 7, 260);
        g.drawString("Attack XP: " + experienceTracker.getGainedXP(Skill.ATTACK) + " (" + experienceTracker
            .getGainedXPPerHour(Skill.ATTACK) + ")", 7, 275);
        g.drawString("Strength XP: " + experienceTracker.getGainedXP(Skill.STRENGTH) + " (" + experienceTracker
            .getGainedXPPerHour(Skill.STRENGTH) + ")", 7, 290);
        g.drawString("Defence XP: " + experienceTracker.getGainedXP(Skill.DEFENCE) + " (" + experienceTracker
            .getGainedXPPerHour(Skill.DEFENCE) + ")", 7, 305);
    }
}

Edited by lare96

  • 2 months later...
  • 3 weeks later...

I remember you Lare, from Divine. :)

Good release none the less.

 

For anybody wondering, I doubt this works because of recent NMZ updates. Not sure though.

I remember you Lare, from Divine. smile.png

Good release none the less.

 

For anybody wondering, I doubt this works because of recent NMZ updates. Not sure though.

 

Should work fine as the new updates only effected the re-entry :boge:

  • 4 weeks later...
  • 11 months later...
  • 1 month later...
  • 2 weeks later...
  • 3 weeks later...

I suggest you change the code from

 

if (skills.getDynamic(Skill.HITPOINTS) == 51 && !prayer
            .isActivated(PrayerButton.RAPID_HEAL) && sipAbsortption == 0)

to

if (skills.getDynamic(Skill.HITPOINTS) >= 51 && !prayer
            .isActivated(PrayerButton.RAPID_HEAL) && sipAbsortption == 0)

This ensures that if (for whatever, unforeseeable reason), you somehow get to 2+hp, the script will still drink overloads and absorbs

EDIT: I leveled up in hitpoints, and it brought me to 2 hp, but the script kept running because of the change I made

Edited by bthebrave
Update

  • 1 month later...
On 2017-05-24 at 6:05 AM, bthebrave said:

I suggest you change the code from

 


if (skills.getDynamic(Skill.HITPOINTS) == 51 && !prayer
            .isActivated(PrayerButton.RAPID_HEAL) && sipAbsortption == 0)

to


if (skills.getDynamic(Skill.HITPOINTS) >= 51 && !prayer
            .isActivated(PrayerButton.RAPID_HEAL) && sipAbsortption == 0)

This ensures that if (for whatever, unforeseeable reason), you somehow get to 2+hp, the script will still drink overloads and absorbs

EDIT: I leveled up in hitpoints, and it brought me to 2 hp, but the script kept running because of the change I made

Hmm wouldn't it be smarter to keep it at == 51, and instead throw in an else loop for >51, to eat on the dwarven rock cake, until 51. 

  • 2 years later...
On 12/7/2015 at 10:53 PM, lare96 said:

Will flick "Rapid Heal", drink overloads when necessary and will drink 1-2 absorption sips after every overload sip. Make sure that you start the bot when you're inside the arena, you've guzzled your rock cakes and fully set up your character to be ready for combat (1HP, standing in corner, ready to flick). Sorry about the poor/messy quality but I whipped it up in 15 or so minutes, but I've been using it all day and it works perfectly. Enjoy!

 
 
(Shitty XP because this is while I was debugging the script.)
 
xFVKrHP.png

import com.google.common.base.Stopwatch;
import org.osbot.rs07.api.ui.PrayerButton;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.time.LocalTime;
import java.util.concurrent.TimeUnit;

/**
 * @author lare96 <http://github.org/lare96>
 */
@ScriptManifest(logo = "", name = "NmzFlicker", author = "lare96", version = 1.0, info = "Will flick HP and pot overloads/absorbs.") public final class NmzFlicker
    extends Script {

    private final Stopwatch watch = Stopwatch.createStarted();
    private String status = "Idle...";
    private int sipAbsortption = 0;

    @Override
    public void onStart() {
        experienceTracker.start(Skill.ATTACK);
        experienceTracker.start(Skill.DEFENCE);
        experienceTracker.start(Skill.STRENGTH);
    }

    @Override
    public int onLoop() throws InterruptedException {
        if (!combat.isAutoRetaliateOn() && !prayer.isActivated(PrayerButton.RAPID_HEAL)) {
            status = "Turning on auto-retaliate...";
            combat.toggleAutoRetaliate(true);
            return random(1000, 1500);
        }

        if (skills.getDynamic(Skill.HITPOINTS) == 51 && !prayer
            .isActivated(PrayerButton.RAPID_HEAL) && sipAbsortption == 0) {
            status = "Drinking Overload potion...";
            for (int i = 1; i < 5; i++) {
                if (inventory.contains("Overload (" + i + ")")) {
                    inventory.interact("Drink", "Overload (" + i + ")");
                    break;
                }
            }
            sipAbsortption = random(1, 2);
            return random(1000, 1500);
        }

        if (sipAbsortption > 0 && !prayer.isActivated(PrayerButton.RAPID_HEAL)) {
            status = "Drinking Absorption potion...";
            for (int i = 1; i < 5; i++) {
                if (inventory.contains("Absorption (" + i + ")")) {
                    inventory.interact("Drink", "Absorption (" + i + ")");
                    break;
                }
            }
            sipAbsortption--;
            return random(1000, 1500);
        }

        if (prayer.isActivated(PrayerButton.RAPID_HEAL)) {
            status = "Flicking \"Rapid Heal\" off...";
            prayer.set(PrayerButton.RAPID_HEAL, false);
        } else {
            status = "Flicking \"Rapid Heal\" on...";
            prayer.set(PrayerButton.RAPID_HEAL, true);
            return random(50, 100);
        }
        return random(3000, 15_000);
    }

    @Override
    public void onPaint(Graphics2D g) {
        g.setColor(Color.WHITE);
        g.setFont(new Font("Myriad Pro", Font.BOLD, 16));
        g.drawString("NmzFlicker [By Lare96]", 7, 225);
        g.setFont(new Font("Myriad Pro", Font.PLAIN, 14));
        g.drawString("Time Running: " + LocalTime.ofSecondOfDay(watch.elapsed(TimeUnit.SECONDS)).toString(), 7, 245);
        g.drawString("Status: " + status, 7, 260);
        g.drawString("Attack XP: " + experienceTracker.getGainedXP(Skill.ATTACK) + " (" + experienceTracker
            .getGainedXPPerHour(Skill.ATTACK) + ")", 7, 275);
        g.drawString("Strength XP: " + experienceTracker.getGainedXP(Skill.STRENGTH) + " (" + experienceTracker
            .getGainedXPPerHour(Skill.STRENGTH) + ")", 7, 290);
        g.drawString("Defence XP: " + experienceTracker.getGainedXP(Skill.DEFENCE) + " (" + experienceTracker
            .getGainedXPPerHour(Skill.DEFENCE) + ")", 7, 305);
    }
}

Hi thank you for the code I yet have not used this on my account

 

  if (prayer.isActivated(PrayerButton.RAPID_HEAL)) {
            status = "Flicking \"Rapid Heal\" off...";
            prayer.set(PrayerButton.RAPID_HEAL, false);
        } else {
            status = "Flicking \"Rapid Heal\" on...";
            prayer.set(PrayerButton.RAPID_HEAL, true);
            return random(50, 100);
        }

 

I am mainly confused only on this part because first you check to see if prayer is on "and if it is on" then you shut it off

That part is clear but when you do shut it off again?

does it loop back through the entire program to fulfil the other conditions?

or does the return random(50,100) loop back around the same if statement one more time?

 

 

On 7/7/2017 at 2:03 PM, slazter said:

Hmm wouldn't it be smarter to keep it at == 51, and instead throw in an else loop for >51, to eat on the dwarven rock cake, until 51. 

That is a good point actually but I do not think this bot will mess up lol

 

but that is definitely a good point incase that happens

or you can do if >51 

and down the line

==1, incase it goes over 1 into the 2 zone.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.