Example #1
1
		public override void GiveGift( Mobile mob )
		{
			GiftBox box = new GiftBox();

			box.DropItem( new MistletoeDeed() );
			box.DropItem( new PileOfGlacialSnow() );
			box.DropItem( new LightOfTheWinterSolstice() );

			int random = Utility.Random( 100 );

			if ( random < 60 )
				box.DropItem( new DecorativeTopiary() );
			else if ( random < 84 )
				box.DropItem( new FestiveCactus() );
			else
				box.DropItem( new SnowyTree() );

			switch ( GiveGift( mob, box ) )
			{
				case GiftResult.Backpack:
					mob.SendMessage( 0x482, "Happy Holidays from the team!  Gift items have been placed in your backpack." );
					break;
				case GiftResult.BankBox:
					mob.SendMessage( 0x482, "Happy Holidays from the team!  Gift items have been placed in your bank box." );
					break;
			}
		}
Example #2
0
		public override void OnDoubleClick( Mobile m )

		{
			Item a = m.Backpack.FindItemByType( typeof(EnchantedRope) );
			if ( a != null )
			{	
			Item b = m.Backpack.FindItemByType( typeof(GlowingShipModel) );
			if ( b != null )
			{
			Item c = m.Backpack.FindItemByType( typeof(SacredAnchor) );
			if ( c != null )
			{
			Item d = m.Backpack.FindItemByType( typeof(SpecialSeaMap) );
			if ( d != null )
			{						
				m.AddToBackpack( new MasterOfTheSeaChest() );
				a.Delete();
				b.Delete();
				c.Delete();
				d.Delete();				
				m.SendMessage( "You place the artifacts into the Sea Chest for a Full Master of the Sea Chest!" );
				this.Delete();
			}
			}
			}
			}			
				else
			{
				m.SendMessage( "You are missing some artifacts." );
			}
		}		
		public override void GiveGift( Mobile mob )
		{
			HalloweenBag2007 bag = new HalloweenBag2007();

			bag.DropItem( new HalloweenLantern2007() );

			switch ( Utility.Random( 4 ) )
			{      	
				case 0: bag.DropItem(new HalloweenCloak2007()); break;
				case 1: bag.DropItem(new HalloweenTunic2007()); break;
				case 2: bag.DropItem(new HalloweenDoublet2007()); break;
				case 3: bag.DropItem(new HalloweenBoots2007()); break;
			}

			if ( 0.1 > Utility.RandomDouble() )
			{
				bag.DropItem( new HalloweenOuiJaBoard2007() );
			}

			switch ( GiveGift( mob, bag ) )
			{
				case GiftResult.Backpack:
					mob.SendMessage( 0x482, "Happy Halloween from Tannis and Victoria!  Gift items have been placed in your backpack." );
					break;
				case GiftResult.BankBox:
					mob.SendMessage( 0x482, "Happy Halloween ffrom Tannis and Victoria!  Gift items have been placed in your bank box." );
					break;
			}
		}
		public override void OnDoubleClick( Mobile m )

		{
			Item d = m.Backpack.FindItemByType( typeof(SigilofMinax) );
			if ( d != null )
			{	
				Item c = m.Backpack.FindItemByType( typeof(SigilofLloth) );
				if ( c != null )
				{
					Item n = m.Backpack.FindItemByType( typeof(SigilofGoat) );
					if ( n != null )
					{
						Item p = m.Backpack.FindItemByType( typeof(SigilofTreefolk) );
						if ( p != null )
						{
							m.AddToBackpack( new BraceletofMinax() );
							d.Delete();
							c.Delete();
							n.Delete();
							p.Delete();
							m.SendMessage( "The four Sigils of the Minaxian Minions and Minax herself have been United!" );
						}
					}
					else
					{
						m.SendMessage( "You Are Missing Something..." );
					}
				}
			}
			
		}
Example #5
0
		public override void OnDamage( int amount, Mobile from, bool willKill )
		{
			if ( from != null && from.Map != null )
			{
				int amt = 0;

				Mobile target = this;

				if ( willKill )
					amt = 3 + ((Utility.Random( 6 ) % 5) >> 2); // 20% = 1, 20% = 2, 60% = 0

				if ( Hits < 550 )
				{
					double rand = Utility.RandomDouble();

					if ( 0.10 > rand )
						target = from;

					if ( 0.20 > rand )
						amt++;
				}

				if ( amt > 0 )
				{
					SpillAcid( target, amt );

					if ( willKill )
						from.SendMessage( "Your body explodes into a pile of venom!" );
					else
						from.SendMessage( "The creature spits venom at you!" );
				}
			}

			base.OnDamage( amount, from, willKill );
		}
		public override void OnDoubleClick( Mobile m )

		{
			Item a = m.Backpack.FindItemByType( typeof(ArrianasDiamond) );
			if ( a != null )
			{	
			Item b = m.Backpack.FindItemByType( typeof(ArrianasClips) );
			if ( b != null )
			{
			Item c = m.Backpack.FindItemByType( typeof(ArrianasHoops) );
			if ( c != null )
			{
			
				m.AddToBackpack( new DiamondHoopEarrings() );
				a.Delete();
				b.Delete();
				c.Delete();
				m.SendMessage( "You Combine the knowledge of Arriana's ancestry into a Heirloom" );
				this.Delete();
			}
			}
				else
			{
				m.SendMessage( "You are missing something..." );
		}
		}
		}
Example #7
0
        public static void DecayAccounts_Callback( Mobile from, bool okay, object state )
        {
            if ( okay )
            {
                List<Account> list = (List<Account>)state;

                CommandLogging.WriteLine( from, "{0} {1} deleting {2} old account{3}", from.AccessLevel, CommandLogging.Format( from ), list.Count, list.Count == 1 ? "" : "s" );

                NetState.Pause();

                for ( int i = 0; i < list.Count; ++i )
                {
                    Account a = (Account)list[i];

                    if ( a != null )
                        a.Delete();
                }

                NetState.Resume();

                from.SendMessage( "You have deleted {0} old accounts{1}.", list.Count, list.Count == 1 ? "" : "s" );
            }
            else
            {
                from.SendMessage( "You have chosen not to delete old accounts." );
            }
        }
Example #8
0
         		protected override void OnTarget( Mobile from, object target ) 
         		{ 

            			if ( target == from ) 
               				from.SendMessage( "This can only be used on pets." );

				else if ( target is PlayerMobile )
					from.SendMessage( "You cannot dye them." );

				else if ( target is Item )
					from.SendMessage( "You cannot dye that." );

          			else if ( target is BaseCreature ) 
          			{ 
          				BaseCreature c = (BaseCreature)target;	
					if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false )
					{
						from.SendMessage( "You cannot dye them." );
					}
					else if ( c.ControlMaster != from && c.Controlled == false )
					{
						from.SendMessage( "This is not your pet." );
					}
					else if ( c.Controlled == true && c.ControlMaster == from)
					{
						c.Hue = 2118;
						from.SendMessage( 53, "Your pet has now been dyed." );
						from.PlaySound( 0x23E );
						m_Powder.Delete();
					}
  
            			}
         		} 
		public override bool TryDropItem( Mobile from, Item dropped, bool sendFullMessage )
		{
			if ( m_Participant == null || !m_Participant.Contains( from ) )
			{
				if ( sendFullMessage )
					from.SendMessage( "You are not allowed to place items here." );

				return false;
			}

			if ( dropped is Container || dropped.Stackable )
			{
				if ( sendFullMessage )
					from.SendMessage( "That item cannot be used as stakes." );

				return false;
			}

			if ( !base.TryDropItem( from, dropped, sendFullMessage ) )
				return false;

			if ( from != null )
				m_Owners[dropped] = from;

			return true;
		}
Example #10
0
		protected override void OnTarget( Mobile from, object target )
		{
			if ( target is BaseWeapon || target is BaseArmor || target is BaseClothing || target is BaseJewel )
			{
				Item item = (Item)target;

				XmlLevelItem a = (XmlLevelItem)XmlAttach.FindAttachment(item, typeof(XmlLevelItem));

				if ( a != null )
				{
					from.SendMessage( "That already is levelable!");
					return;
				}
				else
				{
					if( item.RootParent != from ) // Make sure its in their pack or they are wearing it
					{
						from.SendMessage( "You cannot make that levelable there!" );
					}
					else
					{
						XmlAttach.AttachTo(item, new XmlLevelItem());

						from.SendMessage( "You magically make the item levelable..." );

						m_Deed.Delete();
					}
				}
			}
			else
			{
				from.SendMessage( "You cannot make that levelable" );
			}
		}
     		public override void OnDoubleClick( Mobile from ) 
		{ 
			
                        if ( Parent != from ) 
                        { 
                                from.SendMessage( "The costume must be equiped to be used." ); 
                        } 

			else if ( from.Mounted == true )
			{
				from.SendMessage( "You cannot be mounted while wearing your costume!" );
			}


			else if ( from.BodyMod == 0x0 )
                        { 
				

               			from.SendMessage( "You pull the mask over your head." );
				from.PlaySound( 0x440 );
				from.BodyMod = 75;
				from.DisplayGuildTitle = false; 
                        
			}
			else
			{
				from.SendMessage( "You lower the mask." );
				from.PlaySound( 0x440 );
				from.BodyMod = 0x0;
				from.DisplayGuildTitle = true;
				this.Transformed = false;
			}
		}
		protected override void OnTarget( Mobile from, object targeted )
		{
			if( targeted is Mobile )
			{
				Mobile m = ((Mobile)targeted);

				if( m == creature )
				{
					from.SendMessage( "It cannot attack itself!" );
					from.SendGump( new CreatureControl( creature, from ) );
				}

				else
				{

					if( creature.Alive )
					{
						m_AI.Action = ActionType.Combat;
						m_AI.NextMove = DateTime.Now;
						creature.Combatant = m;
						from.SendGump( new CreatureControl( creature, from ) );
					}
				}
			}

			else
			{
				from.SendMessage( "You cannot attack that!" );
				from.SendGump( new CreatureControl( creature, from ) );
			}
		}
		protected override void OnTarget( Mobile from, object target ) 
		{  
			if ( target is PlayerVendor )
			{
				PlayerVendor vendor = (PlayerVendor)target;
				if (vendor.IsOwner(from))
				{
					from.SendMessage("What dost thou wish to name thy servant?");
					from.Prompt = new RenamePrompt(from,vendor,m_Deed );                
				}

				else
				{
					vendor.SayTo(from, "I do not work for thee! Only my master may change my name.");
				}
			}
			else if (target is PlayerBarkeeper)
			{
				PlayerBarkeeper barkeep = (PlayerBarkeeper)target;
				if (barkeep.IsOwner(from))
				{
					from.SendMessage("What dost thou wish to name thy servant?");
					from.Prompt = new RenamePrompt(from,barkeep,m_Deed );                
				}

				else
				{
					barkeep.SayTo(from, "I do not work for thee! Only my master may change my name.");
				}
			}
			else
			{
				from.SendMessage("Thou canst only change the names of thy servants."); 
			}
		}
Example #14
0
			protected override void OnTarget( Mobile from, object targeted )
			{
				if( from == null || targeted == null ) return;

				string name = String.Empty;
				string typename = targeted.GetType().Name;
				string article = "a";

				if( typename != null && typename.Length > 0 )
				{
					if( "aeiouy".IndexOf( typename.ToLower()[0] ) >= 0 )
					{
						article = "an";
					}
				}

				if( targeted is Item )
				{
					name = ((Item)targeted).Name;
				}
				else
					if( targeted is Mobile )
					{
						name = ((Mobile)targeted).Name;
					}
				if( name != String.Empty && name != null )
				{
					from.SendMessage( "That is {0} {1} named '{2}'", article, typename, name );
				}
				else
				{
					from.SendMessage( "That is {0} {1} with no name", article, typename );
				}
			}
Example #15
0
        protected override void OnTarget( Mobile from, object target )
        {
            if( target is HitchingPost )
            {
                HitchingPost post = (HitchingPost)target;

                if( !from.InRange(post.GetWorldLocation(), 1) )
                    from.SendLocalizedMessage(500295);

                else
                {
                    from.LocalOverheadMessage(MessageType.Regular, from.EmoteHue, false, "*ties the rope to the hitching post ring*");
                    from.SendMessage("Target the pet you wish to hitch.");

                    from.Target = new PostToPetTarget();
                }
            }
            else if( target is BaseCreature )
                from.SendMessage("You must tie the rope to a hitching post before being able to hitch your pet.");

            else if( target is PlayerMobile )
                from.SendMessage("The person looks at you in disgust.");

            else if( target == from )
                from.SendMessage("That would be a stupid idea.");
        }
Example #16
0
        	public override void OnDoubleClick( Mobile from )
        	{
			if ( IsChildOf( from.Backpack ) )
			{

				PlayerMobile pm = (PlayerMobile)from;
				if ( from.Skills[SkillName.AnimalTaming].Base < 100.0 && from.Skills[SkillName.Tinkering].Base < 100.0 )
				{
					from.SendMessage( "You have no clue how to use this." );
				}
				else if ( FSATS.EnableBioEngineer == false )
				{
					from.SendMessage( "Bio-Engineering has been disabled on this server, Please contact your server administrator for more information." );
				}
				//else if ( pm.Bioenginer == false )
				//{
				//	from.SendMessage( "You have no clue how to use this." );
				//}
				else
				{
					from.CloseGump( typeof( SampleDNAGump ) );
					from.SendGump( new SampleDNAGump( this ) );
				}
			}
			else
			{
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
		}
		public override void OnDoubleClick( Mobile from )
		{
			BaseCreature squi = new Squire();
			
			if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
				squi.Delete();
			}
			else if ( from.FollowersMax - from.Followers < 5 )
			{
				from.SendMessage( "You have too many followers to have a squire at the moment." );
				squi.Delete();
			}
			else
			{
				squi.Controlled = true;
				squi.ControlMaster = from;
				squi.ControlOrder = OrderType.Follow;
				squi.ControlTarget = from;
				squi.Direction = from.Direction & Direction.Mask;
				squi.MoveToWorld( from.Location, from.Map );
				
				from.SendMessage( squi.Name + " has arrived, meet your new squire!" );

				this.Delete();
			}
		}
Example #18
0
        // When this object -- the bottle -- is double-clicked...
        public override void OnDoubleClick(Mobile m)
        {
            if (m.Followers >= m.FollowersMax) // If the player's followers is greater than or equal to his max followers...
            {
                m.SendMessage("You need at least one free follower slot to open the bottle.");
            }
            else if (((m.InRange(this, 1) && m.CanSee(this)) || this.IsChildOf(m.Backpack)) && (!GetGooInBottle())) // If the bottle is in-range and the goo is not in its bottle...
            {
                m.SendMessage("The goo is out of its bottle!");
                m.SendLocalizedMessage(1010018); // What do you want to use this item on?

                m.Target = new BottleOfGooTarget(this, gooPet); // Creates a target from this mobile with the goo mobile thrown to the new class as a reference.
            }
            else if (((m.InRange(this, 1) && m.CanSee(this)) || this.IsChildOf(m.Backpack)) && (GetGooInBottle())) // If the bottle is in-range and the goo IS in its bottle, this function creates a new goo mobile.
            {
                gooPet = new Goo(this);

                ((GenericWarrior)gooPet).Controlled = true;
                ((GenericWarrior)gooPet).ControlMaster = m;

                gooPet.MoveToWorld(m.Location, m.Map);
                gooPet.PlaySound(0x1CC);
                gooPet.Emote("*leaps out of " + m.Name + "'s bottle!*");

                SetGooInBottle(false);
            }
            else
            {
                m.SendLocalizedMessage(500446); //That is too far away.
            }
        }
        public override void OnDoubleClick(Mobile m)
        {

            Item e = m.Backpack.FindItemByType(typeof(AncientSmeltingBox));

            if (e != null)
            {

                Item a = m.Backpack.FindItemByType(typeof(SosarianOre));
                Item b = m.Backpack.FindItemByType(typeof(EnergizerCrystal));
                Item c = m.Backpack.FindItemByType(typeof(StarMetalFragments));
                Item d = m.Backpack.FindItemByType(typeof(SpecialCharcoal));


                if (e == null || e.Amount < 1 || a == null || a.Amount < 1 || b == null || b.Amount < 1 || c == null || c.Amount < 1 || d == null || d.Amount < 1)
                {
                    m.SendMessage("You are missing something...");
                }

                else
                {
                    m.AddToBackpack(new EnergizedSosarianIngots());
                    a.Delete();
                    b.Delete();
                    c.Delete();
                    d.Delete();
                    m.SendMessage("You Combine the items into the Energized Sosarian Ingots");
                    this.Delete();
                }

            }
        }
        public override void OnDoubleClick(Mobile from)
        {
            MerlinsStaff Staff = from.FindItemOnLayer(Layer.TwoHanded) as MerlinsStaff;

            if (Parent != from)
            {
                from.SendMessage("You remember that you must equip the staff to summon a portal to Merlin");
            }
            else
            {
                Item marker1 = from.Backpack.FindItemByType(typeof(Marker1));
                if (marker1 != null)
                {
                    marker1.Delete();

                    from.AddToBackpack(new Marker2());
                    from.AddToBackpack(new Tablet());
                    from.FixedParticles(0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot);
                    from.SendGump(new MerlinsQuestGump6(from));
                    from.SendMessage("Muahahahaha!!!! You fool!");
                    Talon2 tl = new Talon2();
                    tl.Map = from.Map;
                    tl.Location = from.Location;
                    Delete();
                }
                else
                {
                    from.SendMessage("You have no right to have this staff!!!!");
                }
            }
        }
		public void Hatch( Mobile from )
		{
			IEvoCreature evo = GetEvoCreature();

			if ( null != evo )
			{
				BaseEvoSpec spec = evo.GetEvoSpec();
				BaseCreature creature = evo as BaseCreature;

				if ( null != spec && null != spec.Stages && !creature.Deleted )
				{
					if ( spec.Tamable && spec.MinTamingToHatch > from.Skills[SkillName.AnimalTaming].Value )
					{
						from.SendMessage( "A minimum animal taming skill of {0} is required to hatch this egg.", spec.Stages[0].MinTameSkill );
						creature.Delete();
					}
					else if ( from.FollowersMax - from.Followers < spec.Stages[0].ControlSlots )
					{
						from.SendMessage( "You have too many followers to hatch this egg." );
						creature.Delete();
					}
					else
					{
						creature.Controlled = true;
						creature.ControlMaster = from;
						creature.IsBonded = true;
						creature.MoveToWorld( from.Location, from.Map );
						creature.ControlOrder = OrderType.Follow;
						Delete();
						from.SendMessage( "You are now the proud owner of " + creature.Name + "!" );
						creature.Owners.Add(from);
					}
				}
			}
		}
Example #22
0
			protected override void OnTarget( Mobile from, object targ )
			{
				if (targ is Object)
				{
					if (targ is Container)
					{
						from.SendMessage("You cannot add containers to containers. Sorry!");
					}
					else
					{
						if (targ is Item)
						{
							Item itemtobag = targ as Item;
							if ( itemtobag.IsChildOf( from.Backpack ) ) // Make sure its in their pack
							{
								from.SendMessage("Select the Container you wish to toss the items in.");
								from.Target = new TargetBag(itemtobag);
							}
							else
							{
								from.SendMessage("Item must be in your backpack in order to initiate Mass Bagging!");
							}
						}
						else
						{
							from.SendMessage("You can only bag items!");
						}
					}
				}
				else
				{
					from.SendMessage("You cannot bag that!");
				}
			}
Example #23
0
 protected override void OnTarget(Mobile m_From, object targeted)
 {
     //string SetName = "tadek";
     if (targeted is Mobile)
     {
         Mobile m_Target = (Mobile)targeted;
         if (m_Target is PlayerMobile)
         {
             if (((PlayerMobile)m_Target).SetNames.ContainsKey(m_From.Serial) == false)
             {
                 ((PlayerMobile)m_From).SendGump(new SetNameGump((PlayerMobile)m_From, m_Target));
                 //((PlayerMobile)m_From).SetNames.Add(m_Target.Serial, SetName);
                 //((PlayerMobile)m_From).SendGump(new WrodzoneGump(((PlayerMobile)m_From), m_Target));
                 //m_From.SendMessage("Nadales przydomek");
                 // m_Target.SendMessage("Podal Ci Imie: {0}", m_From.Name);
             }
             else
             {
                 m_From.SendMessage("Już ma przydomek");
             }
         }
         else
         {
             m_From.SendMessage("To nie jest gracz!");
         }
     }
     else
     {
         m_From.SendMessage("Nie mozesz tego nazwac!");
     }
 }
Example #24
0
        public void DropTarget(Mobile from, object obj)
        {
            if(!(obj is SlayerForge))
            {
                from.SendMessage("Ceci n'est pas une forge adéquate");
                return;
            }

            SlayerForge forge = (SlayerForge)obj;

            if(forge.SuperSlayer != SuperSlayerType.None)
            {
                from.SendMessage("Cette forge contient déjà une relique");
                return;
            }

            if (!(forge.CanAddRelic))
            {
                from.SendMessage("Cette forge ne peut accepter de relique");
                return;
            }

            from.SendMessage("Vous jetez la relique dans la forge");
            forge.SuperSlayer = SuperSlayerType.Elemental;
            this.Delete();
        }
 protected override void OnTarget(Mobile from, object targeted)
 {
     if (targeted is BaseCreature)
     {
         foreach (object item in World.Items.Values)
         {
             if (item is ESpawner)
             {
                 ESpawner spawner = (ESpawner)item;
                 foreach (EclSpawnEntry entry in spawner.SpawnEntries)
                 {
                     foreach (object o in entry.SpawnObjects)
                     {
                         if (o is BaseCreature)
                         {
                             if (((BaseCreature)o).Serial == ((BaseCreature)targeted).Serial)
                             {
                                 from.Location = spawner.Location;
                                 from.Map = spawner.Map;
                                 from.SendMessage(55, "Spawner found for creature.");
                                 return;
                             }
                         }
                     }
                 }
             }
         }
     }
     from.SendMessage(55, "No spawner found for creature.");
 }
Example #26
0
		public static void ToggleKeyGuard( Mobile from, Item item )
		{
			#if( XML_ATTACHMENT_PRESENT )
			{
			    //Get guardatt attachment
			    Keyguard guardatt = (Keyguard)XmlAttach.FindAttachment( item, typeof( Keyguard ) );
			    
			    // does item already have an attachment?
			    if( guardatt == null )
			    {
			        // create a new attachment and add it
			        XmlAttach.AttachTo( item, new Keyguard() );
			
			        guardatt = (Keyguard)XmlAttach.FindAttachment( item, typeof( Keyguard ) );
			        guardatt.Guard = true;
				    guardatt.SetAttachedBy( from.Name );
			    	guardatt.Name = "Keyguard";
                    from.SendMessage(264, "Item is now Guarded");
				}
				else
				{
					//delete the attachment to reduce soap film buildup!
                	guardatt.Delete();
					from.SendMessage(33, "Item is now Un-Guarded");
				}
	    	}
	    	#else
	    	{
		    	from.SendMessage( "This command only works when XML attachments are enabled." );
	    	}
	    	#endif
		}
			protected override void OnTarget( Mobile from, object targeted )
			{
				IPoint3D p = targeted as IPoint3D;

				if ( p == null )
					return;
				else if ( p is Item )
					p = ((Item)p).GetWorldTop();

				if ( m_First )
				{
					from.SendMessage( "Target another location to complete the bounding box." );
					from.Target = new PickTarget( new Point3D( p ), false, from.Map, m_Callback, m_State );
				}
				else if ( from.Map != m_Map )
				{
					from.SendMessage( "Both locations must reside on the same map." );
				}
				else if ( m_Map != null && m_Map != Map.Internal && m_Callback != null )
				{
					Point3D start = m_Store;
					Point3D end = new Point3D( p );

					Utility.FixPoints( ref start, ref end );

					m_Callback( from, m_Map, start, end, m_State );
				}
			}
Example #28
0
		private static void Path( Mobile from, IPoint3D p, PathAlgorithm alg, string name, int zOffset )
		{
			m_OverrideAlgorithm = alg;

			long start = DateTime.Now.Ticks;
			MovementPath path = new MovementPath( from, new Point3D( p ) );
			long end = DateTime.Now.Ticks;
			double len = Math.Round( (end-start) / 10000.0, 2 );

			if ( !path.Success )
			{
				from.SendMessage( "{0} path failed: {1}ms", name, len );
			}
			else
			{
				from.SendMessage( "{0} path success: {1}ms", name, len );

				int x = from.X;
				int y = from.Y;
				int z = from.Z;

				for ( int i = 0; i < path.Directions.Length; ++i )
				{
					Movement.Movement.Offset( path.Directions[i], ref x, ref y );

					new RecallRune().MoveToWorld( new Point3D( x, y, z+zOffset ), from.Map );
				}
			}
		}
Example #29
0
        public void Carve( Mobile from, Item item )
        {
            Effects.PlaySound( GetWorldLocation(), Map, 0x48F );
            Effects.SendLocationEffect( GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0 );

            if ( 0.5 > 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." );
            }
        }
         		protected override void OnTarget( Mobile from, object target ) 
         		{ 

            			if( target == from ) 
               				from.SendMessage( "You cant do that." );
            
          			else if( target is BaseCreature ) 
          			{ 
            						
          				BaseCreature c = (BaseCreature)target;
					Mobile master = c.ControlMaster;
					if( c.Controlled == false )
					{
						from.SendMessage( "That creature is not tamed." );
					}	
					else if( !c.IsDeadPet )
					{
						from.SendMessage( "That creature is alive." );
					}

					else if ( c != null && c.IsDeadPet )
					{
						master.SendGump( new PetResurrectGump( from, c ) );
						from.PlaySound( 0x214 );
						from.FixedEffect( 0x376A, 10, 16 );

                        m_Powder.Consume();
                        from.AddToBackpack(new Bottle());
					}
  
            			}
         		}