示例#1
0
文件: 198292.cs 项目: realTobby/NullD
        public override void Execute(Map.World world)
        {
            if (HadConversation)
            {
                HadConversation = false;
                Logger.Debug(" Quests.Advance(72221) ");
            }
            foreach (var player in world.Players.Values)
            {
                player.Toon.ActiveQuest = 72221;
                player.Toon.StepOfQuest = 2;
                Logger.Debug(" Progress Saved ");
            }
            ;
            var      TELEGAS    = world.GetActorsBySNO(112131);
            Vector3D LastTelega = new Vector3D();

            foreach (var TELEGA in TELEGAS)
            {
                TELEGA.Destroy();
                LastTelega = TELEGA.Position;
            }

            world.Game.Quests.NotifyQuest(72221, QuestStepObjectiveType.HadConversation, 198292);
            var BlacksmithQuest = world.GetActorBySNO(65036);

            (BlacksmithQuest as Core.GS.Actors.InteractiveNPC).Conversations.Clear();
            (BlacksmithQuest as Core.GS.Actors.InteractiveNPC).Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = 0;
            (BlacksmithQuest as Core.GS.Actors.InteractiveNPC).Attributes.BroadcastChangedIfRevealed();

            BlacksmithQuest.WalkSpeed = 0.33f;
            BlacksmithQuest.RunSpeed  = 0.33f;

            Vector3D FirstPoint  = new Vector3D(2905.856f, 2584.807f, 0.5997877f);
            Vector3D SecondPoint = new Vector3D(2790.396f, 2611.313f, 0.5997864f);

            var FirstfacingAngle = Actors.Movement.MovementHelpers.GetFacingAngle(BlacksmithQuest, FirstPoint);

            var SecondfacingAngle = Actors.Movement.MovementHelpers.GetFacingAngle(BlacksmithQuest, SecondPoint);

            BlacksmithQuest.Move(FirstPoint, FirstfacingAngle);

            Ticker.TickTimer Timeout  = new Ticker.SecondsTickTimer(world.Game, 3f);
            var ListenerKingSkeletons = System.Threading.Tasks.Task <bool> .Factory.StartNew(() => WaitToSpawn(Timeout));

            ListenerKingSkeletons.ContinueWith(delegate
            {
                BlacksmithQuest.Move(SecondPoint, SecondfacingAngle);
            });
        }
示例#2
0
        public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message)
        {
            Logger.Warn("Healthwell Implementaion ver 1.1, Range 26f, refill 5 second");
            var playersAffected = player.GetPlayersInRange(26f);

            foreach (Players.Player playerN in playersAffected)
            {
                foreach (Players.Player targetAffected in playersAffected)
                {
                    player.InGameClient.SendMessage(new Net.GS.Message.Definitions.Effect.PlayEffectMessage()
                    {
                        ActorId = targetAffected.DynamicID,
                        Effect  = Net.GS.Message.Definitions.Effect.Effect.HealthOrbPickup
                    });
                }

                player.AddPercentageHP(100);
            }
            this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true;
            this.Attributes[GameAttribute.Gizmo_Operator_ACDID]    = unchecked ((int)player.DynamicID);
            this.Attributes[GameAttribute.Gizmo_State]             = 1;
            Attributes.BroadcastChangedIfRevealed();

            Ticker.TickTimer Timeout = new Ticker.SecondsTickTimer(player.World.Game, 5f);
            var ListenerWaiting      = System.Threading.Tasks.Task <bool> .Factory.StartNew(() => WaitToSpawn(Timeout));

            ListenerWaiting.ContinueWith(delegate {
                this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = false;
                //this.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked((int)player.DynamicID);
                this.Attributes[GameAttribute.Gizmo_State] = 0;
                Attributes.BroadcastChangedIfRevealed();
            });

            player.Attributes[GameAttribute.Skill, 0x0002EC66]       = 1;
            player.Attributes[GameAttribute.Skill_Total, 0x0002EC66] = 1;

            player.Attributes.SendChangedMessage(player.InGameClient);
        }
示例#3
0
文件: 167115.cs 项目: realTobby/NullD
        };                                        // Используем для отслеживания убийства


        public override void Execute(Map.World world)
        {
            var boss    = world.GetActorBySNO(CapitanDaltynAID);
            var minions = world.GetActorsBySNO(RiseZombieAID);

            if (boss == null)
            {
                Logger.Debug("Не найдено: Капитан Далтин - {0}", CapitanDaltynAID);
                Vector3D   CapitanDaltyn = new Vector3D(51.12595f, 100.2664f, 0.1000305f);
                Vector3D[] Zombies       = new Vector3D[4];
                Zombies[0] = new Vector3D(50.00065f, 125.4087f, 0.1000305f);
                Zombies[1] = new Vector3D(54.88688f, 62.24541f, 0.1000305f);
                Zombies[2] = new Vector3D(86.45869f, 77.09571f, 0.1000305f);
                Zombies[3] = new Vector3D(102.117f, 97.59058f, 0.1000305f);
                var Daltyn = world.SpawnMonsterWithGet(CapitanDaltynAID, CapitanDaltyn);
                //[011523] [Anim] zombie_male_skinny_spawn
                world.BroadcastIfRevealed(new PlayAnimationMessage
                {
                    ActorID = Daltyn.DynamicID,
                    Field1  = 5,
                    Field2  = 0,
                    tAnim   = new Net.GS.Message.Fields.PlayAnimationMessageSpec[]
                    {
                        new Net.GS.Message.Fields.PlayAnimationMessageSpec()
                        {
                            Duration         = 20,
                            AnimationSNO     = 11523,
                            PermutationIndex = 0,
                            Speed            = 0.9f
                        }
                    }
                }, Daltyn);
                (Daltyn as Actors.Monster).Brain.DeActivate();
                foreach (Vector3D point in Zombies)
                {
                    var Zombie = world.SpawnMonsterWithGet(RiseZombieAID, point);
                    CapitanDaltynKiller.Add(Zombie.DynamicID);

                    Zombie.Attributes[GameAttribute.Quest_Monster] = true;
                    (Zombie as Actors.Monster).Brain.DeActivate();
                    world.BroadcastIfRevealed(new PlayAnimationMessage
                    {
                        ActorID = Zombie.DynamicID,
                        Field1  = 5,
                        Field2  = 0,
                        tAnim   = new Net.GS.Message.Fields.PlayAnimationMessageSpec[]
                        {
                            new Net.GS.Message.Fields.PlayAnimationMessageSpec()
                            {
                                Duration         = 160,
                                AnimationSNO     = 11523,
                                PermutationIndex = 0,
                                Speed            = 1f
                            }
                        }
                    }, Zombie);
                }
                boss = world.GetActorBySNO(CapitanDaltynAID);
                CapitanDaltynKiller.Add(boss.DynamicID);
                minions        = world.GetActorsBySNO(RiseZombieAID);
                boss.RunSpeed  = 0.33f;
                boss.WalkSpeed = 0.33f;

                Ticker.TickTimer Timeout = new Ticker.SecondsTickTimer(world.Game, 3.5f);
                var Boom = System.Threading.Tasks.Task <bool> .Factory.StartNew(() => WaitToSpawn(Timeout));

                Boom.ContinueWith(delegate
                {
                    (Daltyn as Actors.Monster).Brain.Activate();
                    foreach (var minion in minions)
                    {
                        (minion as Actors.Monster).Brain.Activate();
                    }
                });
            }
            else
            {
                CapitanDaltynKiller.Add(boss.DynamicID);
            }

            // Пытаемся привязать статус босса!
            boss = world.GetActorBySNO(CapitanDaltynAID);
            boss.Attributes[Net.GS.Message.GameAttribute.Using_Bossbar]   = true;
            boss.Attributes[Net.GS.Message.GameAttribute.InBossEncounter] = true;
            // DOES NOT WORK it should be champion affixes or shit of this kind ...
            // Увеличиваем здоровье босса!

            boss.Attributes[GameAttribute.Hitpoints_Max] = 200f;
            boss.Attributes[GameAttribute.Hitpoints_Cur] = 200f;
            boss.Attributes[GameAttribute.Movement_Scalar_Reduction_Percent] -= 10f;
            boss.Attributes[GameAttribute.Quest_Monster] = true;


            //Запуск отслеживания убийства
            var ListenerDaltyn = Task <bool> .Factory.StartNew(() => OnKillListener(CapitanDaltynKiller, world));

            //Ждём пока убьют
            ListenerDaltyn.ContinueWith(delegate
            {
                //{[Actor] [Type: Monster] SNOId:203030 DynamicId: 3634 Position: x:149,8516 y:60,33301 z:3,051758E-05 Name: Leah_AdriaCellar}
                var Leah_Cellar      = world.GetActorBySNO(203030);
                Leah_Cellar.Position = new Vector3D(149.8516f, 60.33301f, 3.051758E-05f);
                Leah_Cellar.Attributes[Net.GS.Message.GameAttribute.MinimapActive] = true;
                (Leah_Cellar as Actors.InteractiveNPC).Conversations.Clear();
                (Leah_Cellar as Actors.InteractiveNPC).Conversations.Add(new Actors.Interactions.ConversationInteraction(198588));
                Leah_Cellar.Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = 1;
                Leah_Cellar.Attributes.BroadcastChangedIfRevealed();


                foreach (var player in world.Players)
                {
                    try
                    {
                        if (player.Value.PlayerIndex == 0)
                        {
                            world.Game.Quests.Advance(72095);
                        }
                        if (player.Value.ActiveHireling != null)
                        {
                            player.Value.ActiveHireling      = null;
                            player.Value.ActiveHirelingProxy = null;
                        }
                    }
                    catch { }
                }
            });
        }