Exemplo n.º 1
0
        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);
                            break;
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        public override void OnObjectLoad(Object Obj)
        {
            this.Obj   = Obj;
            spawnPoint = Obj as Point3D;

            Obj.EvtInterface.AddEventNotify(EventName.OnEnterCombat, OnEnterCombat);
            Obj.EvtInterface.AddEventNotify(EventName.OnLeaveCombat, OnLeaveCombat);

            Obj.EvtInterface.AddEvent(ClearImmunities, 900, 0);

            Creature c = Obj as Creature;

            c.AddCrowdControlImmunity((int)GameData.CrowdControlTypes.All);
        }
Exemplo n.º 3
0
        public override void OnObjectLoad(Object Obj)
        {
            this.Obj   = Obj;
            spawnPoint = Obj as Point3D;

            Obj.EvtInterface.AddEventNotify(EventName.OnEnterCombat, OnEnterCombat);
            Obj.EvtInterface.AddEventNotify(EventName.OnLeaveCombat, OnLeaveCombat);
            Obj.EvtInterface.AddEventNotify(EventName.OnDealDamage, CheckFriendInCombat);

            Obj.EvtInterface.AddEvent(SetRandomTarget, 200, 1);

            Obj.EvtInterface.AddEvent(CheckDespawn, 30 * 1000, 0);

            Creature c = Obj as Creature;

            c.AddCrowdControlImmunity((int)GameData.CrowdControlTypes.All);
        }
Exemplo n.º 4
0
        public override void OnObjectLoad(Object Obj)
        {
            this.Obj   = Obj;
            spawnPoint = Obj as Point3D;

            Obj.EvtInterface.AddEventNotify(EventName.OnEnterCombat, OnEnterCombat);
            Obj.EvtInterface.AddEventNotify(EventName.OnLeaveCombat, OnLeaveCombat);
            Obj.EvtInterface.AddEventNotify(EventName.OnReceiveDamage, CheckHP);
            // Terror

            Obj.EvtInterface.AddEvent(ClearImmunities, 900, 0);
            //Obj.EvtInterface.AddEvent(ApplyTerrorToEveryoneInRadius, 1000, 0);

            Creature c = Obj as Creature;

            c.AddCrowdControlImmunity((int)GameData.CrowdControlTypes.All);
        }
Exemplo n.º 5
0
        public override void OnObjectLoad(Object Obj)
        {
            this.Obj = Obj;
            Obj.EvtInterface.AddEvent(SetRandomTarget, 200, 1);

            Creature c = Obj as Creature;

            var prms = new List <object>()
            {
                Obj, 239
            };                                          // Fist of Gork

            Obj.EvtInterface.AddEvent(LoopVfx, 100, 1, prms);
            Obj.EvtInterface.AddEvent(LoopVfx, 15 * 100, 0, prms); // every 1.5 s
            Obj.EvtInterface.AddEvent(DispellFistOfGork, 30 * 1000, 1);

            c.AddCrowdControlImmunity((int)GameData.CrowdControlTypes.All);
        }
Exemplo n.º 6
0
        public override bool OnEnterCombat(Object npc = null, object instigator = null)
        {
            Creature c = Obj as Creature;

            c.IsInvulnerable = false;
            Stage            = -1;

            Obj.EvtInterface.AddEventNotify(EventName.OnEnterCombat, OnEnterCombat);
            Obj.EvtInterface.AddEventNotify(EventName.OnLeaveCombat, OnLeaveCombat);
            Obj.EvtInterface.AddEventNotify(EventName.OnReceiveDamage, CheckHP);
            Obj.EvtInterface.AddEventNotify(EventName.OnDealDamage, CheckFriendInCombat);

            Obj.EvtInterface.AddEvent(ClearImmunities, 900, 0);

            c.AddCrowdControlImmunity((int)GameData.CrowdControlTypes.All);

            SetRandomTargetToNPC(2000893); // Logazor join fight

            return(false);
        }