Beispiel #1
0
        public static void Add_Static( int itemID, Point3D location, Map map, string name )
        {
            var eable = map.GetItemsInRange( location, 0 );

            foreach ( Item item in eable )
            {
                if ( item is Sign && item.Z == location.Z && item.ItemID == itemID )
                    m_ToDelete.Enqueue( item );
            }

            while ( m_ToDelete.Count > 0 )
                ( (Item) m_ToDelete.Dequeue() ).Delete();

            Item sign;

            if ( name.StartsWith( "#" ) )
            {
                sign = new LocalizedSign( itemID, Utility.ToInt32( name.Substring( 1 ) ) );
            }
            else
            {
                sign = new Sign( itemID );
                sign.Name = name;
            }

            if ( map == Map.Malas )
            {
                if ( location.X >= 965 && location.Y >= 502 && location.X <= 1012 && location.Y <= 537 )
                    sign.Hue = 0x47E;
                else if ( location.X >= 1960 && location.Y >= 1278 && location.X < 2106 && location.Y < 1413 )
                    sign.Hue = 0x44E;
            }

            sign.MoveToWorld( location, map );
        }
        public static void GenerateDeco(CommandEventArgs e)
        {
            string name = "highseas";

            CharydbisSpawner.GenerateCharydbisSpawner();
            BountyQuestSpawner.GenerateShipSpawner();

            CorgulAltar altar;

            altar = new CorgulAltar();
            altar.MoveToWorld(new Point3D(2453, 865, 0), Map.Felucca);
            WeakEntityCollection.Add(name, altar);

            altar = new CorgulAltar();
            altar.MoveToWorld(new Point3D(2453, 865, 0), Map.Trammel);
            WeakEntityCollection.Add(name, altar);

            ProfessionalBountyBoard board;

            board = new ProfessionalBountyBoard();
            board.MoveToWorld(new Point3D(4544, 2298, -1), Map.Trammel);
            WeakEntityCollection.Add(name, board);

            board = new ProfessionalBountyBoard();
            board.MoveToWorld(new Point3D(4544, 2298, -1), Map.Felucca);
            WeakEntityCollection.Add(name, board);

            LocalizedSign sign;

            sign = new LocalizedSign(3025, 1152653); //The port of Zento Parking Area
            sign.MoveToWorld(new Point3D(713, 1359, 53), Map.Tokuno);
            WeakEntityCollection.Add(name, sign);

            sign = new LocalizedSign(3023, 1149821); //Winds Tavern
            sign.MoveToWorld(new Point3D(4548, 2300, -6), Map.Trammel);
            WeakEntityCollection.Add(name, sign);

            sign = new LocalizedSign(3023, 1149821); //Winds Tavern
            sign.MoveToWorld(new Point3D(4548, 2300, -6), Map.Felucca);
            WeakEntityCollection.Add(name, sign);

            sign = new LocalizedSign(3023, 1149820); //General Store
            sign.MoveToWorld(new Point3D(4543, 2317, -3), Map.Trammel);
            WeakEntityCollection.Add(name, sign);

            sign = new LocalizedSign(3023, 1149820); //General Store
            sign.MoveToWorld(new Point3D(4543, 2317, -3), Map.Felucca);
            WeakEntityCollection.Add(name, sign);

            XmlSpawner sp;
            string     toSpawn = "FishMonger";

            //Britain
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(1482, 1754, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(1482, 1754, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Moonglow
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(4406, 1049, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(4406, 1049, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Trinsic
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(2061, 2855, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(2061, 2855, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Vesper
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(3009, 826, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(3009, 826, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Jhelom
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(1373, 3885, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(1373, 3885, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Skara Brae
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(641, 2234, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.MoveToWorld(new Point3D(641, 2234, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Papua
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(5827, 3258, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(5827, 3258, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Floating Eproriam
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 0,
                HomeRange  = 0
            };
            sp.MoveToWorld(new Point3D(4552, 2299, -1), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 0,
                HomeRange  = 0
            };
            sp.MoveToWorld(new Point3D(4540, 2321, -1), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "DocksAlchemist";

            //Britain
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(1482, 1754, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(1482, 1754, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Moonglow
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(4406, 1049, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(4406, 1049, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Trinsic
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(2061, 2855, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(2061, 2855, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Vesper
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(3009, 826, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(3009, 826, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Jhelom
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(1373, 3885, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(1373, 3885, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Skara Brae
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(641, 2234, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.MoveToWorld(new Point3D(641, 2234, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Papua
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(5827, 3258, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(5827, 3258, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Floating Eproriam
            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(4552, 2299, -1), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(4540, 2321, -1), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "GBBigglesby";

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(4544, 2302, -1), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(4544, 2302, -1), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "GBBigglesby/Name/Mitsubishi/Title/the fleet officer";

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 10
            };
            sp.MoveToWorld(new Point3D(713, 1370, 6), Map.Tokuno);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "BoatPainter";

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 15
            };
            sp.MoveToWorld(new Point3D(4552, 2337, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 15
            };
            sp.MoveToWorld(new Point3D(4552, 2337, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "Banker";

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(4554, 2315, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(4554, 2315, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "CrabFisher";

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 15
            };
            sp.MoveToWorld(new Point3D(4552, 2336, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 15
            };
            sp.MoveToWorld(new Point3D(4552, 2336, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 15
            };
            sp.MoveToWorld(new Point3D(4552, 2378, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 15
            };
            sp.MoveToWorld(new Point3D(4552, 2378, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "DockMaster";

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 10
            };
            sp.MoveToWorld(new Point3D(4565, 2307, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 10
            };
            sp.MoveToWorld(new Point3D(4565, 2307, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "SeaMarketTavernKeeper";

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(4544, 2302, -1), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn)
            {
                SpawnRange = 1,
                HomeRange  = 5
            };
            sp.MoveToWorld(new Point3D(4544, 2302, -1), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            SeaMarketBuoy bouy1 = new SeaMarketBuoy();
            SeaMarketBuoy bouy2 = new SeaMarketBuoy();
            SeaMarketBuoy bouy3 = new SeaMarketBuoy();
            SeaMarketBuoy bouy4 = new SeaMarketBuoy();
            SeaMarketBuoy bouy5 = new SeaMarketBuoy();
            SeaMarketBuoy bouy6 = new SeaMarketBuoy();
            SeaMarketBuoy bouy7 = new SeaMarketBuoy();
            SeaMarketBuoy bouy8 = new SeaMarketBuoy();

            Rectangle2D bound = Regions.SeaMarketRegion.Bounds[0];

            bouy1.MoveToWorld(new Point3D(bound.X, bound.Y, -5), Map.Felucca);
            bouy2.MoveToWorld(new Point3D(bound.X, bound.Y, -5), Map.Trammel);
            WeakEntityCollection.Add(name, bouy1);
            WeakEntityCollection.Add(name, bouy2);

            bouy3.MoveToWorld(new Point3D(bound.X + bound.Width, bound.Y, -5), Map.Felucca);
            bouy4.MoveToWorld(new Point3D(bound.X + bound.Width, bound.Y, -5), Map.Trammel);
            WeakEntityCollection.Add(name, bouy3);
            WeakEntityCollection.Add(name, bouy4);

            bouy5.MoveToWorld(new Point3D(bound.X + bound.Width, bound.Y + bound.Height, -5), Map.Felucca);
            bouy6.MoveToWorld(new Point3D(bound.X + bound.Width, bound.Y + bound.Height, -5), Map.Trammel);
            WeakEntityCollection.Add(name, bouy5);
            WeakEntityCollection.Add(name, bouy6);

            bouy7.MoveToWorld(new Point3D(bound.X, bound.Y + bound.Height, -5), Map.Felucca);
            bouy8.MoveToWorld(new Point3D(bound.X, bound.Y + bound.Height, -5), Map.Trammel);
            WeakEntityCollection.Add(name, bouy7);
            WeakEntityCollection.Add(name, bouy8);

            Console.WriteLine("High Seas Content generated.");
        }
		public Item Construct()
		{
			Item item;

			try
			{
				if ( m_Type == typeofStatic )
				{
					item = new Static( m_ItemID );
				}
				else if ( m_Type == typeofLocalizedStatic )
				{
					int labelNumber = 0;

					for ( int i = 0; i < m_Params.Length; ++i )
					{
						if ( m_Params[i].StartsWith( "LabelNumber" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
							{
								labelNumber = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
								break;
							}
						}
					}

					item = new LocalizedStatic( m_ItemID, labelNumber );
				}
				else if ( m_Type == typeofLocalizedSign )
				{
					int labelNumber = 0;

					for ( int i = 0; i < m_Params.Length; ++i )
					{
						if ( m_Params[i].StartsWith( "LabelNumber" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
							{
								labelNumber = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
								break;
							}
						}
					}

					item = new LocalizedSign( m_ItemID, labelNumber );
				}
				else if ( m_Type == typeofAnkhWest || m_Type == typeofAnkhEast )
				{
					bool bloodied = false;

					for ( int i = 0; !bloodied && i < m_Params.Length; ++i )
						bloodied = ( m_Params[i] == "Bloodied" );

					if ( m_Type == typeofAnkhWest )
						item = new AnkhWest( bloodied );
					else
						item = new AnkhEast( bloodied );
				}
				else if ( m_Type == typeofMarkContainer )
				{
					bool bone = false;
					bool locked = false;
					Map map = Map.Malas;

					for ( int i = 0; i < m_Params.Length; ++i )
					{
						if ( m_Params[i] == "Bone" )
						{
							bone = true;
						}
						else if ( m_Params[i] == "Locked" )
						{
							locked = true;
						}
						else if ( m_Params[i].StartsWith( "TargetMap" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								map = Map.Parse( m_Params[i].Substring( ++indexOf ) );
						}
					}

					MarkContainer mc = new MarkContainer( bone, locked );

					mc.TargetMap = map;
					mc.Description = "strange location";

					item = mc;
				}
				else if ( m_Type == typeofHintItem )
				{
					int range = 0;
					int messageNumber = 0;
					string messageString = null;
					int hintNumber = 0;
					string hintString = null;
					TimeSpan resetDelay = TimeSpan.Zero;

					for ( int i = 0; i < m_Params.Length; ++i )
					{
						if ( m_Params[i].StartsWith( "Range" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								range = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
						}
						else if ( m_Params[i].StartsWith( "WarningString" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								messageString = m_Params[i].Substring( ++indexOf );
						}
						else if ( m_Params[i].StartsWith( "WarningNumber" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								messageNumber = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
						}
						else if ( m_Params[i].StartsWith( "HintString" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								hintString = m_Params[i].Substring( ++indexOf );
						}
						else if ( m_Params[i].StartsWith( "HintNumber" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								hintNumber = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
						}
						else if ( m_Params[i].StartsWith( "ResetDelay" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								resetDelay = TimeSpan.Parse( m_Params[i].Substring( ++indexOf ) );
						}
					}

					HintItem hi = new HintItem( m_ItemID, range, messageNumber, hintNumber );

					hi.WarningString = messageString;
					hi.HintString = hintString;
					hi.ResetDelay = resetDelay;

					item = hi;
				}
				else if ( m_Type == typeofWarningItem )
				{
					int range = 0;
					int messageNumber = 0;
					string messageString = null;
					TimeSpan resetDelay = TimeSpan.Zero;

					for ( int i = 0; i < m_Params.Length; ++i )
					{
						if ( m_Params[i].StartsWith( "Range" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								range = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
						}
						else if ( m_Params[i].StartsWith( "WarningString" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								messageString = m_Params[i].Substring( ++indexOf );
						}
						else if ( m_Params[i].StartsWith( "WarningNumber" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								messageNumber = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
						}
						else if ( m_Params[i].StartsWith( "ResetDelay" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								resetDelay = TimeSpan.Parse( m_Params[i].Substring( ++indexOf ) );
						}
					}

					WarningItem wi = new WarningItem( m_ItemID, range, messageNumber );

					wi.WarningString = messageString;
					wi.ResetDelay = resetDelay;

					item = wi;
				}
				else if ( m_Type == typeofCannon )
				{
					CannonDirection direction = CannonDirection.North;

					for ( int i = 0; i < m_Params.Length; ++i )
					{
						if ( m_Params[i].StartsWith( "CannonDirection" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								direction = (CannonDirection)Enum.Parse( typeof( CannonDirection ), m_Params[i].Substring( ++indexOf ), true );
						}
					}

					item = new Cannon( direction );
				}
				else if ( m_Type == typeofSerpentPillar )
				{
					string word = null;
					Rectangle2D destination = new Rectangle2D();

					for ( int i = 0; i < m_Params.Length; ++i )
					{
						if ( m_Params[i].StartsWith( "Word" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								word = m_Params[i].Substring( ++indexOf );
						}
						else if ( m_Params[i].StartsWith( "DestStart" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								destination.Start = Point2D.Parse( m_Params[i].Substring( ++indexOf ) );
						}
						else if ( m_Params[i].StartsWith( "DestEnd" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								destination.End = Point2D.Parse( m_Params[i].Substring( ++indexOf ) );
						}
					}

					item = new SerpentPillar( word, destination );
				}
				else if ( m_Type.IsSubclassOf( typeofBeverage ) )
				{
					BeverageType content = BeverageType.Liquor;
					bool fill = false;

					for ( int i = 0; !fill && i < m_Params.Length; ++i )
					{
						if ( m_Params[i].StartsWith( "Content" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
							{
								content = (BeverageType)Enum.Parse( typeof( BeverageType ), m_Params[i].Substring( ++indexOf ), true );
								fill = true;
							}
						}
					}

					if ( fill )
						item = (Item)Activator.CreateInstance( m_Type, new object[]{ content } );
					else
						item = (Item)Activator.CreateInstance( m_Type );
				}
				else if ( m_Type.IsSubclassOf( typeofBaseDoor ) )
				{
					DoorFacing facing = DoorFacing.WestCW;

					for ( int i = 0; i < m_Params.Length; ++i )
					{
						if ( m_Params[i].StartsWith( "Facing" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
							{
								facing = (DoorFacing)Enum.Parse( typeof( DoorFacing ), m_Params[i].Substring( ++indexOf ), true );
								break;
							}
						}
					}

					item = (Item)Activator.CreateInstance( m_Type, new object[]{ facing } );
				}
				else
				{
					item = (Item)Activator.CreateInstance( m_Type );
				}
			}
			catch ( Exception e )
			{
				throw new Exception( String.Format( "Bad type: {0}", m_Type ), e );
			}

			if ( item is BaseAddon )
			{
				if ( item is MaabusCoffin )
				{
					MaabusCoffin coffin = (MaabusCoffin)item;

					for ( int i = 0; i < m_Params.Length; ++i )
					{
						if ( m_Params[i].StartsWith( "SpawnLocation" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								coffin.SpawnLocation = Point3D.Parse( m_Params[i].Substring( ++indexOf ) );
						}
					}
				}
				else if ( m_ItemID > 0 )
				{
					List<AddonComponent> comps = ((BaseAddon)item).Components;

					for ( int i = 0; i < comps.Count; ++i )
					{
						AddonComponent comp = (AddonComponent)comps[i];

						if ( comp.Offset == Point3D.Zero )
							comp.ItemID = m_ItemID;
					}
				}
			}
			else if ( item is BaseLight )
			{
				bool unlit = false;

				for ( int i = 0; !unlit && i < m_Params.Length; ++i )
					unlit = ( m_Params[i] == "Unlit" );

				if ( !unlit )
					((BaseLight)item).Ignite();

				((BaseLight)item).Protected = true;

				if ( m_ItemID > 0 )
					item.ItemID = m_ItemID;
			}
			else if ( item is Server.Mobiles.Spawner )
			{
				Server.Mobiles.Spawner sp = (Server.Mobiles.Spawner)item;

				sp.NextSpawn = TimeSpan.Zero;

				for ( int i = 0; i < m_Params.Length; ++i )
				{
					if ( m_Params[i].StartsWith( "Spawn" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							sp.CreaturesName.Add( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "MinDelay" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							sp.MinDelay = TimeSpan.Parse( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "MaxDelay" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							sp.MaxDelay = TimeSpan.Parse( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "NextSpawn" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							sp.NextSpawn = TimeSpan.Parse( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "Count" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							sp.Count = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "Team" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							sp.Team = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "HomeRange" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							sp.HomeRange = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "Running" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							sp.Running = Utility.ToBoolean( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "Group" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							sp.Group = Utility.ToBoolean( m_Params[i].Substring( ++indexOf ) );
					}
				}
			}
			else if ( item is RecallRune )
			{
				RecallRune rune = (RecallRune)item;

				for ( int i = 0; i < m_Params.Length; ++i )
				{
					if ( m_Params[i].StartsWith( "Description" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							rune.Description = m_Params[i].Substring( ++indexOf );
					}
					else if ( m_Params[i].StartsWith( "Marked" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							rune.Marked = Utility.ToBoolean( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "TargetMap" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							rune.TargetMap = Map.Parse( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "Target" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							rune.Target = Point3D.Parse( m_Params[i].Substring( ++indexOf ) );
					}
				}
			}
			else if ( item is SkillTeleporter )
			{
				SkillTeleporter tp = (SkillTeleporter)item;

				for ( int i = 0; i < m_Params.Length; ++i )
				{
					if ( m_Params[i].StartsWith( "Skill" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.Skill = (SkillName)Enum.Parse( typeof( SkillName ), m_Params[i].Substring( ++indexOf ), true );
					}
					else if ( m_Params[i].StartsWith( "RequiredFixedPoint" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.Required = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) ) * 0.01;
					}
					else if ( m_Params[i].StartsWith( "Required" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.Required = Utility.ToDouble( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "MessageString" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.MessageString = m_Params[i].Substring( ++indexOf );
					}
					else if ( m_Params[i].StartsWith( "MessageNumber" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.MessageNumber = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "PointDest" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.PointDest = Point3D.Parse( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "MapDest" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.MapDest = Map.Parse( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "Creatures" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.Creatures = Utility.ToBoolean( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "SourceEffect" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.SourceEffect = Utility.ToBoolean( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "DestEffect" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.DestEffect = Utility.ToBoolean( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "SoundID" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.SoundID = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "Delay" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.Delay = TimeSpan.Parse( m_Params[i].Substring( ++indexOf ) );
					}
				}

				if ( m_ItemID > 0 )
					item.ItemID = m_ItemID;
			}
			else if ( item is KeywordTeleporter )
			{
				KeywordTeleporter tp = (KeywordTeleporter)item;

				for ( int i = 0; i < m_Params.Length; ++i )
				{
					if ( m_Params[i].StartsWith( "Substring" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.Substring = m_Params[i].Substring( ++indexOf );
					}
					else if ( m_Params[i].StartsWith( "Keyword" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.Keyword = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "Range" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.Range = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "PointDest" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.PointDest = Point3D.Parse( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "MapDest" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.MapDest = Map.Parse( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "Creatures" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.Creatures = Utility.ToBoolean( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "SourceEffect" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.SourceEffect = Utility.ToBoolean( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "DestEffect" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.DestEffect = Utility.ToBoolean( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "SoundID" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.SoundID = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "Delay" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.Delay = TimeSpan.Parse( m_Params[i].Substring( ++indexOf ) );
					}
				}

				if ( m_ItemID > 0 )
					item.ItemID = m_ItemID;
			}
			else if ( item is Teleporter )
			{
				Teleporter tp = (Teleporter)item;

				for ( int i = 0; i < m_Params.Length; ++i )
				{
					if ( m_Params[i].StartsWith( "PointDest" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.PointDest = Point3D.Parse( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "MapDest" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.MapDest = Map.Parse( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "Creatures" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.Creatures = Utility.ToBoolean( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "SourceEffect" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.SourceEffect = Utility.ToBoolean( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "DestEffect" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.DestEffect = Utility.ToBoolean( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "SoundID" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.SoundID = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
					}
					else if ( m_Params[i].StartsWith( "Delay" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							tp.Delay = TimeSpan.Parse( m_Params[i].Substring( ++indexOf ) );
					}
				}

				if ( m_ItemID > 0 )
					item.ItemID = m_ItemID;
			}
			else if ( item is FillableContainer )
			{
				FillableContainer cont = (FillableContainer) item;

				for ( int i = 0; i < m_Params.Length; ++i )
				{
					if ( m_Params[i].StartsWith( "ContentType" ) )
					{
						int indexOf = m_Params[i].IndexOf( '=' );

						if ( indexOf >= 0 )
							cont.ContentType = (FillableContentType)Enum.Parse( typeof( FillableContentType ), m_Params[i].Substring( ++indexOf ), true );
					}
				}

				if ( m_ItemID > 0 )
					item.ItemID = m_ItemID;
			}
			else if ( m_ItemID > 0 )
			{
				item.ItemID = m_ItemID;
			}

			item.Movable = false;

			for ( int i = 0; i < m_Params.Length; ++i )
			{
				if ( m_Params[i].StartsWith( "Light" ) )
				{
					int indexOf = m_Params[i].IndexOf( '=' );

					if ( indexOf >= 0 )
						item.Light = (LightType)Enum.Parse( typeof( LightType ), m_Params[i].Substring( ++indexOf ), true );
				}
				else if ( m_Params[i].StartsWith( "Hue" ) )
				{
					int indexOf = m_Params[i].IndexOf( '=' );

					if ( indexOf >= 0 )
					{
						int hue = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );

						if ( item is DyeTub )
							((DyeTub)item).DyedHue = hue;
						else
							item.Hue = hue;
					}
				}
				else if ( m_Params[i].StartsWith( "Name" ) )
				{
					int indexOf = m_Params[i].IndexOf( '=' );

					if ( indexOf >= 0 )
						item.Name = m_Params[i].Substring( ++indexOf );
				}
				else if ( m_Params[i].StartsWith( "Amount" ) )
				{
					int indexOf = m_Params[i].IndexOf( '=' );

					if ( indexOf >= 0 )
					{
						// Must supress stackable warnings

						bool wasStackable = item.Stackable;

						item.Stackable = true;
						item.Amount = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
						item.Stackable = wasStackable;
					}
				}
			}

			return item;
		}
Beispiel #4
0
		public static void Add_Static( int itemID, Point3D location, Map map, string name )
		{
			IPooledEnumerable eable = map.GetItemsInRange( location, 0 );

			foreach ( Item item in eable )
			{
				if ( item is Sign && item.Z == location.Z && item.ItemID == itemID )
					m_ToDelete.Enqueue( item );
			}

			eable.Free();

			while ( m_ToDelete.Count > 0 )
				m_ToDelete.Dequeue().Delete();

			Item sign;

			if ( name.StartsWith( "#" ) )
			{
				sign = new LocalizedSign( itemID, Utility.ToInt32( name.Substring( 1 ) ) );
			}
			else
			{
				sign = new Sign( itemID );
				sign.Name = name;
			}

			sign.MoveToWorld( location, map );
		}
		public static void Add_Static( int itemID, Point3D location, Map map, string name )
		{
			Del_Static( itemID, location, map );

			Item sign;

			if ( name.StartsWith( "#" ) )
			{
				sign = new LocalizedSign( itemID, Utility.ToInt32( name.Substring( 1 ) ) );
			}
			else
			{
				sign = new Sign( itemID );
				sign.Name = name;
			}

			if ( map == Map.Malas )
			{
				if ( location.X >= 965 && location.Y >= 502 && location.X <= 1012 && location.Y <= 537 )
					sign.Hue = 0x47E;
				else if ( location.X >= 1960 && location.Y >= 1278 && location.X < 2106 && location.Y < 1413 )
					sign.Hue = 0x44E;
			}

			sign.MoveToWorld( location, map );
		}
Beispiel #6
0
        public static void Generate()
        {
            ExperimentalRoomController controller = new ExperimentalRoomController();

            controller.MoveToWorld(new Point3D(980, 1117, -42), Map.TerMur);

            //Room 0 to 1
            ExperimentalRoomDoor    door    = new ExperimentalRoomDoor(Room.RoomZero, DoorFacing.WestCCW);
            ExperimentalRoomBlocker blocker = new ExperimentalRoomBlocker(Room.RoomZero);

            door.Hue = 1109;
            door.MoveToWorld(new Point3D(984, 1116, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(984, 1116, -42), Map.TerMur);

            door     = new ExperimentalRoomDoor(Room.RoomZero, DoorFacing.EastCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomZero);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(985, 1116, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(985, 1116, -42), Map.TerMur);

            //Room 1 to 2
            door     = new ExperimentalRoomDoor(Room.RoomOne, DoorFacing.WestCCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomOne);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(984, 1102, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(984, 1102, -42), Map.TerMur);

            door     = new ExperimentalRoomDoor(Room.RoomOne, DoorFacing.EastCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomOne);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(985, 1102, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(985, 1102, -42), Map.TerMur);

            //Room 2 to 3
            door     = new ExperimentalRoomDoor(Room.RoomTwo, DoorFacing.WestCCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomTwo);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(984, 1090, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(984, 1090, -42), Map.TerMur);

            door     = new ExperimentalRoomDoor(Room.RoomTwo, DoorFacing.EastCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomTwo);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(985, 1090, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(985, 1090, -42), Map.TerMur);

            //Room 3 to 4
            door     = new ExperimentalRoomDoor(Room.RoomTwo, DoorFacing.WestCCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomThree);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(984, 1072, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(984, 1072, -42), Map.TerMur);

            door     = new ExperimentalRoomDoor(Room.RoomTwo, DoorFacing.EastCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomThree);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(985, 1072, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(985, 1072, -42), Map.TerMur);

            ExperimentalRoomChest chest = new ExperimentalRoomChest();

            chest.MoveToWorld(new Point3D(984, 1064, -37), Map.TerMur);

            ExperimentalBook instr = new ExperimentalBook();

            instr.Movable = false;
            instr.MoveToWorld(new Point3D(995, 1114, -36), Map.TerMur);

            SecretDungeonDoor dd = new SecretDungeonDoor(DoorFacing.NorthCCW);

            dd.ClosedID = 87;
            dd.OpenedID = 88;
            dd.MoveToWorld(new Point3D(1007, 1119, -42), Map.TerMur);

            LocalizedSign sign = new LocalizedSign(3026, 1113407);  // Experimental Room Access

            sign.Movable = false;
            sign.MoveToWorld(new Point3D(980, 1119, -37), Map.TerMur);

            //Puzze Room
            PuzzleBox box = new PuzzleBox(PuzzleType.WestBox);

            box.MoveToWorld(new Point3D(1090, 1171, 11), Map.TerMur);

            box = new PuzzleBox(PuzzleType.EastBox);
            box.MoveToWorld(new Point3D(1104, 1171, 11), Map.TerMur);

            box = new PuzzleBox(PuzzleType.NorthBox);
            box.MoveToWorld(new Point3D(1097, 1163, 11), Map.TerMur);

            XmlSpawner spawner = new XmlSpawner("MagicKey");

            spawner.MoveToWorld(new Point3D(1109, 1150, -12), Map.TerMur);
            spawner.SpawnRange = 0;
            spawner.MinDelay   = TimeSpan.FromSeconds(30);
            spawner.MaxDelay   = TimeSpan.FromSeconds(45);
            spawner.DoRespawn  = true;

            PuzzleBook book = new PuzzleBook();

            book.Movable = false;
            book.MoveToWorld(new Point3D(1109, 1153, -17), Map.TerMur);

            PuzzleRoomTeleporter tele = new PuzzleRoomTeleporter();

            tele.PointDest = new Point3D(1097, 1173, 1);
            tele.MapDest   = Map.TerMur;
            tele.MoveToWorld(new Point3D(1097, 1175, 0), Map.TerMur);

            tele           = new PuzzleRoomTeleporter();
            tele.PointDest = new Point3D(1098, 1173, 1);
            tele.MapDest   = Map.TerMur;
            tele.MoveToWorld(new Point3D(1098, 1175, 0), Map.TerMur);

            MetalDoor2 door2 = new MetalDoor2(DoorFacing.WestCCW);

            door2.Locked   = true;
            door2.KeyValue = 50000;
            door2.MoveToWorld(new Point3D(1097, 1174, 1), Map.TerMur);

            door2          = new MetalDoor2(DoorFacing.EastCW);
            door2.Locked   = true;
            door2.KeyValue = 50000;
            door2.MoveToWorld(new Point3D(1098, 1174, 1), Map.TerMur);

            Teleporter telep = new Teleporter();

            telep.PointDest = new Point3D(1097, 1175, 0);
            telep.MapDest   = Map.TerMur;
            telep.MoveToWorld(new Point3D(1097, 1173, 1), Map.TerMur);

            telep           = new Teleporter();
            telep.PointDest = new Point3D(1098, 1175, 0);
            telep.MapDest   = Map.TerMur;
            telep.MoveToWorld(new Point3D(1098, 1173, 1), Map.TerMur);

            telep           = new Teleporter();
            telep.PointDest = new Point3D(996, 1117, -42);
            telep.MapDest   = Map.TerMur;
            telep.MoveToWorld(new Point3D(980, 1064, -42), Map.TerMur);

            Static sparkle = new Static(14138);

            sparkle.MoveToWorld(new Point3D(980, 1064, -42), Map.TerMur);

            //Maze of Death
            UnderworldPuzzleBox pBox = new UnderworldPuzzleBox();

            pBox.MoveToWorld(new Point3D(1068, 1026, -37), Map.TerMur);

            GoldenCompass compass = new GoldenCompass();

            compass.MoveToWorld(new Point3D(1070, 1055, -34), Map.TerMur);

            Item map = new RolledMapOfTheUnderworld();

            map.MoveToWorld(new Point3D(1072, 1055, -36), Map.TerMur);
            map.Movable = false;

            FountainOfFortune f = new FountainOfFortune();

            f.MoveToWorld(new Point3D(1121, 957, -42), Map.TerMur);

            Item tile = new InvisibleTile();

            tile.MoveToWorld(new Point3D(1121, 965, -41), Map.TerMur);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1122, 965, -40), Map.TerMur);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1123, 965, -41), Map.TerMur);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1124, 965, -41), Map.TerMur);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1122, 964, -41), Map.TerMur);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1123, 964, -41), Map.TerMur);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1123, 963, -40), Map.TerMur);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1123, 962, -40), Map.TerMur);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1123, 961, -41), Map.TerMur);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1122, 961, -41), Map.TerMur);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1122, 960, -41), Map.TerMur);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1121, 960, -41), Map.TerMur);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1121, 959, -41), Map.TerMur);

            Console.WriteLine("Experimental Room, Puzzle Room and Maze of Death initialized.");
        }
Beispiel #7
0
        public static void GenerateDeco(CommandEventArgs e)
        {
            string name = "highseas";

            CharydbisSpawner.GenerateCharydbisSpawner();
            BountyQuestSpawner.GenerateShipSpawner();

            CorgulAltar altar;

            altar = new CorgulAltar();
            altar.MoveToWorld(new Point3D(2453, 865, 0), Map.Felucca);
            WeakEntityCollection.Add(name, altar);

            altar = new CorgulAltar();
            altar.MoveToWorld(new Point3D(2453, 865, 0), Map.Trammel);
            WeakEntityCollection.Add(name, altar);

            ProfessionalBountyBoard board;
            
            board = new ProfessionalBountyBoard();
            board.MoveToWorld(new Point3D(4544, 2298, -1), Map.Trammel);
            WeakEntityCollection.Add(name, board);

            board = new ProfessionalBountyBoard();
            board.MoveToWorld(new Point3D(4544, 2298, -1), Map.Felucca);
            WeakEntityCollection.Add(name, board);

            LocalizedSign sign;

            sign = new LocalizedSign(3025, 1152653); //The port of Zento Parking Area
            sign.MoveToWorld(new Point3D(713, 1359, 53), Map.Tokuno);
            WeakEntityCollection.Add(name, sign);

            sign = new LocalizedSign(3023, 1149821); //Winds Tavern
            sign.MoveToWorld(new Point3D(4548, 2300, -6), Map.Trammel);
            WeakEntityCollection.Add(name, sign);

            sign = new LocalizedSign(3023, 1149821); //Winds Tavern
            sign.MoveToWorld(new Point3D(4548, 2300, -6), Map.Felucca);
            WeakEntityCollection.Add(name, sign);

            sign = new LocalizedSign(3023, 1149820); //General Store
            sign.MoveToWorld(new Point3D(4543, 2317, -3), Map.Trammel);
            WeakEntityCollection.Add(name, sign);

            sign = new LocalizedSign(3023, 1149820); //General Store
            sign.MoveToWorld(new Point3D(4543, 2317, -3), Map.Felucca);
            WeakEntityCollection.Add(name, sign);

            XmlSpawner sp;
            string toSpawn = "FishMonger";

            //Britain
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(1482, 1754, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(1482, 1754, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Moonglow
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(4406, 1049, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(4406, 1049, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Trinsic
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(2061, 2855, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(2061, 2855, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Vesper
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(3009, 826, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(3009, 826, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Jhelom
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(1373, 3885, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(1373, 3885, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Skara Brae
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(641, 2234, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.MoveToWorld(new Point3D(641, 2234, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Papua
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(5827, 3258, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(5827, 3258, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Floating Eproriam
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 0;
            sp.HomeRange = 0;
            sp.MoveToWorld(new Point3D(4552, 2299, -1), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 0;
            sp.HomeRange = 0;
            sp.MoveToWorld(new Point3D(4540, 2321, -1), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "DocksAlchemist";

            //Britain
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(1482, 1754, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(1482, 1754, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Moonglow
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(4406, 1049, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(4406, 1049, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Trinsic
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(2061, 2855, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(2061, 2855, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Vesper
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(3009, 826, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(3009, 826, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Jhelom
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(1373, 3885, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(1373, 3885, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Skara Brae
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(641, 2234, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.MoveToWorld(new Point3D(641, 2234, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Papua
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(5827, 3258, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(5827, 3258, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            //Floating Eproriam
            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(4552, 2299, -1), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(4540, 2321, -1), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "GBBigglesby";

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(4544, 2302, -1), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(4544, 2302, -1), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "GBBigglesby/Name/Mitsubishi/Title/the fleet officer";

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 10;
            sp.MoveToWorld(new Point3D(713, 1370, 6), Map.Tokuno);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "BoatPainter";

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 15;
            sp.MoveToWorld(new Point3D(4552, 2337, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 15;
            sp.MoveToWorld(new Point3D(4552, 2337, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "Banker";

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(4554, 2315, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(4554, 2315, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "CrabFisher";

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 15;
            sp.MoveToWorld(new Point3D(4552, 2336, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 15;
            sp.MoveToWorld(new Point3D(4552, 2336, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 15;
            sp.MoveToWorld(new Point3D(4552, 2378, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 15;
            sp.MoveToWorld(new Point3D(4552, 2378, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "DockMaster";

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 10;
            sp.MoveToWorld(new Point3D(4565, 2307, -2), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 10;
            sp.MoveToWorld(new Point3D(4565, 2307, -2), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            toSpawn = "SeaMarketTavernKeeper";

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(4544, 2302, -1), Map.Trammel);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            sp = new XmlSpawner(toSpawn);
            sp.SpawnRange = 1;
            sp.HomeRange = 5;
            sp.MoveToWorld(new Point3D(4544, 2302, -1), Map.Felucca);
            sp.Respawn();
            WeakEntityCollection.Add(name, sp);

            SeaMarketBuoy bouy1 = new SeaMarketBuoy();
            SeaMarketBuoy bouy2 = new SeaMarketBuoy();
            SeaMarketBuoy bouy3 = new SeaMarketBuoy();
            SeaMarketBuoy bouy4 = new SeaMarketBuoy();
            SeaMarketBuoy bouy5 = new SeaMarketBuoy();
            SeaMarketBuoy bouy6 = new SeaMarketBuoy();
            SeaMarketBuoy bouy7 = new SeaMarketBuoy();
            SeaMarketBuoy bouy8 = new SeaMarketBuoy();

            Rectangle2D bound = Server.Regions.SeaMarketRegion.Bounds[0];

            bouy1.MoveToWorld(new Point3D(bound.X, bound.Y, -5), Map.Felucca);
            bouy2.MoveToWorld(new Point3D(bound.X, bound.Y, -5), Map.Trammel);
            WeakEntityCollection.Add(name, bouy1);
            WeakEntityCollection.Add(name, bouy2);

            bouy3.MoveToWorld(new Point3D(bound.X + bound.Width, bound.Y, -5), Map.Felucca);
            bouy4.MoveToWorld(new Point3D(bound.X + bound.Width, bound.Y, -5), Map.Trammel);
            WeakEntityCollection.Add(name, bouy3);
            WeakEntityCollection.Add(name, bouy4);

            bouy5.MoveToWorld(new Point3D(bound.X + bound.Width, bound.Y + bound.Height, -5), Map.Felucca);
            bouy6.MoveToWorld(new Point3D(bound.X + bound.Width, bound.Y + bound.Height, -5), Map.Trammel);
            WeakEntityCollection.Add(name, bouy5);
            WeakEntityCollection.Add(name, bouy6);

            bouy7.MoveToWorld(new Point3D(bound.X, bound.Y + bound.Height, -5), Map.Felucca);
            bouy8.MoveToWorld(new Point3D(bound.X, bound.Y + bound.Height, -5), Map.Trammel);
            WeakEntityCollection.Add(name, bouy7);
            WeakEntityCollection.Add(name, bouy8);

            Console.WriteLine("High Seas Content generated.");
        }
Beispiel #8
0
        public static void Generate()
        {
            ExperimentalRoomController controller = new ExperimentalRoomController();
            controller.MoveToWorld(new Point3D(980, 1117, -42), Map.TerMur);

            //Room 0 to 1
            ExperimentalRoomDoor door = new ExperimentalRoomDoor(Room.RoomZero, DoorFacing.WestCCW);
            ExperimentalRoomBlocker blocker = new ExperimentalRoomBlocker(Room.RoomZero);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(984, 1116, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(984, 1116, -42), Map.TerMur);

            door = new ExperimentalRoomDoor(Room.RoomZero, DoorFacing.EastCW);
            blocker = new ExperimentalRoomBlocker(Room.RoomZero);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(985, 1116, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(985, 1116, -42), Map.TerMur);

            //Room 1 to 2
            door = new ExperimentalRoomDoor(Room.RoomOne, DoorFacing.WestCCW);
            blocker = new ExperimentalRoomBlocker(Room.RoomOne);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(984, 1102, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(984, 1102, -42), Map.TerMur);

            door = new ExperimentalRoomDoor(Room.RoomOne, DoorFacing.EastCW);
            blocker = new ExperimentalRoomBlocker(Room.RoomOne);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(985, 1102, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(985, 1102, -42), Map.TerMur);

            //Room 2 to 3
            door = new ExperimentalRoomDoor(Room.RoomTwo, DoorFacing.WestCCW);
            blocker = new ExperimentalRoomBlocker(Room.RoomTwo);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(984, 1090, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(984, 1090, -42), Map.TerMur);

            door = new ExperimentalRoomDoor(Room.RoomTwo, DoorFacing.EastCW);
            blocker = new ExperimentalRoomBlocker(Room.RoomTwo);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(985, 1090, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(985, 1090, -42), Map.TerMur);

            //Room 3 to 4
            door = new ExperimentalRoomDoor(Room.RoomTwo, DoorFacing.WestCCW);
            blocker = new ExperimentalRoomBlocker(Room.RoomThree);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(984, 1072, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(984, 1072, -42), Map.TerMur);

            door = new ExperimentalRoomDoor(Room.RoomTwo, DoorFacing.EastCW);
            blocker = new ExperimentalRoomBlocker(Room.RoomThree);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(985, 1072, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(985, 1072, -42), Map.TerMur);

            ExperimentalRoomChest chest = new ExperimentalRoomChest();
            chest.MoveToWorld(new Point3D(984, 1064, -37), Map.TerMur);

            ExperimentalBook instr = new ExperimentalBook();
            instr.Movable = false;
            instr.MoveToWorld(new Point3D(995, 1114, -36), Map.TerMur);

            SecretDungeonDoor dd = new SecretDungeonDoor(DoorFacing.NorthCCW);
            dd.ClosedID = 87;
            dd.OpenedID = 88;
            dd.MoveToWorld(new Point3D(1007, 1119, -42), Map.TerMur);

            LocalizedSign sign = new LocalizedSign(3026, 1113407);  // Experimental Room Access
            sign.Movable = false;
            sign.MoveToWorld(new Point3D(980, 1119, -37), Map.TerMur);

            //Puzze Room
            PuzzleBox box = new PuzzleBox(PuzzleType.WestBox);
            box.MoveToWorld(new Point3D(1090, 1171, 11), Map.TerMur);

            box = new PuzzleBox(PuzzleType.EastBox);
            box.MoveToWorld(new Point3D(1104, 1171, 11), Map.TerMur);

            box = new PuzzleBox(PuzzleType.NorthBox);
            box.MoveToWorld(new Point3D(1097, 1163, 11), Map.TerMur);

            XmlSpawner spawner = new XmlSpawner("MagicKey");
            spawner.MoveToWorld(new Point3D(1109, 1150, -12), Map.TerMur);
            spawner.SpawnRange = 0;
            spawner.MinDelay = TimeSpan.FromSeconds(30);
            spawner.MaxDelay = TimeSpan.FromSeconds(45);
            spawner.DoRespawn = true;

            PuzzleBook book = new PuzzleBook();
            book.Movable = false;
            book.MoveToWorld(new Point3D(1109, 1153, -17), Map.TerMur);

            PuzzleRoomTeleporter tele = new PuzzleRoomTeleporter();
            tele.PointDest = new Point3D(1097, 1173, 1);
            tele.MapDest = Map.TerMur;
            tele.MoveToWorld(new Point3D(1097, 1175, 0), Map.TerMur);

            tele = new PuzzleRoomTeleporter();
            tele.PointDest = new Point3D(1098, 1173, 1);
            tele.MapDest = Map.TerMur;
            tele.MoveToWorld(new Point3D(1098, 1175, 0), Map.TerMur);

            MetalDoor2 door2 = new MetalDoor2(DoorFacing.WestCCW);
            door2.Locked = true;
            door2.KeyValue = 50000;
            door2.MoveToWorld(new Point3D(1097, 1174, 1), Map.TerMur);

            door2 = new MetalDoor2(DoorFacing.EastCW);
            door2.Locked = true;
            door2.KeyValue = 50000;
            door2.MoveToWorld(new Point3D(1098, 1174, 1), Map.TerMur);

            Teleporter telep = new Teleporter();
            telep.PointDest = new Point3D(1097, 1175, 0);
            telep.MapDest = Map.TerMur;
            telep.MoveToWorld(new Point3D(1097, 1173, 1), Map.TerMur);

            telep = new Teleporter();
            telep.PointDest = new Point3D(1098, 1175, 0);
            telep.MapDest = Map.TerMur;
            telep.MoveToWorld(new Point3D(1098, 1173, 1), Map.TerMur);

            telep = new Teleporter();
            telep.PointDest = new Point3D(996, 1117, -42);
            telep.MapDest = Map.TerMur;
            telep.MoveToWorld(new Point3D(980, 1064, -42), Map.TerMur);

            Static sparkle = new Static(14138);
            sparkle.MoveToWorld(new Point3D(980, 1064, -42), Map.TerMur);

            //Maze of Death
            UnderworldPuzzleBox pBox = new UnderworldPuzzleBox();
            pBox.MoveToWorld(new Point3D(1068, 1026, -37), Map.TerMur);

            GoldenCompass compass = new GoldenCompass();
            compass.MoveToWorld(new Point3D(1070, 1055, -34), Map.TerMur);

            Item map = new RolledMapOfTheUnderworld();
            map.MoveToWorld(new Point3D(1072, 1055, -36), Map.TerMur);
            map.Movable = false;

            FountainOfFortune f = new FountainOfFortune();
            f.MoveToWorld(new Point3D(1121, 962, -42), Map.TerMur);

            Console.WriteLine("Experimental Room, Puzzle Room and Maze of Death initialized.");
        }
Beispiel #9
0
        public static void Generate()
        {
            ExperimentalRoomController controller = new ExperimentalRoomController();

            controller.MoveToWorld(new Point3D(980, 1117, -42), Map.TerMur);

            //Room 0 to 1
            ExperimentalRoomDoor    door    = new ExperimentalRoomDoor(Room.RoomZero, DoorFacing.WestCCW);
            ExperimentalRoomBlocker blocker = new ExperimentalRoomBlocker(Room.RoomZero);

            door.Hue = 1109;
            door.MoveToWorld(new Point3D(984, 1116, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(984, 1116, -42), Map.TerMur);
            WeakEntityCollection.Add("sa", door);
            WeakEntityCollection.Add("sa", blocker);

            door     = new ExperimentalRoomDoor(Room.RoomZero, DoorFacing.EastCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomZero);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(985, 1116, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(985, 1116, -42), Map.TerMur);
            WeakEntityCollection.Add("sa", door);
            WeakEntityCollection.Add("sa", blocker);

            //Room 1 to 2
            door     = new ExperimentalRoomDoor(Room.RoomOne, DoorFacing.WestCCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomOne);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(984, 1102, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(984, 1102, -42), Map.TerMur);
            WeakEntityCollection.Add("sa", door);
            WeakEntityCollection.Add("sa", blocker);

            door     = new ExperimentalRoomDoor(Room.RoomOne, DoorFacing.EastCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomOne);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(985, 1102, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(985, 1102, -42), Map.TerMur);
            WeakEntityCollection.Add("sa", door);
            WeakEntityCollection.Add("sa", blocker);

            //Room 2 to 3
            door     = new ExperimentalRoomDoor(Room.RoomTwo, DoorFacing.WestCCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomTwo);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(984, 1090, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(984, 1090, -42), Map.TerMur);
            WeakEntityCollection.Add("sa", door);
            WeakEntityCollection.Add("sa", blocker);

            door     = new ExperimentalRoomDoor(Room.RoomTwo, DoorFacing.EastCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomTwo);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(985, 1090, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(985, 1090, -42), Map.TerMur);
            WeakEntityCollection.Add("sa", door);
            WeakEntityCollection.Add("sa", blocker);

            //Room 3 to 4
            door     = new ExperimentalRoomDoor(Room.RoomTwo, DoorFacing.WestCCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomThree);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(984, 1072, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(984, 1072, -42), Map.TerMur);
            WeakEntityCollection.Add("sa", door);
            WeakEntityCollection.Add("sa", blocker);

            door     = new ExperimentalRoomDoor(Room.RoomTwo, DoorFacing.EastCW);
            blocker  = new ExperimentalRoomBlocker(Room.RoomThree);
            door.Hue = 1109;
            door.MoveToWorld(new Point3D(985, 1072, -42), Map.TerMur);
            blocker.MoveToWorld(new Point3D(985, 1072, -42), Map.TerMur);
            WeakEntityCollection.Add("sa", door);
            WeakEntityCollection.Add("sa", blocker);

            ExperimentalRoomChest chest = new ExperimentalRoomChest();

            chest.MoveToWorld(new Point3D(984, 1064, -37), Map.TerMur);
            WeakEntityCollection.Add("sa", chest);

            ExperimentalBook instr = new ExperimentalBook
            {
                Movable = false
            };

            instr.MoveToWorld(new Point3D(995, 1114, -36), Map.TerMur);
            WeakEntityCollection.Add("sa", instr);

            SecretDungeonDoor dd = new SecretDungeonDoor(DoorFacing.NorthCCW)
            {
                ClosedID = 87,
                OpenedID = 88
            };

            dd.MoveToWorld(new Point3D(1007, 1119, -42), Map.TerMur);
            WeakEntityCollection.Add("sa", dd);

            LocalizedSign sign = new LocalizedSign(3026, 1113407)
            {
                Movable = false
            };  // Experimental Room Access

            sign.MoveToWorld(new Point3D(980, 1119, -37), Map.TerMur);
            WeakEntityCollection.Add("sa", sign);

            //Puzze Room
            PuzzleBox box = new PuzzleBox(PuzzleType.WestBox);

            box.MoveToWorld(new Point3D(1090, 1171, 11), Map.TerMur);
            WeakEntityCollection.Add("sa", box);

            box = new PuzzleBox(PuzzleType.EastBox);
            box.MoveToWorld(new Point3D(1104, 1171, 11), Map.TerMur);
            WeakEntityCollection.Add("sa", box);

            box = new PuzzleBox(PuzzleType.NorthBox);
            box.MoveToWorld(new Point3D(1097, 1163, 11), Map.TerMur);
            WeakEntityCollection.Add("sa", box);

            PuzzleBook book = new PuzzleBook
            {
                Movable = false
            };

            book.MoveToWorld(new Point3D(1109, 1153, -17), Map.TerMur);
            WeakEntityCollection.Add("sa", book);

            PuzzleRoomTeleporter tele = new PuzzleRoomTeleporter
            {
                PointDest = new Point3D(1097, 1173, 1),
                MapDest   = Map.TerMur
            };

            tele.MoveToWorld(new Point3D(1097, 1175, 0), Map.TerMur);
            WeakEntityCollection.Add("sa", tele);

            tele = new PuzzleRoomTeleporter
            {
                PointDest = new Point3D(1098, 1173, 1),
                MapDest   = Map.TerMur
            };
            tele.MoveToWorld(new Point3D(1098, 1175, 0), Map.TerMur);
            WeakEntityCollection.Add("sa", tele);

            MetalDoor2 door2 = new MetalDoor2(DoorFacing.WestCCW)
            {
                Locked   = true,
                KeyValue = 50000
            };

            door2.MoveToWorld(new Point3D(1097, 1174, 1), Map.TerMur);
            WeakEntityCollection.Add("sa", door2);

            door2 = new MetalDoor2(DoorFacing.EastCW)
            {
                Locked   = true,
                KeyValue = 50000
            };
            door2.MoveToWorld(new Point3D(1098, 1174, 1), Map.TerMur);
            WeakEntityCollection.Add("sa", door);

            Teleporter telep = new Teleporter
            {
                PointDest = new Point3D(1097, 1175, 0),
                MapDest   = Map.TerMur
            };

            telep.MoveToWorld(new Point3D(1097, 1173, 1), Map.TerMur);
            WeakEntityCollection.Add("sa", telep);

            telep = new Teleporter
            {
                PointDest = new Point3D(1098, 1175, 0),
                MapDest   = Map.TerMur
            };
            telep.MoveToWorld(new Point3D(1098, 1173, 1), Map.TerMur);
            WeakEntityCollection.Add("sa", telep);

            telep = new Teleporter
            {
                PointDest = new Point3D(996, 1117, -42),
                MapDest   = Map.TerMur
            };
            telep.MoveToWorld(new Point3D(980, 1064, -42), Map.TerMur);
            WeakEntityCollection.Add("sa", telep);

            Static sparkle = new Static(14138);

            sparkle.MoveToWorld(new Point3D(980, 1064, -42), Map.TerMur);
            WeakEntityCollection.Add("sa", sparkle);

            //Maze of Death
            UnderworldPuzzleBox pBox = new UnderworldPuzzleBox();

            pBox.MoveToWorld(new Point3D(1068, 1026, -37), Map.TerMur);
            WeakEntityCollection.Add("sa", pBox);

            GoldenCompass compass = new GoldenCompass();

            compass.MoveToWorld(new Point3D(1070, 1055, -34), Map.TerMur);
            WeakEntityCollection.Add("sa", compass);

            Item map = new RolledMapOfTheUnderworld();

            map.MoveToWorld(new Point3D(1072, 1055, -36), Map.TerMur);
            map.Movable = false;
            WeakEntityCollection.Add("sa", map);

            FountainOfFortune f = new FountainOfFortune();

            f.MoveToWorld(new Point3D(1121, 957, -42), Map.TerMur);
            WeakEntityCollection.Add("sa", f);

            Item tile = new InvisibleTile();

            tile.MoveToWorld(new Point3D(1121, 965, -41), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1122, 965, -40), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1123, 965, -41), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1124, 965, -41), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1122, 964, -41), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1123, 964, -41), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1123, 963, -40), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1123, 962, -40), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1123, 961, -41), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1122, 961, -41), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1122, 960, -41), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1121, 960, -41), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            tile = new InvisibleTile();
            tile.MoveToWorld(new Point3D(1121, 959, -41), Map.TerMur);
            WeakEntityCollection.Add("sa", tile);

            GenerateRevealTiles();
            CheckCannoneers();

            Console.WriteLine("Experimental Room, Puzzle Room and Maze of Death initialized.");
        }