Ejemplo n.º 1
0
		public QuestLogDetailedGump( MLQuestInstance instance, bool closeGumps )
			: base( 1046026 ) // Quest Log
		{
			m_Instance = instance;
			m_CloseGumps = closeGumps;

			PlayerMobile pm = instance.Player;
			MLQuest quest = instance.Quest;

			if ( closeGumps )
			{
				CloseOtherGumps( pm );
				pm.CloseGump( typeof( QuestLogDetailedGump ) );
			}

			SetTitle( quest.Title );
			RegisterButton( ButtonPosition.Left, ButtonGraphic.Resign, 1 );
			RegisterButton( ButtonPosition.Right, ButtonGraphic.Okay, 2 );

			SetPageCount( 3 );

			BuildPage();
			AddDescription( quest );

			if ( instance.Failed ) // only displayed on the first page
				AddHtmlLocalized( 160, 80, 250, 16, 500039, 0x3C00, false, false ); // Failed!

			BuildPage();
			AddObjectivesProgress( instance );

			BuildPage();
			AddRewardsPage( quest );
		}
Ejemplo n.º 2
0
		public override BaseObjectiveInstance CreateInstance( MLQuestInstance instance )
		{
			if ( instance == null || m_Destination == null )
				return null;

			return new EscortObjectiveInstance( this, instance );
		}
Ejemplo n.º 3
0
		public BaseObjectiveInstance( MLQuestInstance instance, BaseObjective obj )
		{
			m_Instance = instance;

			if ( obj.IsTimed )
				m_EndTime = DateTime.UtcNow + obj.Duration;
		}
Ejemplo n.º 4
0
		public override void GetRewards( MLQuestInstance instance )
		{
			if ( AwardHumanInNeed )
				HumanInNeed.AwardTo( instance.Player );

			base.GetRewards( instance );
		}
Ejemplo n.º 5
0
		public QuestRewardGump( MLQuestInstance instance )
			: base( 1072201 ) // Reward
		{
			m_Instance = instance;

			MLQuest quest = instance.Quest;
			PlayerMobile pm = instance.Player;

			CloseOtherGumps( pm );

			SetTitle( quest.Title );
			RegisterButton( ButtonPosition.Left, ButtonGraphic.Accept, 1 );

			SetPageCount( 1 );

			BuildPage();
			AddRewards( quest );
		}
Ejemplo n.º 6
0
		public QuestReportBackGump( MLQuestInstance instance )
			: base( 3006156 ) // Quest Conversation
		{
			m_Instance = instance;

			MLQuest quest = instance.Quest;
			PlayerMobile pm = instance.Player;

			// TODO: Check close sequence
			CloseOtherGumps( pm );

			SetTitle( quest.Title );
			RegisterButton( ButtonPosition.Left, ButtonGraphic.Continue, 4 );
			RegisterButton( ButtonPosition.Right, ButtonGraphic.Close, 3 );

			SetPageCount( 1 );

			BuildPage();
			AddConversation( quest.CompletionMessage );
		}
Ejemplo n.º 7
0
		public override void GetRewards( MLQuestInstance instance )
		{
			instance.Player.SendLocalizedMessage( 1074944, "", 0x2A ); // You have gained the boon of Arielle!  You have been taught the importance of laughter and light spirits.  You are one step closer to claiming your elven heritage.
			instance.ClaimRewards(); // skip gump
		}
Ejemplo n.º 8
0
		public override void GetRewards( MLQuestInstance instance )
		{
			instance.PlayerContext.SummonFiend = true;
			instance.Player.SendLocalizedMessage( 1074322, "", 0x2A ); // You've demonstrated your strength, got a means of control, and taught the imps to fear you.  You're ready now to summon them.

			base.GetRewards( instance );
		}
Ejemplo n.º 9
0
		public override void GetRewards( MLQuestInstance instance )
		{
			instance.Player.SendLocalizedMessage( 1074942, "", 0x2A ); // You have gained the boon of Bravehorn!  You have glimpsed the nobility of those that sacrifice themselves for their people.  You are one step closer to claiming your elven heritage.
			instance.ClaimRewards(); // skip gump
		}
Ejemplo n.º 10
0
		public KillObjectiveInstance( KillObjective objective, MLQuestInstance instance )
			: base( instance, objective )
		{
			m_Objective = objective;
			m_Slain = 0;
		}
Ejemplo n.º 11
0
		public override void GetRewards( MLQuestInstance instance )
		{
			Spellweaving.AwardTo( instance.Player );
			base.GetRewards( instance );
		}
Ejemplo n.º 12
0
 public override void OnAccepted(MLQuestInstance instance)
 {
     instance.PlayerContext.BedlamAccess = true;             // Permanent access
 }
Ejemplo n.º 13
0
 public GainSkillObjectiveInstance(GainSkillObjective objective, MLQuestInstance instance)
     : base(instance, objective)
 {
     m_Objective = objective;
 }
Ejemplo n.º 14
0
 public override void GetRewards(MLQuestInstance instance)
 {
     instance.Player.SendLocalizedMessage(1074940, "",
                                          0x2A); // You have gained the boon of Maul!  Your understanding of the seasons grows.  You are one step closer to claiming your elven heritage.
     instance.ClaimRewards();                    // skip gump
 }
Ejemplo n.º 15
0
		public QuestLogDetailedGump( MLQuestInstance instance )
			: this( instance, true )
		{
		}
Ejemplo n.º 16
0
 public override void GetRewards(MLQuestInstance instance)
 {
     instance.Player.SendLocalizedMessage(1074943, "",
                                          0x2A); // You have gained the boon of the Huntsman!  You have been given a taste of the bittersweet duty of those who guard the balance.  You are one step closer to claiming your elven heritage.
     instance.ClaimRewards();                    // skip gump
 }
Ejemplo n.º 17
0
 public override void GetRewards(MLQuestInstance instance)
 {
     instance.Player.SendLocalizedMessage(1074944, "",
                                          0x2A); // You have gained the boon of Arielle!  You have been taught the importance of laughter and light spirits.  You are one step closer to claiming your elven heritage.
     instance.ClaimRewards();                    // skip gump
 }
Ejemplo n.º 18
0
 public override void GetRewards(MLQuestInstance instance)
 {
     instance.Player.SendLocalizedMessage(1074942, "",
                                          0x2A); // You have gained the boon of Bravehorn!  You have glimpsed the nobility of those that sacrifice themselves for their people.  You are one step closer to claiming your elven heritage.
     instance.ClaimRewards();                    // skip gump
 }
Ejemplo n.º 19
0
 public override void GetRewards(MLQuestInstance instance)
 {
     instance.Player.SendLocalizedMessage(1074945, "",
                                          0x2A); // You have gained the boon of Enigma!  You are wise enough to know how little you know.  You are one step closer to claiming your elven heritage.
     instance.ClaimRewards();                    // skip gump
 }
Ejemplo n.º 20
0
 public virtual BaseObjectiveInstance CreateInstance(MLQuestInstance instance)
 {
     return(null);
 }
Ejemplo n.º 21
0
		public override void GetRewards( MLQuestInstance instance )
		{
			instance.Player.SendLocalizedMessage( 1074946, "", 0x2A ); // You have demonstrated your ingenuity!  Humans are jacks of all trades and know a little about a lot of things.  You are one step closer to achieving humanity.
			instance.ClaimRewards(); // skip gump
		}
Ejemplo n.º 22
0
		public EscortObjectiveInstance( EscortObjective objective, MLQuestInstance instance )
			: base( instance, objective )
		{
			m_Objective = objective;
			m_HasCompleted = false;
			m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 5 ), TimeSpan.FromSeconds( 5 ), new TimerCallback( CheckDestination ) );
			m_LastSeenEscorter = DateTime.UtcNow;
			m_Escort = instance.Quester as BaseCreature;

			if ( MLQuestSystem.Debug && m_Escort == null && instance.Quester != null )
				Console.WriteLine( "Warning: EscortObjective is not supported for type '{0}'", instance.Quester.GetType().Name );
		}
Ejemplo n.º 23
0
		public override void GetRewards( MLQuestInstance instance )
		{
			instance.Player.SendLocalizedMessage( 1074947, "", 0x2A ); // You have demonstrated your toughness!  Humans are able to endure unimaginable hardships in pursuit of their goals.  You are one step closer to achieving humanity.
			instance.ClaimRewards(); // skip gump
		}
Ejemplo n.º 24
0
        public QuestCancelConfirmGump(MLQuestInstance instance, bool closeGumps)
            : base(120, 50)
        {
            m_Instance   = instance;
            m_CloseGumps = closeGumps;

            if (closeGumps)
            {
                BaseQuestGump.CloseOtherGumps(instance.Player);
            }

            AddPage(0);

            Closable = false;

            AddImageTiled(0, 0, 348, 262, 0xA8E);
            AddAlphaRegion(0, 0, 348, 262);

            AddImage(0, 15, 0x27A8);
            AddImageTiled(0, 30, 17, 200, 0x27A7);
            AddImage(0, 230, 0x27AA);

            AddImage(15, 0, 0x280C);
            AddImageTiled(30, 0, 300, 17, 0x280A);
            AddImage(315, 0, 0x280E);

            AddImage(15, 244, 0x280C);
            AddImageTiled(30, 244, 300, 17, 0x280A);
            AddImage(315, 244, 0x280E);

            AddImage(330, 15, 0x27A8);
            AddImageTiled(330, 30, 17, 200, 0x27A7);
            AddImage(330, 230, 0x27AA);

            AddImage(333, 2, 0x2716);
            AddImage(333, 248, 0x2716);
            AddImage(2, 248, 0x2716);
            AddImage(2, 2, 0x2716);

            AddHtmlLocalized(25, 22, 200, 20, 1049000, 0x7D00, false, false); // Confirm Quest Cancellation
            AddImage(25, 40, 0xBBF);

            /*
             * This quest will give you valuable information, skills
             * and equipment that will help you advance in the
             * game at a quicker pace.<BR>
             * <BR>
             * Are you certain you wish to cancel at this time?
             */
            AddHtmlLocalized(25, 55, 300, 120, 1060836, 0xFFFFFF, false, false);

            MLQuest quest = instance.Quest;

            if (quest.IsChainTriggered || quest.NextQuest != null)
            {
                AddRadio(25, 145, 0x25F8, 0x25FB, false, 2);
                AddHtmlLocalized(60, 150, 280, 20, 1075023, 0xFFFFFF, false, false); // Yes, I want to quit this entire chain!
            }

            AddRadio(25, 180, 0x25F8, 0x25FB, true, 1);
            AddHtmlLocalized(60, 185, 280, 20, 1049005, 0xFFFFFF, false, false); // Yes, I really want to quit this quest!

            AddRadio(25, 215, 0x25F8, 0x25FB, false, 0);
            AddHtmlLocalized(60, 220, 280, 20, 1049006, 0xFFFFFF, false, false); // No, I don't want to quit.

            AddButton(265, 220, 0xF7, 0xF8, 7, GumpButtonType.Reply, 0);
        }
Ejemplo n.º 25
0
 public override void GetRewards(MLQuestInstance instance)
 {
     instance.Player.SendLocalizedMessage(1074946, "",
                                          0x2A); // You have demonstrated your ingenuity!  Humans are jacks of all trades and know a little about a lot of things.  You are one step closer to achieving humanity.
     instance.ClaimRewards();                    // skip gump
 }
Ejemplo n.º 26
0
 public CollectObjectiveInstance(CollectObjective objective, MLQuestInstance instance)
     : base(instance, objective) =>
		public QuestCancelConfirmGump( MLQuestInstance instance, bool closeGumps )
			: base( 120, 50 )
		{
			m_Instance = instance;
			m_CloseGumps = closeGumps;

			if ( closeGumps )
				BaseQuestGump.CloseOtherGumps( instance.Player );

			AddPage( 0 );

			Closable = false;

			AddImageTiled( 0, 0, 348, 262, 0xA8E );
			AddAlphaRegion( 0, 0, 348, 262 );

			AddImage( 0, 15, 0x27A8 );
			AddImageTiled( 0, 30, 17, 200, 0x27A7 );
			AddImage( 0, 230, 0x27AA );

			AddImage( 15, 0, 0x280C );
			AddImageTiled( 30, 0, 300, 17, 0x280A );
			AddImage( 315, 0, 0x280E );

			AddImage( 15, 244, 0x280C );
			AddImageTiled( 30, 244, 300, 17, 0x280A );
			AddImage( 315, 244, 0x280E );

			AddImage( 330, 15, 0x27A8 );
			AddImageTiled( 330, 30, 17, 200, 0x27A7 );
			AddImage( 330, 230, 0x27AA );

			AddImage( 333, 2, 0x2716 );
			AddImage( 333, 248, 0x2716 );
			AddImage( 2, 248, 0x2716 );
			AddImage( 2, 2, 0x2716 );

			AddHtmlLocalized( 25, 22, 200, 20, 1049000, 0x7D00, false, false ); // Confirm Quest Cancellation
			AddImage( 25, 40, 0xBBF );

			/*
			 * This quest will give you valuable information, skills
			 * and equipment that will help you advance in the
			 * game at a quicker pace.<BR>
			 * <BR>
			 * Are you certain you wish to cancel at this time?
			 */
			AddHtmlLocalized( 25, 55, 300, 120, 1060836, 0xFFFFFF, false, false );

			MLQuest quest = instance.Quest;

			if ( quest.IsChainTriggered || quest.NextQuest != null )
			{
				AddRadio( 25, 145, 0x25F8, 0x25FB, false, 2 );
				AddHtmlLocalized( 60, 150, 280, 20, 1075023, 0xFFFFFF, false, false ); // Yes, I want to quit this entire chain!
			}

			AddRadio( 25, 180, 0x25F8, 0x25FB, true, 1 );
			AddHtmlLocalized( 60, 185, 280, 20, 1049005, 0xFFFFFF, false, false ); // Yes, I really want to quit this quest!

			AddRadio( 25, 215, 0x25F8, 0x25FB, false, 0 );
			AddHtmlLocalized( 60, 220, 280, 20, 1049006, 0xFFFFFF, false, false ); // No, I don't want to quit.

			AddButton( 265, 220, 0xF7, 0xF8, 7, GumpButtonType.Reply, 0 );
		}
Ejemplo n.º 28
0
		public virtual BaseObjectiveInstance CreateInstance( MLQuestInstance instance )
		{
			return null;
		}
Ejemplo n.º 29
0
 public override void GetRewards(MLQuestInstance instance)
 {
     instance.Player.SendLocalizedMessage(1074947, "",
                                          0x2A); // You have demonstrated your toughness!  Humans are able to endure unimaginable hardships in pursuit of their goals.  You are one step closer to achieving humanity.
     instance.ClaimRewards();                    // skip gump
 }
Ejemplo n.º 30
0
 public QuestCancelConfirmGump(MLQuestInstance instance)
     : this(instance, true)
 {
 }
Ejemplo n.º 31
0
 public override void GetRewards(MLQuestInstance instance)
 {
     instance.Player.SendLocalizedMessage(1074941, "",
                                          0x2A); // You have gained the boon of Strongroot!  You have been approved by one whose roots touch the bones of Sosaria.  You are one step closer to claiming your elven heritage.
     instance.ClaimRewards();                    // skip gump
 }
Ejemplo n.º 32
0
 public override void GetRewards(MLQuestInstance instance)
 {
     instance.Player.SendLocalizedMessage(1074948, "", 0x2A); // You have demonstrated your physical strength!  Humans can carry vast loads without complaint.  You are one step closer to achieving humanity.
     instance.ClaimRewards();                                 // skip gump
 }
Ejemplo n.º 33
0
		public DeliverObjectiveInstance( DeliverObjective objective, MLQuestInstance instance )
			: base( instance, objective )
		{
			m_Objective = objective;
		}
Ejemplo n.º 34
0
 public virtual BaseObjectiveInstance CreateInstance(MLQuestInstance instance) => null;
Ejemplo n.º 35
0
		public override BaseObjectiveInstance CreateInstance( MLQuestInstance instance )
		{
			return new KillObjectiveInstance( this, instance );
		}
Ejemplo n.º 36
0
		public GainSkillObjectiveInstance( GainSkillObjective objective, MLQuestInstance instance )
			: base( instance, objective )
		{
			m_Objective = objective;
		}
Ejemplo n.º 37
0
		public override void GetRewards( MLQuestInstance instance )
		{
			instance.PlayerContext.SummonFey = true;
			instance.Player.SendLocalizedMessage( 1074320, "", 0x2A ); // *giggle* Mean reapers got fixed!  Pixie friend now! *giggle* When mean thingies bother you, a brave pixie will help.

			base.GetRewards( instance );
		}
Ejemplo n.º 38
0
 public override BaseObjectiveInstance CreateInstance(MLQuestInstance instance) => new DeliverObjectiveInstance(this, instance);
Ejemplo n.º 39
0
		public override void GetRewards( MLQuestInstance instance )
		{
			instance.Player.SendLocalizedMessage( 1074945, "", 0x2A ); // You have gained the boon of Enigma!  You are wise enough to know how little you know.  You are one step closer to claiming your elven heritage.
			instance.ClaimRewards(); // skip gump
		}
Ejemplo n.º 40
0
 public DeliverObjectiveInstance(DeliverObjective objective, MLQuestInstance instance)
     : base(instance, objective) =>
Ejemplo n.º 41
0
		public override void GetRewards( MLQuestInstance instance )
		{
			instance.Player.SendLocalizedMessage( 1074943, "", 0x2A ); // You have gained the boon of the Huntsman!  You have been given a taste of the bittersweet duty of those who guard the balance.  You are one step closer to claiming your elven heritage.
			instance.ClaimRewards(); // skip gump
		}
Ejemplo n.º 42
0
 public KillObjectiveInstance(KillObjective objective, MLQuestInstance instance)
     : base(instance, objective)
 {
     m_Objective = objective;
     m_Slain     = 0;
 }
Ejemplo n.º 43
0
		public override void GetRewards( MLQuestInstance instance )
		{
			instance.Player.SendLocalizedMessage( 1074940, "", 0x2A ); // You have gained the boon of Maul!  Your understanding of the seasons grows.  You are one step closer to claiming your elven heritage.
			instance.ClaimRewards(); // skip gump
		}
Ejemplo n.º 44
0
 public override BaseObjectiveInstance CreateInstance(MLQuestInstance instance)
 {
     return(new KillObjectiveInstance(this, instance));
 }
Ejemplo n.º 45
0
		public override void GetRewards( MLQuestInstance instance )
		{
			instance.Player.SendLocalizedMessage( 1074948, "", 0x2A ); // You have demonstrated your physical strength!  Humans can carry vast loads without complaint.  You are one step closer to achieving humanity.
			instance.ClaimRewards(); // skip gump
		}
Ejemplo n.º 46
0
 public override void GetRewards(MLQuestInstance instance)
 {
     Spellweaving.AwardTo(instance.Player);
     base.GetRewards(instance);
 }
Ejemplo n.º 47
0
		public override void GetRewards( MLQuestInstance instance )
		{
			instance.Player.SendLocalizedMessage( 1074941, "", 0x2A ); // You have gained the boon of Strongroot!  You have been approved by one whose roots touch the bones of Sosaria.  You are one step closer to claiming your elven heritage.
			instance.ClaimRewards(); // skip gump
		}
Ejemplo n.º 48
0
		public void AddObjectivesProgress( MLQuestInstance instance )
		{
			MLQuest quest = instance.Quest;

			AddHtmlLocalized( 98, 140, 312, 16, 1049073, 0x2710, false, false ); // Objective:
			AddHtmlLocalized( 98, 156, 312, 16, ( quest.ObjectiveType == ObjectiveType.All ) ? 1072208 : 1072209, 0x2710, false, false ); // All of the following / Only one of the following

			int y = 172;

			foreach ( BaseObjectiveInstance objInstance in instance.Objectives )
				objInstance.WriteToGump( this, ref y );
		}
Ejemplo n.º 49
0
        public override void GetRewards( MLQuestInstance instance )
        {
            PlayerMobile pm = instance.Player;

            if ( !pm.HasRecipe( 32 ) )
            {
                // The ability is awarded regardless of blacksmithy skill
                pm.AcquireRecipe( 32 );

                if ( pm.Skills[SkillName.Blacksmith].Base < 45.0 ) // TODO: Verify threshold
                    pm.SendLocalizedMessage( 1075005 ); // You observe carefully but you can't grasp the complexities of smithing a bone handled machete.
                else
                    pm.SendLocalizedMessage( 1075006 ); // You have learned how to smith a bone handled machete!
            }

            base.GetRewards( instance );
        }
		public QuestCancelConfirmGump( MLQuestInstance instance )
			: this( instance, true )
		{
		}
Ejemplo n.º 51
0
		public override void OnAccepted( MLQuestInstance instance )
		{
			instance.PlayerContext.BedlamAccess = true; // Permanent access
		}
Ejemplo n.º 52
0
 public QuestLogDetailedGump(MLQuestInstance instance)
     : this(instance, true)
 {
 }