Пример #1
0
        public override void OnInteract(Object Obj, Player Target, InteractMenu Menu)
        {
            // Make sure the player has the quest and hasn't already finished the objectives.
            if (!Target.GetPlayer().QtsInterface.HasQuest(30001) || Target.GetPlayer().QtsInterface.HasFinishQuest(30001))
            {
                return;
            }

            Target.GetPlayer().QtsInterface.HandleEvent(Objective_Type.QUEST_UNKNOWN, 1314, 1, true);

            Creature c    = Obj.GetCreature();
            Random   rand = new Random();

            //  Make the villager say something
            Double chance = rand.NextDouble();

            if (chance >= 0.8)
            {
                c.Say("Thanks for saving me!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
            }
            else if (chance >= 0.6)
            {
                c.Say("Phew, that was close!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
            }
            else if (chance >= 0.4)
            {
                c.Say("Ahh, run for your life!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
            }
            else if (chance >= 0.2)
            {
                c.Say("I could have taken him myself!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
            }
            else
            {
                c.Say("Please help my friend!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
            }


            //  Make the villager run to either the start or the village
            chance = rand.NextDouble();
            if (chance >= 0.5)
            {
                c.GetCreature().MvtInterface.Move(22347, 53688, 7425);
            }
            else
            {
                c.GetCreature().MvtInterface.Move(15548, 51104, 7228);
            }
        }
        public override bool OnEnterCombat(Object npc = null, object instigator = null)
        {
            Creature c = Obj as Creature;

            c.Say("Come, mortals, and bathe in my Power!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

            c.BuffInterface.RemoveBuffByEntry(14897); // Removing Iron Body
            NewBuff newBuff = c.BuffInterface.GetBuff(14897, null);

            if (newBuff != null)
            {
                newBuff.RemoveBuff(true);
            }

            if (c != null)
            {
                c.IsInvulnerable = false;
                Stage            = -1;

                var prms = new List <object>()
                {
                    100523, 1110218, 1118213, 19460, (int)Obj.Heading, (uint)0
                };                                                                                            // Solithex Soulstone
                c.EvtInterface.AddEvent(SpawnGO, 100, 1, prms);

                prms = new List <object>()
                {
                    100524, 1110226, 1118211, 19459, (int)Obj.Heading, (uint)0
                };                                                                                        // Solithex Barrier
                c.EvtInterface.AddEvent(SpawnGO, 100, 1, prms);
            }
            return(false);
        }
Пример #3
0
        public override void OnDie(Object Obj)
        {
            Creature c = Obj as Creature;

            c.Say("Youse... kilt... me... but da Mixa make short work of youse! Unnghhh!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

            Stage = -1;
            stuffInRange.Clear();

            //Obj.EvtInterface.RemoveEvent(MatureTrolls);
            c.EvtInterface.RemoveEvent(SpawnTrolls);
            c.EvtInterface.RemoveEvent(SpawnTrolls);

            c.EvtInterface.RemoveEvent(SpawnAdultTrolls);
            c.EvtInterface.RemoveEvent(SpawnAdultTrolls);

            foreach (Creature crea in addList)
            {
                crea.Destroy();
            }
            foreach (GameObject go in goList)
            {
                go.Destroy();
            }

            addList = new List <Creature>();
            goList  = new List <GameObject>();
        }
        public override bool OnEnterCombat(Object npc = null, object instigator = null)
        {
            Creature c = Obj as Creature;

            c.IsInvulnerable = false;
            Stage            = -1;

            var prms = new List <object>()
            {
                36598, (Obj.WorldPosition.X + 250 - (50 * random.Next(1, 11))), (Obj.WorldPosition.Y + 250 - (50 * random.Next(1, 11))), Obj.WorldPosition.Z, Obj.Heading
            };                                                                                                                                                                                           // Spawn snotling

            c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

            c.EvtInterface.AddEvent(SpawnSnotlings, 100, 1);

            c.EvtInterface.AddEvent(SpawnSnotlings, 60 * 1000, 0);

            c.Say("Com 'er Chipfang, we 'l show 'em!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

            c.BuffInterface.RemoveBuffByEntry(13155); // Removing rage
            NewBuff newBuff = c.BuffInterface.GetBuff(13155, null);

            if (newBuff != null)
            {
                newBuff.RemoveBuff(true);
            }

            return(false);
        }
        public void SpawnDaStaff()
        {
            Creature c = Obj as Creature;

            if (!c.IsDead)
            {
                bool staffActive = false;

                foreach (Object obj in Obj.ObjectsInRange.ToList())
                {
                    Creature creature = obj as Creature;
                    if (creature != null && creature.Entry == 2000851 && !creature.IsDead)
                    {
                        staffActive = true;
                        break;
                    }
                }

                if (!staffActive)
                {
                    c.Say("Where 'z my stick?!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
                    var prms = new List <object>()
                    {
                        2000851, c.WorldPosition.X, c.WorldPosition.Y, c.WorldPosition.Z, Obj.Heading
                    };                                                                                                               // Gitzappa da Stick
                    c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);
                }
            }
        }
        public override void SetRandomTarget()
        {
            Creature c = Obj as Creature;

            if (c != null)
            {
                if (c.PlayersInRange.Count > 0)
                {
                    bool   haveTarget     = false;
                    int    playersInRange = c.PlayersInRange.Count();
                    Player player;
                    while (!haveTarget)
                    {
                        int    rndmPlr = random.Next(1, playersInRange + 1);
                        Object obj     = c.PlayersInRange.ElementAt(rndmPlr - 1);
                        player = obj as Player;
                        if (player != null && !player.IsDead)
                        {
                            haveTarget = true;
                            c.MvtInterface.TurnTo(player);
                            c.StsInterface.Speed = 123;
                            c.MvtInterface.SetBaseSpeed(123);
                            c.AddCrowdControlImmunity((int)GameData.CrowdControlTypes.All); // This should grant immunity to CC
                            c.MvtInterface.Follow(player, 5, 10);
                            c.AiInterface.CurrentBrain.AddHatred(player, true, 100000);

                            c.Say("*** A horde of wild squigs chase " + player.Name + "! ***", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                            break;
                        }
                    }
                }
            }
        }
        public void DelayedSay(object creature)
        {
            var      Params = (List <object>)creature;
            Creature c      = Params[0] as Creature;
            string   s      = (string)Params[1];

            c.Say(s, ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
        }
        public override bool OnEnterCombat(Object npc = null, object instigator = null)
        {
            Creature c = Obj as Creature;

            c.IsInvulnerable = false;
            Stage            = -1;

            c.Say("It may have been these creatures that awoken us, but it is all those who live who shall be made to serve the Mourkain! We shall arise once more!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

            return(false);
        }
        public override void RemoveBuffs()
        {
            Creature c = this.Obj as Creature;

            c.Say("Feel my wrath!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
            c.IsInvulnerable = false;
            foreach (Player plr in c.PlayersInRange.ToList())
            {
                c.SendMeTo(plr);
            }
        }
Пример #10
0
        public void SayStuff()
        {
            Creature c = Obj as Creature;

            if (c != null && !c.IsDead)
            {
                switch (random.Next(1, 4))
                {
                case 1:
                    c.Say("Git 'ere! Take 'em! Eat 'em!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
                    break;

                case 2:
                    c.Say("Dose gits ain't nuffink! Get 'em, trolls!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
                    break;

                case 3:
                    c.Say("“Now youse jus' makin' me mad!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
                    break;
                }
            }
        }
        public bool HealArd(Object Obj, object instigator)
        {
            Creature Ard = Obj as Creature;

            Ard = instigator as Creature;

            if (Ard != null && Ard.Entry == 15102 && Ard.TotalHealth - Ard.Health > 5001)
            {
                Ard.Health = Ard.Health + 5000;
                Ard.Say("'Ard ta Feed just swallowed one of the smaller squigs!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_EMOTE);
            }

            return(true);
        }
Пример #12
0
        public void DelayedCast(object prms)
        {
            var Params = (List <object>)prms;

            Creature c         = (Creature)Params[0];
            ushort   AbilityId = (ushort)Params[1];
            string   Text      = (string)Params[2];

            c.AbtInterface.StartCast(c, AbilityId, 1);

            if (!String.IsNullOrEmpty(Text))
            {
                c.Say(Text, SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
            }
        }
        public void DisablePlayer()
        {
            Creature creature = Obj as Creature;

            if (creature != null)
            {
                if (creature.PlayersInRange.Count > 0)
                {
                    bool   haveTarget     = false;
                    int    playersInRange = creature.PlayersInRange.Count();
                    Player player;
                    while (!haveTarget)
                    {
                        int    rndmPlr = random.Next(1, playersInRange + 1);
                        Object obj     = creature.PlayersInRange.ElementAt(rndmPlr - 1);
                        player = obj as Player;
                        if (player != null && !player.IsDead)
                        {
                            haveTarget = true;
                            creature.MvtInterface.TurnTo(player);
                            creature.MvtInterface.Follow(player, 5, 50);
                            creature.AiInterface.CurrentBrain.AddHatred(player, true, 5000);

                            creature.Say("*** Zapping " + player.Name + " ***", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                            BuffInfo b = AbilityMgr.GetBuffInfo(5240, creature, player); // Disable
                            creature.BuffInterface.QueueBuff(new BuffQueueInfo(creature, creature.Level, b));

                            player.PlayEffect(1390);

                            var prms = new List <object>()
                            {
                                player, 165
                            };
                            PlayAnimation(prms);

                            prms = new List <object>()
                            {
                                player, 0
                            };
                            player.EvtInterface.AddEvent(PlayAnimation, 595 * 100, 1, prms);

                            break;
                        }
                    }
                }
            }
        }
        public void SpawnRandomGO()
        {
            int X = Obj.WorldPosition.X;
            int Y = Obj.WorldPosition.Y;
            int Z = Obj.WorldPosition.Z;

            foreach (Object o in Obj.ObjectsInRange.ToList())
            {
                Creature crea = o as Creature;
                if (crea != null && crea.Entry == 36549)
                {
                    Z = crea.WorldPosition.Z;
                    break;
                }
            }



            Creature c = Obj as Creature;

            c.Say("*** Ol' Greenwingz shots rotten eggs in every direction! ***", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_EMOTE);

            if (c.CbtInterface.GetCurrentTarget() != null && (c.CbtInterface.GetCurrentTarget().IsPlayer() || c.CbtInterface.GetCurrentTarget().IsPet()))
            {
                foreach (Player player in c.PlayersInRange.ToList())
                {
                    if (!player.IsDead && !player.IsInvulnerable)
                    {
                        X = player.WorldPosition.X;
                        Y = player.WorldPosition.Y;
                        Z = player.WorldPosition.Z;

                        var prms = new List <object>()
                        {
                            2000576, (X + 125 - (25 * random.Next(1, 11))), (Y + 125 - (25 * random.Next(1, 11))), Z, (int)Obj.Heading, (uint)0
                        };                                                                                                                                                     // Rotten eggs
                        Obj.EvtInterface.AddEvent(SpawnGO, 100, 1, prms);

                        //prms = new List<object>() { 2000576, (X + 125 - (25 * random.Next(1, 11))), (Y + 125 - (25 * random.Next(1, 11))), Z, (int)Obj.Heading, (uint)0 }; // Rotten eggs
                        //Obj.EvtInterface.AddEvent(SpawnGO, 100, 1, prms);

                        //prms = new List<object>() { 2000576, (X + 125 - (25 * random.Next(1, 11))), (Y + 125 - (25 * random.Next(1, 11))), Z, (int)Obj.Heading, (uint)0 }; // Rotten eggs
                        //Obj.EvtInterface.AddEvent(SpawnGO, 100, 1, prms);
                    }
                }
            }
        }
Пример #15
0
        public bool CheckHP(Object Obj, object instigator)
        {
            Creature c = this.Obj as Creature;                                                    // We are casting the script initiator as a Creature

            if (c.Health < c.TotalHealth * 0.1 && !c.IsDead && c.IsCreature() && c.Entry == 1990) // At 10% HP magic happens
            {
                c.Say("Curse you!");

                c.AbtInterface.StartCast(c, 4338, 1);
                c.Health = c.MaxHealth;
                c.CbtInterface.LeaveCombat();
                c.EvtInterface.AddEvent(c.CbtInterface.LeaveCombat, 1000, 2);
                FinishQuestAndTeleportOutside(8000);
            }

            return(false);
        }
Пример #16
0
        public void DelayedBuff(object prms)
        {
            var Params = (List <object>)prms;

            Creature c      = (Creature)Params[0];
            ushort   BuffId = (ushort)Params[1];
            string   Text   = (string)Params[2];

            BuffInfo b = AbilityMgr.GetBuffInfo(BuffId, c, c);

            c.BuffInterface.QueueBuff(new BuffQueueInfo(c, c.Level, b));

            if (!String.IsNullOrEmpty(Text))
            {
                c.Say(Text, SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
            }
        }
        public void CastFistOfGork()
        {
            Creature c = Obj as Creature;

            if (c != null)
            {
                if (c.PlayersInRange.Count > 0)
                {
                    bool   haveTarget     = false;
                    int    playersInRange = c.PlayersInRange.Count();
                    Player player;
                    while (!haveTarget)
                    {
                        int    rndmPlr = random.Next(1, playersInRange + 1);
                        Object obj     = c.PlayersInRange.ElementAt(rndmPlr - 1);
                        player = obj as Player;

                        if (player != null && !player.IsDead && !player.IsInvulnerable)
                        {
                            NewBuff newBuff = player.BuffInterface.GetBuff(5239, null);
                            if (newBuff == null)
                            {
                                haveTarget = true;

                                var prms = new List <object>()
                                {
                                    2000902, player.WorldPosition.X, player.WorldPosition.Y, player.WorldPosition.Z, Obj.Heading
                                };                                                                                                                              // Fist of Gork
                                c.EvtInterface.AddEvent(SpawnAdds, 200, 1, prms);

                                c.Say("Gork will smash' ya " + player.Name + "! Or Mork?!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                                break;
                            }
                        }
                    }
                }
            }
        }
        public bool CheckHP(Object Obj, object instigator)
        {
            Creature c = this.Obj as Creature; // We are casting the script initiator as a Creature

            if (Stage < 0 && !c.IsDead)
            {
                Stage = 0; // Setting control value to 0
            }
            else if (c.Health < c.TotalHealth * 0.5 && Stage < 1 && !c.IsDead)
            {
                c.Say("Rise, my royal servant! Protect those mains from those who want to steal them from you!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                var prms = new List <object>()
                {
                    2000893, 843373, 861016, 25691, Obj.Heading
                };                                                                             // Logazor
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                Stage = 1;
            }

            return(false);
        }
        public bool CheckHP(Object Obj, object instigator)
        {
            Creature c = this.Obj as Creature; // We are casting the script initiator as a Creature

            if (Stage < 0 && !c.IsDead)
            {
                Stage = 0; // Setting control value to 0
            }
            else if (c.Health < c.TotalHealth * 0.05 && Stage < 8 && !c.IsDead)
            {
                c.Say("Traitors!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                KillTraitors();

                Stage = 8;
            }
            else if (c.Health < c.TotalHealth * 0.1 && Stage < 7 && !c.IsDead)
            {
                TraitorousSouls();

                Stage = 7;
            }
            else if (c.Health < c.TotalHealth * 0.2 && Stage < 6 && !c.IsDead)
            {
                c.Say("I'd like you to meet some friends of mine!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                var prms = new List <object>()
                {
                    41619, 853039, 856219, 20257, Obj.Heading
                };                                                                           // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853204, 856279, 20247, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853329, 856246, 20244, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853558, 856098, 20244, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853518, 855937, 20254, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853390, 853827, 20263, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                Stage = 6;
            }
            else if (c.Health < c.TotalHealth * 0.25 && Stage < 5 && !c.IsDead)
            {
                c.Say("Traitors!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                KillTraitors();

                Stage = 5;
            }
            else if (c.Health < c.TotalHealth * 0.3 && Stage < 4 && !c.IsDead)
            {
                TraitorousSouls();

                Stage = 4;
            }
            else if (c.Health < c.TotalHealth * 0.4 && Stage < 3 && !c.IsDead)
            {
                c.Say("I am never alone!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                var prms = new List <object>()
                {
                    41619, 853039, 856219, 20257, Obj.Heading
                };                                                                           // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853204, 856279, 20247, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853329, 856246, 20244, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853558, 856098, 20244, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853518, 855937, 20254, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853390, 853827, 20263, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                Stage = 3;
            }
            else if (c.Health < c.TotalHealth * 0.6 && Stage < 2 && !c.IsDead)
            {
                c.Say("I'd like you to meet some friends of mine!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                var prms = new List <object>()
                {
                    41619, 853039, 856219, 20257, Obj.Heading
                };                                                                           // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853204, 856279, 20247, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853329, 856246, 20244, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853558, 856098, 20244, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853518, 855937, 20254, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853390, 853827, 20263, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                Stage = 2;
            }
            else if (c.Health < c.TotalHealth * 0.8 && Stage < 1 && !c.IsDead)
            {
                c.Say("I am never alone!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                var prms = new List <object>()
                {
                    41619, 853039, 856219, 20257, Obj.Heading
                };                                                                           // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853204, 856279, 20247, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853329, 856246, 20244, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853558, 856098, 20244, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853518, 855937, 20254, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    41619, 853390, 853827, 20263, Obj.Heading
                };                                                                       // Deceived Souls
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                Stage = 1;
            }

            return(false);
        }
Пример #20
0
        //This checks the current HP of boss
        public bool CheckHP(Object Obj, object instigator)
        {
            Creature c = this.Obj as Creature; // We are casting the script initiator as a Creature

            if (Stage < 0 && !c.IsDead)
            {
                AddWall();                                                                                                  // First time he is damaged he spawns a wall to block exit
                Stage = 0;                                                                                                  // Setting control value to 0
                c.Say("Fools! How dare you disturb my experiments!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY); // Banter
            }

            if (c.Health < c.TotalHealth * 0.2 && Stage < 4 && !c.IsDead) // At 20% HP he fails to summon anything
            {
                c.IsImmovable    = true;                                  // Boss immovable when walking to table
                c.IsInvulnerable = true;                                  // Boss invulnerable when walking to table
                c.Say("Watch this!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                c.MvtInterface.Move(38761, 33364, 11103);      // Move to some coordinates

                c.EvtInterface.AddEvent(FinalWords, 5000, 1);  // Banter
                c.EvtInterface.AddEvent(RemoveBuffs, 5000, 1); // We are removing is immovability and invulnerability

                Stage = 4;
            }
            else if (c.Health < c.TotalHealth * 0.4 && Stage < 3 && !c.IsDead)
            {
                c.IsImmovable    = true;
                c.IsInvulnerable = true;
                c.Say("This isn't even my final form yet!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                c.MvtInterface.Move(38761, 33364, 11103);

                c.EvtInterface.AddEvent(SpawnMaggots, AddsSpawnTimer, 1); // We are spawnning some adds
                c.EvtInterface.AddEvent(RemoveBuffs, 5000, 1);

                Stage = 3;
            }
            else if (c.Health < c.TotalHealth * 0.6 && Stage < 2 && !c.IsDead)
            {
                c.IsImmovable    = true;
                c.IsInvulnerable = true;
                c.Say("Tremble at my illogical glory!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                c.MvtInterface.Move(38761, 33364, 11103);

                c.EvtInterface.AddEvent(SpawnSpiders, AddsSpawnTimer, 1);
                c.EvtInterface.AddEvent(RemoveBuffs, 5000, 1);

                Stage = 2;
            }
            else if (c.Health < c.TotalHealth * 0.8 && Stage < 1 && !c.IsDead)
            {
                c.IsImmovable    = true;
                c.IsInvulnerable = true;
                c.Say("You are just a nurgling bait!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                c.MvtInterface.Move(38761, 33364, 11103);

                c.EvtInterface.AddEvent(SpawnNurglings, AddsSpawnTimer, 1);
                c.EvtInterface.AddEvent(RemoveBuffs, 5000, 1);

                Stage = 1;
            }

            return(false);
        }
        // This is for handling custom GO interaction
        private void HandleCustomInteraction()
        {
            if (Entry == 2000579) // This is Mourkain Gem for Ard 'ta Feed Gunbad Boss and part of his mechanics
            {
                if (LastUsedTimestamp == 0)
                {
                    Say("*** Sinister energy is gone from the gem... ***", ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
                }

                LastUsedTimestamp = TCPManager.GetTimeStampMS();

                bool removeBuff = false;

                foreach (Object o in ObjectsInRange)
                {
                    GameObject go = o as GameObject;
                    if (go != null && go != this && go.Entry == 2000579) // This is 2nd Mourkain Gem
                    {
                        if (go.LastUsedTimestamp != 0 && (LastUsedTimestamp - go.LastUsedTimestamp < 2001))
                        {
                            LastUsedTimestamp    = 0;
                            go.LastUsedTimestamp = 0;
                            removeBuff           = true;
                        }
                        else if (go.LastUsedTimestamp != 0)
                        {
                            LastUsedTimestamp    = 0;
                            go.LastUsedTimestamp = 0;
                            Say("*** You are too late! Better hurry and try again! ***", ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
                        }
                    }
                }

                if (removeBuff)
                {
                    foreach (Object ob in ObjectsInRange) // This is looking for ard to feed in range
                    {
                        Creature c = ob as Creature;
                        if (c != null && c.Entry == 15102) // This is ard ta feed
                        {
                            c.BuffInterface.RemoveBuffByEntry(20364);
                            NewBuff newBuff = c.BuffInterface.GetBuff(20364, null);
                            if (newBuff != null)
                            {
                                newBuff.RemoveBuff(true);
                            }

                            c.AbtInterface.StartCast(c, 5308, 0);
                            Say("*** Wicked energy evaporates from the cursed jewel... ***", ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
                            c.Say("*** Monstrous squig calms a bit... ***", ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);
                        }

                        GameObject gobject = ob as GameObject;
                        if (gobject != null && gobject.Entry == 98876) // This is Mourkain Henge
                        {
                            gobject.VfxState = 0;
                            foreach (Player player in gobject.PlayersInRange)
                            {
                                gobject.SendMeTo(player);
                            }
                        }
                    }
                }
            }
        }
Пример #22
0
        public bool CheckHP(Object Obj, object instigator)
        {
            Creature c = this.Obj as Creature; // We are casting the script initiator as a Creature

            if (Stage < 0 && !c.IsDead)
            {
                Stage = 0; // Setting control value to 0
            }

            if (c.Health < c.TotalHealth * 0.3 && Stage < 4 && !c.IsDead)  // At 20% HP he fails to summon anything
            {
                ApplyIronSkin();

                DismountNPC();

                SquigForm(1);

                c.Say("I almost 'ad ya!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                c.PlayEffect(2185); // Mount puff effect

                Stage = 4;
            }
            else if (c.Health < c.TotalHealth * 0.4 && Stage < 3 && !c.IsDead)
            {
                var prms = new List <object>()
                {
                    2000866, 929787, 930312, 27020, Obj.Heading
                };                                                                             // Spikestabbin'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000866, 930761, 931907, 27026, Obj.Heading
                };                                                                         // Spikestabbin'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000866, 929366, 932515, 27062, Obj.Heading
                };                                                                         // Spikestabbin'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000866, 928632, 931686, 26987, Obj.Heading
                };                                                                         // Spikestabbin'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000866, 928715, 930710, 27000, Obj.Heading
                };                                                                         // Spikestabbin'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                ApplyIronSkin();

                MountNPC(c, 136);
                c.EvtInterface.AddEvent(DismountNPC, 30 * 10000, 1);

                c.Say("Spikestabba' Squigs, get out 'ere!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                c.PlayEffect(1359); // Skull Effect
                c.PlayEffect(2185); // Mount puff effect

                Stage = 3;
            }
            else if (c.Health < c.TotalHealth * 0.6 && Stage < 2 && !c.IsDead)
            {
                var prms = new List <object>()
                {
                    2000865, 929787, 930312, 27020, Obj.Heading
                };                                                                             // Stinkspewin'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000865, 930761, 931907, 27026, Obj.Heading
                };                                                                         // Stinkspewin'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000865, 929366, 932515, 27062, Obj.Heading
                };                                                                         // Stinkspewin'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000865, 928632, 931686, 26987, Obj.Heading
                };                                                                         // Stinkspewin'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000865, 928715, 930710, 27000, Obj.Heading
                };                                                                         // Stinkspewin'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                ApplyIronSkin();

                MountNPC(c, 136);
                c.EvtInterface.AddEvent(DismountNPC, 30 * 10000, 1);

                c.Say("Stinkspewin' Squigs, get out 'ere!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                c.PlayEffect(1359); // Skull Effect
                c.PlayEffect(2185); // Mount puff effect

                Stage = 2;
            }
            else if (c.Health < c.TotalHealth * 0.90 && Stage < 1 && !c.IsDead)
            {
                var prms = new List <object>()
                {
                    2000864, 929787, 930312, 27020, Obj.Heading
                };                                                                             // Skewering'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000864, 930761, 931907, 27026, Obj.Heading
                };                                                                         // Skewering'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000864, 929366, 932515, 27062, Obj.Heading
                };                                                                         // Skewering'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000864, 928632, 931686, 26987, Obj.Heading
                };                                                                         // Skewering'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000864, 928715, 930710, 27000, Obj.Heading
                };                                                                         // Skewering'Squigs
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                ApplyIronSkin();
                MountNPC(c, 136); // Squig Mount
                c.EvtInterface.AddEvent(DismountNPC, 30 * 10000, 1);

                c.Say("Skewerin' Squigs, get out 'ere!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                c.PlayEffect(1359); // Skull Effect
                c.PlayEffect(2185); // Mount puff effect

                Stage = 1;
            }

            return(false);
        }
        public bool CheckHP(Object Obj, object instigator)
        {
            Creature c = this.Obj as Creature; // We are casting the script initiator as a Creature

            if (Stage < 0 && !c.IsDead)
            {
                Stage = 0; // Setting control value to 0
            }
            else if (c.Health < c.TotalHealth * 0.2 && Stage < 3 && !c.IsDead)
            {
                var prms = new List <object>()
                {
                    c, (ushort)14897, "This battle may be yours but my will persists. If we meet again, it is you that will return to the soil and eternally serve the Mourkain!"
                };                                                                                                                                                                                              // Iron Body
                c.EvtInterface.AddEvent(DelayedBuff, 100, 1, prms);

                foreach (Object o in c.ObjectsInRange.ToList())
                {
                    GameObject go = o as GameObject;
                    if (go != null && go.Entry == 100524)
                    {
                        go.Say("*** Magical barrier collaps and the gem is in your reach... ***", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_EMOTE);
                        go.Destroy();
                    }

                    if (go != null && go.Entry == 100523)
                    {
                        go.IsInvulnerable = false;
                        go.IsAttackable   = 1;
                        go.Health         = go.TotalHealth;

                        //go.Say("*** Cracks start to show upon surface of the gem... ***", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_EMOTE);

                        foreach (Player plr in go.PlayersInRange.ToList())
                        {
                            if (plr != null)
                            {
                                BuffInfo b = AbilityMgr.GetBuffInfo(13058, c, plr); // Killer dot
                                plr.BuffInterface.QueueBuff(new BuffQueueInfo(c, c.Level, b));
                                go.SendMeTo(plr);
                            }
                        }

                        break;
                    }
                }

                Stage = 3;

                //c.Say("Stage 3");
            }
            else if (c.Health < c.TotalHealth * 0.4 && Stage < 2 && !c.IsDead)
            {
                var prms = new List <object>()
                {
                    2000561, 1109983, 1119476, 19138, (int)Obj.Heading, (uint)0
                };                                                                                             // Deathshadow Drudge
                c.EvtInterface.AddEvent(SpawnGO, 100, 1, prms);

                prms = new List <object>()
                {
                    2000561, 1110752, 1119141, 19134, (int)Obj.Heading, (uint)0
                };                                                                                         // Deathshadow Drudge
                c.EvtInterface.AddEvent(SpawnGO, 100, 1, prms);

                prms = new List <object>()
                {
                    2000561, 1111016, 1119874, 19145, (int)Obj.Heading, (uint)0
                };                                                                                         // Deathshadow Drudge
                c.EvtInterface.AddEvent(SpawnGO, 100, 1, prms);

                prms = new List <object>()
                {
                    2000561, 1110467, 1120222, 19146, (int)Obj.Heading, (uint)0
                };                                                                                         // Deathshadow Drudge
                c.EvtInterface.AddEvent(SpawnGO, 100, 1, prms);

                c.Say("Arise, my servants, for it is time the Mourkain retake this word!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                //c.IsInvulnerable = true;

                //c.EvtInterface.AddEvent(RemoveBuffs, 30000, 1);

                Stage = 2;

                //c.Say("Stage 2");
            }
            else if (c.Health < c.TotalHealth * 0.7 && Stage < 1 && !c.IsDead)
            {
                var prms = new List <object>()
                {
                    2000876, 1109983, 1119476, 19138, Obj.Heading
                };                                                                               // Deathshadow Construct
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000876, 1110752, 1119141, 19134, Obj.Heading
                };                                                                           // Deathshadow Construct
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000876, 1111016, 1119874, 19145, Obj.Heading
                };                                                                           // Deathshadow Construct
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                prms = new List <object>()
                {
                    2000876, 1110467, 1120222, 19146, Obj.Heading
                };                                                                           // Deathshadow Construct
                c.EvtInterface.AddEvent(SpawnAdds, 100, 1, prms);

                c.Say("Arise, my servants, for it is time the Mourkain retake this word!", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY);

                //c.IsInvulnerable = true;

                //c.EvtInterface.AddEvent(RemoveBuffs, 30000, 1);

                Stage = 1;

                //c.Say("Stage 1");
            }

            return(false);
        }