Beispiel #1
0
        public override void Execute(Map.World world)
        {
            if (HadConversation)
            {
                HadConversation = false;
                Logger.Debug(" Quests.Advance(72221) ");

                world.Game.Quests.Advance(72221);
            }
            foreach (var player in world.Players.Values)
            {
                player.Toon.MaximumQuest = 72061;
                player.Toon.ActiveQuest  = 72061;
                player.Toon.StepOfQuest  = 0;
                Logger.Debug(" Progress Saved ");
            }
            ;

            Logger.Debug(" Третий квест окончен. ");

            Logger.Debug("ПОЛУЧЕНИЕ НАГРАДЫ!");
            foreach (var player in world.Game.Players.Values)
            {
                D3.Quests.QuestReward.Builder Reward = new D3.Quests.QuestReward.Builder();
                Reward.SnoQuest    = 72221;
                Reward.GoldGranted = 195;
                Reward.XpGranted   = 900;

                player.Toon.StoneOfPortal = true;
                player.EnableStoneOfRecall();

                D3.Quests.QuestStepComplete.Builder StepCompleted = new D3.Quests.QuestStepComplete.Builder();
                StepCompleted.Reward = Reward.Build();
                StepCompleted.SetIsQuestComplete(true);

                player.InGameClient.SendMessage(new Net.GS.Message.Definitions.Quest.QuestStepCompleteMessage()
                {
                    QuestStepComplete = StepCompleted.Build()
                });
                player.Inventory.AddGoldAmount(Reward.GoldGranted);
                player.UpdateExp(Reward.XpGranted);
            }
            bool questConversation = true;
            var  Cain = world.GetActorBySNO(3533);

            Cain.Attributes[Net.GS.Message.GameAttribute.MinimapActive] = true;
            (Cain as Actors.InteractiveNPC).Conversations.Clear();
            (Cain as Actors.InteractiveNPC).Conversations.Add(new Actors.Interactions.ConversationInteraction(80681));

            Cain.Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = questConversation ? 1 : 0;
            Cain.Attributes.BroadcastChangedIfRevealed();
        }
Beispiel #2
0
        public override void Execute(Map.World world)
        {
            Logger.Debug(" Conversation done ");
            if (HadConversation)
            {
                world.Game.Quests.NotifyQuest(87700, NullD.Common.MPQ.FileFormats.QuestStepObjectiveType.HadConversation, 198521);
                HadConversation = false;
            }

            foreach (var plr in world.Players.Values)
            {
                plr.Toon.ActiveQuest   = 72095;
                plr.Toon.StepOfQuest   = -1;
                plr.Toon.StepIDofQuest = -1;

                plr.UpdateHeroState();
            }
            ;

            Logger.Debug("ПОЛУЧЕНИЕ НАГРАДЫ!");
            foreach (var player in world.Game.Players.Values)
            {
                D3.Quests.QuestReward.Builder Reward = new D3.Quests.QuestReward.Builder();
                Reward.SnoQuest    = 87700;
                Reward.GoldGranted = 370;
                Reward.XpGranted   = 1125;

                D3.Quests.QuestStepComplete.Builder StepCompleted = new D3.Quests.QuestStepComplete.Builder();
                StepCompleted.Reward = Reward.Build();
                StepCompleted.SetIsQuestComplete(true);

                player.InGameClient.SendMessage(new Net.GS.Message.Definitions.Quest.QuestStepCompleteMessage()
                {
                    QuestStepComplete = StepCompleted.Build()
                });
                player.Inventory.AddGoldAmount(Reward.GoldGranted);
                player.UpdateExp(Reward.XpGranted);
            }
            var LeahToConv = world.GetActorByDynamicId(83);

            LeahToConv.dumpConversationList();
            ConversationInteraction QuestCOnv = new ConversationInteraction(198541);

            (LeahToConv as InteractiveNPC).AddMustConversation();
        }
Beispiel #3
0
        public override void Execute(Map.World world)
        {
            if (HadConversation)
            {
                HadConversation = false;
                Logger.Debug(" Quests.Advance(72221) ");

                //world.Game.Quests.NotifyQuest(72221, QuestStepObjectiveType.PossessItem, -1);
                world.Game.Quests.Advance(72221);
            }
            foreach (var player in world.Players.Values)
            {
                player.Toon.MaximumQuest = 72061;
                player.Toon.ActiveQuest  = 72061;
                player.Toon.StepOfQuest  = 0;
                Logger.Debug(" Progress Saved ");
            }
            ;

            foreach (var plr in world.Game.Players.Values)
            {
                var inventory  = plr.Inventory;
                var dbArtisans = DBSessions.AccountSession.Get <DBArtisansOfToon>(plr.Toon.PersistentID);

                plr.InGameClient.SendMessage(plr.GetBlacksmithData(dbArtisans));

                var Blacksmith = world.GetActorBySNO(56947);

                Blacksmith.Attributes[Net.GS.Message.GameAttribute.MinimapActive] = true;
                (Blacksmith as Core.GS.Actors.InteractiveNPC).Conversations.Clear();

                Blacksmith.Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = 0;
                Blacksmith.Attributes.BroadcastChangedIfRevealed();

                foreach (var itm in inventory.GetBackPackItems())
                {
                    if (itm.ActorSNO.Id == 92168)
                    {
                        inventory.DestroyInventoryItem(itm);
                        inventory.RefreshInventoryToClient();

                        var RepairedCrown = Items.ItemGenerator.Cook(plr, "SkeletonKingCrown");
                        inventory.PickUp(RepairedCrown);
                    }
                }
                DBSessions.AccountSession.SaveOrUpdate(dbArtisans);
                DBSessions.AccountSession.Flush();
            }

            Logger.Debug(" Третий квест окончен. ");

            Logger.Debug("ПОЛУЧЕНИЕ НАГРАДЫ!");
            foreach (var player in world.Game.Players.Values)
            {
                D3.Quests.QuestReward.Builder Reward = new D3.Quests.QuestReward.Builder();

                //StoneOfRecallSkellet.Set
                var Hand = D3.GameBalance.Handle.CreateBuilder()
                           .SetGameBalanceType((int)GBHandleType.Gizmo)
                           .SetGbid(-2007738575)
                           //     .SetGbid(1612257705)
                ;
                var RareName = D3.Items.RareItemName.CreateBuilder()
                               .SetSnoAffixStringList(213647)
                               .SetAffixStringListIndex(213668)
                               .SetItemNameIsPrefix(true)
                               .SetItemStringListIndex(213647)
                ;

                var StoneOfRecallScript = D3.Items.Generator.CreateBuilder()
                                          .SetSeed((uint)RandomHelper.Next())
                                          .SetGbHandle(Hand)
                                          .SetDurability(1)
                                          .SetMaxDurability(1)
                                          .SetStackSize(1)
                                          .SetFlags(0x1)
                                          //    .SetItemQualityLevel(6)
                                          //    .SetMaxDurability(30)
                                          //    .SetDurability(30)
                                          //    .SetRareItemName(RareName)
                ;


                Reward.SnoQuest           = 72221;
                Reward.GoldGranted        = 195;
                Reward.XpGranted          = 900;
                Reward.ItemGranted        = StoneOfRecallScript.Build(); //190617
                player.Toon.StoneOfPortal = true;
                player.EnableStoneOfRecall();

                D3.Quests.QuestStepComplete.Builder StepCompleted = new D3.Quests.QuestStepComplete.Builder();
                StepCompleted.Reward = Reward.Build();
                StepCompleted.SetIsQuestComplete(true);

                player.InGameClient.SendMessage(new Net.GS.Message.Definitions.Quest.QuestStepCompleteMessage()
                {
                    QuestStepComplete = StepCompleted.Build()
                });
                player.Inventory.AddGoldAmount(Reward.GoldGranted);
                player.UpdateExp(Reward.XpGranted);
            }
            bool questConversation = true;
            var  Cain = world.GetActorBySNO(3533);

            Cain.Attributes[Net.GS.Message.GameAttribute.MinimapActive] = true;
            (Cain as Actors.InteractiveNPC).Conversations.Clear();
            (Cain as Actors.InteractiveNPC).Conversations.Add(new Actors.Interactions.ConversationInteraction(80681));

            Cain.Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = questConversation ? 1 : 0;
            Cain.Attributes.BroadcastChangedIfRevealed();
            //StartConversation(world, 196043);
        }
Beispiel #4
0
        public override void Execute(Map.World world)
        {
            if (HadConversation)
            {
                HadConversation = false;
            }
            foreach (var player in world.Players.Values)
            {
                player.Toon.MaximumQuest = 72221;
                player.Toon.ActiveQuest  = 72221;
                player.Toon.StepOfQuest  = -1;
            }
            ;
            Logger.Debug(" Второй квест окончен. ");


            bool questConversation = true;
            var  Cain = world.GetActorBySNO(3533);

            Cain.Attributes[Net.GS.Message.GameAttribute.MinimapActive] = true;
            (Cain as InteractiveNPC).Conversations.Clear();
            (Cain as InteractiveNPC).Conversations.Add(new Actors.Interactions.ConversationInteraction(198691));

            Cain.Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = questConversation ? 1 : 0;
            Cain.Attributes.BroadcastChangedIfRevealed();

            try
            {
                var      BlacksmithVendor = world.GetActorBySNO(56947);
                Vector3D position         = new Vector3D(BlacksmithVendor.Position);
                var      BlacksmithQuest  = world.GetActorBySNO(65036);
                BlacksmithQuest.RotationAxis = BlacksmithVendor.RotationAxis;
                BlacksmithQuest.RotationW    = BlacksmithVendor.RotationW;

                var      TELEGAS    = world.GetActorsBySNO(112131);
                Vector3D LastTelega = new Vector3D();
                foreach (var TELEGA in TELEGAS)
                {
                    LastTelega = TELEGA.Position;
                    TELEGA.Destroy();
                }
            }
            catch { Logger.Warn("Не критичная ошибка скрипта."); }

            Players.Player Master = null;

            Logger.Debug("ПОЛУЧЕНИЕ НАГРАДЫ!");
            foreach (var player in world.Game.Players.Values)
            {
                if (player.PlayerIndex == 0)
                {
                    Master = player;
                }

                D3.Quests.QuestReward.Builder Reward = new D3.Quests.QuestReward.Builder();
                Reward.SnoQuest  = 72095;
                Reward.XpGranted = 3300;

                D3.Quests.QuestStepComplete.Builder StepCompleted = new D3.Quests.QuestStepComplete.Builder();
                StepCompleted.Reward = Reward.Build();
                StepCompleted.SetIsQuestComplete(true);

                player.InGameClient.SendMessage(new Net.GS.Message.Definitions.Quest.QuestStepCompleteMessage()
                {
                    QuestStepComplete = StepCompleted.Build()
                });
                player.UpdateExp(Reward.XpGranted);
            }
        }