All pastes #606371 Raw Edit

Stuff

public text v1 · immutable
·published 2007-07-06 20:20 UTC
rendered paste body
using Server.Gumps;
using Server.Network;

namespace Server.Items
{
	public class ReagentStone : Item
	{
		[Constructable]
		public ReagentStone() : base( 0xED6 )
		{
			Name = "ReagentStone [4200gp]";
			Movable = false;
			Hue = 2558;
		}

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

		public override void OnDoubleClick( Mobile m_From )
		{
            Container pack = m_From.Backpack;
            Container bank = m_From.BankBox;

            if ((pack != null && pack.ConsumeTotal(typeof(Gold), 4200)) || (bank != null && bank.ConsumeTotal(typeof(Gold), 4200)))
            {
                m_From.PlaySound(247);
                m_From.Backpack.DropItem(new regbag());
                m_From.SendAsciiMessage("You bought a Reagents Bag");
            }
            else
                m_From.SendAsciiMessage("You do not have enough money!");
            break;
		}

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

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

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

			int version = reader.ReadInt();
		}
	}
}