public OphidianWarrior() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 ) { LastTimeSpoken = DateTime.Now; Name = m_Names[Utility.Random( m_Names.Length )]; Body = 86; SpeechHue = 2129; BaseSoundID = 634; SetStr( 150, 320 ); SetDex( 94, 190 ); SetInt( 64, 160 ); SetHits( 128, 155 ); SetMana( 0 ); SetDamage( 5, 11 ); SetSkill( SkillName.MagicResist, 70.1, 85.0 ); SetSkill( SkillName.Swords, 60.1, 85.0 ); SetSkill( SkillName.Tactics, 75.1, 90.0 ); Fame = 4500; Karma = -4500; VirtualArmor = 36; Item item = null; switch( Utility.Random(2000) ) { case 0: PackItem( item = new Static(0x9BD) ); break; case 1: PackItem( item = new Static(0x9BE) ); break; case 2: PackItem( item = new Static(0x9D4) ); break; case 3: PackItem( item = new Static(0x9D5) ); break; } if (item != null) item.Movable = true; PackGold( 150, 250 ); PackPotion(); PackGem(); PackItem( new Arrow( Utility.RandomMinMax( 1, 10 ) ) ); switch ( Utility.Random( 2 ) ) { case 0: PackWeapon( 0, 5 ); break; case 1: PackWeapon( 0, 5 ); break; } switch ( Utility.Random( 5 ) ) { case 0: PackWeapon( 0, 5 ); break; case 1: PackWeapon( 0, 5 ); break; } if ( 0.10 > Utility.RandomDouble() ) PackItem( new Bandage(250) ); if ( 0.01 > Utility.RandomDouble() ) PackItem( new InvisBoots() ); }
public PreviewHouse(int multiID) : base(multiID) { m_Components = new List<Item>(); MultiComponentList mcl = Components; for (int i = 1; i < mcl.List.Length; ++i) { MultiTileEntry entry = mcl.List[i]; if (entry.m_Flags == 0) { //Item item = new Static((int)entry.m_ItemID); Item item = new Static(entry.m_ItemID & TileData.MaxItemValue); item.MoveToWorld(new Point3D(X + entry.m_OffsetX, Y + entry.m_OffsetY, Z + entry.m_OffsetZ), Map); m_Components.Add(item); } } // check to see if house is custom if (multiID >= 0x13ec && multiID <= 0x147b) { AddSignAndPost(mcl); AddExteriorStairs(mcl); } m_Timer = new DecayTimer(this); m_Timer.Start(); }
public PreviewHouse(int multiID) : base(multiID) { m_Components = new List<Item>(); MultiComponentList mcl = Components; for (int i = 1; i < mcl.List.Length; ++i) { MultiTileEntry entry = mcl.List[i]; if (entry.m_Flags == 0) { //Item item = new Static((int)entry.m_ItemID); Item item = new Static(entry.m_ItemID & TileData.MaxItemValue); item.MoveToWorld(new Point3D(X + entry.m_OffsetX, Y + entry.m_OffsetY, Z + entry.m_OffsetZ), Map); m_Components.Add(item); } } m_Timer = new DecayTimer(this); m_Timer.Start(); }
public TolariaGuard() { Body = 400; Name = NameList.RandomName( "male" ); Title = "the tolaria guard"; Static item = new Static( 11022 ); item.Layer = Layer.Helm; item.Hue = 2714; EquipItem( item ); item = new Static( 11022 ); item.Layer = Layer.Neck; item.Hue = 2714; EquipItem( item ); item = new Static( 11016 ); item.Layer = Layer.InnerTorso; item.Hue = 2714; EquipItem( item ); item = new Static( 11014 ); item.Layer = Layer.Pants; item.Hue = 2714; EquipItem( item ); item = new Static( 11027 ); item.Layer = Layer.Shoes; item.Hue = 2714; EquipItem( item ); item = new Static( 11018 ); item.Layer = Layer.Arms; item.Hue = 2714; EquipItem( item ); item = new Static( 11020 ); item.Layer = Layer.Gloves; item.Hue = 2714; EquipItem( item ); item = new Static( 11012 ); item.Layer = Layer.Cloak; item.Hue = 2714; EquipItem( item ); item = new Static( 11009 ); item.Layer = Layer.TwoHanded; item.Hue = 2714; EquipItem( item ); item = new Static( 9934 ); item.Layer = Layer.FirstValid; item.Hue = 2714; EquipItem( item ); }
/// <summary> /// Builds the structure /// </summary> /// <param name="p">The point at which to build</param> private void BuildCallback(Point3D p) { if (m_User.Map == null || m_User.Map == Map.Internal) { return; } m_Building.Clear(); // Calculate bounds Point2D start = new Point2D(int.MaxValue, int.MaxValue); Point2D end = Point2D.Zero; int z = int.MaxValue; foreach (Point2D point in m_Tiles.Keys) { start.X = Math.Min(start.X, point.X); start.Y = Math.Min(start.Y, point.Y); end.X = Math.Max(end.X, point.X); end.Y = Math.Max(end.Y, point.Y); List <Server.StaticTile> tiles = m_Tiles[point] as List <Server.StaticTile>; foreach (StaticTile t in tiles) { z = Math.Min(z, t.Z); } } Point2D center = Point2D.Zero; center.X = start.X + ((end.X - start.X) / 2); center.Y = start.Y + ((end.Y - start.Y) / 2); foreach (Point2D point in m_Tiles.Keys) { int xOffset = point.X - center.X; int yOffset = point.Y - center.Y; List <Server.StaticTile> tiles = m_Tiles[point] as List <Server.StaticTile>; if (tiles == null || tiles.Count == 0) { continue; } foreach (StaticTile t in tiles) { int zOffset = t.Z - p.Z; Server.Items.Static item = new Server.Items.Static(t.ID); item.MoveToWorld(new Point3D(p.X + xOffset, p.Y + yOffset, p.Z + zOffset), m_User.Map); m_Building.Add(item); } } ResendGump(); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 0: m_Static = (Static)reader.ReadItem(); break; } }
public void AddExteriorStairs( MultiComponentList mcl ) { // this won't work correctly without declaring a new mcl so it can then be resized MultiComponentList mclNew = new MultiComponentList( MultiData.GetComponents( ItemID ) ); mclNew.Resize( mclNew.Width, mclNew.Height + 1 ); int xCenter = mcl.Center.X; int yCenter = mcl.Center.Y; int y = mcl.Height; for ( int x = 1; x < mclNew.Width; ++x ){ Item stair = new Static((int)0x751); stair.MoveToWorld(new Point3D(x - xCenter, y - yCenter, 0), this.Map); this.m_Components.Add(stair); } }
// Adds sign post, sign hanger, and house sign public void AddSignAndPost(MultiComponentList mcl) { int xoffset = mcl.Min.X; int y = mcl.Height - 1 - mcl.Center.Y; Item signpost = new Static((int)9); signpost.MoveToWorld(new Point3D(X + xoffset, Y + y, Z + 7), this.Map); this.m_Components.Add(signpost); xoffset = Components.Min.X; y = Components.Height - Components.Center.Y; Item signhanger = new Static((int)0xB98); signhanger.MoveToWorld(new Point3D(X + xoffset, Y + y, Z + 7), this.Map); this.m_Components.Add(signhanger); Item housesign = new Static((int)0xBD2); housesign.MoveToWorld(new Point3D(X + xoffset, Y + y, Z + 7), this.Map); this.m_Components.Add(housesign); }
private static void GenerateCoral_OnCommand(CommandEventArgs e) { e.Mobile.SendMessage("Generating Corals..."); int count = 0; for(int i = 0; i < limits.Length; i++) { Point2D actual = limits[i]; Point2D next = (i == limits.Length - 1 ? limits[0] : limits[i + 1]); for (int x = actual.X, y = actual.Y; x != next.X || y != next.Y;) { if (x != next.X) { if (x < next.X) x++; else x--; } if (y != next.Y) { if (y < next.Y) y++; else y--; } Static rock = new Static(rocks[Utility.Random(0, rocks.Count)]); Item blocker = new Blocker(); Item losBlocker = new LOSBlocker(); int z = map.GetAverageZ(x, y); // on récupère la hauteur du sol à cet endroit rock.MoveToWorld(new Point3D(x, y, z), map); // le rocher pour la forme blocker.MoveToWorld(new Point3D(x, y, z), map); // un blocker pour empêcher de passer même avec un sea horse par exemple losBlocker.MoveToWorld(new Point3D(x, y, z), map); // pour empêcher tout sort de téléport de fonctionner count++; } } e.Mobile.SendMessage(String.Format("{0} Corals have been generated !", count)); }
public PreviewHouse(int multiID) : base(multiID) { this.m_Components = new List<Item>(); MultiComponentList mcl = this.Components; for (int i = 1; i < mcl.List.Length; ++i) { MultiTileEntry entry = mcl.List[i]; if (entry.m_Flags == 0) { Item item = new Static((int)entry.m_ItemID); item.MoveToWorld(new Point3D(this.X + entry.m_OffsetX, this.Y + entry.m_OffsetY, this.Z + entry.m_OffsetZ), this.Map); this.m_Components.Add(item); } } this.m_Timer = new DecayTimer(this); this.m_Timer.Start(); }
public override void IncreaseTier() { base.IncreaseTier(); List<object> list = new List<object>(); Item c; switch ( this.Tier ) { case 1: // easel with canvas c = new Static(0xF66); c.MoveToWorld(new Point3D(1417, 1602, 30), this.Map); list.Add(c); // table c = new Static(0xB6B); c.MoveToWorld(new Point3D(1417, 1606, 30), this.Map); list.Add(c); c = new Static(0xB6D); c.MoveToWorld(new Point3D(1417, 1605, 30), this.Map); list.Add(c); c = new Static(0xB6C); c.MoveToWorld(new Point3D(1417, 1604, 30), this.Map); list.Add(c); // bonsai tree c = new Static(0x28DC); c.MoveToWorld(new Point3D(1417, 1604, 36), this.Map); list.Add(c); // bottles c = new Static(0xE29); c.MoveToWorld(new Point3D(1417, 1605, 37), this.Map); list.Add(c); c = new Static(0xE28); c.MoveToWorld(new Point3D(1417, 1605, 36), this.Map); list.Add(c); c = new Static(0xE2C); c.MoveToWorld(new Point3D(1417, 1606, 37), this.Map); list.Add(c); // pen and ink c = new Static(0xFBF); c.MoveToWorld(new Point3D(1417, 1606, 36), this.Map); list.Add(c); // cooking book c = new Static(0xFBE); c.MoveToWorld(new Point3D(1418, 1606, 42), this.Map); c.Name = "A Cookbook"; c.Weight = 5.0; list.Add(c); break; } if (list.Count > 0) this.Tiers.Add(list); }
public Item Construct() { Item item; try { if (this.m_Type == typeofStatic) { item = new Static(this.m_ItemID); } #region Mondain's Legacy else if (this.m_Type == typeof(SecretSwitch)) { int id = 0; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("SecretWall")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) { id = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); break; } } } Item wall = Decorate.FindByID(id); item = new SecretSwitch(this.m_ItemID, wall as SecretWall); } else if (this.m_Type == typeof(SecretWall)) { SecretWall wall = new SecretWall(this.m_ItemID); for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("MapDest")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) wall.MapDest = Map.Parse(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("PointDest")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) wall.PointDest = Point3D.Parse(this.m_Params[i].Substring(++indexOf)); } } item = wall; } #endregion else if (this.m_Type == typeofLocalizedStatic) { int labelNumber = 0; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("LabelNumber")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) { labelNumber = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); break; } } } item = new LocalizedStatic(this.m_ItemID, labelNumber); } else if (this.m_Type == typeofLocalizedSign) { int labelNumber = 0; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("LabelNumber")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) { labelNumber = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); break; } } } item = new LocalizedSign(this.m_ItemID, labelNumber); } else if (this.m_Type == typeofAnkhWest || this.m_Type == typeofAnkhNorth) { bool bloodied = false; for (int i = 0; !bloodied && i < this.m_Params.Length; ++i) bloodied = (this.m_Params[i] == "Bloodied"); if (this.m_Type == typeofAnkhWest) item = new AnkhWest(bloodied); else item = new AnkhNorth(bloodied); } else if (this.m_Type == typeofMarkContainer) { bool bone = false; bool locked = false; Map map = Map.Malas; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i] == "Bone") { bone = true; } else if (this.m_Params[i] == "Locked") { locked = true; } else if (this.m_Params[i].StartsWith("TargetMap")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) map = Map.Parse(this.m_Params[i].Substring(++indexOf)); } } MarkContainer mc = new MarkContainer(bone, locked); mc.TargetMap = map; mc.Description = "strange location"; item = mc; } else if (this.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 < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("Range")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) range = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("WarningString")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) messageString = this.m_Params[i].Substring(++indexOf); } else if (this.m_Params[i].StartsWith("WarningNumber")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) messageNumber = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("HintString")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) hintString = this.m_Params[i].Substring(++indexOf); } else if (this.m_Params[i].StartsWith("HintNumber")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) hintNumber = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("ResetDelay")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) resetDelay = TimeSpan.Parse(this.m_Params[i].Substring(++indexOf)); } } HintItem hi = new HintItem(this.m_ItemID, range, messageNumber, hintNumber); hi.WarningString = messageString; hi.HintString = hintString; hi.ResetDelay = resetDelay; item = hi; } else if (this.m_Type == typeofWarningItem) { int range = 0; int messageNumber = 0; string messageString = null; TimeSpan resetDelay = TimeSpan.Zero; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("Range")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) range = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("WarningString")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) messageString = this.m_Params[i].Substring(++indexOf); } else if (this.m_Params[i].StartsWith("WarningNumber")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) messageNumber = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("ResetDelay")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) resetDelay = TimeSpan.Parse(this.m_Params[i].Substring(++indexOf)); } } WarningItem wi = new WarningItem(this.m_ItemID, range, messageNumber); wi.WarningString = messageString; wi.ResetDelay = resetDelay; item = wi; } else if (this.m_Type == typeofCannon) { CannonDirection direction = CannonDirection.North; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("CannonDirection")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) direction = (CannonDirection)Enum.Parse(typeof(CannonDirection), this.m_Params[i].Substring(++indexOf), true); } } item = new Cannon(direction); } else if (this.m_Type == typeofSerpentPillar) { string word = null; Rectangle2D destination = new Rectangle2D(); for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("Word")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) word = this.m_Params[i].Substring(++indexOf); } else if (this.m_Params[i].StartsWith("DestStart")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) destination.Start = Point2D.Parse(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("DestEnd")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) destination.End = Point2D.Parse(this.m_Params[i].Substring(++indexOf)); } } item = new SerpentPillar(word, destination); } else if (this.m_Type.IsSubclassOf(typeofBeverage)) { BeverageType content = BeverageType.Liquor; bool fill = false; for (int i = 0; !fill && i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("Content")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) { content = (BeverageType)Enum.Parse(typeof(BeverageType), this.m_Params[i].Substring(++indexOf), true); fill = true; } } } if (fill) item = (Item)Activator.CreateInstance(this.m_Type, new object[] { content }); else item = (Item)Activator.CreateInstance(this.m_Type); } else if (this.m_Type.IsSubclassOf(typeofBaseDoor)) { DoorFacing facing = DoorFacing.WestCW; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("Facing")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) { facing = (DoorFacing)Enum.Parse(typeof(DoorFacing), this.m_Params[i].Substring(++indexOf), true); break; } } } item = (Item)Activator.CreateInstance(this.m_Type, new object[] { facing }); } else { item = (Item)Activator.CreateInstance(this.m_Type); } } catch (Exception e) { throw new Exception(String.Format("Bad type: {0}", this.m_Type), e); } if (item is BaseAddon) { if (item is MaabusCoffin) { MaabusCoffin coffin = (MaabusCoffin)item; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("SpawnLocation")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) coffin.SpawnLocation = Point3D.Parse(this.m_Params[i].Substring(++indexOf)); } } } else if (this.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 = this.m_ItemID; } } } else if (item is BaseLight) { bool unlit = false, unprotected = false; for (int i = 0; i < this.m_Params.Length; ++i) { if (!unlit && this.m_Params[i] == "Unlit") unlit = true; else if (!unprotected && this.m_Params[i] == "Unprotected") unprotected = true; if (unlit && unprotected) break; } if (!unlit) ((BaseLight)item).Ignite(); if (!unprotected) ((BaseLight)item).Protected = true; if (this.m_ItemID > 0) item.ItemID = this.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 < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("Spawn")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) sp.SpawnNames.Add(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("MinDelay")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) sp.MinDelay = TimeSpan.Parse(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("MaxDelay")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) sp.MaxDelay = TimeSpan.Parse(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("NextSpawn")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) sp.NextSpawn = TimeSpan.Parse(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("Count")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) sp.Count = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("Team")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) sp.Team = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("HomeRange")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) sp.HomeRange = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("Running")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) sp.Running = Utility.ToBoolean(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("Group")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) sp.Group = Utility.ToBoolean(this.m_Params[i].Substring(++indexOf)); } } } else if (item is RecallRune) { RecallRune rune = (RecallRune)item; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("Description")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) rune.Description = this.m_Params[i].Substring(++indexOf); } else if (this.m_Params[i].StartsWith("Marked")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) rune.Marked = Utility.ToBoolean(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("TargetMap")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) rune.TargetMap = Map.Parse(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("Target")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) rune.Target = Point3D.Parse(this.m_Params[i].Substring(++indexOf)); } } } else if (item is SkillTeleporter) { SkillTeleporter tp = (SkillTeleporter)item; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("Skill")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.Skill = (SkillName)Enum.Parse(typeof(SkillName), this.m_Params[i].Substring(++indexOf), true); } else if (this.m_Params[i].StartsWith("RequiredFixedPoint")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.Required = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)) * 0.01; } else if (this.m_Params[i].StartsWith("Required")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.Required = Utility.ToDouble(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("MessageString")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.MessageString = this.m_Params[i].Substring(++indexOf); } else if (this.m_Params[i].StartsWith("MessageNumber")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.MessageNumber = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("PointDest")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.PointDest = Point3D.Parse(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("MapDest")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.MapDest = Map.Parse(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("Creatures")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.Creatures = Utility.ToBoolean(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("SourceEffect")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.SourceEffect = Utility.ToBoolean(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("DestEffect")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.DestEffect = Utility.ToBoolean(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("SoundID")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.SoundID = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("Delay")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.Delay = TimeSpan.Parse(this.m_Params[i].Substring(++indexOf)); } } if (this.m_ItemID > 0) item.ItemID = this.m_ItemID; } else if (item is KeywordTeleporter) { KeywordTeleporter tp = (KeywordTeleporter)item; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("Substring")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.Substring = this.m_Params[i].Substring(++indexOf); } else if (this.m_Params[i].StartsWith("Keyword")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.Keyword = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("Range")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.Range = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("PointDest")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.PointDest = Point3D.Parse(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("MapDest")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.MapDest = Map.Parse(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("Creatures")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.Creatures = Utility.ToBoolean(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("SourceEffect")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.SourceEffect = Utility.ToBoolean(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("DestEffect")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.DestEffect = Utility.ToBoolean(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("SoundID")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.SoundID = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("Delay")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.Delay = TimeSpan.Parse(this.m_Params[i].Substring(++indexOf)); } } if (this.m_ItemID > 0) item.ItemID = this.m_ItemID; } else if (item is Teleporter) { Teleporter tp = (Teleporter)item; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("PointDest")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.PointDest = Point3D.Parse(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("MapDest")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.MapDest = Map.Parse(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("Creatures")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.Creatures = Utility.ToBoolean(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("SourceEffect")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.SourceEffect = Utility.ToBoolean(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("DestEffect")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.DestEffect = Utility.ToBoolean(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("SoundID")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.SoundID = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); } else if (this.m_Params[i].StartsWith("Delay")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) tp.Delay = TimeSpan.Parse(this.m_Params[i].Substring(++indexOf)); } } if (this.m_ItemID > 0) item.ItemID = this.m_ItemID; } else if (item is FillableContainer) { FillableContainer cont = (FillableContainer)item; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("ContentType")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) cont.ContentType = (FillableContentType)Enum.Parse(typeof(FillableContentType), this.m_Params[i].Substring(++indexOf), true); } } if (this.m_ItemID > 0) item.ItemID = this.m_ItemID; } else if (this.m_ItemID > 0) { item.ItemID = this.m_ItemID; } item.Movable = false; for (int i = 0; i < this.m_Params.Length; ++i) { if (this.m_Params[i].StartsWith("Light")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) item.Light = (LightType)Enum.Parse(typeof(LightType), this.m_Params[i].Substring(++indexOf), true); } else if (this.m_Params[i].StartsWith("Hue")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) { int hue = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); if (item is DyeTub) ((DyeTub)item).DyedHue = hue; else item.Hue = hue; } } else if (this.m_Params[i].StartsWith("Name")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) item.Name = this.m_Params[i].Substring(++indexOf); } else if (this.m_Params[i].StartsWith("Amount")) { int indexOf = this.m_Params[i].IndexOf('='); if (indexOf >= 0) { // Must supress stackable warnings bool wasStackable = item.Stackable; item.Stackable = true; item.Amount = Utility.ToInt32(this.m_Params[i].Substring(++indexOf)); item.Stackable = wasStackable; } } } return item; }
public static void ShowSpawnPoints_OnCommand(CommandEventArgs e) { ArrayList ToShow = new ArrayList(); foreach (Item item in World.Items.Values) { if (item is XmlSpawner) { //turned off visibility. Admins will still see masts but players will not. item.Visible = false; // set the spawn item visibility item.Movable = false; // Make the spawn item movable item.Hue = 88; // Bright blue colour so its easy to spot item.ItemID = ShowItemId; // Ship Mast (Very tall, easy to see if beneath other objects) // find container-held spawners to be marked with an external static if ((item.Parent != null) && (item.RootParent is Container)) { ToShow.Add(item); } } } // place the statics foreach (Item i in ToShow) { XmlSpawner xml_item = (XmlSpawner)i; // does the spawner already have a static attached to it? could happen if two showall commands are issued in a row. // if so then dont add another if ((xml_item.m_ShowContainerStatic == null || xml_item.m_ShowContainerStatic.Deleted) && xml_item.RootParent is Container) { Container root_item = xml_item.RootParent as Container; // calculate a world location for the static. Position it just above the container int x = root_item.Location.X; int y = root_item.Location.Y; int z = root_item.Location.Z + 10; Static s = new Static(ShowItemId); s.Visible = false; s.MoveToWorld(new Point3D(x, y, z), root_item.Map); xml_item.m_ShowContainerStatic = s; } } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); bool haveproximityrange = false; bool hasnewobjectinfo = false; int tmpSpawnListSize = 0; ArrayList tmpSubGroup = null; ArrayList tmpSequentialResetTime = null; ArrayList tmpSequentialResetTo = null; ArrayList tmpKillsNeeded = null; ArrayList tmpRequireSurface = null; ArrayList tmpRestrictKillsToSubgroup = null; ArrayList tmpClearOnAdvance = null; ArrayList tmpMinDelay = null; ArrayList tmpMaxDelay = null; ArrayList tmpNextSpawn = null; ArrayList tmpDisableSpawn = null; ArrayList tmpPackRange = null; ArrayList tmpSpawnsPer = null; switch (version) { case 30: { m_AllowNPCTriggering = reader.ReadBool(); goto case 29; } case 29: { tmpSpawnListSize = reader.ReadInt(); tmpSpawnsPer = new ArrayList(tmpSpawnListSize); for (int i = 0; i < tmpSpawnListSize; ++i) { int spawnsper = reader.ReadInt(); tmpSpawnsPer.Add(spawnsper); } goto case 28; } case 28: { if (version < 29) { tmpSpawnListSize = reader.ReadInt(); } tmpPackRange = new ArrayList(tmpSpawnListSize); for (int i = 0; i < tmpSpawnListSize; ++i) { int packrange = reader.ReadInt(); tmpPackRange.Add(packrange); } goto case 27; } case 27: { if (version < 28) { tmpSpawnListSize = reader.ReadInt(); } tmpDisableSpawn = new ArrayList(tmpSpawnListSize); for (int i = 0; i < tmpSpawnListSize; ++i) { bool disablespawn = reader.ReadBool(); tmpDisableSpawn.Add(disablespawn); } goto case 26; } case 26: { m_SpawnOnTrigger = reader.ReadBool(); m_FirstModified = reader.ReadDateTime(); m_LastModified = reader.ReadDateTime(); goto case 25; } case 25: { goto case 24; } case 24: { if (version < 27) { tmpSpawnListSize = reader.ReadInt(); } tmpRestrictKillsToSubgroup = new ArrayList(tmpSpawnListSize); tmpClearOnAdvance = new ArrayList(tmpSpawnListSize); tmpMinDelay = new ArrayList(tmpSpawnListSize); tmpMaxDelay = new ArrayList(tmpSpawnListSize); tmpNextSpawn = new ArrayList(tmpSpawnListSize); for (int i = 0; i < tmpSpawnListSize; ++i) { bool restrictkills = reader.ReadBool(); bool clearadvance = reader.ReadBool(); double mind = reader.ReadDouble(); double maxd = reader.ReadDouble(); DateTime nextspawn = reader.ReadDeltaTime(); tmpRestrictKillsToSubgroup.Add(restrictkills); tmpClearOnAdvance.Add(clearadvance); tmpMinDelay.Add(mind); tmpMaxDelay.Add(maxd); tmpNextSpawn.Add(nextspawn); } bool hasitems = reader.ReadBool(); if (hasitems) { m_ShowBoundsItems = reader.ReadItemList(); } goto case 23; } case 23: { IsInactivated = reader.ReadBool(); SmartSpawning = reader.ReadBool(); goto case 22; } case 22: { SkillTrigger = reader.ReadString(); // note this will also register the skill m_skill_that_triggered = (SkillName)reader.ReadInt(); m_FreeRun = reader.ReadBool(); m_mob_who_triggered = reader.ReadMobile(); goto case 21; } case 21: { m_DespawnTime = reader.ReadTimeSpan(); goto case 20; } case 20: { if (version < 24) { tmpSpawnListSize = reader.ReadInt(); } tmpRequireSurface = new ArrayList(tmpSpawnListSize); for (int i = 0; i < tmpSpawnListSize; ++i) { bool requiresurface = reader.ReadBool(); tmpRequireSurface.Add(requiresurface); } goto case 19; } case 19: { m_ConfigFile = reader.ReadString(); m_OnHold = reader.ReadBool(); m_HoldSequence = reader.ReadBool(); m_FirstModifiedBy = reader.ReadString(); m_LastModifiedBy = reader.ReadString(); // deserialize the keyword tag list int tagcount = reader.ReadInt(); m_KeywordTagList = new ArrayList(tagcount); for (int i = 0; i < tagcount; i++) { BaseXmlSpawner.KeywordTag tag = new BaseXmlSpawner.KeywordTag(null, this); tag.Deserialize(reader); } goto case 18; } case 18: { m_AllowGhostTriggering = reader.ReadBool(); goto case 17; } case 17: { if (version < 25) { // the textentrybooks are deleted on deserialization so no need to track them reader.ReadItem(); } goto case 16; } case 16: { hasnewobjectinfo = true; m_SequentialSpawning = reader.ReadInt(); TimeSpan seqdelay = reader.ReadTimeSpan(); m_SeqEnd = DateTime.UtcNow + seqdelay; if (version < 20) { tmpSpawnListSize = reader.ReadInt(); } tmpSubGroup = new ArrayList(tmpSpawnListSize); tmpSequentialResetTime = new ArrayList(tmpSpawnListSize); tmpSequentialResetTo = new ArrayList(tmpSpawnListSize); tmpKillsNeeded = new ArrayList(tmpSpawnListSize); for (int i = 0; i < tmpSpawnListSize; ++i) { int subgroup = reader.ReadInt(); double resettime = reader.ReadDouble(); int resetto = reader.ReadInt(); int killsneeded = reader.ReadInt(); tmpSubGroup.Add(subgroup); tmpSequentialResetTime.Add(resettime); tmpSequentialResetTo.Add(resetto); tmpKillsNeeded.Add(killsneeded); } m_RegionName = reader.ReadString(); // 2004.02.08 :: Omega Red goto case 15; } case 15: { m_ExternalTriggering = reader.ReadBool(); m_ExternalTrigger = reader.ReadBool(); goto case 14; } case 14: { m_NoItemTriggerName = reader.ReadString(); goto case 13; } case 13: { m_GumpState = reader.ReadString(); goto case 12; } case 12: { int todtype = reader.ReadInt(); switch (todtype) { case (int)TODModeType.Gametime: m_TODMode = TODModeType.Gametime; break; case (int)TODModeType.Realtime: m_TODMode = TODModeType.Realtime; break; } goto case 11; } case 11: { m_KillReset = reader.ReadInt(); m_skipped = reader.ReadBool(); m_spawncheck = reader.ReadInt(); goto case 10; } case 10: { m_SetPropertyItem = reader.ReadItem(); goto case 9; } case 9: { m_TriggerProbability = reader.ReadDouble(); goto case 8; } case 8: { m_MobPropertyName = reader.ReadString(); m_MobTriggerName = reader.ReadString(); m_PlayerPropertyName = reader.ReadString(); goto case 7; } case 7: { m_SpeechTrigger = reader.ReadString(); goto case 6; } case 6: { m_ItemTriggerName = reader.ReadString(); goto case 5; } case 5: { m_ProximityTriggerMessage = reader.ReadString(); m_ObjectPropertyItem = reader.ReadItem(); m_ObjectPropertyName = reader.ReadString(); m_killcount = reader.ReadInt(); goto case 4; } case 4: { haveproximityrange = true; m_ProximityRange = reader.ReadInt(); m_ProximityTriggerSound = reader.ReadInt(); m_proximityActivated = reader.ReadBool(); m_durActivated = reader.ReadBool(); m_refractActivated = reader.ReadBool(); m_StackAmount = reader.ReadInt(); m_TODStart = reader.ReadTimeSpan(); m_TODEnd = reader.ReadTimeSpan(); m_MinRefractory = reader.ReadTimeSpan(); m_MaxRefractory = reader.ReadTimeSpan(); if (m_refractActivated) { TimeSpan delay = reader.ReadTimeSpan(); DoTimer3(delay); } if (m_durActivated) { TimeSpan delay = reader.ReadTimeSpan(); DoTimer2(delay); } goto case 3; } case 3: { m_ShowContainerStatic = reader.ReadItem() as Static; goto case 2; } case 2: { m_Duration = reader.ReadTimeSpan(); goto case 1; } case 1: { m_UniqueId = reader.ReadString(); m_HomeRangeIsRelative = reader.ReadBool(); goto case 0; } case 0: { m_Name = reader.ReadString(); // backward compatibility with old name storage if (m_Name != null && m_Name != String.Empty) { Name = m_Name; } m_X = reader.ReadInt(); m_Y = reader.ReadInt(); m_Width = reader.ReadInt(); m_Height = reader.ReadInt(); if (m_Width == m_Height) { m_SpawnRange = m_Width / 2; } else { m_SpawnRange = -1; } if (!haveproximityrange) { m_ProximityRange = -1; } m_WayPoint = reader.ReadItem() as WayPoint; m_Group = reader.ReadBool(); m_MinDelay = reader.ReadTimeSpan(); m_MaxDelay = reader.ReadTimeSpan(); m_Count = reader.ReadInt(); m_Team = reader.ReadInt(); m_HomeRange = reader.ReadInt(); m_Running = reader.ReadBool(); if (m_Running) { TimeSpan delay = reader.ReadTimeSpan(); DoTimer(delay); } // Read in the size of the spawn object list int SpawnListSize = reader.ReadInt(); m_SpawnObjects = new ArrayList(SpawnListSize); for (int i = 0; i < SpawnListSize; ++i) { string TypeName = reader.ReadString(); int TypeMaxCount = reader.ReadInt(); SpawnObject TheSpawnObject = new SpawnObject(TypeName, TypeMaxCount); m_SpawnObjects.Add(TheSpawnObject); string typeName = BaseXmlSpawner.ParseObjectType(TypeName); // does it have a substitution that might change its validity? // if so then let it go if (typeName == null || ((SpawnerType.GetType(typeName) == null) && (!BaseXmlSpawner.IsTypeOrItemKeyword(typeName) && typeName.IndexOf('{') == -1 && !typeName.StartsWith("*") && !typeName.StartsWith("#")))) { if (m_WarnTimer == null) { m_WarnTimer = new WarnTimer2(); } m_WarnTimer.Add(Location, Map, TypeName); status_str = "invalid type: " + typeName; } // Read in the number of spawns already int SpawnedCount = reader.ReadInt(); TheSpawnObject.SpawnedObjects = new ArrayList(SpawnedCount); for (int x = 0; x < SpawnedCount; ++x) { int serial = reader.ReadInt(); if (serial < -1) { // minusone is reserved for unknown types by default // minustwo on is used for referencing keyword tags int tagserial = -1 * (serial + 2); // get the tag with that serial and add it BaseXmlSpawner.KeywordTag t = BaseXmlSpawner.GetFromTagList(this, tagserial); if (t != null) { TheSpawnObject.SpawnedObjects.Add(t); } } else { IEntity e = World.FindEntity(serial); if (e != null) { TheSpawnObject.SpawnedObjects.Add(e); } } } } // now have to reintegrate the later version spawnobject information into the earlier version desered objects if (hasnewobjectinfo && tmpSpawnListSize == SpawnListSize) { for (int i = 0; i < SpawnListSize; ++i) { SpawnObject so = (SpawnObject)m_SpawnObjects[i]; so.SubGroup = (int)tmpSubGroup[i]; so.SequentialResetTime = (double)tmpSequentialResetTime[i]; so.SequentialResetTo = (int)tmpSequentialResetTo[i]; so.KillsNeeded = (int)tmpKillsNeeded[i]; if (version > 19) { so.RequireSurface = (bool)tmpRequireSurface[i]; } bool restrictkills = false; bool clearadvance = true; double mind = -1; double maxd = -1; DateTime nextspawn = DateTime.MinValue; if (version > 23) { restrictkills = (bool)tmpRestrictKillsToSubgroup[i]; clearadvance = (bool)tmpClearOnAdvance[i]; mind = (double)tmpMinDelay[i]; maxd = (double)tmpMaxDelay[i]; nextspawn = (DateTime)tmpNextSpawn[i]; } so.RestrictKillsToSubgroup = restrictkills; so.ClearOnAdvance = clearadvance; so.MinDelay = mind; so.MaxDelay = maxd; so.NextSpawn = nextspawn; bool disablespawn = false; if (version > 26) { disablespawn = (bool)tmpDisableSpawn[i]; } so.Disabled = disablespawn; int packrange = -1; if (version > 27) { packrange = (int)tmpPackRange[i]; } so.PackRange = packrange; int spawnsper = 1; if (version > 28) { spawnsper = (int)tmpSpawnsPer[i]; } so.SpawnsPerTick = spawnsper; } } break; } } }
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."); }
protected override void OnTarget(Mobile from, object targeted) { IPoint3D target = targeted as IPoint3D; if (target == null) return; Map map = from.Map; if (map == null) return; Point3D location = new Point3D(target); if (target is StaticTarget) location.Z -= TileData.ItemTable[((StaticTarget)target).ItemID & 0x3FFF].CalcHeight; Item newItem = new Static(m_ItemID); newItem.MoveToWorld(location, from.Map); from.Target = new CreateItemTarget(m_ItemID, m_Search, mIndex, mShowImage); }
public override void IncreaseTier() { base.IncreaseTier(); List<object> list = new List<object>(); Item c; switch ( this.Tier ) { case 1: // dishing stump c = new Static(0x1865); c.MoveToWorld(new Point3D(1417, 1590, 30), this.Map); list.Add(c); // pickaxe c = new Pickaxe(); c.MoveToWorld(new Point3D(1414, 1588, 47), this.Map); c.Movable = false; list.Add(c); // sewing kit c = new SewingKit(); c.MoveToWorld(new Point3D(1414, 1592, 42), this.Map); c.Movable = false; list.Add(c); // empty tool box c = new Static(0x1EB7); c.MoveToWorld(new Point3D(1415, 1588, 47), this.Map); list.Add(c); // silver wire c = new Static(0x1EB7); c.Weight = 5.0; c.MoveToWorld(new Point3D(1417, 1592, 46), this.Map); list.Add(c); // gold wire c = new Static(0x1EB7); c.Weight = 5.0; c.MoveToWorld(new Point3D(1417, 1592, 47), this.Map); list.Add(c); // silver ingots c = new Static(0x1BF6); c.MoveToWorld(new Point3D(1416, 1592, 44), this.Map); list.Add(c); break; } if (list.Count > 0) this.Tiers.Add(list); }
public static void CreateTeleporter( int xFrom, int yFrom, int xTo, int yTo ) { Static telePad = new Static( 0x1822 ); Teleporter teleItem = new Teleporter( new Point3D( xTo, yTo, -1 ), Map.Malas, false ); telePad.Hue = 0x482; telePad.MoveToWorld( new Point3D( xFrom, yFrom, -1 ), Map.Malas ); teleItem.MoveToWorld( new Point3D( xFrom, yFrom, -1 ), Map.Malas ); teleItem.SourceEffect = true; teleItem.DestEffect = true; teleItem.SoundID = 0x1FE; }
public override void IncreaseTier() { base.IncreaseTier(); List<object> list = new List<object>(); Item c; // don't know names above lev 6 switch ( this.Tier ) { case 1: c = new BookOfChivalry(); c.MoveToWorld(new Point3D(2924, 979, -18), this.Map); c.Movable = false; list.Add(c); c = new Longsword(); c.MoveToWorld(new Point3D(2923, 980, -18), this.Map); c.Movable = false; c.ItemID = 0x26CF; list.Add(c); c = new Shirt(); c.MoveToWorld(new Point3D(2924, 978, -18), this.Map); c.Movable = false; c.ItemID = 0x2662; c.Name = "Crisp White Shirt"; list.Add(c); break; case 2: c = new GraveDust(); c.MoveToWorld(new Point3D(2921, 972, -17), this.Map); c.Movable = false; list.Add(c); c = new NoxCrystal(); c.MoveToWorld(new Point3D(2921, 972, -17), this.Map); c.Movable = false; list.Add(c); c = new Static(0xF91); c.MoveToWorld(new Point3D(2921, 972, -17), this.Map); c.Movable = false; list.Add(c); c = new NecromancerSpellbook(); c.MoveToWorld(new Point3D(2922, 972, -18), this.Map); c.Movable = false; list.Add(c); c = new AnimateDeadScroll(); c.MoveToWorld(new Point3D(2923, 972, -18), this.Map); c.Movable = false; list.Add(c); c = new HorrificBeastScroll(); c.MoveToWorld(new Point3D(2923, 972, -18), this.Map); c.Movable = false; list.Add(c); c = new VampiricEmbraceScroll(); c.MoveToWorld(new Point3D(2923, 971, -20), this.Map); c.Movable = false; list.Add(c); c = new Static(0xFDD); c.MoveToWorld(new Point3D(2922, 971, -21), this.Map); list.Add(c); c = new Static(0xFDE); c.MoveToWorld(new Point3D(2923, 971, -21), this.Map); list.Add(c); break; case 3: c = new JesterSuit(); c.MoveToWorld(new Point3D(2919, 985, -16), this.Map); c.Movable = false; list.Add(c); c = new LocalizedStatic(0xE74, 1073424); c.MoveToWorld(new Point3D(2919, 984, -11), this.Map); c.Movable = false; c.Weight = 50.0; c.Hue = 0x113; list.Add(c); c = new JesterHat(); c.MoveToWorld(new Point3D(2919, 983, -13), this.Map); c.Movable = false; c.Hue = 0x113; list.Add(c); break; case 4: c = new Static(0xD25); c.MoveToWorld(new Point3D(2916, 984, -13), this.Map); c.Movable = false; list.Add(c); c = new Static(0x20D9); c.MoveToWorld(new Point3D(2916, 982, -12), this.Map); c.Name = "Gargoyle"; list.Add(c); c = new Static(0x2132); c.MoveToWorld(new Point3D(2914, 982, -9), this.Map); list.Add(c); c = new Static(0x25B6); c.MoveToWorld(new Point3D(2913, 982, -13), this.Map); list.Add(c); c = new Static(0x25B6); c.MoveToWorld(new Point3D(2913, 982, -13), this.Map); list.Add(c); c = new Static(0x222E); c.MoveToWorld(new Point3D(2915, 983, -14), this.Map); list.Add(c); c = new Static(0x2211); c.MoveToWorld(new Point3D(2914, 984, -13), this.Map); list.Add(c); break; case 5: c = new LocalizedStatic(0xE30, 1073421); c.MoveToWorld(new Point3D(2911, 983, -12), this.Map); c.Weight = 10.0; list.Add(c); c = new LocalizedStatic(0x2937, 1073422); c.MoveToWorld(new Point3D(2911, 984, -13), this.Map); list.Add(c); c = new LocalizedStatic(0x12AA, 1073423); c.MoveToWorld(new Point3D(2911, 985, -14), this.Map); list.Add(c); c = new Static(0xEAF); c.MoveToWorld(new Point3D(2910, 985, -21), this.Map); c.Weight = 5.0; list.Add(c); c = new Static(0xEAE); c.MoveToWorld(new Point3D(2910, 986, -21), this.Map); c.Weight = 5.0; list.Add(c); break; case 6: c = new Tessen(); c.MoveToWorld(new Point3D(2910, 966, -17), this.Map); c.Movable = false; list.Add(c); c = new Shuriken(); c.MoveToWorld(new Point3D(2910, 965, -17), this.Map); c.Movable = false; list.Add(c); c = new Static(0x2855); c.MoveToWorld(new Point3D(2910, 964, -16), this.Map); c.Weight = 5.0; list.Add(c); c = new Static(0x241D); c.MoveToWorld(new Point3D(2910, 963, -20), this.Map); c.Weight = 5.0; list.Add(c); c = new Static(0x2409); c.MoveToWorld(new Point3D(2910, 963, -17), this.Map); list.Add(c); c = new Static(0x2416); c.MoveToWorld(new Point3D(2909, 965, -17), this.Map); list.Add(c); break; case 7: c = new Static(0x3069); c.MoveToWorld(new Point3D(2914, 964, -21), this.Map); list.Add(c); c = new Static(0x306A); c.MoveToWorld(new Point3D(2913, 964, -21), this.Map); list.Add(c); c = new Static(0x306B); c.MoveToWorld(new Point3D(2912, 964, -21), this.Map); list.Add(c); c = new ElvenLoveseatEastAddon(); c.MoveToWorld(new Point3D(2913, 966, -21), this.Map); c.Movable = false; list.Add(c); c = new Static(0x2CFC); c.MoveToWorld(new Point3D(2912, 963, -21), this.Map); list.Add(c); c = new LocalizedStatic(0x2D74, 1073425); c.MoveToWorld(new Point3D(2914, 963, -21), this.Map); list.Add(c); break; case 8: c = new Static(0x2); c.MoveToWorld(new Point3D(2905, 970, -15), this.Map); list.Add(c); c = new Static(0x3); c.MoveToWorld(new Point3D(2905, 969, -15), this.Map); list.Add(c); c = new OrderShield(); c.MoveToWorld(new Point3D(2905, 971, -17), this.Map); c.Movable = false; list.Add(c); c = new Static(0x1579); c.MoveToWorld(new Point3D(2904, 971, -21), this.Map); list.Add(c); c = new Static(0x1613); c.MoveToWorld(new Point3D(2908, 969, -21), this.Map); list.Add(c); c = new Static(0x1614); c.MoveToWorld(new Point3D(2908, 968, -21), this.Map); list.Add(c); break; case 9: c = new Static(0x1526); c.MoveToWorld(new Point3D(2905, 976, -15), this.Map); list.Add(c); c = new Static(0x1527); c.MoveToWorld(new Point3D(2905, 975, -15), this.Map); list.Add(c); c = new Static(0x151A); c.MoveToWorld(new Point3D(2905, 972, -21), this.Map); list.Add(c); c = new Static(0x151A); c.MoveToWorld(new Point3D(2905, 977, -21), this.Map); list.Add(c); c = new Static(0x151A); c.MoveToWorld(new Point3D(2908, 972, -21), this.Map); list.Add(c); c = new Static(0x151A); c.MoveToWorld(new Point3D(2908, 977, -21), this.Map); list.Add(c); c = new Static(0x1514); c.MoveToWorld(new Point3D(2904, 975, -17), this.Map); list.Add(c); break; case 10: c = new Static(0x15C5); c.MoveToWorld(new Point3D(2904, 982, -21), this.Map); list.Add(c); c = new Static(0x15C5); c.MoveToWorld(new Point3D(2904, 979, -21), this.Map); list.Add(c); c = new Static(0x157B); c.MoveToWorld(new Point3D(2904, 981, -21), this.Map); list.Add(c); c = new Static(0x14E3); c.MoveToWorld(new Point3D(2905, 980, -21), this.Map); list.Add(c); c = new Static(0x14E4); c.MoveToWorld(new Point3D(2905, 981, -21), this.Map); list.Add(c); c = new Static(0x14E5); c.MoveToWorld(new Point3D(2906, 981, -21), this.Map); list.Add(c); c = new Static(0x14E6); c.MoveToWorld(new Point3D(2906, 980, -21), this.Map); list.Add(c); c = new ChaosShield(); c.MoveToWorld(new Point3D(2905, 978, -19), this.Map); c.Movable = false; list.Add(c); break; case 11: c = new FemaleStuddedChest(); c.MoveToWorld(new Point3D(2912, 976, -16), this.Map); c.Movable = false; c.Hue = 0x497; list.Add(c); c = new Static(0x1EA8); c.MoveToWorld(new Point3D(2913, 973, -13), this.Map); c.Hue = 0x497; list.Add(c); c = new Static(0x20F8); c.MoveToWorld(new Point3D(2913, 975, -11), this.Map); c.Hue = 0x113; list.Add(c); c = new Static(0x20E9); c.MoveToWorld(new Point3D(2912, 974, -11), this.Map); c.Name = "Troll"; list.Add(c); c = new Static(0x2607); c.MoveToWorld(new Point3D(2913, 974, -11), this.Map); list.Add(c); c = new Static(0x25F9); c.MoveToWorld(new Point3D(2912, 975, -11), this.Map); list.Add(c); break; case 12: c = new Static(0x1D8A); c.MoveToWorld(new Point3D(2915, 976, -13), this.Map); list.Add(c); c = new Static(0x1D8B); c.MoveToWorld(new Point3D(2916, 976, -13), this.Map); list.Add(c); c = new Static(0x234D); c.MoveToWorld(new Point3D(2915, 975, -10), this.Map); list.Add(c); c = new WizardsHat(); c.MoveToWorld(new Point3D(2915, 974, -13), this.Map); c.Movable = false; list.Add(c); break; } if (list.Count > 0) this.Tiers.Add(list); }
private Item CreateItem(int ItemID) // Create the appropriate item class - Defaults to a Static Item { Item item = null; switch(ItemID) { #region MobileSaver case 0x0001: // Now used for Mobile Importing. { item = new Static( 0x1 ); break; } #endregion case 0x1F19: // Add any unwanted items here. case 0x0FB7: // TODO: Boat parts: planks, tillerman, etc. break; case 0x0FB1: //forge item = new SmallForgeAddon(); break; case 0x0FAF: //anvil east item = new AnvilEastAddon(); break; case 0x0FB0: //anvil south item = new AnvilSouthAddon(); break; case 0x2DD8: //Elven Forge item = new ElvenForgeAddon(); break; case 0x1922: //FlourMill East item = new FlourMillEastAddon(); break; case 0x1920: case 0x1924: break; //Don't add those items since the addon has them. case 0x192E: //FlourMill South item = new FlourMillSouthAddon(); break; case 0x192C: case 0x1930: break; //Don't add those items since the addon has them. case 0x1060: //Loom East item = new LoomEastAddon(); break; case 0x105F: break; //Don't add those items since the addon has them. case 0x1061: //Loom South item = new LoomSouthAddon(); break; case 0x1062: break; //Don't add those items since the addon has them. case 0x1019: //Spinningwheel East item = new SpinningwheelEastAddon(); break; case 0x1015: //Spinningwheel South item = new SpinningwheelSouthAddon(); break; // Housing Metal Doors case 0x679: item = new NorthWestDoor(); break; case 0x67B: item = new NorthEastDoor(); break; case 0x675: item = new SouthWestDoor(); break; case 0x677: item = new SouthEastDoor(); break; case 0x683: item = new WestNorthDoor(); break; case 0x681: item = new WestSouthDoor(); break; case 0x67F: item = new EastNorthDoor(); break; case 0x67D: item = new EastSouthDoor(); break; /* case 0x0675: // Metal Doors 2 NOTE: Some doors seem to open the wrong way, but there's no way to determine correct CCW/CW from the POL file. item = new MetalDoor2( DoorFacing.WestCW ); break; case 0x0677: item = new MetalDoor2( DoorFacing.EastCCW ); break; case 0x067D: item = new MetalDoor2( DoorFacing.SouthCW ); break; case 0x067F: item = new MetalDoor2( DoorFacing.NorthCCW ); break; */ case 0x0685: // Barred Metal Doors item = new BarredMetalDoor( DoorFacing.WestCW ); break; case 0x0687: item = new BarredMetalDoor( DoorFacing.EastCCW ); break; case 0x068D: item = new BarredMetalDoor( DoorFacing.SouthCW ); break; case 0x068F: item = new BarredMetalDoor( DoorFacing.NorthCCW ); break; case 0x0695: // Rattan Doors item = new RattanDoor( DoorFacing.WestCW ); break; case 0x0697: item = new RattanDoor( DoorFacing.EastCCW ); break; case 0x069D: item = new RattanDoor( DoorFacing.SouthCW ); break; case 0x069F: item = new RattanDoor( DoorFacing.NorthCCW ); break; case 0x06A5: // Dark Wood Doors item = new DarkWoodDoor( DoorFacing.WestCW ); break; case 0x06A7: item = new DarkWoodDoor( DoorFacing.EastCCW ); break; case 0x06AD: item = new DarkWoodDoor( DoorFacing.SouthCW ); break; case 0x06AF: item = new DarkWoodDoor( DoorFacing.NorthCCW ); break; case 0x06B5: // Medium Wood Doors item = new MediumWoodDoor( DoorFacing.WestCW ); break; case 0x06B7: item = new MediumWoodDoor( DoorFacing.EastCCW ); break; case 0x06BD: item = new MediumWoodDoor( DoorFacing.SouthCW ); break; case 0x06BF: item = new MediumWoodDoor( DoorFacing.NorthCCW ); break; /* case 0x06C5: // Metal Doors item = new MetalDoor( DoorFacing.WestCW ); break; case 0x06C7: item = new MetalDoor( DoorFacing.EastCCW ); break; case 0x06CD: item = new MetalDoor( DoorFacing.SouthCW ); break; case 0x06CF: item = new MetalDoor( DoorFacing.NorthCCW ); break; */ case 0x06D5: // Light Wood Doors item = new LightWoodDoor( DoorFacing.WestCW ); break; case 0x06D7: item = new LightWoodDoor( DoorFacing.EastCCW ); break; case 0x06DD: item = new LightWoodDoor( DoorFacing.SouthCW ); break; case 0x06DF: item = new LightWoodDoor( DoorFacing.NorthCCW ); break; case 0x06E5: // Strong Wood Doors item = new StrongWoodDoor( DoorFacing.WestCW ); break; case 0x06E7: item = new StrongWoodDoor( DoorFacing.EastCCW ); break; case 0x06ED: item = new StrongWoodDoor( DoorFacing.SouthCW ); break; case 0x06EF: item = new StrongWoodDoor( DoorFacing.NorthCCW ); break; case 0x2A05: //South facing West half Paper door (SE) item = new SWPaperSEDoor(); break; case 0x2A07: //South facing East half Paper door (SE) item = new SEPaperSEDoor(); break; case 0x2A09: //East facing South half Paper door (SE) item = new ESPaperSEDoor(); break; case 0x2A0B: //East facing North half Paper door (SE) item = new ENPaperSEDoor(); break; case 0x2A0D: //South facing West half Cloth door (SE) item = new SWClothSEDoor(); break; case 0x2A0F: //South facing East half Cloth door (SE) item = new SEClothSEDoor(); break; case 0x2A11: //East facing South half Cloth door (SE) item = new ESClothSEDoor(); break; case 0x2A13: //East facing North half Cloth door (SE) item = new ENClothSEDoor(); break; case 0x2A16: //South facing West half Wooden door (SE) item = new SWWoodenSEDoor(); break; case 0x2A17: //South facing East half Wooden door (SE) item = new SEWoodenSEDoor(); break; case 0x2A19: //East facing South half Wooden door (SE) item = new ESWoodenSEDoor(); break; case 0x2A1B: //East facing North half Wooden door (SE) item = new ENWoodenSEDoor(); break; case 0xE77: //Barrel item = new Barrel(); item.Movable = false; break; case 0xE7F: //Keg item = new Keg(); item.Movable = false; break; case 0xE7A: //PicnicBasket item = new PicnicBasket(); item.Movable = false; break; case 0x990: //Basket item = new Basket(); item.Movable = false; break; case 0x9AA: //WoodenBox (0xE7D) item = new WoodenBox(); item.Movable = false; break; case 0xE7D: //WoodenBox (0xE7D) item = new WoodenBox(); item.Movable = false; item.ItemID = 0xE7D; break; case 0x9A9: //SmallCrate (0xE7E) item = new SmallCrate(); item.Movable = false; break; case 0xE7E: //SmallCrate (0xE7E) item = new SmallCrate(); item.Movable = false; item.ItemID = 0xE7E; break; case 0xE3F: //MediumCrate (0xE3E) item = new MediumCrate(); item.Movable = false; break; case 0xE3E: //MediumCrate (0xE3E) item = new MediumCrate(); item.Movable = false; item.ItemID = 0xE3E; break; case 0xE3D: //LargeCrate (0xE3C) item = new LargeCrate(); item.Movable = false; break; case 0xE3C: //LargeCrate (0xE3C) item = new LargeCrate(); item.Movable = false; item.ItemID = 0xE3C; break; case 0x9A8: //MetalBox (0xE80) item = new MetalBox(); item.Movable = false; break; case 0xE80: //MetalBox (0xE80) item = new MetalBox(); item.Movable = false; item.ItemID = 0xE80; break; case 0x9AB: //MetalChest (0xE7C) item = new MetalChest(); item.Movable = false; break; case 0xE7C: //MetalChest (0xE7C) item = new MetalChest(); item.Movable = false; item.ItemID = 0xE7C; break; case 0xE41: //MetalGoldenChest (0xE40) item = new MetalGoldenChest(); item.Movable = false; break; case 0xE40: //MetalGoldenChest (0xE40) item = new MetalGoldenChest(); item.Movable = false; item.ItemID = 0xE40; break; case 0xe43: //WoodenChest (0xe42) item = new WoodenChest(); item.Movable = false; break; case 0xe42: //WoodenChest (0xe42) item = new WoodenChest(); item.Movable = false; item.ItemID = 0xe42; break; case 0x280B: //PlainWoodenChest (0x280C) item = new PlainWoodenChest(); item.Movable = false; break; case 0x280C: //PlainWoodenChest (0x280C) item = new PlainWoodenChest(); item.Movable = false; item.ItemID = 0x280C; break; case 0x280D: //OrnateWoodenChest (0x280E) item = new OrnateWoodenChest(); item.Movable = false; break; case 0x280E: //OrnateWoodenChest (0x280E) item = new OrnateWoodenChest(); item.Movable = false; item.ItemID = 0x280E; break; case 0x280F: //GildedWoodenChest (0x2810) item = new GildedWoodenChest(); item.Movable = false; break; case 0x2810: //GildedWoodenChest (0x2810) item = new GildedWoodenChest(); item.Movable = false; item.ItemID = 0x2810; break; case 0x2811: //WoodenFootLocker (0x2812) item = new WoodenFootLocker(); item.Movable = false; break; case 0x2812: //WoodenFootLocker (0x2812) item = new WoodenFootLocker(); item.Movable = false; item.ItemID = 0x2812; break; case 0x2813: //FinishedWoodenChest (0x2814) item = new FinishedWoodenChest(); item.Movable = false; break; case 0x2814: //FinishedWoodenChest (0x2814) item = new FinishedWoodenChest(); item.Movable = false; item.ItemID = 0x2814; break; case 0x2815: //TallCabinet (0x2816) item = new TallCabinet(); item.Movable = false; break; case 0x2816: //TallCabinet (0x2816) item = new TallCabinet(); item.Movable = false; item.ItemID = 0x2816; break; case 0x2817: //ShortCabinet (0x2818) item = new ShortCabinet(); item.Movable = false; break; case 0x2818: //ShortCabinet (0x2818) item = new ShortCabinet(); item.Movable = false; item.ItemID = 0x2818; break; case 0x2857: //RedArmoire (0x2858) item = new RedArmoire(); item.Movable = false; break; case 0x2858: //RedArmoire (0x2858) item = new RedArmoire(); item.Movable = false; item.ItemID = 0x2858; break; case 0x285D: //CherryArmoire (0x285E) item = new CherryArmoire(); item.Movable = false; break; case 0x285E: //CherryArmoire (0x285E) item = new CherryArmoire(); item.Movable = false; item.ItemID = 0x285E; break; case 0x285B: //MapleArmoire (0x285C) item = new MapleArmoire(); item.Movable = false; break; case 0x285C: //MapleArmoire (0x285C) item = new MapleArmoire(); item.Movable = false; item.ItemID = 0x285C; break; case 0x2859: //ElegantArmoire (0x285A) item = new ElegantArmoire(); item.Movable = false; break; case 0x285A: //ElegantArmoire (0x285A) item = new ElegantArmoire(); item.Movable = false; item.ItemID = 0x285A; break; case 0xA97: //FullBookcase (0xa97, 0xa99, 0xa98, 0xa9a, 0xa9b, 0xa9c) item = new FullBookcase(); item.Movable = false; break; case 0xA99: //FullBookcase (0xa97, 0xa99, 0xa98, 0xa9a, 0xa9b, 0xa9c) item = new FullBookcase(); item.Movable = false; item.ItemID = 0xa99; break; case 0xA98: //FullBookcase (0xa97, 0xa99, 0xa98, 0xa9a, 0xa9b, 0xa9c) item = new FullBookcase(); item.Movable = false; item.ItemID = 0xa98; break; case 0xA9a: //FullBookcase (0xa97, 0xa99, 0xa98, 0xa9a, 0xa9b, 0xa9c) item = new FullBookcase(); item.Movable = false; item.ItemID = 0xa9a; break; case 0xA9b: //FullBookcase (0xa97, 0xa99, 0xa98, 0xa9a, 0xa9b, 0xa9c) item = new FullBookcase(); item.Movable = false; item.ItemID = 0xa9b; break; case 0xA9c: //FullBookcase (0xa97, 0xa99, 0xa98, 0xa9a, 0xa9b, 0xa9c) item = new FullBookcase(); item.Movable = false; item.ItemID = 0xa9c; break; case 0xA9D: //EmptyBookcase (0xa9e) item = new EmptyBookcase(); item.Movable = false; break; case 0xa9e: //EmptyBookcase (0xa9e) item = new EmptyBookcase (); item.Movable = false; item.ItemID = 0xa9e; break; case 0xA2C: //Drawer (0xa34) item = new Drawer(); item.Movable = false; break; case 0xa34: //Drawer (0xa34) item = new Drawer(); item.Movable = false; item.ItemID = 0xa34; break; case 0xA30: //FancyDrawer (0xa38) item = new FancyDrawer(); item.Movable = false; break; case 0xa38: //FancyDrawer (0xa38) item = new FancyDrawer(); item.Movable = false; item.ItemID = 0xa38; break; case 0xA4F: //Armoire (0xa53) item = new Armoire(); item.Movable = false; break; case 0xa53: //Armoire (0xa53) item = new Armoire(); item.Movable = false; item.ItemID = 0xa53; break; case 0xA4D: //FancyArmoire (0xa51) item = new FancyArmoire(); item.Movable = false; break; case 0xa51: //FancyArmoire (0xa51) item = new FancyArmoire(); item.Movable = false; item.ItemID = 0xa51; break; default: item = new Static(ItemID); item.Movable = false; break; } return item; }
public override void IncreaseTier() { base.IncreaseTier(); List<object> list = new List<object>(); Item c; switch ( this.Tier ) { case 1: // wizard's hat c = new WizardsHat(); c.MoveToWorld(new Point3D(1410, 1603, 57), this.Map); list.Add(c); // crystal ball c = new Static(0xE2D); c.Weight = 10.0; c.MoveToWorld(new Point3D(1410, 1604, 57), this.Map); list.Add(c); // spellbook c = new Spellbook(0x0, 0xE3B); c.MoveToWorld(new Point3D(1408, 1603, 63), this.Map); list.Add(c); // garlic c = new Garlic(); c.MoveToWorld(new Point3D(1408, 1603, 62), this.Map); list.Add(c); break; } if (list.Count > 0) this.Tiers.Add(list); }
public WateringTimer(Static water) : base(TimeSpan.FromSeconds(30)) { m_Water = water; this.Start(); }
public static void TileHairDye( Server.Commands.CommandEventArgs args ) { for (int i=0;i<7;i++) { int min, max; switch ( i ) { default: case 0: min = 1102; max = 1148; break; case 1: min = 1201; max = 1247 ; break; case 2: min = 1301; max = 1354 ; break; case 3: min = 1401; max = 1447 ; break; case 4: min = 1501; max = 1547 ; break; case 5: min = 1601; max = 1654 ; break; case 6: min = 2201; max = 2224 ; break; case 7: min = 2401; max = 2430 ; break; } for(int h=min;h<=max;h++) { Item item = new Static( 0xeff ); item.Hue = h; item.Location = new Point3D( args.Mobile.Location.X + (h-min), args.Mobile.Location.Y + i, args.Mobile.Location.Z ); item.Map = args.Mobile.Map; } } args.Mobile.SendMessage( "Done tiling hair dye." ); }
public BlueMarkov() : base( AIType.AI_Melee, FightMode.Weakest, 10, 2, 0.1, 0.4 ) { Body = 400; Name = "Markov Tirel"; Title = "the Midknight Necomancer"; Hue = 1; SpeechHue = 1175; SetStr( 125 ); // +25% SetDex( 125 ); SetInt( 5000 ); SetHits( 25000 ); SetDamageType( ResistanceType.Cold, 50 ); SetDamageType( ResistanceType.Poison, 50 ); SetResistance( ResistanceType.Physical, 50 ); SetResistance( ResistanceType.Fire, 50 ); SetResistance( ResistanceType.Cold, 50 ); SetResistance( ResistanceType.Poison, 50 ); SetResistance( ResistanceType.Energy, 50 ); SetSkill( SkillName.MagicResist, 120.0 ); //SetSkill( SkillName.Hiding, 100.0 ); //SetSkill( SkillName.Stealth, 100.0 ); SetSkill( SkillName.Ninjitsu, 100.0 ); SetSkill( SkillName.Necromancy, 100.0 ); SetSkill( SkillName.SpiritSpeak, 100.0 ); SetSkill( SkillName.Bushido, 100.0 ); SetSkill( SkillName.Parry, 100.0 ); SetSkill( SkillName.Tactics, 80.0 ); // +130% SetSkill( SkillName.Swords, 80.0 ); // +0% // 25 + 130 = 155% // Weapon: 15~16 = 38.25~40.8 Fame = 30000; Karma = -30000; VirtualArmor = 150; #region Equipment Static item = new Static( 12216 ); // Glasses item.Name = "<BASEFONT COLOR='#880000'>Glaring Eyes"; item.Layer = Layer.Earrings; Ability.GiveItem( this, 1194, item ); item = new Static( 5201 ); // Bone Helm item.Name = "<BASEFONT COLOR='#444444'>Bone Armor"; item.Layer = Layer.Helm; Ability.GiveItem( this, 1175, item ); item = new Static( 7933 ); // Fancy Shirt item.Name = "<BASEFONT COLOR='#444444'>Bone Armor"; item.Layer = Layer.Shirt; Ability.GiveItem( this, 1175, item ); item = new Static( 5063 ); // Leather Gorget item.Name = "<BASEFONT COLOR='#444444'>Bone Armor"; item.Layer = Layer.Neck; Ability.GiveItem( this, 1175, item ); item = new Static( 5199 ); // Bone Chest item.Name = "<BASEFONT COLOR='#444444'>Bone Armor"; item.Layer = Layer.InnerTorso; Ability.GiveItem( this, 1175, item ); item = new Static( 5198 ); // // Bone Arms item.Name = "<BASEFONT COLOR='#444444'>Bone Armor"; item.Layer = Layer.Arms; Ability.GiveItem( this, 1175, item ); item = new Static( 5200 ); // Bone Gloves item.Name = "<BASEFONT COLOR='#444444'>Bone Armor"; item.Layer = Layer.Gloves; Ability.GiveItem( this, 1175, item ); item = new Static( 5903 ); // Shoes item.Name = "<BASEFONT COLOR='#444444'>Bone Armor"; item.Layer = Layer.Shoes; Ability.GiveItem( this, 1175, item ); item = new Static( 5397 ); // Cloak item.Name = "<BASEFONT COLOR='#444444'>Bone Armor"; item.Layer = Layer.Cloak; Ability.GiveItem( this, 1175, item ); item = new Static( 5202 ); // Bone Legs item.Name = "<BASEFONT COLOR='#444444'>Bone Armor"; item.Layer = Layer.Waist; Ability.GiveItem( this, 1175, item ); item = new Static( 5433 ); // Long Pants item.Name = "<BASEFONT COLOR='#444444'>Bone Armor"; item.Layer = Layer.Pants; Ability.GiveItem( this, 1175, item ); Ability.GiveItem( this, new MarkovsBardiche() ); #endregion m_SpawnDelay = DateTime.Now + TimeSpan.FromSeconds( Utility.RandomMinMax( 30, 60 ) ); m_SoulDrainDelay = DateTime.Now + TimeSpan.FromSeconds( Utility.RandomMinMax( 7, 14 ) ); m_NegativeBurstDelay = DateTime.Now + TimeSpan.FromSeconds( Utility.RandomMinMax( 3, 6 ) ); m_BoneArmor = 100; }
public OphidianKnight() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 ) { LastTimeSpoken = DateTime.Now; Name = m_Names[Utility.Random( m_Names.Length )]; Body = 86; SpeechHue = 2129; BaseSoundID = 634; SetStr( 417, 595 ); SetDex( 166, 175 ); SetInt( 46, 70 ); SetHits( 266, 342 ); SetMana( 0 ); SetDamage( 16, 19 ); SetSkill( SkillName.Poisoning, 60.1, 80.0 ); SetSkill( SkillName.MagicResist, 65.1, 80.0 ); SetSkill( SkillName.Tactics, 90.1, 110.0 ); SetSkill( SkillName.Wrestling, 90.1, 100.0 ); Fame = 10000; Karma = -10000; VirtualArmor = 40; Item item = null; switch( Utility.Random(1000) ) { case 0: PackItem( item = new Static(0x1E90) ); break; case 1: PackItem( item = new Static(0x1E91) ); break; } if (item != null) item.Movable = true; PackPotion(); PackJewel( 0.01 ); PackGem(); PackScroll( 1, 8 ); PackScroll( 1, 8 ); PackGold( 400, 500 ); PackItem( new Arrow( Utility.RandomMinMax( 1, 10 ) ) ); switch ( Utility.Random( 2 ) ) { case 0: PackWeapon( 0, 5 ); break; case 1: PackArmor( 0, 5 ); break; } switch ( Utility.Random( 2 ) ) { case 0: PackWeapon( 0, 5 ); break; case 1: PackArmor( 0, 5 ); break; } switch ( Utility.Random( 4 ) ) { case 0: PackWeapon( 0, 5 ); break; case 1: PackArmor( 0, 5 ); break; } switch ( Utility.Random( 10 ) ) { case 0: PackWeapon( 1, 5 ); break; case 1: PackArmor( 1, 5 ); break; } if ( 0.01 > Utility.RandomDouble() ) PackItem( new IDWand() ); if ( 0.02 > Utility.RandomDouble() ) PackItem( new InvisCloak() ); }
public override void IncreaseTier() { base.IncreaseTier(); List <object> list = new List <object>(); Item c; // don't know names above lev 6 switch (Tier) { case 1: c = new BookOfChivalry(); c.MoveToWorld(new Point3D(2924, 979, -18), Map); c.Movable = false; list.Add(c); c = new Longsword(); c.MoveToWorld(new Point3D(2923, 980, -18), Map); c.Movable = false; c.ItemID = 0x26CF; list.Add(c); c = new Shirt(); c.MoveToWorld(new Point3D(2924, 978, -18), Map); c.Movable = false; c.ItemID = 0x2662; c.Name = "Crisp White Shirt"; list.Add(c); break; case 2: c = new GraveDust(); c.MoveToWorld(new Point3D(2921, 972, -17), Map); c.Movable = false; list.Add(c); c = new NoxCrystal(); c.MoveToWorld(new Point3D(2921, 972, -17), Map); c.Movable = false; list.Add(c); c = new Static(0xF91); c.MoveToWorld(new Point3D(2921, 972, -17), Map); c.Movable = false; list.Add(c); c = new NecromancerSpellbook(); c.MoveToWorld(new Point3D(2922, 972, -18), Map); c.Movable = false; list.Add(c); c = new AnimateDeadScroll(); c.MoveToWorld(new Point3D(2923, 972, -18), Map); c.Movable = false; list.Add(c); c = new HorrificBeastScroll(); c.MoveToWorld(new Point3D(2923, 972, -18), Map); c.Movable = false; list.Add(c); c = new VampiricEmbraceScroll(); c.MoveToWorld(new Point3D(2923, 971, -20), Map); c.Movable = false; list.Add(c); c = new Static(0xFDD); c.MoveToWorld(new Point3D(2922, 971, -21), Map); list.Add(c); c = new Static(0xFDE); c.MoveToWorld(new Point3D(2923, 971, -21), Map); list.Add(c); break; case 3: c = new JesterSuit(); c.MoveToWorld(new Point3D(2919, 985, -16), Map); c.Movable = false; list.Add(c); c = new LocalizedStatic(0xE74, 1073424); c.MoveToWorld(new Point3D(2919, 984, -11), Map); c.Movable = false; c.Weight = 50.0; c.Hue = 0x113; list.Add(c); c = new JesterHat(); c.MoveToWorld(new Point3D(2919, 983, -13), Map); c.Movable = false; c.Hue = 0x113; list.Add(c); break; case 4: c = new Static(0xD25); c.MoveToWorld(new Point3D(2916, 984, -13), Map); c.Movable = false; list.Add(c); c = new Static(0x20D9); c.MoveToWorld(new Point3D(2916, 982, -12), Map); c.Name = "Gargoyle"; list.Add(c); c = new Static(0x2132); c.MoveToWorld(new Point3D(2914, 982, -9), Map); list.Add(c); c = new Static(0x25B6); c.MoveToWorld(new Point3D(2913, 982, -13), Map); list.Add(c); c = new Static(0x25B6); c.MoveToWorld(new Point3D(2913, 982, -13), Map); list.Add(c); c = new Static(0x222E); c.MoveToWorld(new Point3D(2915, 983, -14), Map); list.Add(c); c = new Static(0x2211); c.MoveToWorld(new Point3D(2914, 984, -13), Map); list.Add(c); break; case 5: c = new LocalizedStatic(0xE30, 1073421); c.MoveToWorld(new Point3D(2911, 983, -12), Map); c.Weight = 10.0; list.Add(c); c = new LocalizedStatic(0x2937, 1073422); c.MoveToWorld(new Point3D(2911, 984, -13), Map); list.Add(c); c = new LocalizedStatic(0x12AA, 1073423); c.MoveToWorld(new Point3D(2911, 985, -14), Map); list.Add(c); c = new Static(0xEAF); c.MoveToWorld(new Point3D(2910, 985, -21), Map); c.Weight = 5.0; list.Add(c); c = new Static(0xEAE); c.MoveToWorld(new Point3D(2910, 986, -21), Map); c.Weight = 5.0; list.Add(c); break; case 6: c = new Tessen(); c.MoveToWorld(new Point3D(2910, 966, -17), Map); c.Movable = false; list.Add(c); c = new Shuriken(); c.MoveToWorld(new Point3D(2910, 965, -17), Map); c.Movable = false; list.Add(c); c = new Static(0x2855); c.MoveToWorld(new Point3D(2910, 964, -16), Map); c.Weight = 5.0; list.Add(c); c = new Static(0x241D); c.MoveToWorld(new Point3D(2910, 963, -20), Map); c.Weight = 5.0; list.Add(c); c = new Static(0x2409); c.MoveToWorld(new Point3D(2910, 963, -17), Map); list.Add(c); c = new Static(0x2416); c.MoveToWorld(new Point3D(2909, 965, -17), Map); list.Add(c); break; case 7: c = new Static(0x3069); c.MoveToWorld(new Point3D(2914, 964, -21), Map); list.Add(c); c = new Static(0x306A); c.MoveToWorld(new Point3D(2913, 964, -21), Map); list.Add(c); c = new Static(0x306B); c.MoveToWorld(new Point3D(2912, 964, -21), Map); list.Add(c); c = new ElvenLoveseatEastAddon(); c.MoveToWorld(new Point3D(2913, 966, -21), Map); c.Movable = false; list.Add(c); c = new Static(0x2CFC); c.MoveToWorld(new Point3D(2912, 963, -21), Map); list.Add(c); c = new LocalizedStatic(0x2D74, 1073425); c.MoveToWorld(new Point3D(2914, 963, -21), Map); list.Add(c); break; case 8: c = new Static(0x2); c.MoveToWorld(new Point3D(2905, 970, -15), Map); list.Add(c); c = new Static(0x3); c.MoveToWorld(new Point3D(2905, 969, -15), Map); list.Add(c); c = new OrderShield(); c.MoveToWorld(new Point3D(2905, 971, -17), Map); c.Movable = false; list.Add(c); c = new Static(0x1579); c.MoveToWorld(new Point3D(2904, 971, -21), Map); list.Add(c); c = new Static(0x1613); c.MoveToWorld(new Point3D(2908, 969, -21), Map); list.Add(c); c = new Static(0x1614); c.MoveToWorld(new Point3D(2908, 968, -21), Map); list.Add(c); break; case 9: c = new Static(0x1526); c.MoveToWorld(new Point3D(2905, 976, -15), Map); list.Add(c); c = new Static(0x1527); c.MoveToWorld(new Point3D(2905, 975, -15), Map); list.Add(c); c = new Static(0x151A); c.MoveToWorld(new Point3D(2905, 972, -21), Map); list.Add(c); c = new Static(0x151A); c.MoveToWorld(new Point3D(2905, 977, -21), Map); list.Add(c); c = new Static(0x151A); c.MoveToWorld(new Point3D(2908, 972, -21), Map); list.Add(c); c = new Static(0x151A); c.MoveToWorld(new Point3D(2908, 977, -21), Map); list.Add(c); c = new Static(0x1514); c.MoveToWorld(new Point3D(2904, 975, -17), Map); list.Add(c); break; case 10: c = new Static(0x15C5); c.MoveToWorld(new Point3D(2904, 982, -21), Map); list.Add(c); c = new Static(0x15C5); c.MoveToWorld(new Point3D(2904, 979, -21), Map); list.Add(c); c = new Static(0x157B); c.MoveToWorld(new Point3D(2904, 981, -21), Map); list.Add(c); c = new Static(0x14E3); c.MoveToWorld(new Point3D(2905, 980, -21), Map); list.Add(c); c = new Static(0x14E4); c.MoveToWorld(new Point3D(2905, 981, -21), Map); list.Add(c); c = new Static(0x14E5); c.MoveToWorld(new Point3D(2906, 981, -21), Map); list.Add(c); c = new Static(0x14E6); c.MoveToWorld(new Point3D(2906, 980, -21), Map); list.Add(c); c = new ChaosShield(); c.MoveToWorld(new Point3D(2905, 978, -19), Map); c.Movable = false; list.Add(c); break; case 11: c = new FemaleStuddedChest(); c.MoveToWorld(new Point3D(2912, 976, -16), Map); c.Movable = false; c.Hue = 0x497; list.Add(c); c = new Static(0x1EA8); c.MoveToWorld(new Point3D(2913, 973, -13), Map); c.Hue = 0x497; list.Add(c); c = new Static(0x20F8); c.MoveToWorld(new Point3D(2913, 975, -11), Map); c.Hue = 0x113; list.Add(c); c = new Static(0x20E9); c.MoveToWorld(new Point3D(2912, 974, -11), Map); c.Name = "Troll"; list.Add(c); c = new Static(0x2607); c.MoveToWorld(new Point3D(2913, 974, -11), Map); list.Add(c); c = new Static(0x25F9); c.MoveToWorld(new Point3D(2912, 975, -11), Map); list.Add(c); break; case 12: c = new Static(0x1D8A); c.MoveToWorld(new Point3D(2915, 976, -13), Map); list.Add(c); c = new Static(0x1D8B); c.MoveToWorld(new Point3D(2916, 976, -13), Map); list.Add(c); c = new Static(0x234D); c.MoveToWorld(new Point3D(2915, 975, -10), Map); list.Add(c); c = new WizardsHat(); c.MoveToWorld(new Point3D(2915, 974, -13), Map); c.Movable = false; list.Add(c); break; } if (list.Count > 0) { Tiers.Add(list); } }
public override void OnClick() { if (m_Beverage == null || m_From == null) return; if (m_Beverage.Deleted || !m_Beverage.Movable || !m_From.CheckAlive() || !m_Beverage.CheckItemUse(m_From)) return; if (m_Beverage.Quantity > 0) { string typeName = ""; int typeHue = 0; switch (m_Beverage.Content) { case BeverageType.LaitChevre: case BeverageType.LaitBrebis: case BeverageType.Milk: typeName = "de lait"; typeHue = 2050; break; case BeverageType.JusRaisin: typeName = "de jus de raison"; typeHue = 1172; break; case BeverageType.JusPeche: typeName = "de jus de pêches"; typeHue = 50; break; case BeverageType.JusPomme: typeName = "de jus de pommes"; typeHue = 50; break; case BeverageType.Wine: typeName = "de vin"; typeHue = 1172; break; case BeverageType.Liquor: typeName = "de liqueur"; typeHue = 96; break; case BeverageType.Cider: typeName = "de cidre"; typeHue = 50; break; case BeverageType.Ale: case BeverageType.BiereAmbre: case BeverageType.BiereBrune: case BeverageType.BiereCommune: case BeverageType.BiereEpice: case BeverageType.BiereMiel: case BeverageType.BiereSorciere: case BeverageType.Kwak: case BeverageType.MoinetteYew: typeName = "de bière"; typeHue = 51; break; default: typeName = "d'eau"; typeHue = 92; break; } m_From.SendMessage("Vous arrosez le sol avec le contenu de votre " + m_Beverage.Name + "."); m_Beverage.Content = BeverageType.Water; m_Beverage.Quantity = 0; m_Beverage.Poison = null; int bloodId = Utility.Random(4650, 4); Static water = new Static(bloodId); water.Name = "Flaque " + typeName; water.Hue = typeHue; water.MoveToWorld(m_From.Location, m_From.Map); m_From.PlaySound(0x04E); new WateringTimer(water); } else { m_From.SendMessage("Vous ne pouvez pas arroser le sol avec quelque chose de vide..."); } }
public override void IncreaseTier() { base.IncreaseTier(); List<object> list = new List<object>(); Item c; switch ( this.Tier ) { case 1: // brush c = new Static(0x1373); c.MoveToWorld(new Point3D(1415, 1593, 67), this.Map); list.Add(c); // horse shoes c = new Static(0xFB6); c.MoveToWorld(new Point3D(1415, 1595, 50), this.Map); list.Add(c); // bridle c = new Static(0x1375); c.MoveToWorld(new Point3D(1416, 1593, 67), this.Map); list.Add(c); // brush c = new Static(0x1372); c.MoveToWorld(new Point3D(1417, 1593, 67), this.Map); list.Add(c); // horse barding c = new Static(0x1378); c.MoveToWorld(new Point3D(1417, 1595, 50), this.Map); list.Add(c); c = new Static(0x1379); c.MoveToWorld(new Point3D(1417, 1594, 50), this.Map); list.Add(c); // shepard's crook c = new ShepherdsCrook(); c.MoveToWorld(new Point3D(1417, 1597, 58), this.Map); break; } if (list.Count > 0) this.Tiers.Add(list); }
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."); }
public TerathanWarrior() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 ) { LastTimeSpoken = DateTime.Now; Name = "a terathan warrior"; Body = 70; SpeechHue= 1549; BaseSoundID = 589; SetStr( 166, 215 ); SetDex( 96, 145 ); SetInt( 41, 65 ); SetHits( 100, 129 ); SetMana( 0 ); SetDamage( 7, 17 ); SetSkill( SkillName.Poisoning, 60.1, 80.0 ); SetSkill( SkillName.MagicResist, 60.1, 75.0 ); SetSkill( SkillName.Tactics, 80.1, 100.0 ); SetSkill( SkillName.Wrestling, 80.1, 90.0 ); Fame = 4000; Karma = -4000; VirtualArmor = 30; Item item = null; switch( Utility.Random(1000) ) { case 0: PackItem( item = new Static(0x1243) ); break; case 1: PackItem( item = new Static(0x1244) ); break; } if (item != null) item.Movable = true; PackGold( 150, 250 ); PackPotion(); PackItem( new Arrow( Utility.Random( 1, 10 ) ) ); switch ( Utility.Random( 3 ) ) { case 0: PackWeapon( 0, 5 ); break; case 1: PackWeapon( 0, 5 ); break; } switch ( Utility.Random( 5 ) ) { case 0: PackWeapon( 1, 5 ); break; case 1: PackWeapon( 1, 5 ); break; } switch ( Utility.Random( 10 ) ) { case 0: PackWeapon( 2, 5 ); break; case 1: PackWeapon( 2, 5 ); break; } if ( 0.20 > Utility.RandomDouble() ) PackReg( 15 ); if ( 0.01 > Utility.RandomDouble() ) PackItem( new IDWand() ); if ( 0.005 > Utility.RandomDouble() ) PackItem( new InvisCloak() ); }
public override void IncreaseTier() { base.IncreaseTier(); List<object> list = new List<object>(); Item c; switch ( this.Tier ) { case 1: // decorative armor c = new Static(0x1508); c.MoveToWorld(new Point3D(1409, 1610, 30), this.Map); list.Add(c); // cannon c = new Static(0xE94); c.MoveToWorld(new Point3D(1409, 1610, 30), this.Map); list.Add(c); c = new Static(0xE95); c.MoveToWorld(new Point3D(1410, 1610, 30), this.Map); list.Add(c); c = new Static(0xE96); c.MoveToWorld(new Point3D(1411, 1610, 30), this.Map); list.Add(c); break; } if (list.Count > 0) this.Tiers.Add(list); }
public static void GenGauntlet_OnCommand( CommandEventArgs e ) { /* Begin healer room */ CreatePricedHealer( 5000, 387, 400 ); CreateTeleporter( 390, 407, 394, 405 ); BaseDoor healerDoor = CreateDoorSet( 393, 404, true, 0x44E ); healerDoor.Locked = true; healerDoor.KeyValue = Key.RandomValue(); if ( healerDoor.Link != null ) { healerDoor.Link.Locked = true; healerDoor.Link.KeyValue = Key.RandomValue(); } /* End healer room */ /* Begin supply room */ CreateMorphItem( 433, 371, 0x29F, 0x116, 3, 0x44E ); CreateMorphItem( 433, 372, 0x29F, 0x115, 3, 0x44E ); CreateVarietyDealer( 492, 369 ); for ( int x = 434; x <= 478; ++x ) { for ( int y = 371; y <= 372; ++y ) { Static item = new Static( 0x524 ); item.Hue = 1; item.MoveToWorld( new Point3D( x, y, -1 ), Map.Malas ); } } /* End supply room */ /* Begin gauntlet cycle */ CreateTeleporter( 471, 428, 474, 428 ); CreateTeleporter( 462, 494, 462, 498 ); CreateTeleporter( 403, 502, 399, 506 ); CreateTeleporter( 357, 476, 356, 480 ); CreateTeleporter( 361, 433, 357, 434 ); GauntletSpawner sp1 = CreateSpawner( "DarknightCreeper", 491, 456, 473, 432, 417, 426, true, 473, 412, 39, 60 ); GauntletSpawner sp2 = CreateSpawner( "FleshRenderer", 482, 520, 468, 496, 426, 422, false, 448, 496, 56, 48 ); GauntletSpawner sp3 = CreateSpawner( "Impaler", 406, 538, 408, 504, 432, 430, false, 376, 504, 64, 48 ); GauntletSpawner sp4 = CreateSpawner( "ShadowKnight", 335, 512, 360, 478, 424, 439, false, 300, 478, 72, 64 ); GauntletSpawner sp5 = CreateSpawner( "AbysmalHorror", 326, 433, 360, 429, 416, 435, true, 300, 408, 60, 56 ); GauntletSpawner sp6 = CreateSpawner( "DemonKnight", 423, 430, 0, 0, 423, 430, true, 392, 392, 72, 96 ); sp1.Sequence = sp2; sp2.Sequence = sp3; sp3.Sequence = sp4; sp4.Sequence = sp5; sp5.Sequence = sp6; sp6.Sequence = sp1; sp1.State = GauntletSpawnerState.InProgress; /* End gauntlet cycle */ /* Begin exit gate */ ConfirmationMoongate gate = new ConfirmationMoongate(); gate.Dispellable = false; gate.Target = new Point3D( 2350, 1270, -85 ); gate.TargetMap = Map.Malas; gate.GumpWidth = 420; gate.GumpHeight = 280; gate.MessageColor = 0x7F00; gate.MessageNumber = 1062109; // You are about to exit Dungeon Doom. Do you wish to continue? gate.TitleColor = 0x7800; gate.TitleNumber = 1062108; // Please verify... gate.Hue = 0x44E; gate.MoveToWorld( new Point3D( 433, 326, 4 ), Map.Malas ); /* End exit gate */ }
// Create the appropriate item class - Defaults to a Static Item private Item CreateItem(int ItemID) { Item item = null; switch(ItemID) { // Don't import nodraw, node crystals, odd items, etc. // Add any unwanted items here. // TODO: Boat parts: planks, tillerman, etc. case 0x0001: case 0x1F19: case 0x0FB7: break; /* * Put all usable items here, for example, forges, anvils, * training dummies, lights, containers, messageboards, etc. * We'll need to wait until some of them are scripted. * * The following are some examples, I intend to finish things * up as quickly as I can. */ case 0x0FB1: //forge item = new SmallForgeAddon(); break; case 0x0FAF: //anvil east item = new AnvilEastAddon(); break; case 0x0FB0: //anvil south item = new AnvilSouthAddon(); break; // TODO: Gates /* * Now create all of the doors according to graphic. * NOTE: Some doors seem to open the wrong way, but * there's no way to determine correct CCW/CW * from the POL file. */ // Metal Doors 2 case 0x0675: item = new MetalDoor2( DoorFacing.WestCW ); break; case 0x0677: item = new MetalDoor2( DoorFacing.EastCCW ); break; case 0x067D: item = new MetalDoor2( DoorFacing.SouthCW ); break; case 0x067F: item = new MetalDoor2( DoorFacing.NorthCCW ); break; // Barred Metal Doors case 0x0685: item = new BarredMetalDoor( DoorFacing.WestCW ); break; case 0x0687: item = new BarredMetalDoor( DoorFacing.EastCCW ); break; case 0x068D: item = new BarredMetalDoor( DoorFacing.SouthCW ); break; case 0x068F: item = new BarredMetalDoor( DoorFacing.NorthCCW ); break; // Rattan Doors case 0x0695: item = new RattanDoor( DoorFacing.WestCW ); break; case 0x0697: item = new RattanDoor( DoorFacing.EastCCW ); break; case 0x069D: item = new RattanDoor( DoorFacing.SouthCW ); break; case 0x069F: item = new RattanDoor( DoorFacing.NorthCCW ); break; // Dark Wood Doors case 0x06A5: item = new DarkWoodDoor( DoorFacing.WestCW ); break; case 0x06A7: item = new DarkWoodDoor( DoorFacing.EastCCW ); break; case 0x06AD: item = new DarkWoodDoor( DoorFacing.SouthCW ); break; case 0x06AF: item = new DarkWoodDoor( DoorFacing.NorthCCW ); break; // Medium Wood Doors case 0x06B5: item = new MediumWoodDoor( DoorFacing.WestCW ); break; case 0x06B7: item = new MediumWoodDoor( DoorFacing.EastCCW ); break; case 0x06BD: item = new MediumWoodDoor( DoorFacing.SouthCW ); break; case 0x06BF: item = new MediumWoodDoor( DoorFacing.NorthCCW ); break; // Metal Doors case 0x06C5: item = new MetalDoor( DoorFacing.WestCW ); break; case 0x06C7: item = new MetalDoor( DoorFacing.EastCCW ); break; case 0x06CD: item = new MetalDoor( DoorFacing.SouthCW ); break; case 0x06CF: item = new MetalDoor( DoorFacing.NorthCCW ); break; // Light Wood Doors case 0x06D5: item = new LightWoodDoor( DoorFacing.WestCW ); break; case 0x06D7: item = new LightWoodDoor( DoorFacing.EastCCW ); break; case 0x06DD: item = new LightWoodDoor( DoorFacing.SouthCW ); break; case 0x06DF: item = new LightWoodDoor( DoorFacing.NorthCCW ); break; // Strong Wood Doors case 0x06E5: item = new StrongWoodDoor( DoorFacing.WestCW ); break; case 0x06E7: item = new StrongWoodDoor( DoorFacing.EastCCW ); break; case 0x06ED: item = new StrongWoodDoor( DoorFacing.SouthCW ); break; case 0x06EF: item = new StrongWoodDoor( DoorFacing.NorthCCW ); break; default: item = new Static(ItemID); item.Movable = false; break; } return item; }
public override void IncreaseTier() { base.IncreaseTier(); List <object> list = new List <object>(); Item c; switch (Tier) { case 1: // easel with canvas c = new Static(0xF66); c.MoveToWorld(new Point3D(1417, 1602, 30), Map); list.Add(c); // table c = new Static(0xB6B); c.MoveToWorld(new Point3D(1417, 1606, 30), Map); list.Add(c); c = new Static(0xB6D); c.MoveToWorld(new Point3D(1417, 1605, 30), Map); list.Add(c); c = new Static(0xB6C); c.MoveToWorld(new Point3D(1417, 1604, 30), Map); list.Add(c); // bonsai tree c = new Static(0x28DC); c.MoveToWorld(new Point3D(1417, 1604, 36), Map); list.Add(c); // bottles c = new Static(0xE29); c.MoveToWorld(new Point3D(1417, 1605, 37), Map); list.Add(c); c = new Static(0xE28); c.MoveToWorld(new Point3D(1417, 1605, 36), Map); list.Add(c); c = new Static(0xE2C); c.MoveToWorld(new Point3D(1417, 1606, 37), Map); list.Add(c); // pen and ink c = new Static(0xFBF); c.MoveToWorld(new Point3D(1417, 1606, 36), Map); list.Add(c); // cooking book c = new Static(0xFBE); c.MoveToWorld(new Point3D(1418, 1606, 42), Map); c.Name = "A Cookbook"; c.Weight = 5.0; list.Add(c); break; } if (list.Count > 0) { Tiers.Add(list); } }
private void AddStatic_CallBack() { m_Static = new Static(0x70D); m_Static.MoveToWorld(new Point3D(X - 1, Y, Z), Map); m_Static.Hue = Hue == 1153 ? 2333 : 1153; }