Dramoor

Member
Just curious if there is a way using the Mondain's Quest system to add cool-offs for after a quest is complete?
 
I usually try to reference ServUO source when attempting to help, but I couldn't even find the ML Quest system classes looking through the repo.
Soooo......at least in regards to RunUO, I know the MLQuest class (in RunUO, found in Scripts/Engines/MLQuests) contains the following you can use for what you are describing (override them in your custom quest class(es)):
Code:
    // Set to false to allow multiple completions
    public bool OneTimeOnly
    {
       get { return m_OneTimeOnly; }
       set { m_OneTimeOnly = value; }
     }
     // Set to true to cause a delay between completion/accepting quest again
     public bool HasRestartDelay
     {
       get { return m_HasRestartDelay; }
       set { m_HasRestartDelay = value; }
     }
    // override this to return the delay you want between completing/accepting the quest again
    public virtual TimeSpan GetRestartDelay()
    {
       return TimeSpan.FromSeconds( Utility.Random( 1, 5 ) * 30 );
     }
 
I don't know which quests are ML quests... I know the Hag's quest (witch apprentice) uses a 5 minute cool down timer. Might take a look at how they do it.
 
Thanks everyone I figured it out by using this:


Code:
public override TimeSpan RestartDelay
        {
            get
            {
                return TimeSpan.FromMinutes(30);
            }
        }
 

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back