Ejemplo n.º 1
0
            protected override void OnTick()
            {
                if (DateTime.Now < shutitoff)
                {
                    if (m_Body != null)
                    {
                        m_Body.PublicOverheadMessage(0, m_Owner.SpeechHue, false, "zZz");
                    }
                    if (m_Owner != null)
                    {
                        m_Owner.PlaySound(m_Owner.Female ? 819 : 1093);
                    }

                    //12OCT2006 Added Mana & Health Restore *** START ***
                    if (m_Owner != null)
                    {
                        m_Owner.PlaySound(m_Owner.Female ? 819 : 1093);

                        if (m_Owner.Hits < m_Owner.HitsMax)
                        {
                            m_Owner.Hits += (m_Owner.HitsMax / 10);
                            if (m_Owner.Hits > m_Owner.HitsMax)
                            {
                                m_Owner.Hits = m_Owner.HitsMax;
                            }
                        }

                        if (m_Owner.Stam < m_Owner.StamMax)
                        {
                            m_Owner.Stam += (m_Owner.StamMax / 10);
                            if (m_Owner.Stam > m_Owner.StamMax)
                            {
                                m_Owner.Stam = m_Owner.StamMax;
                            }
                        }

                        if (m_Owner.Mana < m_Owner.ManaMax)
                        {
                            m_Owner.Mana += (m_Owner.ManaMax / 10);
                            if (m_Owner.Mana > m_Owner.ManaMax)
                            {
                                m_Owner.Mana = m_Owner.ManaMax;
                            }
                        }
                    }
                    //12OCT2006 Added Mana & Health Restore *** END   ***
                }
                else
                {
                    Stop();
                    m_Body.PublicOverheadMessage(0, m_Owner.SpeechHue, false, "You fall into a deep, quiet sleep.");
                }
            }
Ejemplo n.º 2
0
 public override void Carve(Mobile from, Item with)
 {
     if (IsAccessibleTo(from))
     {
         with.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1071896); // This is too crude an implement for such a procedure.
     }
 }
            protected override void OnTick()
            {
                ++m_Count;

                if (m_Count == 1)
                {
                    m_Stone.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1005414);                       // The stone settles into the ground.
                }
                else if (m_Count >= 10)
                {
                    m_Stone.Location = new Point3D(m_Stone.X, m_Stone.Y, m_Stone.Z - 1);

                    if (m_Count == 16)
                    {
                        Barracoon bar = new Barracoon();

                        bar.MoveToWorld(m_Location, m_Map);

                        m_Caster.SendMessage("The skull summons the Barracoon.");

                        m_Stone.Delete();
                        Stop();
                    }
                }
            }
Ejemplo n.º 4
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                var pm = from as PlayerMobile;

                if (m_Item.Deleted)
                {
                    return;
                }

                if (targeted is AddonComponent)
                {
                    var addoncomponent = (AddonComponent)targeted;

                    if (addoncomponent is MagicVinesComponent || addoncomponent is StoneWallComponent ||
                        addoncomponent is DungeonWallComponent)
                    {
                        var Xs = addoncomponent.X;

                        if (addoncomponent is MagicVinesComponent)
                        {
                            Xs += -1;
                        }

                        if (addoncomponent.Addon is StoneWallAndVineAddon)
                        {
                            wall        = new SecretStoneWallNS();
                            wallandvine = new StoneWallAndVineAddon();
                        }
                        else if (addoncomponent.Addon is DungeonWallAndVineAddon)
                        {
                            wall        = new SecretDungeonWallNS();
                            wallandvine = new DungeonWallAndVineAddon();
                        }

                        wall.MoveToWorld(new Point3D(Xs, addoncomponent.Y, addoncomponent.Z), addoncomponent.Map);

                        addoncomponent.Delete();

                        m_Item.Consume();

                        wall.PublicOverheadMessage(0, 1358, 1111662);
                        // The acid quickly burns through the writhing wallvines, revealing the strange wall.

                        Timer.DelayCall(TimeSpan.FromSeconds(15.0), delegate
                        {
                            this.wallandvine.MoveToWorld(this.wall.Location, this.wall.Map);

                            this.wall.Delete();
                            this.wallandvine.PublicOverheadMessage(0, 1358, 1111663);
                            // The vines recover from the acid and, spreading like tentacles, reclaim their grip over the wall.
                        });
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1111657); // The acid swiftly burn through it.
                    m_Item.Consume();
                }
            }
Ejemplo n.º 5
0
 protected override void OnTick()
 {
     if (DateTime.Now < shutitoff)
     {
         if (m_Body != null)
         {
             m_Body.PublicOverheadMessage(0, m_Owner.SpeechHue, false, "zZz");
         }
         if (m_Owner != null)
         {
             m_Owner.PlaySound(m_Owner.Female ? 819 : 1093);
         }
     }
     else
     {
         Stop();
         m_Body.PublicOverheadMessage(0, m_Owner.SpeechHue, false, "You fall into a deep, quiet sleep.");
     }
 }
Ejemplo n.º 6
0
            protected override void OnTick()
            {
                ++m_Count;

                if (m_Count == 1)
                {
                    m_Stone.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1005414);                       // The stone settles into the ground.
                }
                else if (m_Count >= 10)
                {
                    m_Stone.Location = new Point3D(m_Stone.X, m_Stone.Y, m_Stone.Z - 1);

                    if (m_Count == 16)
                    {
                        if (!Region.Find(m_Location, m_Map).IsDefault || !Region.Find(m_Location, m_TargetMap).IsDefault)
                        {
                            m_Stone.Movable = true;
                            m_Caster.AddToBackpack(m_Stone);
                            Stop();
                            return;
                        }
                        else if (!m_TargetMap.CanFit(m_Location, 16))
                        {
                            m_Stone.Movable = true;
                            m_Caster.AddToBackpack(m_Stone);
                            Stop();
                            return;
                        }

                        int hue = m_Stone.Hue;

                        if (hue == 0)
                        {
                            hue = Utility.RandomBirdHue();
                        }

                        new MoonstoneGate(m_Location, m_TargetMap, m_Map, m_Caster, hue);
                        new MoonstoneGate(m_Location, m_Map, m_TargetMap, m_Caster, hue);

                        m_Stone.Delete();
                        Stop();
                    }
                }
            }
Ejemplo n.º 7
0
            protected override void OnTick()
            {
                ++m_Count;

                if (m_Count == 1)
                {
                    m_Stone.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1005414);                     // The stone settles into the ground.
                }
                else if (m_Count >= 10)
                {
                    m_Stone.Location = new Point3D(m_Stone.X, m_Stone.Y, m_Stone.Z - 1);

                    if (m_Count == 16)
                    {
                        // latent exploit test - maybe a house preview was dropped at the location
                        if (!m_Map.CanSpawnMobile(m_Location) || !m_Map.CanSpawnMobile(m_Destination))
                        {
                            m_Stone.Movable = true;
                            m_Caster.AddToBackpack(m_Stone);
                            Stop();
                            return;
                        }

                        int hue = m_Stone.Hue;

                        if (hue == 0)
                        {
                            hue = Utility.RandomBirdHue();
                        }

                        new MoonstoneGate(m_Location, m_Map, m_Caster, hue, m_Destination);
                        new MoonstoneGate(m_Destination, m_Map, m_Caster, hue, m_Location);

                        m_Stone.Delete();
                        Stop();
                    }
                }
            }
Ejemplo n.º 8
0
        public void Spawn()
        {
            Map map = Map;

            if (map == null || map == Map.Internal || m_Location == Point3D.Zero || m_Creature == null || m_Creature == "-invalid-")
            {
                return;
            }

            Type type = SpawnerType.GetType((string)m_Creature);

            if (type != null)
            {
                m_NextSpawn = DateTime.Now + m_Delay;

                try
                {
                    object o = Activator.CreateInstance(type);

                    if (o is Mobile)
                    {
                        Mobile m = (Mobile)o;

                        m_Creatures.Add(m);
                        InvalidateProperties();

                        m.Map      = map;
                        m.Location = m_Location;

                        if (m_Message != null)
                        {
                            m.PublicOverheadMessage(MessageType.Regular, 0x76C, false, m_Message);
                        }

                        if (m is BaseCreature)
                        {
                            BaseCreature c = (BaseCreature)m;

                            c.RangeHome = m_HomeRange;

                            if (m_Team > 0)
                            {
                                c.Team = m_Team;
                            }

                            c.Home = m_Location;
                        }
                    }
                    else if (o is Item)
                    {
                        Item item = (Item)o;

                        m_Creatures.Add(item);
                        InvalidateProperties();

                        item.MoveToWorld(m_Location, map);

                        if (m_Message != null)
                        {
                            item.PublicOverheadMessage(MessageType.Regular, 0x76C, false, m_Message);
                        }
                    }
                }
                catch
                {
                    PublicOverheadMessage(MessageType.Regular, 0x3BD, false, string.Format("Exception Caught"));                         // debugging
                }
            }
        }