Пример #1
0
 public void POP1(byte iLevel) // POP1 sera un mot public ... en gros , il suffira de placer POP1(); pour executer ce qu'il contient.
 {
     MOB1 = new ML10POPMob1(); // on execute le script DOL.GS.ML6POPMob1 et on lui donne les valeurs qui suivent et que tu connais
     Random r = new Random();
     MOB1.X = X + r.Next(-100,100);
     MOB1.Y = Y + r.Next(-100, 100);
     MOB1.Z = Z + r.Next(-100, 100);
     MOB1.CurrentRegion = CurrentRegion;
     MOB1.Heading = 3340;
     MOB1.Level = iLevel;
     MOB1.Realm = 0;
     MOB1.Name = "";
     MOB1.Model = 1;
     MOB1.Size = 50;
     MOB1.CurrentSpeed = 0;
     MOB1.MaxSpeedBase = 350;
     MOB1.Name = "Slave";
     MOB1.GuildName = "";
     popbrain = new ML10POPMob1Brain();
     popbrain.AggroLevel = 100;
     popbrain.AggroRange = 3500;
     MOB1.SetOwnBrain(popbrain);
     MOB1.AddToWorld();
 }
Пример #2
0
 public void POP10() // POP1 sera un mot public ... en gros , il suffira de placer POP1(); pour executer ce qu'il contient.S
 {
     MOB1 = new ML10POPMob1(); // on execute le script DOL.GS.ML6POPMob1 et on lui donne les valeurs qui suivent et que tu connais
     MOB1.X = 30005;
     MOB1.Y = 32127;
     MOB1.Z = 16067;
     MOB1.CurrentRegion = CurrentRegion;
     MOB1.Heading = 233;
     MOB1.Level = 1;
     MOB1.Realm = 0;
     MOB1.Name = "";
     MOB1.Model = 1;
     MOB1.CurrentSpeed = 0;
     MOB1.MaxSpeedBase = 350;
     MOB1.GuildName = "";
     MOB1.Size = 1;
     popbrain = new ML10POPMob1Brain();
     popbrain.AggroLevel = 100;
     popbrain.AggroRange = 3500;
     MOB1.SetOwnBrain(popbrain);
     MOB1.AddToWorld();
 }
Пример #3
0
        /// <summary>
        /// Add aggro table of this brain to that of another living.
        /// </summary>
        /// <param name="brain">The target brain.</param>
        public void AddAggroListTo(ML10POPMob1Brain brain)
        {
            // TODO: This should actually be the other way round, but access
            // to m_aggroTable is restricted and needs to be threadsafe.

            // do not modify aggro list if dead
            if (!brain.Body.IsAlive) return;

            lock (m_aggroTable.SyncRoot)
            {
                IDictionaryEnumerator dictEnum = m_aggroTable.GetEnumerator();
                while (dictEnum.MoveNext())
                    brain.AddToAggroList((GameLiving)dictEnum.Key, Body.MaxHealth);
            }
        }