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.)
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);
}
}