Exemplo n.º 1
0
        public override void OnTalk(PlayerMobile player, bool contextMenu)
        {
            Direction = this.GetDirectionTo(player);

            QuestSystem qs = player.Quest;

            if (qs is TerribleHatchlingsQuest)
            {
                if (qs.IsObjectiveInProgress(typeof(ReturnToAnsellaGryenObjective)))
                {
                    Container cont = GetNewContainer();

                    cont.DropItem(new Gold(Utility.RandomMinMax(100, 200)));

                    switch (Utility.Random(1))
                    {
                    case 0:
                    {
                        BaseWeapon weapon = Loot.RandomWeapon(true);

                        BaseRunicTool.ApplyAttributesTo(weapon, 3, 10, 30);

                        cont.DropItem(weapon);

                        break;
                    }

                    case 1:
                    {
                        BaseArmor armor = Loot.RandomArmor(true);

                        BaseRunicTool.ApplyAttributesTo(armor, 1, 10, 20);

                        cont.DropItem(armor);

                        break;
                    }
                    }

                    player.AddToBackpack(cont);

                    qs.AddConversation(new RewardsConversation());
                }
                else
                {
                    qs.AddConversation(new DeathwatchBeetlesLocationConversation());
                }
            }
            else
            {
                QuestSystem newQuest        = new TerribleHatchlingsQuest(player);
                bool        inRestartPeriod = false;

                if (qs != null)
                {
                    SayTo(player, 1063322);                       // Before you can help me with the Terrible Hatchlings, you'll need to finish the quest you've already taken!
                }
                else if (QuestSystem.CanOfferQuest(player, typeof(TerribleHatchlingsQuest), out inRestartPeriod))
                {
                    PlaySound(0x2A3);

                    newQuest.SendOffer();
                }
                else if (inRestartPeriod && contextMenu)
                {
                    SayTo(player, 1049357);                       // I have nothing more for you at this time.
                }
            }
        }
Exemplo n.º 2
0
        public override void OnTalk( PlayerMobile player, bool contextMenu )
        {
            Direction = this.GetDirectionTo( player );

            QuestSystem qs = player.Quest;

            if ( qs is TerribleHatchlingsQuest )
            {
                if ( qs.IsObjectiveInProgress( typeof( ReturnToAnsellaGryenObjective ) ) )
                {
                    Container cont = GetNewContainer();

                    cont.DropItem( new Gold( Utility.RandomMinMax( 100, 200 ) ) );

                    switch ( Utility.Random( 1 ) )
                    {
                        case 0:
                            {
                                BaseWeapon weapon = Loot.RandomWeapon( true );

                                BaseRunicTool.ApplyAttributesTo( weapon, 3, 10, 30 );

                                cont.DropItem( weapon );

                                break;
                            }

                        case 1:
                            {
                                BaseArmor armor = Loot.RandomArmor( true );

                                BaseRunicTool.ApplyAttributesTo( armor, 1, 10, 20 );

                                cont.DropItem( armor );

                                break;
                            }
                    }

                    player.AddToBackpack( cont );

                    qs.AddConversation( new RewardsConversation() );
                }
                else
                {
                    qs.AddConversation( new DeathwatchBeetlesLocationConversation() );
                }
            }
            else
            {
                QuestSystem newQuest = new TerribleHatchlingsQuest( player );
                bool inRestartPeriod = false;

                if ( qs != null )
                {
                    SayTo( player, 1063322 ); // Before you can help me with the Terrible Hatchlings, you'll need to finish the quest you've already taken!
                }
                else if ( QuestSystem.CanOfferQuest( player, typeof( TerribleHatchlingsQuest ), out inRestartPeriod ) )
                {
                    PlaySound( 0x2A3 );

                    newQuest.SendOffer();
                }
                else if ( inRestartPeriod && contextMenu )
                {
                    SayTo( player, 1049357 ); // I have nothing more for you at this time.
                }
            }
        }