Class TransportLoader
java.lang.Object
net.storm.sdk.movement.pathfinder.TransportLoader
Manages custom transport definitions and provides factory methods for creating transports.
Transports represent non-walking movement methods in the game such as ladders, doors, boats, agility shortcuts, and other interactive objects that move the player from one location to another. This class provides both management of custom transports and convenient factory methods for creating common transport types.
Transport types supported:
- Object transports: Ladders, stairs, portals, agility obstacles
- NPC transports: Charter ships, NPCs that teleport players
- Item transports: Using items on objects (keys on doors, etc.)
- Dialog transports: Transports requiring dialog navigation
- Special transports: Trapdoors, webs, and other unique cases
Example Usage:
// Create a simple object transport (ladder)
Transport ladder = TransportLoader.objectTransport(
new WorldPoint(3200, 3200, 0), // source
new WorldPoint(3200, 3200, 1), // destination
12345, // object ID
"Climb-up" // action
);
TransportLoader.addCustomTransport(ladder);
// Create an NPC transport
Transport boat = TransportLoader.npcTransport(
new WorldPoint(3000, 3000, 0),
new WorldPoint(3100, 3100, 0),
1234, // NPC ID
"Travel"
);
// Create a transport with requirements
Requirements reqs = new Requirements();
reqs.quest(Quest.MONKEY_MADNESS_I);
Transport questTransport = TransportLoader.objectTransport(
source, destination, objId, "Enter", reqs
);
// Remove a custom transport
TransportLoader.removeCustomTransport(ladder);
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddCustomTransport(Transport transport) Registers a new custom transport with the pathfinding system.Retrieves the list of all registered custom transports.static TransportitemUseAndObjectTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int beforeItem, int afterItem, int itemId) Creates a transport that requires using an item on an object, with state change.static TransportitemUseTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int itemId, int objId) Creates a transport that requires using an item on an object with default radius.static TransportitemUseTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int itemId, int objId, int radius) Creates a transport that requires using an item on an object.static TransportitemWearTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String actions, int... itemIds) Creates a transport that requires wearing specific items to interact with an object.static TransportitemWearTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String actions, int... itemIds) Creates a transport that requires wearing specific items with default radius.static TransportnpcDialogTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, String... chatOptions) Creates an NPC dialog transport with default requirements.static TransportnpcDialogTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, Requirements requirements, String... chatOptions) Creates an NPC transport that requires navigating through dialog options.static TransportnpcDialogTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, String... chatOptions) Creates a simple NPC dialog transport with default settings.static TransportnpcDialogTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, Requirements requirements, String... chatOptions) Creates an NPC dialog transport with requirements and default radius.static TransportnpcTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, String... actions) Creates an NPC transport with custom radius.static TransportnpcTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, Requirements requirements, String... actions) Creates a transport via NPC interaction with custom radius and requirements.static TransportnpcTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, String npcName, Requirements requirements, String... actions) Creates a transport via NPC interaction by name with custom radius and requirements.static TransportnpcTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, String... actions) Creates a simple NPC transport by ID with default settings.static TransportnpcTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, Requirements requirements, String... actions) Creates an NPC transport by ID with requirements.static TransportnpcTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, String npcName, String... actions) Creates a simple NPC transport by name with default settings.static TransportobjectDialogTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String action, String... chatOptions) Creates an object dialog transport with default requirements.static TransportobjectDialogTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String action, Requirements requirements, String... chatOptions) Creates an object transport that requires navigating through dialog options.static TransportobjectTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String actions) Creates an object transport with custom radius and default requirements.static TransportobjectTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String actions, Requirements requirements) Creates an object transport with custom radius and requirements.static TransportobjectTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String actions) Creates a simple object transport (ladder, stairs, portal, etc.).static TransportobjectTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String actions, Requirements requirements) Creates an object transport with requirements and default radius.static voidremoveCustomTransport(Transport transport) Removes a custom transport from the pathfinding system.static TransportslashWebTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination) Creates a transport for slashing through a web obstacle.static TransporttrapDoorTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int closedId, int openedId) Creates a transport for a trapdoor that may need to be opened first.
-
Constructor Details
-
TransportLoader
public TransportLoader()
-
-
Method Details
-
getCustomTransports
Retrieves the list of all registered custom transports.- Returns:
- the list of custom transports
-
addCustomTransport
Registers a new custom transport with the pathfinding system.- Parameters:
transport- the transport to register
-
removeCustomTransport
Removes a custom transport from the pathfinding system.- Parameters:
transport- the transport to unregister
-
trapDoorTransport
public static Transport trapDoorTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int closedId, int openedId) Creates a transport for a trapdoor that may need to be opened first.- Parameters:
source- the source locationdestination- the destination after using the trapdoorclosedId- the object ID when the trapdoor is closedopenedId- the object ID when the trapdoor is open- Returns:
- a Transport configured for the trapdoor
-
itemUseAndObjectTransport
public static Transport itemUseAndObjectTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int beforeItem, int afterItem, int itemId) Creates a transport that requires using an item on an object, with state change.- Parameters:
source- the source locationdestination- the destination after the transportbeforeItem- the object ID before interactionafterItem- the object ID after interactionitemId- the item ID to use- Returns:
- a Transport configured for item use with state change
-
itemUseTransport
public static Transport itemUseTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int itemId, int objId, int radius) Creates a transport that requires using an item on an object.- Parameters:
source- the source locationdestination- the destination after the transportitemId- the item ID to useobjId- the object ID to use the item onradius- the interaction radius- Returns:
- a Transport configured for item use
-
itemUseTransport
public static Transport itemUseTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int itemId, int objId) Creates a transport that requires using an item on an object with default radius.- Parameters:
source- the source locationdestination- the destination after the transportitemId- the item ID to useobjId- the object ID to use the item on- Returns:
- a Transport configured for item use with radius of 5
-
itemWearTransport
public static Transport itemWearTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String actions, int... itemIds) Creates a transport that requires wearing specific items to interact with an object.- Parameters:
radius- the interaction radiussource- the source locationdestination- the destination after the transportobjId- the object ID to interact withactions- the action to perform on the objectitemIds- the item IDs that must be worn- Returns:
- a Transport configured for equipment-gated access
-
itemWearTransport
public static Transport itemWearTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String actions, int... itemIds) Creates a transport that requires wearing specific items with default radius.- Parameters:
source- the source locationdestination- the destination after the transportobjId- the object ID to interact withactions- the action to performitemIds- the item IDs that must be worn- Returns:
- a Transport configured for equipment-gated access
-
npcTransport
public static Transport npcTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, Requirements requirements, String... actions) Creates a transport via NPC interaction with custom radius and requirements.- Parameters:
radius- the interaction radiussource- the source locationdestination- the destination after the transportnpcId- the NPC ID to interact withrequirements- the requirements to use this transportactions- the actions to perform- Returns:
- a Transport configured for NPC interaction
-
npcTransport
public static Transport npcTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, String npcName, Requirements requirements, String... actions) Creates a transport via NPC interaction by name with custom radius and requirements.- Parameters:
radius- the interaction radiussource- the source locationdestination- the destination after the transportnpcName- the NPC name to interact withrequirements- the requirements to use this transportactions- the actions to perform- Returns:
- a Transport configured for NPC interaction
-
npcTransport
public static Transport npcTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, String npcName, String... actions) Creates a simple NPC transport by name with default settings.- Parameters:
source- the source locationdestination- the destination after the transportnpcName- the NPC name to interact withactions- the actions to perform- Returns:
- a Transport configured for NPC interaction
-
npcTransport
public static Transport npcTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, Requirements requirements, String... actions) Creates an NPC transport by ID with requirements.- Parameters:
source- the source locationdestination- the destination after the transportnpcId- the NPC ID to interact withrequirements- the requirements to use this transportactions- the actions to perform- Returns:
- a Transport configured for NPC interaction
-
npcTransport
public static Transport npcTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, String... actions) Creates a simple NPC transport by ID with default settings.- Parameters:
source- the source locationdestination- the destination after the transportnpcId- the NPC ID to interact withactions- the actions to perform- Returns:
- a Transport configured for NPC interaction
-
npcTransport
public static Transport npcTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, String... actions) Creates an NPC transport with custom radius.- Parameters:
radius- the interaction radiussource- the source locationdestination- the destination after the transportnpcId- the NPC ID to interact withactions- the actions to perform- Returns:
- a Transport configured for NPC interaction
-
npcDialogTransport
public static Transport npcDialogTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, Requirements requirements, String... chatOptions) Creates an NPC transport that requires navigating through dialog options.- Parameters:
radius- the interaction radiussource- the source locationdestination- the destination after the transportnpcId- the NPC ID to interact withrequirements- the requirements to use this transportchatOptions- the dialog options to select- Returns:
- a Transport configured for NPC dialog navigation
-
npcDialogTransport
public static Transport npcDialogTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, String... chatOptions) Creates an NPC dialog transport with default requirements.- Parameters:
radius- the interaction radiussource- the source locationdestination- the destination after the transportnpcId- the NPC ID to interact withchatOptions- the dialog options to select- Returns:
- a Transport configured for NPC dialog navigation
-
npcDialogTransport
public static Transport npcDialogTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, Requirements requirements, String... chatOptions) Creates an NPC dialog transport with requirements and default radius.- Parameters:
source- the source locationdestination- the destination after the transportnpcId- the NPC ID to interact withrequirements- the requirements to use this transportchatOptions- the dialog options to select- Returns:
- a Transport configured for NPC dialog navigation
-
npcDialogTransport
public static Transport npcDialogTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int npcId, String... chatOptions) Creates a simple NPC dialog transport with default settings.- Parameters:
source- the source locationdestination- the destination after the transportnpcId- the NPC ID to interact withchatOptions- the dialog options to select- Returns:
- a Transport configured for NPC dialog navigation
-
objectTransport
public static Transport objectTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String actions) Creates a simple object transport (ladder, stairs, portal, etc.).- Parameters:
source- the source locationdestination- the destination after using the objectobjId- the object ID to interact withactions- the action to perform- Returns:
- a Transport configured for object interaction
-
objectTransport
public static Transport objectTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String actions, Requirements requirements) Creates an object transport with custom radius and requirements.- Parameters:
radius- the interaction radiussource- the source locationdestination- the destination after using the objectobjId- the object ID to interact withactions- the action to performrequirements- the requirements to use this transport- Returns:
- a Transport configured for object interaction
-
objectDialogTransport
public static Transport objectDialogTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String action, Requirements requirements, String... chatOptions) Creates an object transport that requires navigating through dialog options.- Parameters:
source- the source locationdestination- the destination after the transportobjId- the object ID to interact withaction- the action to perform on the objectrequirements- the requirements to use this transportchatOptions- the dialog options to select- Returns:
- a Transport configured for object dialog navigation
-
objectDialogTransport
public static Transport objectDialogTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String action, String... chatOptions) Creates an object dialog transport with default requirements.- Parameters:
source- the source locationdestination- the destination after the transportobjId- the object ID to interact withaction- the action to perform on the objectchatOptions- the dialog options to select- Returns:
- a Transport configured for object dialog navigation
-
objectTransport
public static Transport objectTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String actions, Requirements requirements) Creates an object transport with requirements and default radius.- Parameters:
source- the source locationdestination- the destination after using the objectobjId- the object ID to interact withactions- the action to performrequirements- the requirements to use this transport- Returns:
- a Transport configured for object interaction
-
objectTransport
public static Transport objectTransport(int radius, net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination, int objId, String actions) Creates an object transport with custom radius and default requirements.- Parameters:
radius- the interaction radiussource- the source locationdestination- the destination after using the objectobjId- the object ID to interact withactions- the action to perform- Returns:
- a Transport configured for object interaction
-
slashWebTransport
public static Transport slashWebTransport(net.runelite.api.coords.WorldPoint source, net.runelite.api.coords.WorldPoint destination) Creates a transport for slashing through a web obstacle.- Parameters:
source- the source location before the webdestination- the destination after slashing the web- Returns:
- a Transport configured for web slashing
-