Interface IQuest


  • public interface IQuest
    Represents a quest with objectives, rewards, repeatability, and party/profile options.
    • Method Detail

      • getId

        int getId()
        Returns:
        the unique quest ID.
      • getName

        String getName()
        Returns:
        the quest display name.
      • setName

        void setName​(String name)
        Parameters:
        name - the quest display name.
      • getType

        int getType()
        Returns:
        the quest type ordinal (0: Item, 1: Dialog, 2: Kill, 3: Location, 4: AreaKill, 5: Manual).
      • setType

        void setType​(int type)
        Parameters:
        type - the quest type ordinal.
      • getLogText

        String getLogText()
        Returns:
        the quest log description text.
      • setLogText

        void setLogText​(String text)
        Parameters:
        text - the quest log description text.
      • getCompleteText

        String getCompleteText()
        Returns:
        the text displayed on quest completion.
      • setCompleteText

        void setCompleteText​(String text)
        Parameters:
        text - the completion text.
      • getNextQuest

        IQuest getNextQuest()
        Returns:
        the next quest in the chain, or null if none.
      • setNextQuest

        void setNextQuest​(IQuest quest)
        Parameters:
        quest - the next quest in the chain, or null to clear.
      • getObjectives

        IQuestObjective[] getObjectives​(IPlayer player)
        Returns the quest objectives for the given player.
        Parameters:
        player - the player whose objectives to retrieve.
        Returns:
        an array of quest objectives.
      • getCategory

        IQuestCategory getCategory()
        Returns:
        the category this quest belongs to.
      • getRewards

        IContainer getRewards()
        Returns:
        the reward container with items given on completion.
      • getNpcName

        String getNpcName()
        Returns:
        the NPC name associated with this quest.
      • setNpcName

        void setNpcName​(String name)
        Parameters:
        name - the NPC name.
      • save

        void save()
        Saves this quest to disk.
      • getIsRepeatable

        boolean getIsRepeatable()
        Returns:
        true if this quest can be repeated.
      • getTimeUntilRepeat

        long getTimeUntilRepeat​(IPlayer player)
        Returns the time remaining before the quest can be repeated.
        Parameters:
        player - the player.
        Returns:
        milliseconds until repeatable, or 0 if ready.
      • setRepeatType

        void setRepeatType​(int type)
        Sets the repeat type.
        Parameters:
        type - 0: None, 1: Instant, 2: Daily, 3: Weekly, 4: Custom.
      • getRepeatType

        int getRepeatType()
        Returns:
        the repeat type ordinal.
      • getQuestInterface

        IQuestInterface getQuestInterface()
        Returns:
        the quest interface (type-specific objective data).
      • getPartyOptions

        IPartyOptions getPartyOptions()
        Returns:
        the party options for this quest.
      • getProfileOptions

        IProfileOptions getProfileOptions()
        Returns:
        the profile options for this quest.
      • getCustomCooldown

        long getCustomCooldown()
        Returns:
        the custom cooldown in milliseconds for the Custom repeat type.
      • setCustomCooldown

        void setCustomCooldown​(long newCooldown)
        Parameters:
        newCooldown - the custom cooldown in milliseconds.