RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

{ expected?

flinn

Wanderer
{ expected?

Code:
Notsure what is wrong but this is what its saying for this script, I cant find the missing sign? please help? Its on line 59, says } expected?

using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
	[CorpseName( "a hill giants corpse" )]
	public class HillGiantSmith : BaseCreature
	{
		[Constructable]
		public HillGiantSmith() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "a hill giant smith";
			Body = 76;
			BaseSoundID = 609;
                        Hue = 1822;

			SetStr( 836, 1400 );
			SetDex( 826, 1145 );
			SetInt( 281, 305 );

			SetHits( 2322, 3351 );

			SetDamage( 13, 20 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 35, 45 );
			SetResistance( ResistanceType.Fire, 30, 40 );
			SetResistance( ResistanceType.Cold, 25, 35 );
			SetResistance( ResistanceType.Poison, 30, 40 );
			SetResistance( ResistanceType.Energy, 30, 40 );

			SetSkill( SkillName.EvalInt, 85.1, 100.0 );
			SetSkill( SkillName.Magery, 85.1, 100.0 );
			SetSkill( SkillName.MagicResist, 80.2, 110.0 );
			SetSkill( SkillName.Tactics, 60.1, 80.0 );
			SetSkill( SkillName.Wrestling, 40.1, 50.0 );

			Fame = 11500;
			Karma = -11500;

			VirtualArmor = 40;

			PackGold( 300, 450 );
			PackMagicItems( 1, 5 );
			PackMagicItems( 1, 5 );
			PackScroll( 1, 7 );

			if ( Utility.Random( 100 ) == 0 )
			{
					switch( Utility.RandomMinMax( 1, 8 ) )
			{
					PackItem(new Carrot (3) );
			}


			
		}

		public override int Meat{ get{ return 4; } }
		public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
		public override int TreasureMapLevel{ get{ return 5; } }

                private DateTime m_NextBomb;
		private int m_Thrown;

		public override void OnActionCombat()
		{
			Mobile combatant = Combatant;

			if ( combatant == null || combatant.Deleted || combatant.Map != Map || !InRange( combatant, 18 ) || !CanBeHarmful( combatant ) || !InLOS( combatant ) )
				return;

			if ( DateTime.Now >= m_NextBomb )
			{
				ThrowBomb( combatant );

				m_Thrown++;

				if ( 0.5 >= Utility.RandomDouble() && (m_Thrown % 2) == 1 ) // 75% chance to quickly throw another bomb
					m_NextBomb = DateTime.Now + TimeSpan.FromSeconds( 5.0 );
				else
					m_NextBomb = DateTime.Now + TimeSpan.FromSeconds( 10.0 + (10.0 * Utility.RandomDouble()) ); // 5-15 seconds
			}
		}

		public void ThrowBomb( Mobile m )
		{
			DoHarmful( m );

			this.MovingParticles( m, 0x11B6, 1, 0, false, true, 0, 0, 9502, 6014, 0x11D, EffectLayer.Waist, 0 );

			new InternalTimer( m, this ).Start();
		}

		private class InternalTimer : Timer
		{
			private Mobile m_Mobile, m_From;

			public InternalTimer( Mobile m, Mobile from ) : base( TimeSpan.FromSeconds( 1.0 ) )
			{
				m_Mobile = m;
				m_From = from;
				Priority = TimerPriority.TwoFiftyMS;
			}

			protected override void OnTick()
			{
				m_Mobile.PlaySound( 0x11D );
				AOS.Damage( m_Mobile, m_From, Utility.RandomMinMax( 30, 60 ), 100, 0, 0, 0, 0 );
			}
		}

		public HillGiantSmith( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
		}
	}
}
 

Kenko

Page
Code:
			if ( Utility.Random( 100 ) == 0 )
			{
					switch( Utility.RandomMinMax( 1, 8 ) )
			{
					PackItem(new Carrot (3) );
			}
Code:
			if ( Utility.Random( 100 ) == 0 )
			{
			    switch( Utility.RandomMinMax( 1, 8 ) )
			    {
			    case 0: PackItem(new Carrot (3) ); break;
			    }
                        }
btw, that's insanely mad.
You are telling the script that you have a 1% chance TO Have a 12,5% chance to add three carrots to the backpack (?)
 

flinn

Wanderer
Outstanding!

Actually ive been tinkering with the script trying to make it work it originally had 6 runic hammers, but, i modified and it works now, i had to delete some more expected? im learnig thx, buddy. But you have a keen eye where i dont :(
Good work, thankyou..
 
Top