java.lang.Object
net.storm.api.movement.pathfinder.model.requirement.charges.ItemChargeRequirement
net.storm.api.movement.pathfinder.model.requirement.charges.UnlockRequirement

public class UnlockRequirement extends ItemChargeRequirement
Requirement for tracking unlockable teleport destinations on items.

UnlockRequirement extends ItemChargeRequirement to track items with unlockable destinations rather than numeric charges. Examples include Xeric's Talisman (unlock destinations by visiting them) or Digsite Pendant (unlock locations via research).

Key Properties

  • widgetGroupId/childId - Widget to check for unlock status
  • widgetTextMatch - Text to match in widget to determine unlock
  • menuActionId - Menu action ID associated with the unlock
  • objectMenuId - Object menu ID for the unlock interaction
  • unlockTriggers - Chat patterns that indicate unlocking
  • lockTriggers - Chat patterns that indicate re-locking

Detection Methods

Unlock status can be detected via:

  • Widget text matching
  • Menu action presence
  • Chat messages (unlock/lock triggers)

Usage Example


 UnlockRequirement xericHonour = UnlockRequirement.builder("xeric_honour")
     .itemIds(ItemID.XERICS_TALISMAN)
     .widget(187, 3, "Xeric's Honour")
     .unlockTrigger("You have unlocked Xeric's Honour")
     .build();

 if (xericHonour.hasWidgetCheck()) {
     // Can check widget for unlock status
 }
 
See Also:
  • Method Details

    • hasWidgetCheck

      public boolean hasWidgetCheck()
      Checks if this requirement has a widget check for unlock status.
      Returns:
      true if widget group ID is configured
    • hasMenuActionId

      public boolean hasMenuActionId()
      Checks if this requirement has a menu action ID for detection.
      Returns:
      true if menu action ID is configured
    • hasObjectMenuId

      public boolean hasObjectMenuId()
      Checks if this requirement has an object menu ID for detection.
      Returns:
      true if object menu ID is configured
    • hasUnlockTriggers

      public boolean hasUnlockTriggers()
      Checks if this requirement has unlock trigger patterns.
      Returns:
      true if unlock triggers are configured
    • hasLockTriggers

      public boolean hasLockTriggers()
      Checks if this requirement has lock trigger patterns.
      Returns:
      true if lock triggers are configured
    • builder

      public static UnlockRequirement.Builder builder(String id)
      Creates a new builder for constructing an UnlockRequirement.
      Parameters:
      id - the unique identifier for this unlock requirement
      Returns:
      a new Builder instance