RouteOptions

Methods
16
Fields
None

Getting one

RouteOptions.defaults()

Methods

MethodReturnsDescription
setAvoidWilderness(boolean)()Avoid the Wilderness.
setUseHouse(boolean)()Allow every player-owned-house route.
setUseTeleports(boolean)()Allow every teleport (spells, items, portals, levers, minigames).
setTransport(string, boolean)()Allow or forbid one transport type ("FAIRY_RING", "SPIRIT_TREE", "CHARTER_SHIP", ...); raises for an unknown name.
setTransportCost(string, number)()Extra cost in ticks the server adds for one transport type.
setTeleportItems("NONE" | "INVENTORY" | "INVENTORY_NON_CONSUMABLE" | "INVENTORY_AND_BANK" | "INVENTORY_AND_BANK_NON_CONSUMABLE")()Where a route may take its teleport items from, and whether it may use up the ones that run out. Raises for another value.
setBankStops(boolean)()Let a walk stop at a bank for what later steps need.
setMaxFare(number)()Most coins one fare or toll may cost.
setUseStamina(boolean)()Drink stamina potions while walking.
setEatFood(boolean)()Eat while walking, with Bento's own food logic.
setRunFloor(number)()Least run energy, in percent (0-100), at which run is turned on while an NPC attacks.
setArriveDistance(number)()How many tiles from the target count as arrived.
setHouseFeature(string, boolean)()Allow or forbid one house feature ("PORTALS", "POOL", ...); raises for an unknown name.
setPlannedInventory({number}?, {number}?)()A query with these options plans as if the inventory held exactly the items ids (quantities[i] of ids[i], 1 where quantities is sho…
setAvoidAreas({WorldArea})numberRoutes keep out of these areas (a way round aggressive NPCs, say), replacing any set before; {} clears them. A walk still reaches a targe…
defaults()RouteOptionsBento's defaults, not the user's settings (avoid the Wilderness; every transport; teleport items from the pack and the bank; bank stops; fa…

Returned by

MethodReturnsDescription
RouteOptionsClass.defaultsRouteOptionsBento's defaults, not the user's settings (avoid the Wilderness; every transport; teleport items from the pack and the bank; bank stops; fa…

Method details

setTransport

setTransport: (RouteOptions, string, boolean) -> ()

Allow or forbid one transport type ("FAIRY_RING", "SPIRIT_TREE", "CHARTER_SHIP", ...); raises for an unknown name.

setTeleportItems

setTeleportItems: (RouteOptions, "NONE" | "INVENTORY" | "INVENTORY_NON_CONSUMABLE" | "INVENTORY_AND_BANK" | "INVENTORY_AND_BANK_NON_CONSUMABLE") -> ()

Where a route may take its teleport items from, and whether it may use up the ones that run out. Raises for another value.

setRunFloor

setRunFloor: (RouteOptions, number) -> ()

Least run energy, in percent (0-100), at which run is turned on while an NPC attacks.

setHouseFeature

setHouseFeature: (RouteOptions, string, boolean) -> ()

Allow or forbid one house feature ("PORTALS", "POOL", ...); raises for an unknown name.

setPlannedInventory

setPlannedInventory: (RouteOptions, {number}?, {number}?) -> ()

A query with these options plans as if the inventory held exactly the items ids (quantities[i] of ids[i], 1 where quantities is shorter or nil); worn items stay as they are. The path server then admits the item-paid teleports and transports those items pay for. nil ids plans with the live inventory again. Raises for a negative id or quantity.

setAvoidAreas

setAvoidAreas: (RouteOptions, {WorldArea}) -> number

Routes keep out of these areas (a way round aggressive NPCs, say), replacing any set before; {} clears them. A walk still reaches a target inside one: an area holding the target is lifted, unless another target lies outside every area, and a start inside one walks out of it. An area the path server would refuse (under 1 by 1, a plane past 3, off the map) is left out, so is a repeat, and past 256 the rest; answers how many were kept. Needs a path server that takes the V4 request, which carries the areas.

defaults

defaults: () -> RouteOptions

Bento's defaults, not the user's settings (avoid the Wilderness; every transport; teleport items from the pack and the bank; bank stops; fares up to 10,000 coins; stamina; run floor 50; arrive within 1 tile; the house pool).