public class WalkingEvent extends Event
Event.EventMode, Event.EventStatus
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 |
---|
WalkingEvent()
Creates a walking event for which a path will need to be set with the setPath() methods.
|
WalkingEvent(Area area)
Creates a walking event with a minDistanceThreshold of 2 and a miniMapDistanceThreshold of 5 to a random location within
the given area.
|
WalkingEvent(Entity entity)
Creates a walking event with a minDistanceThreshold of 2 and a miniMapDistanceThreshold of 5 to the location
of the given entity.
|
WalkingEvent(Position position)
Creates a walking event with a minDistanceThreshold of 2 and a miniMapDistanceThreshold of 5 to the location of
the given position.
|
Modifier and Type | Method and Description |
---|---|
int |
execute()
This is the execution method.
|
int |
getEnergyThreshold() |
int |
getMinDistanceThreshold()
This methods gets the property of this walking event that determines the walking accuracy to the destination
you have specified.
|
int |
getMiniMapDistanceThreshold()
This method returns the property of this walking event that determines whether the next position
you're walking to in the path from A to B will be walked to by using the mini map or the main screen.
|
java.util.List<Position> |
getPath()
Returns the list of positions that represent the path associated with this event.
|
boolean |
isOperateCamera()
This method gets the property of this walking event that determines whether or not the camera is allowed to be
used by this event.
|
void |
onStart()
Called before this event is executed.
|
WalkingEvent |
setBreakCondition(Condition breakCondition)
Sets the break condition for this walking event
|
void |
setEnergyThreshold(int energyThreshold)
Path walker methods use energyThreshold to activate run mid-path.
|
WalkingEvent |
setHighBreakPriority(boolean highPriority)
Allows for break conditions to be checked during waits, default value is false.
|
WalkingEvent |
setMinDistanceThreshold(int minDistanceThreshold)
This methods sets the property of this walking event that determines the walking accuracy to the destination
you have specified.
|
WalkingEvent |
setMiniMapDistanceThreshold(int miniMapDistanceThreshold)
This method sets the property of this walking event that determines whether the next position
you're walking to in the path from A to B will be walked to by using the mini map or the main screen.
|
WalkingEvent |
setOperateCamera(boolean operateCamera)
This method sets the property of this walking event that determines whether or not the camera is allowed to be
used by this event.
|
WalkingEvent |
setPath(java.util.LinkedList<Position> path)
This method sets the path of this event.
|
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 WalkingEvent()
public WalkingEvent(Entity entity)
entity
- The entity which location to walk to.public WalkingEvent(Position position)
position
- The position to walk to.public WalkingEvent(Area area)
area
- The area to walk to.public boolean isOperateCamera()
public int getMinDistanceThreshold()
public int getMiniMapDistanceThreshold()
public void setEnergyThreshold(int energyThreshold)
energyThreshold
- The energy level which is permissible to activate run.public int getEnergyThreshold()
public java.util.List<Position> getPath()
public WalkingEvent setMinDistanceThreshold(int minDistanceThreshold)
minDistanceThreshold
- The threshold value. Must be above 0 for Entity.public WalkingEvent setMiniMapDistanceThreshold(int miniMapDistanceThreshold)
miniMapDistanceThreshold
- The threshold value.public WalkingEvent setOperateCamera(boolean operateCamera)
operateCamera
- True if you want this event to be allowed to use the camera.public WalkingEvent setPath(java.util.LinkedList<Position> path)
path
- The path for this event to walk.public WalkingEvent setBreakCondition(Condition breakCondition)
breakCondition
- The break conditionpublic WalkingEvent setHighBreakPriority(boolean highPriority)
highPriority
- The indicator for high priority breakingpublic int execute() throws java.lang.InterruptedException
Event
onLoop()
in OSBot v1.