Class RestockRunner
java.lang.Object
privbot.restock.RestockRunner
Runs a
RestockCycle one confirmed step per call, on the script worker (it waits for each confirmation):
- Home: the home spell, after closing an open bank; confirmed by landing in the route's home area.
- Pool: the restoring object; confirmed by
RestockHost.restored(); skipped when already full. - 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.
- Returning: the teleport widget's way back; confirmed by
RestockHost.atDestination().
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().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringfingerprint(ItemContainerSnapshot equipment, ItemContainerSnapshot inventory) static StringThe worn and carried items as one comparable string; null when either is unreadable.route()booleanstep(PrivTaskContext ctx, RestockCycle cycle, RestockHost host) Runs the current stage's step.supplies(PrivTaskContext ctx) The carried items by name (the supplies the next fight starts with).
-
Constructor Details
-
RestockRunner
-
-
Method Details
-
route
-
step
Runs the current stage's step. Returns false when the cycle is not on a stage this runs. -
fingerprint
The worn and carried items as one comparable string; null when either is unreadable. Client thread. -
fingerprint
-
supplies
The carried items by name (the supplies the next fight starts with). Client thread.
-