Strong Backpack

We try to put in new spawn areas, quests, events, items and scripts. This is where you submit your wish.
Locked
User avatar
Elron
Novice Scribe
Posts: 9
Joined: Mon May 03, 2010 9:00 am

Strong Backpack

Post by Elron »

I think it would be great if the backpack could hold more weight so things don't drop to the ground from storagekeys. The char still can't move or recall because of the weight but at least nothing gets left behind.
in Container.cs

Code: Select all

	public class Backpack : BaseContainer, IDyable
	{
		[Constructable]
		public Backpack() : base( 0xE75 )
		{
			Layer = Layer.Backpack;
			Weight = 1.0;
			}		
		public override int DefaultMaxWeight
		{
			get
			{
				if ( IsSecure )
					return 0;
 
				return 1600;
			}
		}

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

		public bool Dye( Mobile from, DyeTub sender )
		{
			if ( Deleted ) return false;

			Hue = sender.DyedHue;

			return true;
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 1 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			if ( version == 0 && ItemID == 0x9B2 )
				ItemID = 0xE75;
		}
	}

While your in that file you could also add a message if player drops blessed or insured stuff into wrong bags
in TryDropItem block & OnDragDropInto block

Code: Select all

 Container pack = from.Backpack;
            if (pack != null && (this != pack) && this.IsChildOf(from.Backpack))
            {
                if ((dropped.LootType == LootType.Blessed || dropped.LootType == LootType.Newbied) && this.LootType != LootType.Blessed)
                {
                    from.SendMessage(33, "That is a Blessed item. Place it in your main pack or blessed bag to avoid losing it on death."); 
                }
                if (dropped.Insured && this.LootType != LootType.Blessed)
                {
                    from.SendMessage(33, "That is an Insured item. Place it in your main pack to avoid losing it on death."); 
                }
            }
Locked