public class WebWalkEvent extends Event
Modifier and Type | Class and Description |
---|---|
static class |
WebWalkEvent.PathType |
Event.EventMode, Event.EventStatus
Modifier and Type | Field and Description |
---|---|
static java.util.concurrent.atomic.AtomicInteger |
webwalkRequestCount |
bank, bot, camera, chatbox, client, colorPicker, combat, configs, depositBox, dialogues, diaries, display, doorHandler, equipment, experienceTracker, favour, grandExchange, graphicObjects, groundItems, hintArrow, inventory, keyboard, logger, logoutTab, magic, map, menu, mouse, npcs, objects, players, prayer, projectiles, quests, settings, skills, store, tabs, trade, walking, widgets, worlds
Constructor and Description |
---|
WebWalkEvent(Area... areas)
Walks to closest reachable destination area.
|
WebWalkEvent(Position... destinations)
Walks to closest reachable destination position.
|
Modifier and Type | Method and Description |
---|---|
int |
execute()
This is the execution method.
|
double |
getCompletion() |
Position |
getDestination()
Gets the position of this event's destination.
|
PathPreferenceProfile |
getPathPreferenceProfile() |
Position[] |
getPositions()
Gets the positions from the web path
|
void |
onStart()
Called before this event is executed.
|
boolean |
prefetchRequirements(MethodProvider provider)
Generates the directions for this WebWalkEvent based on the requirements of
PathPreferenceProfile . |
WebWalkEvent |
setBreakCondition(Condition breakCondition)
Breaks out of the WebWalkEvent with the provided condition; the event can not be resumed.
|
WebWalkEvent |
setEnergyThreshold(int energyThreshold)
Sets the energy threshold, default value is 15.
|
WebWalkEvent |
setHighBreakPriority(boolean highPriority)
Allows for break conditions to be checked during waits, default value is false.
|
WebWalkEvent |
setMinDistanceThreshold(int minDistanceThreshold)
This methods sets the property of this event that determines the walking accuracy to the destination
you have specified.
|
WebWalkEvent |
setMiniMapDistanceThreshold(int miniMapDistanceThreshold)
This method sets the property of this event that determines the max distance before a position on the minimap will be clicked.
|
WebWalkEvent |
setMisclickThreshold(int misclickThreshold)
Sets the misclick threshold.
|
WebWalkEvent |
setMoveCameraDuringWalking(boolean moveCameraDuringWalking)
Sets the camera usage during walking, default value is true.
|
WebWalkEvent |
setPathPreferenceProfile(PathPreferenceProfile profile)
Sets a
PathPreferenceProfile for this WebWalkEvent which gives control a wide variety of control
over how this event will execute. |
WebWalkEvent |
setScreenDistanceThreshold(int screenDistanceThreshold)
This method sets the property of this event that determines the max distance before a position on screen will be clicked.
|
WebWalkEvent |
setSourcePosition(Position position)
Sets the source position
|
WebWalkEvent |
useAvoidingPath(boolean block,
Area... areas)
Sets WebWalkEvent to avoid (or completely block) certain areas
|
WebWalkEvent |
useSimplePath()
Sets WebWalkEvent to use the shortest path, does not prioritize roads and other weighted variables.
|
addChild, exchangeContext, getChildren, getMode, getParent, getStatus, hasFailed, hasFinished, interrupt, isQueued, isWorking, onEnd, removeChild, setAsync, setBlocking, setFailed, setFinished, setParent
execute, getBank, getBot, getCamera, getChatbox, getClient, getColorPicker, getCombat, getConfigs, getDepositBox, getDialogues, getDiaries, getDisplay, getDoorHandler, getEquipment, getExperienceTracker, getFavour, getGrandExchange, getGraphicObjects, getGroundItems, getHintArrow, getInventory, getKeyboard, getLogoutTab, getMagic, getMap, getMenuAPI, getMouse, getNpcs, getObjects, getPlayers, getPrayer, getProjectiles, getQuests, getSettings, getSkills, getStore, getTabs, getTrade, getWalking, getWidgets, getWorlds, gRandom, gRandom, gRandom, initializeContext, log, log, myPlayer, myPosition, random, random, sleep, stripFormatting, warn
public static java.util.concurrent.atomic.AtomicInteger webwalkRequestCount
public WebWalkEvent(Area... areas)
areas
- The possible areas to walk topublic WebWalkEvent(Position... destinations)
destinations
- The possible destinations to walk topublic WebWalkEvent setSourcePosition(Position position)
position
- The source position to start frompublic WebWalkEvent useSimplePath()
public WebWalkEvent useAvoidingPath(boolean block, Area... areas)
block
- True to completely block an areaareas
- The areas to avoidpublic WebWalkEvent setMinDistanceThreshold(int minDistanceThreshold)
minDistanceThreshold
- The threshold value. Must be above 0 for Entity.public WebWalkEvent setMiniMapDistanceThreshold(int miniMapDistanceThreshold)
miniMapDistanceThreshold
- The threshold value.public WebWalkEvent setScreenDistanceThreshold(int screenDistanceThreshold)
screenDistanceThreshold
- The threshold value.public WebWalkEvent setEnergyThreshold(int energyThreshold)
energyThreshold
- The energy thresholdpublic PathPreferenceProfile getPathPreferenceProfile()
public WebWalkEvent setPathPreferenceProfile(PathPreferenceProfile profile)
PathPreferenceProfile
for this WebWalkEvent
which gives control a wide variety of control
over how this event will execute.profile
- The profile to use for this event.public WebWalkEvent setBreakCondition(Condition breakCondition)
breakCondition
- The break condition to check forpublic WebWalkEvent setMoveCameraDuringWalking(boolean moveCameraDuringWalking)
moveCameraDuringWalking
- Sets whether or not the camera can move during walkingpublic WebWalkEvent setHighBreakPriority(boolean highPriority)
highPriority
- The indicator for high priority breakingpublic WebWalkEvent setMisclickThreshold(int misclickThreshold)
misclickThreshold
- The threshold to usepublic Position[] getPositions()
public boolean prefetchRequirements(MethodProvider provider)
PathPreferenceProfile
.
If no PathPreferenceProfile is declared, a default profile is set. If this method is not called prior to execution, it is called
on event execution. You may only prefetch once for the event's instance.provider
- The method provider used for api related callspublic void onStart()
Event
public int execute() throws java.lang.InterruptedException
Event
onLoop()
in OSBot v1.public double getCompletion()
0.0
if no route was found.100.0
if route has no directions.