public override void OnDoubleClick(Mobile from) { if (TentCheck(from) == false) { from.SendMessage("You Already own a Tent"); } else { if (IsChildOf(from.Backpack)) { if (Validate(from) == true) { TentWalls v = new TentWalls(); v.Location = from.Location; v.Map = from.Map; TentRoof w = new TentRoof(); w.Location = from.Location; w.Map = from.Map; TentFloor y = new TentFloor(); y.Location = from.Location; y.Map = from.Map; TentTrim z = new TentTrim(); z.Location = from.Location; z.Map = from.Map; TentVerifier tentverifier = new TentVerifier(); from.AddToBackpack(tentverifier); SecureTent chest = new SecureTent((PlayerMobile)from); chest.Location = new Point3D(from.X + 2, from.Y - 1, from.Z); chest.Map = from.Map; TentDestroyer x = new TentDestroyer(v, w, y, z, (PlayerMobile)from, (SecureTent)chest, (TentVerifier)tentverifier); x.Location = new Point3D(from.X + 4, from.Y - 2, from.Z); x.Map = from.Map; from.SendGump(new TentGump(from)); this.Delete(); } else { from.SendMessage("You cannot errect your Tent in this area."); } } else { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); m_TentTrim = (TentTrim)reader.ReadItem(); m_TentFloor = (TentFloor)reader.ReadItem(); m_TentWalls = (TentWalls)reader.ReadItem(); m_TentRoof = (TentRoof)reader.ReadItem(); m_Player = (PlayerMobile)reader.ReadMobile(); }
public override void OnDoubleClick(Mobile from) { if (TentCheck(from) == false) { from.SendMessage("You already have the max number of tents placed."); } else { if (IsChildOf(from.Backpack)) { if (Validate(from) == true) { TentWalls v = new TentWalls(); v.Location = from.Location; v.Map = from.Map; TentRoof w = new TentRoof(); w.Location = from.Location; w.Map = from.Map; TentFloor y = new TentFloor(); y.Location = from.Location; y.Map = from.Map; TentTrim z = new TentTrim(); z.Location = from.Location; z.Map = from.Map; // TentVerifier tentverifier = new TentVerifier(); // from.AddToBackpack (tentverifier); SecureTent chest = new SecureTent((PlayerMobile)from); chest.Location = new Point3D(from.X - 1, from.Y - 1, from.Z); chest.Map = from.Map; TentDestroyer x = new TentDestroyer(v, w, y, z, (PlayerMobile)from, (SecureTent)chest); // ,(TentVerifier) tentverifier); x.Location = new Point3D(from.X - 1, from.Y, from.Z); // was x, y+1, z x.Map = from.Map; from.SendGump(new TentGump(from)); this.Delete(); } else { from.SendMessage("You cannot place your tent in this area."); } } else { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } } }
public override void OnDoubleClick(Mobile from) { if (TentCheck(from) == false) { from.SendMessage("You Already own a Tent"); } else { if (IsChildOf(from.Backpack)) { if (Validate(from) == true) { TentWalls v = new TentWalls(); v.Location = from.Location; v.Map = from.Map; TentRoof w = new TentRoof(); w.Location = from.Location; w.Map = from.Map; TentFloor y = new TentFloor(); y.Location = from.Location; y.Map = from.Map; TentTrim z = new TentTrim(); z.Location = from.Location; z.Map = from.Map; TentVerifier tentverifier = new TentVerifier(); from.AddToBackpack(tentverifier); SecureTent chest = new SecureTent((PlayerMobile)from, v, w, y, z); chest.Location = new Point3D(from.X - 1, from.Y - 1, from.Z); chest.Map = from.Map; BedRoll1 x = new BedRoll1(v, w, y, z, (PlayerMobile)from, (SecureTent)chest, (TentVerifier)tentverifier); x.Location = new Point3D(from.X, from.Y + 1, from.Z); x.Map = from.Map; from.SendGump(new TentGump(from)); this.Delete(); } else { from.SendMessage("You cannot errect your Tent in this area."); } } else { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } } }
public SecureTent(Mobile player, TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim) : base(0xE80) { m_Player = player; m_TentRoof = tentroof; m_TentWalls = tentwalls; m_TentFloor = tentfloor; m_TentTrim = tenttrim; this.ItemID = 2482; this.Visible = true; this.Movable = false; MaxItems = 25; }
public TentDestroyer(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest, TentVerifier tentverifier) { Name = player.Name + "'s tent carrying case"; m_Player = player; m_TentRoof = tentroof; m_TentWalls = tentwalls; m_TentFloor = tentfloor; m_TentTrim = tenttrim; m_Chest = chest; m_TentVerifier = tentverifier; this.ItemID = 2648; this.Visible = true; Hue = 696; }
public BedRoll1(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest, TentVerifier tentverifier) { Name = "A Sleeping Bag"; m_Player = player; m_TentRoof = tentroof; m_TentWalls = tentwalls; m_TentFloor = tentfloor; m_TentTrim = tenttrim; m_Chest = chest; m_TentVerifier = tentverifier; this.ItemID = 2645; this.Visible = true; Hue = 1072; }
public TentDestroyer(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest, TentVerifier tentverifier) { Name = player.Name +"'s tent carrying case"; m_Player = player; m_TentRoof = tentroof; m_TentWalls = tentwalls; m_TentFloor = tentfloor; m_TentTrim = tenttrim; m_Chest = chest; m_TentVerifier = tentverifier; this.ItemID = 2648; this.Visible = true; Hue = 696; }
public TentDestroyer(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest) { Name = "A tent carrying bag"; m_Player = player; m_TentRoof = tentroof; m_TentWalls = tentwalls; m_TentFloor = tentfloor; m_TentTrim = tenttrim; m_Chest = chest; this.ItemID = 2648; // 2645; this.Visible = true; Hue = 277; // 1072; m_Timer = new AutoDeleteTimer(this); m_Timer.Start(); }
public TentDestroyer(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest, TentVerifier tentverifier) { Name = "A tent carrying bag"; m_Player = player; m_TentRoof = tentroof; m_TentWalls = tentwalls; m_TentFloor = tentfloor; m_TentTrim = tenttrim; m_Chest = chest; if (tentverifier != null) { m_TentVerifier = tentverifier; } this.ItemID = 2648; // 2645; this.Visible = true; Hue = 277; // 1072; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); m_TentTrim = (TentTrim)reader.ReadItem(); m_TentFloor = (TentFloor)reader.ReadItem(); m_TentWalls = (TentWalls)reader.ReadItem(); m_TentRoof = (TentRoof)reader.ReadItem(); m_Player = (PlayerMobile)reader.ReadMobile(); m_Chest = (SecureTent)reader.ReadItem(); if (version == 0) { m_TentVerifier = (TentVerifier)reader.ReadItem(); } if (m_Player == null || m_Player.Deleted) { this.Delete(); } }
public void GenerateTent() { TentWalls walls = new TentWalls( TentStyle.Newbie ); TentRoof roof = new TentRoof( m_RoofHue ); //TentTrim trim = new TentTrim(); TentFloor floor = new TentFloor(); walls.MoveToWorld( this.Location, this.Map ); roof.MoveToWorld( this.Location, this.Map ); //trim.MoveToWorld( this.Location, this.Map ); floor.MoveToWorld( this.Location, this.Map ); Addons.Add( walls ); Addons.Add( roof ); //Addons.Add( trim ); Addons.Add( floor ); // Create tent bed m_Tentbed = new TentBedRoll( this ); m_Tentbed.MoveToWorld( new Point3D( this.X, this.Y + 1, this.Z ), this.Map ); m_Tentbed.Movable = false; // Create secute tent pack within the tent m_Tentpack = new TentBackpack( this ); m_Tentpack.MoveToWorld( new Point3D( this.X-1, this.Y-1, this.Z), this.Map ); SecureInfo info = new SecureInfo( (Container) m_Tentpack, SecureLevel.Anyone ); m_Tentpack.IsSecure = true; this.Secures.Add( info ); m_Tentpack.Movable = false; m_Tentpack.Hue = m_RoofHue; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); m_TentTrim = (TentTrim)reader.ReadItem(); m_TentFloor = (TentFloor)reader.ReadItem(); m_TentWalls = (TentWalls)reader.ReadItem(); m_TentRoof = (TentRoof)reader.ReadItem(); m_Player = (PlayerMobile)reader.ReadMobile(); m_Chest = (SecureTent)reader.ReadItem(); CheckAbandoned(); }
public TentDestroyer(TentWalls tentwalls, TentRoof tentroof, TentFloor tentfloor, TentTrim tenttrim, PlayerMobile player, SecureTent chest) : this(tentwalls, tentroof, tentfloor, tenttrim, player, chest, null) { }