Exemplo n.º 1
0
        public override void OnDoubleClick(Mobile from)
        {
            SerpentNest nest = (SerpentNest)this;

            from.Animate(32, 5, 1, true, false, 0);
            if (Utility.RandomDouble() < 0.20)                //% may be off, just a rough guess
            {
                Item RSE = new RareSerpentEgg();
                RSE.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                from.SendLocalizedMessage(1112581);                   // You reach in and find a rare serpent egg!!
                nest.Delete();
            }
            else if (Utility.RandomDouble() >= 0.20)
            {
                switch (Utility.Random(4))
                {
                case 0:
                {
                    from.SendLocalizedMessage(1112578);                       // You try to reach the eggs, but the hole is too deep.
                } break;

                case 1:
                {
                    CoralSnake S1 = new CoralSnake();                      //Not sure of what type or how many snakes it spawns
                    CoralSnake S3 = new CoralSnake();                      //Not sure of what type or how many snakes it spawns
                    S1.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                    S3.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                    from.SendLocalizedMessage(1112577);                       // A swarm of snakes springs forth from the nest and attacks you!!!
                } break;

                case 2:
                {
                    LavaSnake S2 = new LavaSnake();                      //Not sure of what type or how many snakes it spawns
                    LavaSnake S4 = new LavaSnake();                      //Not sure of what type or how many snakes it spawns
                    S2.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                    S4.MoveToWorld(new Point3D(((SerpentNest)this).X, ((SerpentNest)this).Y, ((SerpentNest)this).Z), ((SerpentNest)this).Map);
                    from.SendLocalizedMessage(1112577);                       // A swarm of snakes springs forth from the nest and attacks you!!!
                } break;

                case 3:
                {
                    from.SendLocalizedMessage(1112579);                       // You reach in but clumsily destroy the eggs inside the nest.
                    nest.Delete();
                } break;
                }
            }
        }
Exemplo n.º 2
0
        public void OnChop(Mobile from)
        {
            if (from.InRange(this.GetWorldLocation(), 2))
            {
                Effects.SendLocationEffect(Location, Map, 0x3728, 20, 10);  //smoke or dust
                Effects.PlaySound(Location, Map, 0x11C);

                switch (Utility.Random(12))
                {
                case 0:
                    Effects.SendLocationEffect(from, from.Map, 0x113A, 20, 10);       //Posion Player
                    from.PlaySound(0x231);
                    from.ApplyPoison(from, Poison.Regular);
                    break;

                case 1:
                    Effects.SendLocationEffect(from, from.Map, 0x3709, 30);     //Burn Player
                    from.PlaySound(0x54);
                    AOS.Damage(from, from, Utility.RandomMinMax(10, 40), 0, 100, 0, 0, 0);
                    break;

                case 2:
                    new BarrelLid().MoveToWorld(Location, Map);
                    new BarrelHoops().MoveToWorld(Location, Map);
                    break;

                case 3:
                    Bandage b = new Bandage(Utility.RandomMinMax(50, 100));
                    b.MoveToWorld(Location, Map);
                    break;

                case 4:
                    new BarrelStaves().MoveToWorld(Location, Map);
                    new BarrelHoops().MoveToWorld(Location, Map);
                    break;

                case 5:
                    Gold g = new Gold(Utility.RandomMinMax(100, 1000));
                    g.MoveToWorld(Location, Map);
                    break;

                case 6:
                    new CurePotion().MoveToWorld(Location, Map);
                    break;

                case 7:
                    new GreaterCurePotion().MoveToWorld(Location, Map);
                    break;

                case 8:
                    new HealPotion().MoveToWorld(Location, Map);
                    break;

                case 9:
                    new GreaterHealPotion().MoveToWorld(Location, Map);
                    break;

                case 10:
                    CoralSnake S1 = new CoralSnake();
                    CoralSnake S2 = new CoralSnake();
                    S1.MoveToWorld(new Point3D(((DungeonBarrel)this).X, ((DungeonBarrel)this).Y, ((DungeonBarrel)this).Z), ((DungeonBarrel)this).Map);
                    S2.MoveToWorld(new Point3D(((DungeonBarrel)this).X, ((DungeonBarrel)this).Y, ((DungeonBarrel)this).Z), ((DungeonBarrel)this).Map);
                    from.SendMessage("The barrel was infested with snakes!");
                    break;

                case 11:
                    RottingCorpse S3 = new RottingCorpse();
                    S3.MoveToWorld(new Point3D(((DungeonBarrel)this).X, ((DungeonBarrel)this).Y, ((DungeonBarrel)this).Z), ((DungeonBarrel)this).Map);
                    from.SendMessage("You have awakened a rotting corpse!");
                    break;
                }
                Destroy();
            }
            else
            {
                from.SendLocalizedMessage(500446);   // That is too far away.
            }
        }
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is SerpentNest)
                {
                    SerpentNest nest = (SerpentNest)targeted;

                    from.SendLocalizedMessage(502479);   //The animal walks where it was instructed to.
                    ((BaseCreature)m_Snake).ActiveSpeed  = 0.1;
                    ((BaseCreature)m_Snake).PassiveSpeed = 0.2;
                    ((BaseCreature)m_Snake).ControlOrder = OrderType.Follow;
                    ((BaseCreature)m_Snake).CurrentSpeed = 0.1;
                    ((BaseCreature)m_Snake).MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                    ((BaseCreature)m_Snake).Frozen = true;
                    ((BaseCreature)m_Snake).Say(1112588);   // The snake begins searching for rare eggs.

                    if (Utility.RandomDouble() < 0.25)      //% may be off, just a rough guess
                    {
                        switch (Utility.Random(4))
                        {
                        case 0:
                        {
                            RareSerpentEgg4 RSEB = new RareSerpentEgg4();
                            RSEB.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            ((BaseCreature)m_Snake).Say(1112586);                               // The snake finds a rare egg and drags it out of the nest!
                            nest.Delete();
                        } break;

                        case 1:
                        {
                            RareSerpentEgg3 RSEW = new RareSerpentEgg3();
                            RSEW.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            ((BaseCreature)m_Snake).Say(1112586);                               // The snake finds a rare egg and drags it out of the nest!
                            nest.Delete();
                        } break;

                        case 2:
                        {
                            RareSerpentEgg2 RSER = new RareSerpentEgg2();
                            RSER.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            ((BaseCreature)m_Snake).Say(1112586);                               // The snake finds a rare egg and drags it out of the nest!
                            nest.Delete();
                        } break;

                        case 3:
                        {
                            RareSerpentEgg1 RSEY = new RareSerpentEgg1();
                            RSEY.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            ((BaseCreature)m_Snake).Say(1112586);                               // The snake finds a rare egg and drags it out of the nest!
                            nest.Delete();
                        } break;
                        }
                    }
                    else if (Utility.RandomDouble() >= 0.25)
                    {
                        switch (Utility.Random(4))
                        {
                        case 0:
                        {
                            ((BaseCreature)m_Snake).Say(1112584);                               // The snake searches the nest and finds nothing.
                        } break;

                        case 1:
                        {
                            CoralSnake S1 = new CoralSnake();                              //Not sure of what type or how many snakes it spawns
                            CoralSnake S3 = new CoralSnake();                              //Not sure of what type or how many snakes it spawns
                            S1.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            S3.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            ((BaseCreature)m_Snake).Say(1112585);                               // Beware! The snake has hatched some of the eggs!!
                        } break;

                        case 2:
                        {
                            LavaSnake S2 = new LavaSnake();                              //Not sure of what type or how many snakes it spawns
                            LavaSnake S4 = new LavaSnake();                              //Not sure of what type or how many snakes it spawns
                            S2.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            S4.MoveToWorld(new Point3D(((SerpentNest)targeted).X, ((SerpentNest)targeted).Y, ((SerpentNest)targeted).Z), ((SerpentNest)targeted).Map);
                            ((BaseCreature)m_Snake).Say(1112585);                               // Beware! The snake has hatched some of the eggs!!
                        } break;

                        case 3:
                        {
                            ((BaseCreature)m_Snake).Say(1112583);                               // The nest collapses.
                            nest.Delete();
                        } break;
                        }
                    }

                    ((BaseCreature)m_Snake).Frozen = false;
                    ((BaseCreature)m_Snake).Say(1112181);                       // The charm seems to wear off.
                }
                else
                {
                    return;
                }
                //from.SendLocalizedMessage( 1112176 ); // That is not a snake or serpent.
            }