Class SustainPlan.Builder

java.lang.Object
privbot.mechanics.SustainPlan.Builder
Enclosing class:
SustainPlan

public static final class SustainPlan.Builder extends Object
Builds a SustainPlan.
  • Method Details

    • eatBelowPct

      public SustainPlan.Builder eatBelowPct(int pct)
      Eat when HP is below this percent of max HP (0 turns eating off).
    • foods

      public SustainPlan.Builder foods(String... names)
      Foods in preference order; each must carry the "Eat" action.
    • comboFoods

      public SustainPlan.Builder comboFoods(String... names)
      Foods eaten in the same tick after a food, for a combo eat; each must carry "Eat". A combo food that is carried is eaten together with every Eat, not only when HP is lowest. Leave this empty to opt out.
    • brewBelowPct

      public SustainPlan.Builder brewBelowPct(int pct)
      Drink a brew when HP is below this percent of max HP (0 turns it off).
    • brews

      public SustainPlan.Builder brews(String... names)
      Brews in preference order; each must carry the "Drink" action.
    • restoreBelowPoints

      public SustainPlan.Builder restoreBelowPoints(int points)
      Drink a restore when prayer points are below this many (0 turns it off).
    • restores

      public SustainPlan.Builder restores(String... names)
      Restores in preference order; each must carry the "Drink" action.
    • boost

      public SustainPlan.Builder boost(net.runelite.api.Skill skill, BoostDosePolicy policy, String... doseNames)
      Keep a stat boost up. Boosts are tried in the order they were added; one skill has one boost.
      Parameters:
      skill - the skill whose boost is read from the boost map
      policy - decides when a dose is due
      doseNames - dose item names in preference order; each must carry "Drink"
    • build

      public SustainPlan build()
      Returns:
      the plan