Esempio n. 1
0
        public void Carve(Mobile from, Item item)
        {
            Effects.PlaySound(GetWorldLocation(), Map, 0x48F);
            Effects.SendLocationEffect(GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0);

            if (0.3 > Utility.RandomDouble())
            {
                if (ItemID == 0x11EA)
                {
                    from.SendMessage("You destroy the Insane Dagger.");
                }
                else
                {
                    from.SendMessage("You destroy the Insane Dagger.");
                }

                Gold gold = new Gold(25, 100);

                gold.MoveToWorld(GetWorldLocation(), Map);

                Delete();

                m_Timer.Stop();
            }
        }
Esempio n. 2
0
		public void Carve( Mobile from, Item item )
		{
			Effects.PlaySound( GetWorldLocation(), Map, 0x48F );
			Effects.SendLocationEffect( GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0 );

			if ( 0.3 > Utility.RandomDouble() )
			{
				if ( ItemID == 0xF7E )
					from.SendMessage( "You destroy the bone." );
				else
					from.SendMessage( "You destroy the bone pile." );

				Gold gold = new Gold( 25, 100 );

				gold.MoveToWorld( GetWorldLocation(), Map );

				Delete();

				m_Timer.Stop();
			}
			else
			{
				if ( ItemID == 0xF7E )
					from.SendMessage( "You damage the bone." );
				else
					from.SendMessage( "You damage the bone pile." );
			}
		}
        public void Carve( Mobile from, Item item )
        {
            Effects.PlaySound( GetWorldLocation(), Map, 0x48F );
            Effects.SendLocationEffect( GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0 );

            if ( breakChance > Utility.RandomDouble() )
            {
                from.SendMessage( "You destroy the skull." );

                if( Utility.RandomDouble() < 0.1 )
                {
                    Gold gold = new Gold( 750, 1000 );
                    gold.MoveToWorld( GetWorldLocation(), Map );
                }

                Delete();

                m_Timer.Stop();
            }
            else
            {
                from.SendMessage( "You damage the skull." );
                breakChance += Utility.RandomDouble() * 0.15 + 0.15;
            }
        }
Esempio n. 4
0
            protected override void OnTick()
            {
                if (cycles == 15)
                {
                    new MovingEffectInfo(new Point3D(corpse.X, corpse.Y, 100), corpse, corpse.Map, 3823, 0, 10,
                                         EffectRender.Lighten)
                    .MovingImpact(
                        e =>
                    {
                        int amount = Utility.RandomMinMax(200, 400);

                        if (amount <= 0)
                        {
                            return;
                        }

                        var g = new Gold(amount);
                        g.MoveToWorld(e.Target.Location, e.Map);

                        new EffectInfo(e.Target, e.Map, 14202, 51, 10, 40, EffectRender.Lighten).Send();
                        Effects.PlaySound(e.Target, e.Map, g.GetDropSound());
                    });
                    Stop();
                    return;
                }
                if (count == 9)
                {
                    count = 1;
                    cycles++;
                }
                corpse.Hue       = Utility.RandomBrightHue();
                corpse.Direction = (Direction)count;
                count++;
            }
Esempio n. 5
0
		public override bool OnBeforeDeath()
		{
			Gold gold = new Gold( Utility.RandomMinMax( 190, 230 ) );
			gold.MoveToWorld( Location, Map );

			Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
			return true;
		}
Esempio n. 6
0
        protected override void OnTick()
        {
            int  z      = n_Map.GetAverageZ(n_X, n_Y);
            bool canFit = n_Map.CanFit(n_X, n_Y, z, 6, false, false);

            for (int i = -3; !canFit && i <= 3; ++i)
            {
                canFit = n_Map.CanFit(n_X, n_Y, z + i, 6, false, false);

                if (canFit)
                {
                    z += i;
                }
            }

            if (!canFit)
            {
                return;
            }

            Gold g = new Gold(1);

            g.MoveToWorld(new Point3D(n_X, n_Y, z), n_Map);


            switch (Utility.Random(3))
            {
            case 0:                     // Fire column
            {
                Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x3709, 10, 30, 5052);
                Effects.PlaySound(g, g.Map, 0x208);
                DoDamage(g, n_MinDamage, n_MaxDamage);

                break;
            }

            case 1:                     // Explosion
            {
                Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x36BD, 20, 10, 5044);
                Effects.PlaySound(g, g.Map, 0x307);
                DoDamage(g, n_MinDamage, n_MaxDamage);

                break;
            }

            case 2:                     // Ball of fire
            {
                Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x36FE, 10, 10, 5052);
                DoDamage(g, n_MinDamage, n_MaxDamage);

                break;
            }
            }
            g.Delete();
        }
Esempio n. 7
0
		public override bool OnBeforeDeath()
		{
			if ( !base.OnBeforeDeath() )
				return false;

			Gold gold = new Gold( Utility.RandomMinMax( 240, 375 ) );
			gold.MoveToWorld( Location, Map );

			Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
			return true;
		}
Esempio n. 8
0
		public override bool OnBeforeDeath()
		{
			Gold gold = new Gold( Utility.RandomMinMax( 190, 230 ) );
			gold.MoveToWorld( Location, Map );

			if ( Utility.Random( 3 ) == 0 )
			{
				BaseBook journal = Loot.RandomTavarasJournal();
				journal.MoveToWorld( Location, Map );
			}

			Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
			return true;
		}
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            if (m_Parent != null && !m_Parent.Deleted)
            {
                m_Parent.Destroy( );
            }
            Item Gold = new Gold(100, 200);

            Gold.MoveToWorld(new Point3D(c.X + Utility.RandomMinMax(-1, 1), c.Y + Utility.RandomMinMax(-1, 1), c.Z), c.Map);

            if (this.Corpse != null && !this.Corpse.Deleted)
            {
                ((Corpse)this.Corpse).Delete();
            }
        }
        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(5))
                {
                case 0:
                    new BarrelLid().MoveToWorld(Location, Map);
                    new BarrelHoops().MoveToWorld(Location, Map);
                    break;

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

                case 2:
                    Gold g1 = new Gold(Utility.RandomMinMax(5, 15));
                    g1.MoveToWorld(Location, Map);
                    break;

                case 3:
                    Gold g2 = new Gold(Utility.RandomMinMax(15, 30));
                    g2.MoveToWorld(Location, Map);
                    break;

                case 4:
                    Gold g3 = new Gold(Utility.RandomMinMax(30, 50));
                    g3.MoveToWorld(Location, Map);
                    break;
                }

                Destroy();
            }
            else
            {
                from.SendLocalizedMessage(500446);                   // That is too far away.
            }
        }
Esempio n. 11
0
        public override bool OnBeforeDeath()
        {
            if (Utility.RandomDouble() < 0.05)
            {
                if (!base.OnBeforeDeath())
                    return false;

                //VileTentacles VT = new VileTentacles();
                //VT.MoveToWorld(Location, Map);
            }

            if (!base.OnBeforeDeath())
                return false;

            var gold = new Gold(Utility.RandomMinMax(1767, 1800));
            gold.MoveToWorld(Location, Map);

            Effects.SendLocationEffect(Location, Map, 0x376A, 10, 1);
            return true;
        }
Esempio n. 12
0
        public void OnDoubleClick(Mobile from, Item item)
        {
            Effects.PlaySound(GetWorldLocation(), Map, 0x25B);
            Effects.SendLocationEffect(GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0);

            if (0.3 > Utility.RandomDouble())
            {
                from.SendMessage("You destroy the egg sac.");

                Gold gold = new Gold(25, 100);

                gold.MoveToWorld(GetWorldLocation(), Map);

                Delete();

                m_Timer.Stop();
            }
            else
            {
                from.SendMessage("You damage the egg sac.");
            }
        }
		public void OnDoubleClick( Mobile from, Item item )
		{
			Effects.PlaySound( GetWorldLocation(), Map, 0x25B );
			Effects.SendLocationEffect( GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0 );

			if ( 0.3 > Utility.RandomDouble() )
			{

				from.SendMessage( "You destroy the egg sac." );

				Gold gold = new Gold( 25, 100 );

				gold.MoveToWorld( GetWorldLocation(), Map );

				Delete();

				m_Timer.Stop();
			}
			else
			{
					from.SendMessage( "You damage the egg sac." );
			}
		}
Esempio n. 14
0
        public void Carve(Mobile from, Item item)
        {
            Effects.PlaySound(GetWorldLocation(), Map, 0x48F);
            Effects.SendLocationEffect(GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0);

            //Change to 50/50 chance you can disarm the egg.
            if (0.5 > Utility.RandomDouble())
            {
                from.SendMessage("You destroy the BonBon egg.");

                Gold gold = new Gold(25, 100);

                gold.MoveToWorld(GetWorldLocation(), Map);

                Delete();

                m_Timer.Stop();
            }
            else
            {
                from.SendMessage("You fail to break the BonBon egg.");
            }
        }
Esempio n. 15
0
        public bool Carve(Mobile from, Item item)
        {
            Effects.PlaySound(GetWorldLocation(), Map, 0x48F);
            Effects.SendLocationEffect(GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0);

            if (0.3 > Utility.RandomDouble())
            {
                from.SendLocalizedMessage(1114322); // You destroy the bone pile.

                Gold gold = new Gold(25, 100);

                gold.MoveToWorld(GetWorldLocation(), Map);

                Delete();
                m_Timer.Stop();
            }
            else
            {
                from.SendLocalizedMessage(1114323); // You damage the bone pile.
            }

            return(true);
        }
Esempio n. 16
0
        public bool Carve(Mobile from, Item item)
        {
            Effects.PlaySound(this.GetWorldLocation(), this.Map, 0x48F);
            Effects.SendLocationEffect(this.GetWorldLocation(), this.Map, 0x3728, 10, 10, 0, 0);

            if (0.3 > Utility.RandomDouble())
            {
                if (this.ItemID == 0xF7E)
                {
                    from.SendMessage("You destroy the bone.");
                }
                else
                {
                    from.SendMessage("You destroy the bone pile.");
                }

                Gold gold = new Gold(25, 100);

                gold.MoveToWorld(this.GetWorldLocation(), this.Map);

                this.Delete();
                this.m_Timer.Stop();
            }
            else
            {
                if (this.ItemID == 0xF7E)
                {
                    from.SendMessage("You damage the bone.");
                }
                else
                {
                    from.SendMessage("You damage the bone pile.");
                }
            }

            return(true);
        }
Esempio n. 17
0
        public void Carve(Mobile from, Item item)
        {
            Effects.PlaySound(GetWorldLocation(), Map, 86);
            Effects.SendLocationEffect(GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0);

            if (0.3 > Utility.RandomDouble())
            {
                if (ItemID == 0x2809)
                {
                    from.SendMessage("You destroy the gate.");
                }
                else
                {
                    from.SendMessage("You destroy the earthcalling gate.");
                }

                Gold gold = new Gold(25, 100);

                gold.MoveToWorld(GetWorldLocation(), Map);

                Delete();

                m_Timer.Stop();
            }
            else
            {
                if (ItemID == 0x2809)
                {
                    from.SendMessage("You damage the gate.");
                }
                else
                {
                    from.SendMessage("You damage the earthcalling gate.");
                }
            }
        }
Esempio n. 18
0
        public void Carve(Mobile from, Item item)
        {
            Effects.PlaySound(GetWorldLocation(), Map, 0x48F);
            Effects.SendLocationEffect(GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0);

            //Change to 50/50 chance you can disarm the egg.
            if (0.5 > Utility.RandomDouble())
            {

                from.SendMessage("You destroy the BonBon egg.");

                Gold gold = new Gold(25, 100);

                gold.MoveToWorld(GetWorldLocation(), Map);

                Delete();

                m_Timer.Stop();
            }
            else
            {
                from.SendMessage("You fail to break the BonBon egg.");
            }
        }
Esempio n. 19
0
        public void Carve(Mobile from, Item item)
        {
            Effects.PlaySound(GetWorldLocation(), Map, 0x48F);
            Effects.SendLocationEffect(GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0);

            if (Utility.RandomDouble() < 0.3)
            {
                if (ItemID == 0xF7E)
                {
                    from.SendMessage("You destroy the bone.");
                }
                else
                {
                    from.SendMessage("You destroy the bone pile.");
                }

                var gold = new Gold(25, 100);

                gold.MoveToWorld(GetWorldLocation(), Map);

                Delete();

                m_Timer.Stop();
            }
            else
            {
                if (ItemID == 0xF7E)
                {
                    from.SendMessage("You damage the bone.");
                }
                else
                {
                    from.SendMessage("You damage the bone pile.");
                }
            }
        }
Esempio n. 20
0
		public override bool OnBeforeDeath()
		{
			Gold gold = new Gold( Utility.RandomMinMax( 190, 230 ) );
			gold.MoveToWorld( Location, Map );

			Container pack = this.Backpack;
			if ( pack != null )
			{
				pack.Movable = true;
				pack.MoveToWorld( Location, Map );
			}

			Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
			return true;
		}
Esempio n. 21
0
        public virtual bool CheckAtDestination()
        {
            Mobile escorter = GetEscorter();

            if ( escorter == null )
                return false;

            if ( IsAtDest() )
            {
                Say( 1042809, escorter.Name ); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.

                // not going anywhere
                m_Destination = null;
                m_DestinationString = null;

                Container cont = escorter.Backpack;

                if ( cont == null )
                    cont = escorter.BankBox;

                Gold gold = new Gold( GetGoldAmount() );

                if ( cont == null || !cont.TryDropItem( escorter, gold, false ) )
                    gold.MoveToWorld( escorter.Location, escorter.Map );

                StopFollow();
                SetControlMaster( null );
                BeginDelete();

                Misc.Titles.AlterNotoriety( escorter, 1, NotoCap.Honorable );
                return true;
            }

            return false;
        }
Esempio n. 22
0
        public override bool OnMoveOver(Mobile m)
        {
            if (m is PlayerMobile && m.AccessLevel == AccessLevel.Player && !m.Blessed)
            {
                if (m.Alive && m.CheckSkill(SkillName.DetectHidden, 0, 100))
                {
                    m.LocalOverheadMessage(Network.MessageType.Emote, 0x3B2, false, "Your eye catches something nearby.");
                    Map map = m.Map;
                    string where = Server.Misc.Worlds.GetRegionName(m.Map, m.Location);

                    int money = Utility.RandomMinMax(100, 200);

                    int level = (int)(m.Skills[SkillName.DetectHidden].Value / 10);
                    if (level < 1)
                    {
                        level = 1;
                    }
                    if (level > 10)
                    {
                        level = 10;
                    }

                    switch (Utility.RandomMinMax(1, level))
                    {
                    case 1: level = 1; break;

                    case 2: level = 2; break;

                    case 3: level = 3; break;

                    case 4: level = 4; break;

                    case 5: level = 5; break;

                    case 6: level = 6; break;

                    case 7: level = 7; break;

                    case 8: level = 8; break;

                    case 9: level = 9; break;

                    case 10: level = 10; break;
                    }

                    if (Utility.RandomMinMax(1, 3) > 1)
                    {
                        Gold coins = new Gold((money * level));

                        bool    validLocation = false;
                        Point3D loc           = this.Location;

                        for (int j = 0; !validLocation && j < 10; ++j)
                        {
                            int x = X + Utility.Random(3) - 1;
                            int y = Y + Utility.Random(3) - 1;
                            int z = map.GetAverageZ(x, y);

                            if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                            {
                                loc = new Point3D(x, y, Z);
                            }
                            else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                            {
                                loc = new Point3D(x, y, z);
                            }
                        }

                        coins.MoveToWorld(loc, map);
                        Effects.SendLocationParticles(EffectItem.Create(coins.Location, coins.Map, EffectItem.DefaultDuration), 0x376A, 9, 32, 5024);
                        Effects.PlaySound(coins.Location, coins.Map, 0x1FA);
                    }
                    else
                    {
                        HiddenBox mBox = new HiddenBox(level, where, m);

                        bool    validLocation = false;
                        Point3D loc           = this.Location;

                        for (int j = 0; !validLocation && j < 10; ++j)
                        {
                            int x = X + Utility.Random(3) - 1;
                            int y = Y + Utility.Random(3) - 1;
                            int z = map.GetAverageZ(x, y);

                            if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                            {
                                loc = new Point3D(x, y, Z);
                            }
                            else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                            {
                                loc = new Point3D(x, y, z);
                            }
                        }

                        mBox.MoveToWorld(loc, map);
                        Effects.SendLocationParticles(EffectItem.Create(mBox.Location, mBox.Map, EffectItem.DefaultDuration), 0x376A, 9, 32, 5024);
                        Effects.PlaySound(mBox.Location, mBox.Map, 0x1FA);
                    }
                }
            }

            this.Delete();
            return(true);
        }
Esempio n. 23
0
            protected override void OnTick()
            {
                if (cycles == 15)
                {
                    new MovingEffectInfo(new Point3D(corpse.X, corpse.Y, 100), corpse, corpse.Map, 3823, 0, 10,
                        EffectRender.Lighten)
                        .MovingImpact(
                            e =>
                            {
                                int amount = Utility.RandomMinMax(200, 400);

                                if (amount <= 0)
                                {
                                    return;
                                }

                                var g = new Gold(amount);
                                g.MoveToWorld(e.Target.Location, e.Map);

                                new EffectInfo(e.Target, e.Map, 14202, 51, 10, 40, EffectRender.Lighten).Send();
                                Effects.PlaySound(e.Target, e.Map, g.GetDropSound());
                            });
                    Stop();
                    return;
                }
                if (count == 9)
                {
                    count = 1;
                    cycles++;
                }
                corpse.Hue = Utility.RandomBrightHue();
                corpse.Direction = (Direction) count;
                count++;
            }
Esempio n. 24
0
        public void DropResource(int x, int y, int z, Map map)
        {
            Item Gold = new Gold(100, 200);
            Gold.MoveToWorld(new Point3D(x + Utility.RandomMinMax(-1, 1), y + Utility.RandomMinMax(-1, 1), z), map);

            Item item;

            switch (m_ResType)
            {
                case ResType.Iron:
                    {
                        item = new IronIngot();
                        item.MoveToWorld(new Point3D(x + Utility.RandomMinMax(-1, 1), y + Utility.RandomMinMax(-1, 1), z), map);
                        item.Amount = 100; break;
                    };
                case ResType.Copper:
                    {
                        item = new CopperIngot();
                        item.MoveToWorld(new Point3D(x + Utility.RandomMinMax(-1, 1), y + Utility.RandomMinMax(-1, 1), z), map);
                        item.Amount = 100; break;
                    };
            }
        }
Esempio n. 25
0
        public static void EndGoldExplosion(
            ExplodeFX fx, Point3D center, Map map, int range, int minGold, int maxGold, int[] dropSounds = null)
        {
            BaseExplodeEffect efx = fx.CreateInstance(center, map, range);

            if (efx == null)
            {
                return;
            }

            efx.AverageZ = false;

            efx.Callback = () =>
            {
                var points = new List<Point3D>();

                center.ScanRange(
                    map,
                    range,
                    r =>
                    {
                        if (!r.Excluded)
                        {
                            if (r.QueryMap.CanFit(r.Current, 1, false, false) || r.QueryMap.HasWater(r.Current))
                            {
                                points.Add(r.Current);
                            }
                            else
                            {
                                r.Exclude();
                            }
                        }

                        return false;
                    });

                if (points.Count == 0)
                {
                    return;
                }

                dropSounds = dropSounds ?? new[] {553, 554};

                Timer goldTimer = null;

                goldTimer = Timer.DelayCall(
                    TimeSpan.FromSeconds(1),
                    TimeSpan.FromMilliseconds(100),
                    points.Count,
                    () =>
                    {
                        if (points.Count == 0)
                        {
                            if (goldTimer != null)
                            {
                                goldTimer.Running = false;
                                goldTimer = null;
                            }

                            return;
                        }

                        Point3D p = points.GetRandom();
                        points.Remove(p);

                        Effects.PlaySound(p, map, dropSounds.GetRandom());

                        new MovingEffectInfo(p.Clone3D(0, 0, Utility.RandomMinMax(30, 50)), p, map, 3823, 0, 10,
                            EffectRender.Lighten)
                            .MovingImpact(
                                e =>
                                {
                                    int amount = Utility.RandomMinMax(minGold, maxGold);

                                    if (amount <= 0)
                                    {
                                        return;
                                    }

                                    var g = new Gold(amount);
                                    g.MoveToWorld(e.Target.Location, e.Map);

                                    new EffectInfo(e.Target, e.Map, 14202, 51, 10, 40, EffectRender.Lighten).Send();
                                    Effects.PlaySound(e.Target, e.Map, g.GetDropSound());
                                });
                    });
            };

            efx.Send();
        }
Esempio n. 26
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.
            }
        }
Esempio n. 27
0
        public virtual bool CheckAtDestination()
        {
            EDI dest = GetDestination();

            if ( dest == null )
                return false;

            Mobile escorter = GetEscorter();

            if ( escorter == null )
                return false;

            if ( dest.Contains( Location ) )
            {
                Say( true, String.Format("We have arrived! I thank thee, {0} I have no further need of thy services. Here is thy pay.", escorter.Name ) ); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.

                // not going anywhere
                m_Destination = null;
                m_DestinationString = null;

                Container cont = escorter.Backpack;

                if ( cont == null )
                    cont = escorter.BankBox;

                Gold gold = new Gold( 500, 750 );

                if ( !cont.TryDropItem( escorter, gold, false ) )
                    gold.MoveToWorld( escorter.Location, escorter.Map );

                StopFollow();
                SetControlMaster( null );
                m_EscortTable.Remove( escorter );
                BeginDelete();

                Misc.Titles.AwardKarma( escorter, 10, true );

                return true;
            }

            return false;
        }
Esempio n. 28
0
			protected override void OnTick()
			{
				int z = m_Map.GetAverageZ( m_X, m_Y );
				bool canFit = m_Map.CanFit( m_X, m_Y, z, 6, false, false );

				for ( int i = -3; !canFit && i <= 3; ++i )
				{
					canFit = m_Map.CanFit( m_X, m_Y, z + i, 6, false, false );

					if ( canFit )
						z += i;
				}

				if ( !canFit )
					return;

				Gold g = new Gold( 500, 1000 );
				
				g.MoveToWorld( new Point3D( m_X, m_Y, z ), m_Map );

				if ( 0.5 >= Utility.RandomDouble() )
				{
					switch ( Utility.Random( 3 ) )
					{
						case 0: // Fire column
						{
							Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x3709, 10, 30, 5052 );
							Effects.PlaySound( g, g.Map, 0x208 );

							break;
						}
						case 1: // Explosion
						{
							Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36BD, 20, 10, 5044 );
							Effects.PlaySound( g, g.Map, 0x307 );

							break;
						}
						case 2: // Ball of fire
						{
							Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36FE, 10, 10, 5052 );

							break;
						}
					}
				}
			}
Esempio n. 29
0
        public void OnChop(Mobile from)
        //public override void OnDoubleClick(Mobile from) I'd rather had this work, oh well.
        {
            Effects.SendLocationEffect(Location, Map, 0x3728, 20, 10);      //smoke or dust
            Effects.PlaySound(Location, Map, 573);

            switch (Utility.Random(76))      //picks one of the following
            {
            case 0:
                Effects.SendLocationEffect(from, from.Map, 0x113A, 20, 10);
                from.PlaySound(0x231);
                from.LocalOverheadMessage(MessageType.Regular, 0x44, 1010523);           // A toxic vapor envelops thee.
                from.ApplyPoison(from, Poison.Greater);
                break;

            case 1:
                Effects.SendLocationEffect(from, from.Map, 0x3709, 30);
                from.PlaySound(0x54);
                from.LocalOverheadMessage(MessageType.Regular, 0xEE, 1010524);           // Searing heat scorches thy skin.
                AOS.Damage(from, from, Utility.RandomMinMax(70, 90), 0, 100, 0, 0, 0);
                break;

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

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

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

            case 5:
                Gold g = new Gold(Utility.Random(500));         //Random amount of gold 0 - 500
                g.MoveToWorld(Location, Map);
                break;

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

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

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

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

            case 10:
                new DarkIronWire().MoveToWorld(Location, Map);
                break;

            case 11:
                new EnergyVortexScroll().MoveToWorld(Location, Map);
                break;

            case 12:
                new SummonCreatureScroll().MoveToWorld(Location, Map);
                break;

            case 13:
                new CreateFoodScroll().MoveToWorld(Location, Map);
                break;

            case 14:
                new RecallScroll().MoveToWorld(Location, Map);
                break;

            case 15:
                new CureScroll().MoveToWorld(Location, Map);
                break;

            case 16:
                new GateTravelScroll().MoveToWorld(Location, Map);
                break;

            case 17:
                new InvisibilityScroll().MoveToWorld(Location, Map);
                break;

            case 18:
                new BlessScroll().MoveToWorld(Location, Map);
                break;

            case 19:
                new PotionKeg().MoveToWorld(Location, Map);
                break;

            case 20:
                new Bedroll().MoveToWorld(Location, Map);
                break;

            case 21:
                new SturdyShovel().MoveToWorld(Location, Map);
                break;

            case 22:
                new Slime().MoveToWorld(Location, Map);
                break;

            case 23:
                new IDWand().MoveToWorld(Location, Map);
                break;

            case 24:
                new SpecialHairDye().MoveToWorld(Location, Map);
                break;

            case 25:
                new Torch().MoveToWorld(Location, Map);
                break;

            case 26:
                new NameChangeDeed().MoveToWorld(Location, Map);
                break;

            case 27:
                new Torso().MoveToWorld(Location, Map);
                break;

            case 28:
                Gold n = new Gold(Utility.Random(5000));         //Random amount of gold 0 - 5000
                n.MoveToWorld(Location, Map);
                break;

            case 29:
                Gold m = new Gold(Utility.Random(300));         //Random amount of gold 0 - 3000
                m.MoveToWorld(Location, Map);
                break;

            case 30:
                Gold i = new Gold(Utility.Random(10000));         //Random amount of gold 0 - 10000
                i.MoveToWorld(Location, Map);
                break;

            case 31:
                from.PlaySound(0x223);
                from.LocalOverheadMessage(MessageType.Regular, 0x62, 1010525);           // Pain lances through thee from a sharp metal blade.
                AOS.Damage(from, from, Utility.RandomMinMax(40, 70), 100, 0, 0, 0, 0);
                break;

            case 32:
                from.BoltEffect(0);
                from.LocalOverheadMessage(MessageType.Regular, 0xDA, 1010526);           // Lightning arcs through thy body.
                AOS.Damage(from, from, Utility.RandomMinMax(60, 80), 0, 0, 0, 0, 100);
                break;

            case 33:
                Effects.SendLocationEffect(from, from.Map, 0x113A, 20, 10);
                from.PlaySound(0x231);
                from.LocalOverheadMessage(MessageType.Regular, 0x44, 1010523);           // A toxic vapor envelops thee.
                from.ApplyPoison(from, Poison.Greater);
                break;

            case 34:
                Effects.SendLocationEffect(from, from.Map, 0x113A, 20, 10);
                from.PlaySound(0x231);
                from.LocalOverheadMessage(MessageType.Regular, 0x44, 1010523);           // A toxic vapor envelops thee.
                from.ApplyPoison(from, Poison.Greater);
                break;

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

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

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

            case 38:
                new Slime().MoveToWorld(Location, Map);
                break;

            case 39:
                new Slime().MoveToWorld(Location, Map);
                break;

            case 40:
                new Zombie().MoveToWorld(Location, Map);
                break;

            case 41:
                from.BoltEffect(0);
                from.LocalOverheadMessage(MessageType.Regular, 0xDA, 1010526);           // Lightning arcs through thy body.
                AOS.Damage(from, from, Utility.RandomMinMax(60, 80), 0, 0, 0, 0, 100);
                break;

            case 42:
                from.BoltEffect(0);
                from.LocalOverheadMessage(MessageType.Regular, 0xDA, 1010526);           // Lightning arcs through thy body.
                AOS.Damage(from, from, Utility.RandomMinMax(60, 80), 0, 0, 0, 0, 100);
                break;

            case 43:
                new ContainerBones().MoveToWorld(Location, Map);
                break;

            case 44:
                new FameIounStone().MoveToWorld(Location, Map);
                break;

            case 45:
                new KarmaIounStone().MoveToWorld(Location, Map);
                break;

            case 46:
                new AcidPool().MoveToWorld(Location, Map);
                break;

            case 47:
                new DaemonGate().MoveToWorld(Location, Map);
                break;

            case 48:
                new Diamond().MoveToWorld(Location, Map);
                break;

            case 49:
                new Sapphire().MoveToWorld(Location, Map);
                break;

            case 50:
                new Ruby().MoveToWorld(Location, Map);
                break;

            case 51:
                new Amber().MoveToWorld(Location, Map);
                break;

            case 52:
                new StarSapphire().MoveToWorld(Location, Map);
                break;

            case 53:
                new Emerald().MoveToWorld(Location, Map);
                break;

            case 54:
                new Amethyst().MoveToWorld(Location, Map);
                break;

            case 55:
                new Tourmaline().MoveToWorld(Location, Map);
                break;

            case 56:
                new Citrine().MoveToWorld(Location, Map);
                break;

            case 57:
                new MessageInABottle().MoveToWorld(Location, Map);
                break;

            case 58:
                from.PlaySound(0x223);
                from.LocalOverheadMessage(MessageType.Regular, 0x62, 1010525);           // Pain lances through thee from a sharp metal blade.
                AOS.Damage(from, from, Utility.RandomMinMax(40, 90), 100, 0, 0, 0, 0);
                break;

            case 59:
                from.PlaySound(0x223);
                from.LocalOverheadMessage(MessageType.Regular, 0x62, 1010525);           // Pain lances through thee from a sharp metal blade.
                AOS.Damage(from, from, Utility.RandomMinMax(10, 90), 100, 0, 0, 0, 0);
                break;

            case 60:
                Effects.SendLocationEffect(from, from.Map, 0x3709, 30);
                from.PlaySound(0x54);
                from.LocalOverheadMessage(MessageType.Regular, 0xEE, 1010524);           // Searing heat scorches thy skin.
                AOS.Damage(from, from, Utility.RandomMinMax(70, 90), 0, 100, 0, 0, 0);
                break;

            case 61:
                Effects.SendLocationEffect(from, from.Map, 0x3709, 30);
                from.PlaySound(0x54);
                from.LocalOverheadMessage(MessageType.Regular, 0xEE, 1010524);           // Searing heat scorches thy skin.
                AOS.Damage(from, from, Utility.RandomMinMax(70, 90), 0, 100, 0, 0, 0);
                break;

            case 62:
                new Jwilson().MoveToWorld(Location, Map);
                break;

            case 63:
                new Jwilson().MoveToWorld(Location, Map);
                break;

            case 64:
                new Jwilson().MoveToWorld(Location, Map);
                break;

            case 65:
                new Jwilson().MoveToWorld(Location, Map);
                break;

            case 66:
                new Jwilson().MoveToWorld(Location, Map);
                break;

            case 67:
                new Jwilson().MoveToWorld(Location, Map);
                break;

            case 68:
                new Jwilson().MoveToWorld(Location, Map);
                break;

            case 69:
                new Jwilson().MoveToWorld(Location, Map);
                break;

            case 70:
                new Zombie().MoveToWorld(Location, Map);
                break;

            case 71:
                new TreasureMap(1, Map.Felucca).MoveToWorld(Location, Map);
                break;

            case 72:
                new TreasureMap(2, Map.Felucca).MoveToWorld(Location, Map);
                break;

            case 73:
                new TreasureMap(3, Map.Felucca).MoveToWorld(Location, Map);
                break;

            case 74:
                new TreasureMap(4, Map.Felucca).MoveToWorld(Location, Map);
                break;

            case 75:
                new TreasureMap(5, Map.Felucca).MoveToWorld(Location, Map);
                break;
            }
            Destroy();
        }
		public void OnChop( Mobile from )
        //public override void OnDoubleClick(Mobile from) I'd rather had this work, oh well.
			{
                Effects.SendLocationEffect( Location, Map, 0x3728, 20, 10); //smoke or dust
                Effects.PlaySound( Location, Map, 573 );

                switch (Utility.Random(76))  //picks one of the following
                {
                    case 0:
			Effects.SendLocationEffect( from, from.Map, 0x113A, 20, 10 );
			from.PlaySound( 0x231 );
			from.LocalOverheadMessage( MessageType.Regular, 0x44, 1010523 ); // A toxic vapor envelops thee.
			from.ApplyPoison( from, Poison.Greater );
			break;
                    case 1:
			Effects.SendLocationEffect( from, from.Map, 0x3709, 30 );
			from.PlaySound( 0x54 );
			from.LocalOverheadMessage( MessageType.Regular, 0xEE, 1010524 ); // Searing heat scorches thy skin.
			AOS.Damage( from, from, Utility.RandomMinMax( 70, 90 ), 0, 100, 0, 0, 0 );
			break;
                    case 2:
                        new BarrelLid().MoveToWorld(Location, Map);
                        break;
                    case 3:
                        new BarrelHoops().MoveToWorld(Location, Map);
                        break;
                    case 4:
                        new BarrelStaves().MoveToWorld(Location, Map);
                        break;
                    case 5:
                        Gold g = new Gold(Utility.Random(500)); //Random amount of gold 0 - 500
                        g.MoveToWorld(Location, Map);
                        break;
                    case 6:
                        new NightSightPotion().MoveToWorld(Location, Map);
                        break;
                    case 7:
                        new GreaterCurePotion().MoveToWorld(Location, Map);
                        break;
                    case 8:
                        new TotalRefreshPotion().MoveToWorld(Location, Map);
                        break;
                    case 9:
                        new GreaterHealPotion().MoveToWorld(Location, Map);
                        break;
                    case 10:
                        new DarkIronWire().MoveToWorld(Location, Map);
                        break;
                    case 11:
                        new EnergyVortexScroll().MoveToWorld(Location, Map);
                        break;
                    case 12:
                        new SummonCreatureScroll().MoveToWorld(Location, Map);
                        break;
                    case 13:
                        new CreateFoodScroll().MoveToWorld(Location, Map);
                        break;
                    case 14:
                        new RecallScroll().MoveToWorld(Location, Map);
                        break;
                    case 15:
                        new CureScroll().MoveToWorld(Location, Map);
                        break;
                    case 16:
                        new GateTravelScroll().MoveToWorld(Location, Map);
                        break;
                    case 17:
                        new InvisibilityScroll().MoveToWorld(Location, Map);
                        break;
                    case 18:
                        new BlessScroll().MoveToWorld(Location, Map);
                        break;
                    case 19:
                        new PotionKeg().MoveToWorld(Location, Map);
                        break;
                    case 20:
                        new Bedroll().MoveToWorld(Location, Map);
                        break;
                    case 21:
                        new SturdyShovel().MoveToWorld(Location, Map);
                        break;
                    case 22:
                        new Slime().MoveToWorld(Location, Map);
                        break;
                    case 23:
                        new IDWand().MoveToWorld(Location, Map);
                        break;
                    case 24:
                        new SpecialHairDye().MoveToWorld(Location, Map);
                        break;
                    case 25:
                        new Torch().MoveToWorld(Location, Map);
                        break;
                    case 26:
                        new NameChangeDeed().MoveToWorld(Location, Map);
                        break;
                    case 27:
                        new Torso().MoveToWorld(Location, Map);
                        break;
                    case 28:
                        Gold n = new Gold(Utility.Random(5000)); //Random amount of gold 0 - 5000
                        n.MoveToWorld(Location, Map);
                        break;
                    case 29:
                        Gold m = new Gold(Utility.Random(300)); //Random amount of gold 0 - 3000
                        m.MoveToWorld(Location, Map);
                        break;
                    case 30:
                        Gold i = new Gold(Utility.Random(10000)); //Random amount of gold 0 - 10000
                        i.MoveToWorld(Location, Map);
                        break;
                    case 31:
			from.PlaySound( 0x223 );
			from.LocalOverheadMessage( MessageType.Regular, 0x62, 1010525 ); // Pain lances through thee from a sharp metal blade.
			AOS.Damage( from, from, Utility.RandomMinMax( 40, 70 ), 100, 0, 0, 0, 0 );
			break;
                    case 32:
			from.BoltEffect( 0 );
			from.LocalOverheadMessage( MessageType.Regular, 0xDA, 1010526 ); // Lightning arcs through thy body.
			AOS.Damage( from, from, Utility.RandomMinMax( 60, 80 ), 0, 0, 0, 0, 100 );
			break;
                    case 33:
			Effects.SendLocationEffect( from, from.Map, 0x113A, 20, 10 );
			from.PlaySound( 0x231 );
			from.LocalOverheadMessage( MessageType.Regular, 0x44, 1010523 ); // A toxic vapor envelops thee.
			from.ApplyPoison( from, Poison.Greater );
			break;
                    case 34:
			Effects.SendLocationEffect( from, from.Map, 0x113A, 20, 10 );
			from.PlaySound( 0x231 );
			from.LocalOverheadMessage( MessageType.Regular, 0x44, 1010523 ); // A toxic vapor envelops thee.
			from.ApplyPoison( from, Poison.Greater );
			break;
                    case 35:
                        new BarrelLid().MoveToWorld(Location, Map);
                        break;
                    case 36:
                        new BarrelStaves().MoveToWorld(Location, Map);
                        break;
                    case 37:
                        new BarrelLid().MoveToWorld(Location, Map);
                        break;
                    case 38:
			new Slime().MoveToWorld( Location, Map );
                        break;
                    case 39:
			new Slime().MoveToWorld( Location, Map );
                        break;
                    case 40:
			new Zombie().MoveToWorld( Location, Map );
                        break;
                    case 41:
			from.BoltEffect( 0 );
			from.LocalOverheadMessage( MessageType.Regular, 0xDA, 1010526 ); // Lightning arcs through thy body.
			AOS.Damage( from, from, Utility.RandomMinMax( 60, 80 ), 0, 0, 0, 0, 100 );
			break;
                    case 42:
			from.BoltEffect( 0 );
			from.LocalOverheadMessage( MessageType.Regular, 0xDA, 1010526 ); // Lightning arcs through thy body.
			AOS.Damage( from, from, Utility.RandomMinMax( 60, 80 ), 0, 0, 0, 0, 100 );
			break;
                    case 43:
                        new ContainerBones().MoveToWorld(Location, Map);
                        break;
                    case 44:
                        new FameIounStone().MoveToWorld(Location, Map);
                        break;
                    case 45:
                        new KarmaIounStone().MoveToWorld(Location, Map);
                        break;
                    case 46:
                        new AcidPool().MoveToWorld(Location, Map);
                        break;
                    case 47:
                        new DaemonGate().MoveToWorld(Location, Map);
                        break;
                    case 48:
                        new Diamond().MoveToWorld(Location, Map);
                        break;
                    case 49:
                        new Sapphire().MoveToWorld(Location, Map);
                        break;
                    case 50:
                        new Ruby().MoveToWorld(Location, Map);
                        break;
                    case 51:
                        new Amber().MoveToWorld(Location, Map);
                        break;
                    case 52:
                        new StarSapphire().MoveToWorld(Location, Map);
                        break;
                    case 53:
                        new Emerald().MoveToWorld(Location, Map);
                        break;
                    case 54:
                        new Amethyst().MoveToWorld(Location, Map);
                        break;
                    case 55:
                        new Tourmaline().MoveToWorld(Location, Map);
                        break;
                    case 56:
                        new Citrine().MoveToWorld(Location, Map);
                        break;
                    case 57:
                        new MessageInABottle().MoveToWorld(Location, Map);
                        break;
                    case 58:
			from.PlaySound( 0x223 );
			from.LocalOverheadMessage( MessageType.Regular, 0x62, 1010525 ); // Pain lances through thee from a sharp metal blade.
			AOS.Damage( from, from, Utility.RandomMinMax( 40, 90 ), 100, 0, 0, 0, 0 );
			break;
                    case 59:
			from.PlaySound( 0x223 );
			from.LocalOverheadMessage( MessageType.Regular, 0x62, 1010525 ); // Pain lances through thee from a sharp metal blade.
			AOS.Damage( from, from, Utility.RandomMinMax( 10, 90 ), 100, 0, 0, 0, 0 );
			break;
                    case 60:
			Effects.SendLocationEffect( from, from.Map, 0x3709, 30 );
			from.PlaySound( 0x54 );
			from.LocalOverheadMessage( MessageType.Regular, 0xEE, 1010524 ); // Searing heat scorches thy skin.
			AOS.Damage( from, from, Utility.RandomMinMax( 70, 90 ), 0, 100, 0, 0, 0 );
			break;
                    case 61:
			Effects.SendLocationEffect( from, from.Map, 0x3709, 30 );
			from.PlaySound( 0x54 );
			from.LocalOverheadMessage( MessageType.Regular, 0xEE, 1010524 ); // Searing heat scorches thy skin.
			AOS.Damage( from, from, Utility.RandomMinMax( 70, 90 ), 0, 100, 0, 0, 0 );
			break;
                    case 62:
			new Jwilson().MoveToWorld( Location, Map );
                        break;
                    case 63:
			new Jwilson().MoveToWorld( Location, Map );
                        break;
                    case 64:
			new Jwilson().MoveToWorld( Location, Map );
                        break;
                    case 65:
			new Jwilson().MoveToWorld( Location, Map );
                        break;
                    case 66:
			new Jwilson().MoveToWorld( Location, Map );
                        break;
                    case 67:
			new Jwilson().MoveToWorld( Location, Map );
                        break;
                    case 68:
			new Jwilson().MoveToWorld( Location, Map );
                        break;
                    case 69:
			new Jwilson().MoveToWorld( Location, Map );
                        break;
                    case 70:
			new Zombie().MoveToWorld( Location, Map );
                        break;
                    case 71:
                        new TreasureMap( 1, Map.Felucca ).MoveToWorld(Location, Map);
                        break;
                    case 72:
                        new TreasureMap( 2, Map.Felucca ).MoveToWorld(Location, Map);
                        break;
                    case 73:
                        new TreasureMap( 3, Map.Felucca ).MoveToWorld(Location, Map);
                        break;
                    case 74:
                        new TreasureMap( 4, Map.Felucca ).MoveToWorld(Location, Map);
                        break;
                    case 75:
                        new TreasureMap( 5, Map.Felucca ).MoveToWorld(Location, Map);
                        break;
                }
                Destroy();
			}
        public override bool OnBeforeDeath()
        {
            Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
            Gold g = new Gold( 900, 1000 );
            g.MoveToWorld( new Point3D( X, Y, Z ), Map );

            return true;
        }
Esempio n. 32
0
        public override void OnDeath( Container c )
        {
            base.OnDeath( c );

            if( m_Parent != null && !m_Parent.Deleted ) {
                m_Parent.Destroy( );
            }
            Item Gold = new Gold( 100, 200 );
            Gold.MoveToWorld( new Point3D( c.X + Utility.RandomMinMax( -1, 1 ), c.Y + Utility.RandomMinMax( -1, 1 ), c.Z ), c.Map );

            if( this.Corpse != null && !this.Corpse.Deleted ) {
                ((Corpse)this.Corpse).Delete();
            }
        }
Esempio n. 33
0
        public virtual bool CheckAtDestination()
        {
            EDI dest = GetDestination();

            if ( dest == null )
                return false;

            Mobile escorter = GetEscorter();

            if ( escorter == null )
                return false;

            if ( dest.Contains( Location ) )
            {
                Say( 1042809, escorter.Name ); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.

                // not going anywhere
                m_Destination = null;
                m_DestinationString = null;

                Container cont = escorter.Backpack;

                if ( cont == null )
                    cont = escorter.BankBox;

                Gold gold = new Gold( 500, 1000 );

                if ( cont == null || !cont.TryDropItem( escorter, gold, false ) )
                    gold.MoveToWorld( escorter.Location, escorter.Map );

                StopFollow();
                SetControlMaster( null );
                m_EscortTable.Remove( escorter );
                BeginDelete();

                Misc.Titles.AwardFame( escorter, 10, true );

                bool gainedPath = false;

                PlayerMobile pm = escorter as PlayerMobile;

                if ( pm != null )
                {
                    if ( pm.CompassionGains > 0 && DateTime.Now > pm.NextCompassionDay )
                    {
                        pm.NextCompassionDay = DateTime.MinValue;
                        pm.CompassionGains = 0;
                    }

                    if ( pm.CompassionGains >= 5 ) // have already gained 5 points in one day, can gain no more
                    {
                        pm.SendLocalizedMessage( 1053004 ); // You must wait about a day before you can gain in compassion again.
                    }
                    else if ( VirtueHelper.Award( pm, VirtueName.Compassion, 1, ref gainedPath ) )
                    {
                        if ( gainedPath )
                            pm.SendLocalizedMessage( 1053005 ); // You have achieved a path in compassion!
                        else
                            pm.SendLocalizedMessage( 1053002 ); // You have gained in compassion.

                        pm.NextCompassionDay = DateTime.Now + TimeSpan.FromDays( 1.0 ); // in one day CompassionGains gets reset to 0
                        ++pm.CompassionGains;
                    }
                    else
                    {
                        pm.SendLocalizedMessage( 1053003 ); // You have achieved the highest path of compassion and can no longer gain any further.
                    }
                }

                return true;
            }

            return false;
        }
Esempio n. 34
0
        public override void OnDoubleClick(Mobile from)
        {
            BlackAntNest nest = (BlackAntNest)this;

            from.Animate(32, 5, 1, true, false, 0);

            if (Utility.RandomDouble() < 0.50)
            {
                switch (Utility.Random(10))
                {
                case 0:
                {
                    SmallBlackAntEgg SBAE = new SmallBlackAntEgg();
                    SBAE.MoveToWorld(new Point3D(((BlackAntNest)this).X, ((BlackAntNest)this).Y, ((BlackAntNest)this).Z), ((BlackAntNest)this).Map);
                    from.SendMessage("You reach in and find a small black ant egg.");
                    nest.Delete();
                } break;

                case 1:
                {
                    Ruby ruby = new Ruby();
                    ruby.MoveToWorld(new Point3D(((BlackAntNest)this).X, ((BlackAntNest)this).Y, ((BlackAntNest)this).Z), ((BlackAntNest)this).Map);
                    from.SendMessage("You reach in and find a ruby.");
                    nest.Delete();
                } break;

                case 2:
                {
                    IrishSpirit IRSP = new IrishSpirit();
                    IRSP.MoveToWorld(new Point3D(((BlackAntNest)this).X, ((BlackAntNest)this).Y, ((BlackAntNest)this).Z), ((BlackAntNest)this).Map);
                    from.SendMessage("You reach in and find some irish spirit.");
                    nest.Delete();
                } break;

                case 3:
                {
                    AdeptPotionOfWrestling APOW = new AdeptPotionOfWrestling();
                    APOW.MoveToWorld(new Point3D(((BlackAntNest)this).X, ((BlackAntNest)this).Y, ((BlackAntNest)this).Z), ((BlackAntNest)this).Map);
                    from.SendMessage("You reach in and find an adept potion of wrestling.");
                    nest.Delete();
                } break;

                case 4:
                {
                    Gold GOLD5 = new Gold(5);
                    GOLD5.MoveToWorld(new Point3D(((BlackAntNest)this).X, ((BlackAntNest)this).Y, ((BlackAntNest)this).Z), ((BlackAntNest)this).Map);
                    from.SendMessage("You reach in and find some gold.");
                    nest.Delete();
                } break;

                case 5:
                {
                    Gold GOLD15 = new Gold(15);
                    GOLD15.MoveToWorld(new Point3D(((BlackAntNest)this).X, ((BlackAntNest)this).Y, ((BlackAntNest)this).Z), ((BlackAntNest)this).Map);
                    from.SendMessage("You reach in and find some gold.");
                    nest.Delete();
                } break;

                case 6:
                {
                    Gold GOLD35 = new Gold(35);
                    GOLD35.MoveToWorld(new Point3D(((BlackAntNest)this).X, ((BlackAntNest)this).Y, ((BlackAntNest)this).Z), ((BlackAntNest)this).Map);
                    from.SendMessage("You reach in and find some gold.");
                    nest.Delete();
                } break;

                case 7:
                {
                    Gold GOLD50 = new Gold(50);
                    GOLD50.MoveToWorld(new Point3D(((BlackAntNest)this).X, ((BlackAntNest)this).Y, ((BlackAntNest)this).Z), ((BlackAntNest)this).Map);
                    from.SendMessage("You reach in and find some gold.");
                    nest.Delete();
                } break;

                case 8:
                {
                    BlackAntAmbusher S1 = new BlackAntAmbusher();
                    BlackAntAmbusher S2 = new BlackAntAmbusher();
                    BlackAntAmbusher S3 = new BlackAntAmbusher();
                    BlackAntAmbusher S4 = new BlackAntAmbusher();
                    S1.MoveToWorld(new Point3D(((BlackAntNest)this).X, ((BlackAntNest)this).Y, ((BlackAntNest)this).Z), ((BlackAntNest)this).Map);
                    S2.MoveToWorld(new Point3D(((BlackAntNest)this).X, ((BlackAntNest)this).Y, ((BlackAntNest)this).Z), ((BlackAntNest)this).Map);
                    S3.MoveToWorld(new Point3D(((BlackAntNest)this).X, ((BlackAntNest)this).Y, ((BlackAntNest)this).Z), ((BlackAntNest)this).Map);
                    S4.MoveToWorld(new Point3D(((BlackAntNest)this).X, ((BlackAntNest)this).Y, ((BlackAntNest)this).Z), ((BlackAntNest)this).Map);
                    from.SendMessage("A swarm of pissed off ants erupt from the nest and begin to unleash havoc upon you!");
                    nest.Delete();
                } break;

                case 9:
                {
                    from.SendMessage("You reach into the nest, but due to utter retardation, you accidently destroy the eggs.");
                    nest.Delete();
                } break;
                }
            }
        }
Esempio n. 35
0
        //public void OnAttack(Mobile from)
        public override void OnDoubleClick(Mobile from)
        //public override void OnDoubleClick(Mobile from) I'd rather had this work, oh well.
        {
            if (!from.InRange(GetWorldLocation(), 2))
            {
                from.SendLocalizedMessage(500446); // That is too far away. 
            }
            else
            {
                Effects.SendLocationEffect(Location, Map, 0x3728, 20, 10); //smoke or dust
                Effects.PlaySound(Location, Map, 0x11C);

                switch (Utility.Random(10))  //picks one of the following
                {
                    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);
                        break;
                    case 3:
                        new BarrelHoops().MoveToWorld(Location, Map);
                        break;
                    case 4:
                        new BarrelStaves().MoveToWorld(Location, Map);
                        break;
                    case 5:
                        Gold g = new Gold(Utility.Random(500)); //Random amount of gold 0 - 500
                        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;
                }
                Destroy();
            }
        }
Esempio n. 36
0
	//RUFO beginfunction
	private void SellPetForGold(Mobile from, BaseCreature pet, int goldamount)
	{
               		Item gold = new Gold(goldamount);
               		pet.ControlTarget = null; 
               		pet.ControlOrder = OrderType.None; 
               		pet.Internalize(); 
               		pet.SetControlMaster( null ); 
               		pet.SummonMaster = null;
               		pet.Delete();
               		
               		Container backpack = from.Backpack;
               		if ( backpack == null || !backpack.TryDropItem( from, gold, false ) ) 
            		{ 
            			gold.MoveToWorld( from.Location, from.Map );           			
            		}

	}
        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(25))
                {
                case 0:
                    Effects.SendLocationEffect(from, from.Map, 0x113A, 20, 10);                               // Poison Player
                    from.PlaySound(0x231);
                    from.ApplyPoison(from, Poison.Lesser);
                    break;

                case 1:
                    Effects.SendLocationEffect(from, from.Map, 0x3709, 30);                             // Burn Player
                    from.PlaySound(0x54);
                    AOS.Damage(from, from, Utility.RandomMinMax(2, 5), 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(5, 10));
                    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(25, 50));
                    g.MoveToWorld(Location, Map);
                    break;

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

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

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

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

                case 10:
                    new LesserLightningPotion().MoveToWorld(Location, Map);
                    break;

                case 11:
                    new LesserManaPotion().MoveToWorld(Location, Map);
                    break;

                case 12:
                    new MindPotion().MoveToWorld(Location, Map);
                    break;

                case 13:
                    new LesserPoisonPotion().MoveToWorld(Location, Map);
                    break;

                case 14:
                    new LesserShatterPotion().MoveToWorld(Location, Map);
                    break;

                case 15:
                    new StrengthPotion().MoveToWorld(Location, Map);
                    break;

                case 16:
                    new LesserToxicPotion().MoveToWorld(Location, Map);
                    break;

                case 17:
                    Arrow arrow = new Arrow(Utility.RandomMinMax(5, 25));
                    arrow.MoveToWorld(Location, Map);
                    break;

                case 18:
                    Bolt bolt = new Bolt(Utility.RandomMinMax(5, 25));
                    bolt.MoveToWorld(Location, Map);
                    break;

                case 19:
                    IronIngot ii = new IronIngot(Utility.RandomMinMax(5, 25));
                    ii.MoveToWorld(Location, Map);
                    break;

                case 20:
                    Leather leather = new Leather(Utility.RandomMinMax(5, 25));
                    leather.MoveToWorld(Location, Map);
                    break;

                case 21:
                    Log log = new Log(Utility.RandomMinMax(5, 25));
                    log.MoveToWorld(Location, Map);
                    break;

                case 22:
                    BoltOfCloth boc = new BoltOfCloth(Utility.RandomMinMax(1, 25));
                    boc.MoveToWorld(Location, Map);
                    break;

                case 23:
                    SpidersSilk spiderssilk = new SpidersSilk(Utility.RandomMinMax(5, 25));
                    spiderssilk.MoveToWorld(Location, Map);
                    break;

                case 24:
                    SulfurousAsh sulfurousash = new SulfurousAsh(Utility.RandomMinMax(1, 25));
                    sulfurousash.MoveToWorld(Location, Map);
                    break;
                }

                Destroy();
            }
            else
            {
                from.SendLocalizedMessage(500446);                   // That is too far away.
            }
        }
Esempio n. 38
0
        //public void OnAttack(Mobile from)
        public override void OnDoubleClick(Mobile from)
        //public override void OnDoubleClick(Mobile from) I'd rather had this work, oh well.
        {
            if (!from.InRange(GetWorldLocation(), 2))
            {
                from.SendLocalizedMessage(500446); // That is too far away.
            }
            else
            {
                Effects.SendLocationEffect(Location, Map, 0x3728, 20, 10); //smoke or dust
                Effects.PlaySound(Location, Map, 0x11C);

                switch (Utility.Random(10))  //picks one of the following
                {
                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);
                    break;

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

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

                case 5:
                    Gold g = new Gold(Utility.Random(500));     //Random amount of gold 0 - 500
                    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;
                }
                Destroy();
            }
        }