Class RestockRunner

java.lang.Object
privbot.restock.RestockRunner

public final class RestockRunner extends Object
Runs a RestockCycle one confirmed step per call, on the script worker (it waits for each confirmation):
  1. Home: the home spell, after closing an open bank; confirmed by landing in the route's home area.
  2. Pool: the restoring object; confirmed by RestockHost.restored(); skipped when already full.
  3. Bank: the preset action on the nearest bank object, else a banker; confirmed by the worn and carried items changing. The supplies carried after it are recorded.
  4. Returning: the teleport widget's way back; confirmed by RestockHost.atDestination().
A confirmation that fails RestockCycle.MAX_FAILURES times on one stage stops the cycle and tells the host. Rows: restock_home, restock_pool, restock_bank, restock_return, restock_stage, restock_failed, restock_stopped.

Each plugin-specific part is left to the host; a plugin calls step(privbot.task.PrivTaskContext, privbot.restock.RestockCycle, privbot.restock.RestockHost) from one task node while cycle.active().