Neyse artık boşver bi Eques'e rica ediyim baksın senin sorununa o Run Uo'dan anlar.
using System; 
using System.IO;
using System.Collections;
using Server.Items; 
using Server.Network; 
using Server.Gumps; 
using Server.Mobiles; 
using Server.Targeting;
using Server.Targets;

namespace Server.Items
{
	public class VSItem
	{
		private string m_Item = "";
		private string m_Name = "";
		private int m_Price = 0;
		private int m_Amount = 1;
		private bool m_BlessBond;
		private int m_BBPrice;
		private string m_Description = "";

		public string Item{ get{ return m_Item; } set{ m_Item = value; } }
		public string Name{ get{ return m_Name; } set{ m_Name = value; } }
		public int Price{ get{ return m_Price; } set{ m_Price = value; } }
		public int Amount{ get{ return m_Amount; } set{ m_Amount = value; if ( m_Amount < 1 ) m_Amount = 1; } }
		public bool BlessBond{ get{ return m_BlessBond; } set{ m_BlessBond = value; } }
		public int BBPrice{ get{ return m_BBPrice; } set{ m_BBPrice = value; } }
		public string Description{ get{ return m_Description; } set{ m_Description = value; } }

		public VSItem()
		{
		}

		public VSItem( string item, string name, int price, int amount, bool blessbond, int bbprice, string description )
		{
			Item = item;
			Name = name;
			Price = price;
			Amount = amount;
			BlessBond = blessbond;
			BBPrice = bbprice;
			Description = description;
		}

		public Type GetItemType()
		{
			Type type = ScriptCompiler.FindTypeByName( m_Item );
			return type;
		}

		public void Serialize( GenericWriter writer )
		{
			writer.Write( (string) m_Description );
			writer.Write( (bool) m_BlessBond );
			writer.Write( (int) m_BBPrice );
			writer.Write( (string) m_Item );
			writer.Write( (string) m_Name );
			writer.Write( (int) m_Price );
			writer.Write( (int) m_Amount );
		}

		public void Deserialize( GenericReader reader, int version )
		{
			switch( version )
			{
				case 2:
				{
					m_Description = reader.ReadString();

					goto case 1;
				}
				case 1:
				{
					m_BlessBond = reader.ReadBool();
					m_BBPrice = reader.ReadInt();

					goto case 0;
				}
				case 0:
				{
					m_Item = reader.ReadString();
					m_Name = reader.ReadString();
					m_Price = reader.ReadInt();
					m_Amount = reader.ReadInt();

					break;
				}
			}
		}
	}
	public class VSShopper
	{
		private ArrayList m_ItemList = new ArrayList();
		private Mobile m_Owner;
		private VendorStone m_Stone;

		public ArrayList ItemList{ get{ return m_ItemList; } set{ m_ItemList = value; } }
		public Mobile Owner{ get{ return m_Owner; } set{ m_Owner = value; } }
		public VendorStone Stone{ get{ return m_Stone; } set{ m_Stone = value; } }

		public VSShopper( Mobile owner, VendorStone stone )
		{
			m_Owner = owner;
			m_Stone = stone;
		}

		public void AddItem( int itemnumber )
		{
			m_ItemList.Add( itemnumber );
		}

		public int TotalPrice()
		{
			int tp = 0;

			for( int i = 0; i < m_ItemList.Count; ++i )
			{
				int n = (int)ItemList[i];

				VSItem vsi = (VSItem)m_Stone.ItemList[n];
				tp += vsi.Price;
			}

			return tp;
		}
	}
	public class VendorBall : Item
	{
		private VendorStone m_Stone;

		//[CommandProperty( AccessLevel.GameMaster )]
		public VendorStone Stone{ get{ return m_Stone; } set{ m_Stone = value; } }

		[Constructable]
		public VendorBall() : base( 0x1869 )
		{
			Weight = 0.1;
			Hue = 89; 
			Name = "Vendor Ball";
		}

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

		private void ConnectTarget_Callback( Mobile from, object obj ) 
		{ 
			if ( obj is VendorStone && obj is Item ) 
			{ 
				Item item = (Item)obj;
				VendorStone ps = (VendorStone)obj;

				Stone = ps;
				from.SendMessage( "You have connected the ball to the stone." );
			} 
			else 
			{ 
				from.SendMessage( "That is an invalid target!" );
			}
		}

		public override void OnDoubleClick( Mobile from ) 
		{ 
			if ( !IsChildOf( from ) && !Utility.InRange( from.Location, Location, 3 ) )
				from.SendMessage( "You are too far away to use that." );
			else if ( Stone != null && !Stone.Deleted )
			{
				if ( from.AccessLevel >= Stone.AccessLevel )
				{
					from.SendGump( new StaffVendorGump( from, Stone ) );
				}
				else if ( !Stone.EditMode )
				{
					if ( !Stone.EditMode )
						from.SendGump( new VendorGump( new VSShopper( from, m_Stone ), Stone ) );
					else
						from.SendMessage( "This vendor stone is currently in edit mode." );
				}
				else
					from.SendMessage( "This stone is in edit mode." );
			}
			else
			{
				from.BeginTarget( -1, false, TargetFlags.Beneficial, new TargetCallback( ConnectTarget_Callback ) );
				from.SendMessage( "Please target a stone to connect this ball to." );
			}
		}

		public override void OnSingleClick( Mobile from )
		{
			base.OnSingleClick( from );

			if ( Stone != null && !Stone.Deleted )
			{
				if ( Stone.Name != null )
					LabelTo( from, "Stone Ball, Connected to: "+ Stone.Name );
				else
					LabelTo( from, "Stone Ball, Connected to: !SET THE STONE'S NAME!" );
			}
			else
			{
				LabelTo( from, "Stone Ball, Connected to: None" );
			}
		}

		public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties( list );

			if ( Stone != null && !Stone.Deleted )
			{
				if ( Stone.Name != null )
					list.Add( "Stone Ball, Connected to: "+ Stone.Name );
				else
					list.Add( "Stone Ball, Connected to: !SET THE STONE'S NAME!" );
			}
			else
			{
				list.Add( "Stone Ball, Connected to: None" );
			}
		}

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

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

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

			int version = reader.ReadInt();
			m_Stone = reader.ReadItem() as VendorStone;
		}
	}
}

namespace Server.Items
{ 
	public class VendorStone : Item 
	{ 
		private AccessLevel m_AccessLevel = AccessLevel.Owner;
		private bool m_EditMode;
		private string m_Currency;
		private ArrayList m_ItemList = new ArrayList();

		public string Currency{get{return m_Currency;}set{m_Currency = value;}}
		public ArrayList ItemList{get{return m_ItemList;}set{m_ItemList = value;}}
		public AccessLevel AccessLevel{get{return m_AccessLevel;}set{m_AccessLevel = value;}}
		public bool EditMode{get{return m_EditMode;}set{m_EditMode = value;}}

		[Constructable] 
		public VendorStone() : base( 0xEDC ) 
		{ 
			Movable = false; 
			Hue = 89; 
			Name = "Vendor Stone";
		} 

		public override void OnDoubleClick( Mobile from ) 
		{ 
			if ( !Utility.InRange( from.Location, Location, 3 ) )
				from.SendMessage( "You are too far away to use that." );
			else if ( from.AccessLevel >= AccessLevel )
				from.SendGump( new StaffVendorGump( from, this ) );
			else if ( !EditMode )
				from.SendGump( new VendorGump( new VSShopper( from, this ), this ) );
			else
				from.SendMessage( "This stone is in edit mode." );
		}

		public void CloseGumps( Mobile from )
		{
			from.CloseGump( typeof( VendorGump ) );
			from.CloseGump( typeof( VendorStoneBuyGump ) );
			from.CloseGump( typeof( VendorStoneEditGump ) );
			from.CloseGump( typeof( VendorStoneAddItemGump ) );
			from.CloseGump( typeof( StaffVendorGump ) );
		}

		public Type GetCurrency()
		{
			Type type = ScriptCompiler.FindTypeByName( Currency );
			return type;
		}

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

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

			writer.Write( (int) 2 ); // version 
			writer.Write( (int)m_AccessLevel );
			writer.Write( (string)m_Currency );
			writer.Write( (bool)m_EditMode );

			writer.Write( m_ItemList.Count );
			for ( int i = 0; i < m_ItemList.Count; ++i )
				((VSItem)m_ItemList[i]).Serialize( writer );
		}

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

			int version = reader.ReadInt(); 

			if (version == 0)
			{
				bool bNull;
				int iNull;
				bNull = reader.ReadBool(); //custom hues
				bNull = reader.ReadBool(); //m_Blessed
				bNull = reader.ReadBool(); //m_Bonded
				bNull = reader.ReadBool(); //m_Hued
				iNull = reader.ReadInt(); //m_BlessedPrice
				iNull = reader.ReadInt(); //m_BondedPrice
				iNull = reader.ReadInt(); //m_HuedPrice
				m_AccessLevel = (AccessLevel)reader.ReadInt(); 
				m_Currency = reader.ReadString();
				m_EditMode = reader.ReadBool(); 

				int size1 = reader.ReadInt();
				ArrayList alPrice = new ArrayList( size1 );
				for ( int i = 0; i < size1; ++i )
				{
					int price = reader.ReadInt();
					alPrice.Add( price );
				}

				int size4 = reader.ReadInt();
				ArrayList alNull = new ArrayList( size4 );
				for ( int i = 0; i < size4; ++i )
				{
					int hue = reader.ReadInt();
					alNull.Add( hue );
				}

				int size5 = reader.ReadInt();
				ArrayList alAmount = new ArrayList( size5 );
				for ( int i = 0; i < size5; ++i )
				{
					int itemamount = reader.ReadInt();
					alAmount.Add( itemamount );
				}

				int size2 = reader.ReadInt();
				ArrayList alItem = new ArrayList( size2 );
				for ( int i = 0; i < size2; ++i )
				{
					string item = reader.ReadString();
					alItem.Add( item );
				}

				int size3 = reader.ReadInt();
				ArrayList alName = new ArrayList( size3 );
				for ( int i = 0; i < size3; ++i )
				{
					string gumpname = reader.ReadString();
					alName.Add( gumpname );
				}

				int size6 = reader.ReadInt();
				alNull = new ArrayList( size6 );
				for ( int i = 0; i < size6; ++i )
				{
					int hueprices = reader.ReadInt();
					alNull.Add( hueprices );
				}
				//dispose of the not used arrays (bless.. bond...)
				alNull.Clear();
				for( int i = 0; i < alName.Count; i++ )
				{
					VSItem v = new VSItem( alItem[i].ToString(), alName[i].ToString(), (int)alPrice[i], (int)alAmount[i], false, 0, "" );
					ItemList.Add( v );
				}
				//dispose of the "old" arrays
				alItem.Clear();
				alName.Clear();
				alPrice.Clear();
				alAmount.Clear();
			}
			else switch( version )
			{
				case 2:
				case 1:
				case 0:
				{
					m_AccessLevel = (AccessLevel)reader.ReadInt(); 
					m_Currency = reader.ReadString();
					m_EditMode = reader.ReadBool(); 

					int size = reader.ReadInt();
					m_ItemList = new ArrayList( size );
					for ( int i = 0; i < size; ++i )
					{
						VSItem vsi = new VSItem();
						vsi.Deserialize( reader, version );
						m_ItemList.Add( vsi );
					}

					break;
				} 
			} 
		} 
	} 
} 

namespace Server.Gumps
{ 
	public class VendorGump : Gump
	{
                private VendorStone m_Stone;
                private VSShopper m_Shopper;

		private const int AmountPerPage = 20; 

		public string Center( string text )
		{
			return String.Format( "<CENTER>{0}</CENTER>", text );
		}

		public string Color( string text, int color )
		{
			return String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", color, text );
		}

                public VendorGump( VSShopper shopper, VendorStone stone ) : base( 25, 25 )
                {
			m_Stone = stone;
			m_Shopper = shopper;

			m_Stone.CloseGumps( m_Shopper.Owner );

			AddPage( 0 ); 

			AddBackground( 0, 0, 550, 480, 0x2436 );
			AddAlphaRegion( 10, 10, 530, 460 );

			AddImageTiled( 10, 40, 530, 5, 2624 );
			AddImageTiled( 10, 58, 390, 5, 2624 );

			AddImageTiled( 90, 40, 5, 430, 2624 );
			AddImageTiled( 125, 40, 5, 430, 2624 );
			AddImageTiled( 160, 40, 5, 430, 2624 );
			AddImageTiled( 310, 40, 5, 430, 2624 );
			AddImageTiled( 400, 40, 5, 430, 2624 );

			if ( m_Stone.Name != null && m_Stone.Name != "" )
				AddHtml( 10, 10, 510, 20, Color( Center( m_Stone.Name ), 0xFFFFFF ), false, false );
			else
				AddHtml( 10, 10, 510, 20, Color( Center( "Vendor Stone" ), 0xFFFFFF ), false, false );

			AddLabel( 420, 60, 5, "Stone Currency:" );
			if ( m_Stone.Currency != null  )
				AddLabel( 420, 80, 5, m_Stone.Currency );
			else
				AddLabel( 420, 80, 33, "None" );

			AddHtml( 10, 42, 85, 20, Color( Center( "Item Amount" ), 0xFFFFFF ), false, false );
			AddHtml( 95, 42, 30, 20, Color( Center( ((m_Stone.EditMode && shopper.Owner.AccessLevel >= m_Stone.AccessLevel) ? "Edit" : "Buy") ), 0xFFFFFF ), false, false );
			AddHtml( 130, 42, 30, 20, Color( Center( "Des" ), 0xFFFFFF ), false, false );
			AddHtml( 165, 42, 145, 20, Color( Center( "Item" ), 0xFFFFFF ), false, false );
			AddHtml( 315, 42, 85, 20, Color( Center( "Price" ), 0xFFFFFF ), false, false );

			if ( !m_Stone.EditMode )
			{
				AddButton( 420, 120, 1209, 1210, 1, GumpButtonType.Reply, 0 );
				AddLabel( 440, 120, 1152, "Buy Items" );
			}

			AddLabel( 410, 160, 1152, "The (B) beside" );
			AddLabel( 410, 175, 1152, "items and creatures" );
			AddLabel( 410, 190, 1152, "stands for blessing" );
			AddLabel( 410, 205, 1152, "or bonding." );


			AddLabel( 420, 400, 906, "Created By" );
			AddLabel( 420, 420, 906, "~Raelis~" );

			AddButton( 420, 440, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
			AddLabel( 450, 440, 33, "Close" );

			int index = 0;
			int page = 1;

			AddPage( 1 );

			for ( int i = 0; i < m_Stone.ItemList.Count; ++i )
			{
				if ( index >= AmountPerPage )
				{ 
					AddButton( 420, 365, 0x1196, 0x1196, 1152, GumpButtonType.Page, page + 1 );
					AddLabel( 420, 350, 1152, "Next page" ); 

					++page; 
					index = 0; 

					AddPage( page );

					AddButton( 420, 315, 0x119a, 0x119a, 1152, GumpButtonType.Page, page - 1 );
					AddLabel( 420, 300, 1152, "Previous page" ); 
				}

				int price = ((VSItem)m_Stone.ItemList[i]).Price;
				int amount = ((VSItem)m_Stone.ItemList[i]).Amount;
				string gumpname = ((VSItem)m_Stone.ItemList[i]).Name;

				AddLabel( 165, 60 + (index * 20), 1152, gumpname +( ((VSItem)m_Stone.ItemList[i]).BlessBond ? " (B)" : "") );
				AddLabel( 25, 60 + (index * 20), 1152, ""+ amount );
				AddLabel( 320, 60 + (index * 20), 1152, ""+ price );

				AddButton( 100, 65 + (index * 20), 1209, 1210, i+2, GumpButtonType.Reply, 0 );
				if ( ((VSItem)m_Stone.ItemList[i]).Description != null && ((VSItem)m_Stone.ItemList[i]).Description != "" )
					AddButton( 135, 65 + (index * 20), 0x1523, 0x1523, i+m_Stone.ItemList.Count+3, GumpButtonType.Reply, 0 );

				AddImageTiled( 10, 80 + (index * 20), 390, 3, 2624 );

				index++;
			}
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{ 
			Mobile from = state.Mobile;

			if ( m_Stone.Deleted )
				return;

			if ( info.ButtonID == 0 )
			{
				from.SendMessage( "You decide not to buy anything." );
			}

			if ( info.ButtonID == 1 )
			{
				from.SendGump( new VendorStoneBuyGump( m_Shopper, m_Stone ) );
			}

			if ( info.ButtonID-m_Stone.ItemList.Count-2 <= m_Stone.ItemList.Count && info.ButtonID >= 3 && info.ButtonID-2 > m_Stone.ItemList.Count )
			{
				from.SendGump( new VendorGump( m_Shopper, m_Stone ) );
				if ( ((VSItem)m_Stone.ItemList[info.ButtonID-m_Stone.ItemList.Count-3]).Description != null && ((VSItem)m_Stone.ItemList[info.ButtonID-m_Stone.ItemList.Count-3]).Description != "" )
					from.SendGump( new VendorStoneDescriptionGump( from, ((VSItem)m_Stone.ItemList[info.ButtonID-m_Stone.ItemList.Count-3]).Description, ((VSItem)m_Stone.ItemList[info.ButtonID-m_Stone.ItemList.Count-3]).Name ) );
			}
			else if ( info.ButtonID-1 <= m_Stone.ItemList.Count && info.ButtonID >= 2 )
			{
				if ( !m_Stone.EditMode )
				{
					m_Shopper.AddItem( info.ButtonID-2 );
					from.SendMessage( "You add it to your list." );
					from.SendGump( new VendorGump( m_Shopper, m_Stone ) );
				}
				else
				{
					if ( info.ButtonID-2 > m_Stone.ItemList.Count-1 || info.ButtonID-2 < 0 )
						return;

					m_Stone.CloseGumps( from );
					from.SendGump( new VendorStoneEditGump( from, (VSItem)m_Stone.ItemList[info.ButtonID-2], m_Stone ) );
				}
			}
		}
	}
	public class VendorStoneBuyGump : Gump
	{
		private VSShopper m_Shopper;
		private VendorStone m_Stone;

                public VendorStoneBuyGump( VSShopper shopper, VendorStone stone ) : base( 125, 125 )
                {
			m_Shopper = shopper;
			m_Stone = stone;

			m_Stone.CloseGumps( m_Shopper.Owner );

			AddPage( 0 ); 

			AddBackground( 0, 0, 375, 210, 0x2436 );

			AddLabel( 12, 17, 5, "Your Buy List" );
			AddLabel( 110, 22, 5, "Total Purchase: "+m_Shopper.TotalPrice() );

			AddButton( 15, 160, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
			AddLabel( 45, 160, 33, "Back" );
			AddButton( 110, 160, 4005, 4007, 1, GumpButtonType.Reply, 0 ); 
			AddLabel( 140, 160, 1152, "Buy" );

			for ( int i = 0; i < m_Shopper.ItemList.Count; ++i )
			{
				int item = (int)m_Shopper.ItemList[i];

				if ( (i % 5) == 0 )
				{
					if ( i != 0 )
					{
						AddButton( 190, 235, 0x1196, 0x1196, 1152, GumpButtonType.Page, (i / 5) + 1 );
						AddLabel( 190, 220, 1152, "Next page" ); 
					}

					AddPage( (i / 5) + 1 );

					if ( i != 0 )
					{
						AddButton( 10, 235, 0x119a, 0x119a, 1152, GumpButtonType.Page, (i / 5) );
						AddLabel( 10, 220, 1152, "Previous page" ); 
					}
				}

				VSItem vsi = (VSItem)m_Stone.ItemList[item];

				string blessbond = (vsi.BlessBond ? "(B)" : "");

				AddButton( 13, 40 + ((i % 5) * 20), 0x26AF, 0x26B1, i+2, GumpButtonType.Reply, 0 ); 
				AddLabel( 40, 40 + ((i % 5) * 20), 1152, vsi.Amount+" "+vsi.Name+" "+blessbond+" "+vsi.Price+" "+m_Stone.Currency );
			}
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{ 
			Mobile from = state.Mobile;

			if ( from.Backpack == null || from.BankBox == null )
				return;

			if ( info.ButtonID == 0 )
			{
				from.SendGump( new VendorGump( m_Shopper, m_Stone ) );
			}
			if ( info.ButtonID == 1 )
			{
				if ( m_Stone.GetCurrency() == null && m_Shopper.TotalPrice() > 0 )
					from.SendMessage( "There was no set currency to this stone." );
				else if ( m_Shopper.ItemList.Count <= 0 )
				{
					from.SendMessage( "You did not select anything to buy." );
					from.SendGump( new VendorStoneBuyGump( m_Shopper, m_Stone ) );
				}
				else if ( m_Shopper.TotalPrice() == 0 || from.Backpack.ConsumeTotal( m_Stone.GetCurrency(), m_Shopper.TotalPrice(), true ) )
				{
					for( int i = 0; i < m_Shopper.ItemList.Count; ++i )
					{
						int n = (int)m_Shopper.ItemList[i];

						VSItem vsi = (VSItem)m_Stone.ItemList[n];

						Type type = vsi.GetItemType();

						if ( type != null )
						{
							object o = Activator.CreateInstance( type );

							if ( o is Mobile )
							{
								Mobile m = (Mobile)o;

								ArrayList items = new ArrayList();

								m.MoveToWorld( from.Location, from.Map );
								if ( m is BaseCreature )
								{
									BaseCreature c = (BaseCreature)m;
									c.ControlMaster = from;
									c.Controlled = true;
									c.ControlTarget = from;
									c.ControlOrder = OrderType.Follow;

									items.Add( c );
								}
								int total = 0;
								while( vsi.Amount-1 > total )
								{
									object o2 = Activator.CreateInstance( type );
									Mobile m2 = (Mobile)o2;

									m2.MoveToWorld( from.Location, from.Map );
									if ( m2 is BaseCreature )
									{
										BaseCreature c = (BaseCreature)m2;
										c.ControlMaster = from;
										c.Controlled = true;
										c.ControlTarget = from;
										c.ControlOrder = OrderType.Follow;

										items.Add( c );
									}
									total++;
								}

								if ( vsi.BlessBond )
									from.SendGump( new VendorStoneBlessBondGump( from, vsi, m_Stone, items ) );
							}
							if ( o is Item )
							{
								Item item = (Item)o;

								ArrayList items = new ArrayList();

								items.Add( item );

								if ( item.Stackable )
								{
									if ( vsi.Amount > 60000 )
									{
										item.Amount = 60000;

										int aleft = vsi.Amount-60000;

										while( aleft > 0 )
										{
											object o2 = Activator.CreateInstance( type );
											if ( o2 is Item )
											{
												Item item2 = (Item)o2;

												if ( aleft > 60000 )
												{
													item2.Amount = 60000;
													aleft -= 60000;
												}
												else
												{
													item2.Amount = aleft;
													aleft = 0;
												}
												from.AddToBackpack( item2 );
												items.Add( item2 );
											}
										}
									}
									else
										item.Amount = vsi.Amount;
								}
								else
								{
									int total = 0;
									while( vsi.Amount-1 > total )
									{
										object o2 = Activator.CreateInstance( type );
										if ( o2 is Item )
										{
											Item item2 = (Item)o2;
											from.AddToBackpack( item2 );
											items.Add( item2 );
										}
										total++;
									}
								}

								if ( vsi.BlessBond )
									from.SendGump( new VendorStoneBlessBondGump( from, vsi, m_Stone, items ) );
								from.AddToBackpack( item );
							}
						}
					}
					if ( m_Shopper.TotalPrice() == 0 )
						from.SendMessage( "You recieve the item for free." );
					else if ( m_Stone.Currency != null && m_Stone.Currency != "" )
						from.SendMessage( "You buy the items with the "+m_Stone.Currency+" in your backpack." );
					else
						from.SendMessage( "You buy the items with the currency in your backpack." );
				}
				else if ( from.BankBox.ConsumeTotal( m_Stone.GetCurrency(), m_Shopper.TotalPrice(), true ) )
				{
					for( int i = 0; i < m_Shopper.ItemList.Count; ++i )
					{
						int n = (int)m_Shopper.ItemList[i];

						VSItem vsi = (VSItem)m_Stone.ItemList[n];

						Type type = vsi.GetItemType();

						if ( type != null )
						{
							object o = Activator.CreateInstance( type );

							if ( o is Mobile )
							{
								Mobile m = (Mobile)o;

								ArrayList items = new ArrayList();

								m.MoveToWorld( from.Location, from.Map );
								if ( m is BaseCreature )
								{
									BaseCreature c = (BaseCreature)m;
									c.ControlMaster = from;
									c.Controlled = true;
									c.ControlTarget = from;
									c.ControlOrder = OrderType.Follow;

									items.Add( c );

									if ( vsi.BlessBond )
										from.SendGump( new VendorStoneBlessBondGump( from, vsi, m_Stone, items ) );
								}
								int total = 0;
								while( vsi.Amount-1 > total )
								{
									object o2 = Activator.CreateInstance( type );
									Mobile m2 = (Mobile)o2;

									m2.MoveToWorld( from.Location, from.Map );
									if ( m2 is BaseCreature )
									{
										BaseCreature c = (BaseCreature)m2;
										c.ControlMaster = from;
										c.Controlled = true;
										c.ControlTarget = from;
										c.ControlOrder = OrderType.Follow;

										items.Add( c );
									}
									total++;
								}
							}
							if ( o is Item )
							{
								Item item = (Item)o;

								ArrayList items = new ArrayList();

								items.Add( item );

								if ( item.Stackable )
								{
									if ( vsi.Amount > 60000 )
									{
										item.Amount = 60000;

										int aleft = vsi.Amount-60000;

										while( aleft > 0 )
										{
											object o2 = Activator.CreateInstance( type );
											if ( o2 is Item )
											{
												Item item2 = (Item)o2;

												if ( aleft > 60000 )
												{
													item2.Amount = 60000;
													aleft -= 60000;
												}
												else
												{
													item2.Amount = aleft;
													aleft = 0;
												}
												from.AddToBackpack( item2 );
												items.Add( item2 );
											}
										}
									}
									else
										item.Amount = vsi.Amount;
								}
								else
								{
									int total = 0;
									while( vsi.Amount-1 > total )
									{
										object o2 = Activator.CreateInstance( type );
										if ( o2 is Item )
										{
											Item item2 = (Item)o2;
											from.AddToBackpack( item2 );
											items.Add( item2 );
										}
										total++;
									}
								}

								if ( vsi.BlessBond )
									from.SendGump( new VendorStoneBlessBondGump( from, vsi, m_Stone, items ) );
								from.AddToBackpack( item );
							}
						}
					}
					if ( m_Stone.Currency != null && m_Stone.Currency != "" )
						from.SendMessage( "You buy the items with the "+m_Stone.Currency+" in your bank box." );
					else
						from.SendMessage( "You buy the items with the currency in your bank box." );
				}
				else
				{
					from.SendGump( new VendorStoneBuyGump( m_Shopper, m_Stone ) );
					from.SendMessage( "You cannot not afford the items on your list." );
				}
			}
			if ( info.ButtonID >= 2 )
			{
				if ( info.ButtonID-2 > m_Shopper.ItemList.Count-1 || info.ButtonID-2 < 0 )
					return;
				m_Shopper.ItemList.Remove( m_Shopper.ItemList[info.ButtonID-2] );
				from.SendGump( new VendorStoneBuyGump( m_Shopper, m_Stone ) );
			}
		}
	}
	public class StaffVendorGump : Gump
	{
                private VendorStone m_Stone;

                public StaffVendorGump( Mobile from, VendorStone stone ) : base( 125, 125 )
                {
			m_Stone = stone;

			m_Stone.CloseGumps( from );

			AddPage( 0 ); 

			AddBackground( 0, 0, 160, 140, 0x2436 );

			AddButton( 10, 10, 4005, 4007, 1, GumpButtonType.Reply, 0 ); 
			AddLabel( 40, 10, 1152, "Vendor Gump" );
			AddButton( 10, 30, 4005, 4007, 2, GumpButtonType.Reply, 0 ); 
			AddLabel( 40, 30, 1152, "Add Item" );

			if ( from.AccessLevel >= AccessLevel.Owner )
				AddButton( 10, 50, 4005, 4007, 3, GumpButtonType.Reply, 0 ); 
            if ( m_Stone.AccessLevel == AccessLevel.Owner )
				AddLabel( 40, 50, 1302, "Owner" );
            else if ( m_Stone.AccessLevel == AccessLevel.Developer )
				AddLabel( 40, 50, 1302, "Developer" );
			else if ( m_Stone.AccessLevel == AccessLevel.Administrator )
				AddLabel( 40, 50, 1302, "Administrator" );
			else if ( m_Stone.AccessLevel == AccessLevel.Seer )
				AddLabel( 40, 50, 324, "Seer" );
			else if ( m_Stone.AccessLevel == AccessLevel.GameMaster )
				AddLabel( 40, 50, 33, "Game Master" );
			else if ( m_Stone.AccessLevel == AccessLevel.Counselor )
				AddLabel( 40, 50, 2, "Counselor" );
			else if ( m_Stone.AccessLevel == AccessLevel.Player )
				AddLabel( 40, 50, 88, "Player" );

			AddButton( 10, 70, 4005, 4007, 4, GumpButtonType.Reply, 0 ); 
			if ( m_Stone.EditMode )
				AddLabel( 40, 70, 5, "Edit Mode" );
			else
				AddLabel( 40, 70, 33, "Edit Mode" );
			AddLabel( 10, 90, 1152, "Currency:" );
			AddTextEntry( 70, 90, 85, 15, 1152, 0, m_Stone.Currency );

			AddButton( 10, 110, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
			AddLabel( 40, 110, 33, "Close" );
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{ 
			Mobile from = state.Mobile;

			if ( m_Stone.Deleted )
				return;

			string currency = "";
			string[] tr = new string[ 1 ];
			foreach( TextRelay t in info.TextEntries )
				tr[ t.EntryID ] = t.Text;
			if ( tr[ 0 ] != null )
				currency = tr[ 0 ];
			m_Stone.Currency = currency;

			if ( info.ButtonID == 0 )
			{
				from.SendMessage( "Closed." );
			}
			if ( info.ButtonID == 1 )
			{
				from.SendGump( new VendorGump( new VSShopper( from, m_Stone ), m_Stone ) );
			}
			if ( info.ButtonID == 2 )
			{
				from.SendGump( new VendorStoneAddItemGump( from, m_Stone ) );
			}
			if ( info.ButtonID == 3 )
			{
				if ( m_Stone.AccessLevel == AccessLevel.Owner )
					m_Stone.AccessLevel = AccessLevel.Player;
				else if ( m_Stone.AccessLevel == AccessLevel.Developer )
					m_Stone.AccessLevel = AccessLevel.Owner;
				else if ( m_Stone.AccessLevel == AccessLevel.Administrator )
					m_Stone.AccessLevel = AccessLevel.Developer;
				else if ( m_Stone.AccessLevel == AccessLevel.Seer )
					m_Stone.AccessLevel = AccessLevel.Administrator;
				else if ( m_Stone.AccessLevel == AccessLevel.GameMaster )
					m_Stone.AccessLevel = AccessLevel.Seer;
				else if ( m_Stone.AccessLevel == AccessLevel.Counselor )
					m_Stone.AccessLevel = AccessLevel.GameMaster;
				else if ( m_Stone.AccessLevel == AccessLevel.Player )
					m_Stone.AccessLevel = AccessLevel.Counselor;

				from.SendGump( new StaffVendorGump( from, m_Stone ) );
			}
			if ( info.ButtonID == 4 )
			{
				if ( m_Stone.EditMode )
					m_Stone.EditMode = false;
				else
					m_Stone.EditMode = true;

				from.SendGump( new StaffVendorGump( from, m_Stone ) );
			}
		}
	}
	public class VendorStoneAddItemGump : Gump
	{
		private Mobile m_Mobile;
		private VendorStone m_Stone;

		public VendorStoneAddItemGump( Mobile mobile, VendorStone stone ) : base( 25, 50 )
		{
			m_Mobile = mobile;
			m_Stone = stone;

			m_Stone.CloseGumps( m_Mobile );

			AddPage( 0 );

			AddBackground( 25, 10, 420, 430, 0x2436 );

			AddImageTiled( 33, 20, 401, 411, 2624 );
			AddAlphaRegion( 33, 20, 401, 411 );

			AddLabel( 125, 40, 1152, "Vendor Stone" );

			AddLabel( 40, 60, 1152, "Add a Mobile or Item:" );
			AddTextEntry( 40, 80, 225, 15, 5, 0, "Item Here" );
			AddLabel( 40, 100, 1152, "Gump Name:" );
			AddTextEntry( 40, 120, 225, 15, 5, 1, "Name Here" );
			AddLabel( 40, 140, 1152, "Price:" );
			AddTextEntry( 40, 160, 225, 15, 5, 2, "0" );
			AddLabel( 40, 180, 1152, "Item Amount:" );
			AddTextEntry( 40, 200, 225, 15, 5, 3, "1" );

			AddCheck( 40, 220, 0x2342, 0x2343, false, 1 );
			AddLabel( 70, 220, 1152, "Bless/Bond:" );

			AddLabel( 40, 240, 1152, "Bless/Bond Price:" );
			AddTextEntry( 40, 260, 225, 15, 5, 4, "0" );

			AddLabel( 40, 280, 1152, "Description:" );
			AddTextEntry( 40, 300, 360, 75, 5, 5, "Des Here" );

			AddButton( 40, 390, 4005, 4007, 0, GumpButtonType.Reply, 0 );
			AddLabel( 70, 393, 1152, "Back" );
			AddButton( 120, 390, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddLabel( 150, 393, 1152, "Apply" );
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{
			Mobile from = state.Mobile; 

			if ( from == null )
				return;

			if ( info.ButtonID == 0 )
			{
				from.SendGump( new StaffVendorGump( from, m_Stone ) );
			}
			if ( info.ButtonID == 1 )
			{
				string item = "";
				string gumpname = "";
				int price = 0;
				int amount = 0;
				int bbprice = 0;
				bool blessbond = info.IsSwitched( 1 );
				string description = "";

				string[] tr = new string[ 6 ];
				foreach( TextRelay t in info.TextEntries )
				{
					tr[ t.EntryID ] = t.Text;
				}

				try { price = (int) uint.Parse( tr[ 2 ] ); } 
				catch {}
				try { amount = (int) uint.Parse( tr[ 3 ] ); } 
				catch {}
				try { bbprice = (int) uint.Parse( tr[ 4 ] ); } 
				catch {}
				if ( tr[ 0 ] != null )
					item = tr[ 0 ];
				if ( tr[ 1 ] != null )
					gumpname = tr[ 1 ];
				if ( tr[ 5 ] != null )
					description = tr[ 5 ];

				if ( amount <= 0 )
					amount = 1;

				if ( item != "" && gumpname != "" )
				{
					VSItem vsi = new VSItem( item, gumpname, price, amount, blessbond, bbprice, description );
					m_Stone.ItemList.Add( vsi );

					from.SendMessage( "Item Added." );
				}
				else
				{
					from.SendMessage( "You must set a property for each one." );
				}

				from.SendGump( new VendorStoneAddItemGump( from, m_Stone ) );
			}
		}
	}
	public class VendorStoneEditGump : Gump
	{
                private VendorStone m_Stone;
                private VSItem m_VSI;

                public VendorStoneEditGump( Mobile from, VSItem vsi, VendorStone stone ) : base( 125, 125 )
                {
			m_Stone = stone;
			m_VSI = vsi;

			m_Stone.CloseGumps( from );

			AddPage( 0 ); 

			AddBackground( 0, 0, 420, 300, 0x2436 );

			AddLabel( 13, 10, 1152, "Item Type:" );
			AddTextEntry( 83, 10, 100, 15, 1152, 0, m_VSI.Item );

			AddLabel( 13, 30, 1152, "Gump Name:" );
			AddTextEntry( 90, 30, 90, 15, 1152, 1, m_VSI.Name );

			AddLabel( 13, 50, 1152, "Price:" );
			AddTextEntry( 53, 50, 85, 15, 1152, 2, ""+m_VSI.Price );

			AddLabel( 13, 70, 1152, "Amount:" );
			AddTextEntry( 63, 70, 85, 15, 1152, 3, ""+m_VSI.Amount );

			AddCheck( 15, 90, 0x2342, 0x2343, m_VSI.BlessBond, 1 );
			AddLabel( 45, 90, 1152, "Bless/Bond:" );

			AddLabel( 13, 110, 1152, "Bless/Bond Price:" );
			AddTextEntry( 123, 110, 225, 15, 1152, 4, ""+m_VSI.BBPrice );

			AddLabel( 13, 130, 1152, "Description:" );
			AddTextEntry( 13, 150, 387, 75, 1152, 5, m_VSI.Description );

			AddButton( 15, 245, 4005, 4007, 2, GumpButtonType.Reply, 0 ); 
			AddLabel( 45, 245, 33, "Remove" );

			AddButton( 15, 265, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
			AddLabel( 45, 265, 33, "Back" );
			AddButton( 85, 265, 4005, 4007, 1, GumpButtonType.Reply, 0 ); 
			AddLabel( 115, 265, 33, "Apply" );
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{ 
			Mobile from = state.Mobile;

			if ( m_Stone.Deleted )
				return;

			if ( info.ButtonID == 0 )
			{
				from.SendMessage( "Back." );
				from.SendGump( new VendorGump( new VSShopper( from, m_Stone ), m_Stone ) );
			}
			if ( info.ButtonID == 1 )
			{
				string item = "";
				string gumpname = "";
				int price = 0;
				int amount = 0;
				int bbprice = 0;
				bool blessbond = info.IsSwitched( 1 );
				string description = "";

				string[] tr = new string[ 6 ];
				foreach( TextRelay t in info.TextEntries )
				{
					tr[ t.EntryID ] = t.Text;
				}

				try { price = (int) uint.Parse( tr[ 2 ] ); } 
				catch {}
				try { amount = (int) uint.Parse( tr[ 3 ] ); } 
				catch {}
				try { bbprice = (int) uint.Parse( tr[ 4 ] ); } 
				catch {}
				if ( tr[ 0 ] != null )
					item = tr[ 0 ];
				if ( tr[ 0 ] != null )
					gumpname = tr[ 1 ];
				if ( tr[ 5 ] != null )
					description = tr[ 5 ];

				m_VSI.Item = item;
				m_VSI.Name = gumpname;
				m_VSI.Price = price;
				m_VSI.Amount = amount;
				m_VSI.BBPrice = bbprice;
				m_VSI.BlessBond = blessbond;
				m_VSI.Description = description;

				from.SendGump( new VendorGump( new VSShopper( from, m_Stone ), m_Stone ) );
			}
			if ( info.ButtonID == 2 )
			{
				if ( m_Stone.ItemList.Contains( m_VSI ) )
					m_Stone.ItemList.Remove( m_VSI );

				from.SendGump( new VendorGump( new VSShopper( from, m_Stone ), m_Stone ) );
			}
		}
	}
	public class VendorStoneBlessBondGump : Gump
	{
                private VendorStone m_Stone;
                private VSItem m_VSI;
		private ArrayList m_Objects;

                public VendorStoneBlessBondGump( Mobile from, VSItem vsi, VendorStone stone, ArrayList objects ) : base( 125, 125 )
                {
			m_Stone = stone;
			m_VSI = vsi;
			m_Objects = objects;

			m_Stone.CloseGumps( from );

			AddPage( 0 ); 

			AddBackground( 0, 0, 375, 85, 0x2436 );

			if ( objects.Count > 0 && objects[0] is Item )
				AddLabel( 13, 10, 1152, "Would you like to bless this item: '"+ vsi.Name +"'?" );
			else if ( objects.Count > 0 && objects[0] is Mobile )
				AddLabel( 13, 10, 1152, "Would you like to bond this pet: '"+ vsi.Name +"'?" );
			AddLabel( 13, 25, 1152, "Price: "+ vsi.BBPrice );

			AddButton( 15, 50, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
			AddLabel( 45, 50, 33, "No" );
			AddButton( 85, 50, 4005, 4007, 1, GumpButtonType.Reply, 0 ); 
			AddLabel( 115, 50, 33, "Yes" );
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{ 
			Mobile from = state.Mobile;

			if ( m_Stone.Deleted )
				return;

			if ( info.ButtonID == 0 )
			{
				if ( m_Objects.Count > 0 && m_Objects[0] is Item )
					from.SendMessage( "You decide not to bless this item." );
				else if ( m_Objects.Count > 0 && m_Objects[0] is Mobile )
					from.SendMessage( "You decide not to bond this pet." );
			}
			if ( info.ButtonID == 1 )
			{
				if ( from.Backpack.ConsumeTotal( m_Stone.GetCurrency(), m_VSI.BBPrice, true ) || m_VSI.BBPrice == 0 )
				{
					for( int i = 0; i < m_Objects.Count; i++ )
					{
						object o = m_Objects[i];

						if ( o is Item )
							((Item)o).LootType = LootType.Blessed;
						if ( o is Mobile && (Mobile)o is BaseCreature )
							((BaseCreature)o).IsBonded = true;
					}
				}
				else if ( from.BankBox.ConsumeTotal( m_Stone.GetCurrency(), m_VSI.BBPrice, true ) )
				{
					for( int i = 0; i < m_Objects.Count; i++ )
					{
						object o = m_Objects[i];

						if ( o is Item )
							((Item)o).LootType = LootType.Blessed;
						if ( o is Mobile && (Mobile)o is BaseCreature )
							((BaseCreature)o).IsBonded = true;
					}
				}
				else
					from.SendMessage( "You cannot not afford to do this." );
			}
		}
	}
	public class VendorStoneDescriptionGump : Gump
	{
		public string Center( string text )
		{
			return String.Format( "<CENTER>{0}</CENTER>", text );
		}

		public string Color( string text, int color )
		{
			return String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", color, text );
		}

                public VendorStoneDescriptionGump( Mobile from, string description, string name ) : base( 125, 125 )
                {
			from.CloseGump( typeof( VendorStoneDescriptionGump ) );

			AddPage( 0 ); 

			AddBackground( 0, 0, 200, 200, 0x2436 );

			AddHtml( 10, 10, 190, 20, Color( Center( "Description For: '"+name+"'" ), 0xFFFFFF ), false, false );

			AddHtml( 10, 30, 190, 145, Color( Center( description ), 0xFFFFFF ), false, true );
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{ 
			Mobile from = state.Mobile;

			if ( info.ButtonID == 0 )
				from.SendMessage( "Closed." );
		}
	}
}
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Ben bu kod'ların arasında nereye item kodlarını yerleştirçem. (Örnek aşağıdaki itemi vendor stone eklemek istiyorum)
using System;
using Server;
using Server.Network;
using Server.Items;
using Server.Mobiles;

// published by ahope222111 try our shard dns: uoperfection.dnsdojo.com , port 2593 , all feedback is 
//welcome

namespace Server.Items
{
    public class HolyBlade : BaseSword
	{
	    public override WeaponAbility PrimaryAbility { get{return WeaponAbility.DoubleStrike; } }
		public override WeaponAbility SecondaryAbility { get{return WeaponAbility.ArmorIgnore; } }
		
		public override int AosStrengthReq{ get{return 40; } }
		public override int AosMinDamage{ get{return 17; } }
		public override int AosMaxDamage{ get{return 18; } }
		public override int AosSpeed{ get{return 40; } }
		
		public override int OldStrengthReq{ get{return 20; } }
		public override int OldMinDamage{ get{return 13; } }
		public override int OldMaxDamage{ get{return 14; } }
		public override int OldSpeed{ get{return 50; } }
		
		public override int ArtifactRarity{ get{return 4; } }
		
		public override int DefHitSound{ get{return 0x23B; } }
		public override int DefMissSound{ get{return 0x23A; } }
		
		public override int InitMinHits{ get{return 255; } }
		public override int InitMaxHits{ get{return 255; } }
		
		[Constructable]
		public HolyBlade() : base(0x13FF)
		{
		  Weight = 9.6;
		  Name = "a blessed blade";
		  Hue = 47;
		  
		  Attributes.DefendChance = 15;
		  Attributes.LowerRegCost = 30;
		  Attributes.SpellChanneling = 1;
		  }
		  
		  public HolyBlade(Serial serial) : base(serial)
		  {
		  }
		  
		  public override void Serialize(GenericWriter writer)
		  {
		     base.Serialize( writer );
			 writer.Write( (int) 0);
		  }
		  
		  public override void Deserialize(GenericReader reader)
		  {
		     base.Deserialize( reader );
			 int version = reader.ReadInt();
		  }
      }
 }
 
kucukasker : Arkadaşlar kusura bakmayın tekrar açmak zorunda kaldım ama sorularıma yanıt alamadım ve tekrar bir başlık açmak zorunda kaldım.

Arkadaşlar ben bir kaç sorum olaçak.

1.Yaratmış olduğum vendor stones satılması için item ve eşya eklemek istiyorum ama bunu vendorstones scripts'i içinde hangi bölümlere ve nasıl yerleştireçem bana örnek olarak yardımıçı olursanız sevinirim.

2.Token sistemini kesilen spawnlardan düşmesini istiyorum bunu nasıl yapçam.

3.bazı dungonlara giriliyor ama tekrar çıkmak istediğimde diğer tarafa geçemeiyorum (örenk: desart giriyorum ama tekrar çıkılmıyor town çekmek zorunda kalıyorum.

Şimdilik yaşadığım sorunlar bunlar bana bu konular hakkında yardımıçı olursanız sevinirim simdiden teşekür edrim iyi oyunlar..

https://www.ultima-strike.com/forum/ultima-online/scripts-cs-yardim-q40509

ehehe yılan hikayesine dönmüş, yettim arkadaşlar =)

1- Vendor stone scripti oyun içinden yönetilebilir bir sistem. Daat99 unkinden bahsediyorsak tabii. Scripti kurcalama.
2- LootType kısmına Token cinsini girmen gerekiyor bir mobile gönderirsen örnekleştiririm
3- soruyu açarmısın pek anlamadım.
vendor stone dosyası ayrı bir dosya token için daat99'u kulanıyorum onda sorun yok
bu token daat99 scripti.
///daat99's Token System
///Made by daat99 based on idea by Viago :)
///Thanx for Murzin for all the grammer corrections :)
using System;
using Server;
using Server.Targeting;
using Server.Mobiles;
using Server.Gumps;
using Server.Network;


namespace Server.Items
{
	public class TokenLedger : Item
	{
		private int i_Owner, i_Tokens;
		
		[CommandProperty(AccessLevel.Administrator)]
		public int Owner { get { return i_Owner; } set { i_Owner = value; InvalidateProperties(); } }
		
		[CommandProperty(AccessLevel.Administrator)]
		public int Tokens { get { return i_Tokens; } set { i_Tokens = value; InvalidateProperties(); } }
		
		[Constructable]
		public TokenLedger() : base( 7715 )
		{
			Stackable = false;
			Name = "An Empty Token Ledger";
			Hue = 1173;
			Weight = 1.0;
			LootType = LootType.Blessed;
		}
		
		public override void OnDoubleClick(Mobile from)
		{
			if ( this.IsChildOf( from.Backpack ) )
			{
				if (i_Owner == 0)
				{
					i_Owner = from.Serial;
					Name = from.Name + "'s Token Ledger";
					i_Tokens = 0;
					from.SendGump( new TokensGump( from, this ) );
				}
				else if (from.Serial == i_Owner)
				{
					from.SendGump( new TokensGump( from, this ) );
				}
				else if (from.AccessLevel >= AccessLevel.GameMaster)
				{
					from.SendMessage(1173, "Select a new owner for this token ledger.");
					BeginSetOwner( from );
				}
				else
				{
					from.PlaySound(1074); //play no!! sound
					from.SendMessage(1173, "This book is not yours and you cannot seem to write your name in it!");
				}
			}
			else
				from.SendMessage(1173, "The token ledger must be in your backpack to be used.");
		}
		
		public void BeginSetOwner( Mobile from )
		{
			from.Target = new SetOwnerTarget( this );
		}

		public class SetOwnerTarget : Target
		{
			private TokenLedger m_TL;

			public SetOwnerTarget( TokenLedger tl ) : base( 18, false, TargetFlags.None )
			{
				m_TL = tl;
			}

			protected override void OnTarget( Mobile from, object targeted )
			{
				if ( m_TL.Deleted )
					return;

				m_TL.EndSetOwner( from, targeted );
			}
		}
		
		public void EndSetOwner( Mobile from, object obj )
		{
			if ( obj is PlayerMobile )
			{                                
				PlayerMobile m = obj as PlayerMobile;
				if ( m.Alive )
				{
					if (!(this.Deleted))
					{
						if  (m.Name != null)
						{
							this.Owner = m.Serial;
							this.Name = m.Name + "'s Token Ledger";
							from.SendMessage(1173, "You set the new owner as: {0}", m.Name);
							m.SendMessage(1173, "You became the owner of a new token ledger book.");
						}
						else
							from.SendMessage(1173, "Your target doesn't have a name.");
					}
					else
						from.SendMessage(1173, "The ledger was deleted before you selected your target.");
				}
				else
					from.SendMessage(1173, "Your target is dead, please choose a target that is alive.");
			}
			else
				from.SendMessage(1173, "Only players can be the owners of token ledger.");
		}

		public void BeginAddTokens( Mobile from )
		{
			from.Target = new AddTokensTarget( this );
		}
		
		public class AddTokensTarget : Target
		{
			private TokenLedger m_TL;

			public AddTokensTarget( TokenLedger tl ) : base( 18, false, TargetFlags.None )
			{
				m_TL = tl;
			}

			protected override void OnTarget( Mobile from, object targeted )
			{
				if ( m_TL.Deleted )
					return;
				m_TL.EndAddTokens( from, targeted );
			}
		}

		public void EndAddTokens( Mobile from, object obj )
		{
			from.CloseGump( typeof( TokensGump ) );
			if ( obj is Item )
			{            
				Item oldTokens = obj as Item;
				if ( oldTokens.IsChildOf( from.Backpack ) )
				{
					if (oldTokens.Name != null && oldTokens.Stackable == true && oldTokens.Amount > 0)
					{
						if ((oldTokens.Name).ToLower().IndexOf("token") != -1)
						{
							if (!(this.Deleted) && !(oldTokens.Deleted))
							{
								this.Tokens = (this.Tokens + oldTokens.Amount);
								from.SendMessage(1173, "You added {0} tokens to your ledger.", oldTokens.Amount);
								oldTokens.Delete();
							}
							else
							{
								from.PlaySound(1069); //play Hey!! sound
								from.SendMessage(1173, "Hey, don't try to rob the bank!!!");
							}
						}
						else
						{
							from.PlaySound(1074); //play no!! sound
							from.SendMessage(1173, "This isn't tokens!!!");
						}
					}
					else
						from.SendMessage(1173, "The ledger rejected this item.");
				}
				else
					from.SendMessage(1173, "This isn't in your backpack.");
			}
			else
				from.SendMessage(1173, "This is not an item.");
			from.SendGump( new TokensGump( from, this ) );
		}
		
		public TokenLedger( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 ); // version

			writer.Write( i_Tokens );
			writer.Write( i_Owner );
			
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			switch (version)
			{
				case 0:
				{
					i_Tokens = reader.ReadInt();
					i_Owner = reader.ReadInt();
					break;
				}
			}
		}
	}

	
	public class TokensGump : Gump
	{
		private Mobile m_From;
		private TokenLedger m_TL;
		
		public TokensGump( Mobile from, Item item ) : base( 50, 50 )
		{
			from.CloseGump( typeof( TokensGump ) );
			m_From = from;
			if (!(item is TokenLedger))
				return;
			TokenLedger tl = item as TokenLedger;
			m_TL = tl;

			AddPage(0);
			
			AddBackground(40, 40, 360, 325, 5170);
			
			AddLabel(75, 75, 69, item.Name);
			AddLabel(75, 100, 88, "You have " + ((TokenLedger)tl).Tokens + " Tokens.");
			AddLabel(75, 125, 32, @"Add Tokens to your Ledger manually:");
			AddButton(307, 130, 2460, 2461, 1, GumpButtonType.Reply, 0); //add tokens
			AddLabel(75, 150, 88, @"How much tokens you want to take out?");
			
			AddBackground(125, 200, 195, 41, 9270); //text entry backgrounf
			if (((TokenLedger)tl).Tokens >= 10000)
				AddTextEntry(145, 211, 155, 21, 39, 3, "10000"); //default text entry (where we write how much tokens)
			else
				AddTextEntry(145, 211, 155, 21, 39, 3, "" + ((TokenLedger)tl).Tokens + "");

			//token check
			AddLabel(75, 180, 69, @"Write a check:");
			AddImage(70, 200, 92);
			AddButton(79, 207, 2474, 2474, 2, GumpButtonType.Reply, 0);

			//token item
			AddLabel(280, 180, 69, @"Extract tokens:");
			AddImage(325, 200, 92);
			AddButton(334, 207, 2474, 2474, 4, GumpButtonType.Reply, 0);

			AddImage(70, 255, 7012);
			AddImage(300, 255, 7012);
			AddLabel(146, 277, 38, @"Daat99's Token System");
		}
		
		public override void OnResponse( NetState state, RelayInfo info )
		{
			if ( m_TL.Deleted )
				return;
			else if ( info.ButtonID == 1 )
			{
				if (((TokenLedger)m_TL).Tokens <= 2000000000)
					m_TL.BeginAddTokens( m_From );
				else
					m_From.SendMessage(1173, "This token ledger is full");
				m_From.SendGump( new TokensGump( m_From, m_TL ) );
			}
			else if ( info.ButtonID == 2 || info.ButtonID == 4 )
			{
				TextRelay tr_TokenAmount = info.GetTextEntry( 3 );
				if(tr_TokenAmount != null)
				{
					int i_MaxAmount = 0;
					try
					{
						i_MaxAmount = Convert.ToInt32(tr_TokenAmount.Text,10);
					} 
					catch
					{
						m_From.SendMessage(1173, "Please make sure you write only numbers.");
					}
					if(i_MaxAmount > 0) 
					{
						if (i_MaxAmount <= ((TokenLedger)m_TL).Tokens)
						{
							if (info.ButtonID == 4 )
							{
								if (i_MaxAmount <= 60000)
								{
									m_From.AddToBackpack(new Daat99Tokens(i_MaxAmount));
									m_From.SendMessage(1173, "You extracted {0} tokens from your ledger.", i_MaxAmount);
									((TokenLedger)m_TL).Tokens = (((TokenLedger)m_TL).Tokens - i_MaxAmount);
								}
								else
									m_From.SendMessage(1173, "You can't extract more then 60,000 tokens at 1 time.");
							}
							else if (i_MaxAmount >= 1000)
							{
								m_From.AddToBackpack(new TokenCheck(i_MaxAmount));
								m_From.SendMessage(1173, "You wrote a token check in the value of {0} tokens.", i_MaxAmount);
								((TokenLedger)m_TL).Tokens = (((TokenLedger)m_TL).Tokens - i_MaxAmount);
							}
							else 
								m_From.SendMessage(1173, "You can't write checks for less then 1,000 tokens.");
						}
						else
							m_From.SendMessage(1173, "You don't have that many tokens in your ledger.");
					}
					m_From.SendGump( new TokensGump( m_From, m_TL ) );
				}
			}
		}
	}

	
	public class TokenCheck : Item
	{
		private int i_TokensAmount;
		
		[CommandProperty(AccessLevel.Administrator)]
		public int tokensAmount { get { return i_TokensAmount; } set { i_TokensAmount = value; InvalidateProperties(); } }
		
		[Constructable]
		public TokenCheck() : this( 100 )
		{
		}

		[Constructable]
		public TokenCheck( int tokensAmount ) : base( 5359 )
		{
			Stackable = false;
			Name = "A Token Check";
			Hue = 1173;
			Weight = 1.0;
			LootType = LootType.Blessed;
			i_TokensAmount = tokensAmount;
		}
		
		public override void OnDoubleClick(Mobile from)
		{
			if ( this.IsChildOf( from.Backpack ) )
			{
				Item[] items = from.Backpack.FindItemsByType( typeof( TokenLedger ) );

				foreach( TokenLedger tl in items )
				{
					if ( tl.Owner == from.Serial )
					{
						if ((tl.Tokens + i_TokensAmount) <= 2000000000 )
						{
							if (!(this.Deleted))
							{
								from.CloseGump( typeof( TokensGump ) );
								tl.Tokens = (tl.Tokens + i_TokensAmount);
								from.SendMessage(1173, "You added {0} Tokens to your ledger using a token check.", i_TokensAmount);
								from.SendGump( new TokensGump( from, tl ) );
								this.Delete();
								break;
							}
							else
							{
								from.PlaySound(1069); //play Hey!! sound
								from.SendMessage(1173, "Hey, don't try to rob the bank!!!");
								from.SendGump( new TokensGump( from, this ) );
							}
						}
						else 
							from.SendMessage(1173, "You have a full token ledger, please make a check and store it in your bank.");
					}
				}
			}
			else
				from.SendMessage(1173, "The check must be in your backpack to be used.");
		}

		public override int LabelNumber{ get{ return 1041361; } } // A bank check

		public override void GetProperties(ObjectPropertyList list)
		{
			base.GetProperties( list );

			list.Add( 1060738, i_TokensAmount.ToString() ); // value: ~1_val~
		}
		
		public TokenCheck( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 ); // version

			writer.Write( i_TokensAmount );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			switch (version)
			{
				case 0:
				{
					i_TokensAmount = reader.ReadInt();
					break;
				}
			}
		}
	}
	
	
	public class LootTokenCheck : Item
	{
		private int i_TokensAmount;
		
		[CommandProperty(AccessLevel.Administrator)]
		public int tokensAmount { get { return i_TokensAmount; } set { i_TokensAmount = value; InvalidateProperties(); } }
		
		[Constructable]
		public LootTokenCheck() : this( 100 )
		{
		}

		[Constructable]
		public LootTokenCheck( int tokensAmount ) : base( 5359 )
		{
			Stackable = false;
			Name = "A Token Check";
			Hue = 1173;
			Weight = 1.0;
			i_TokensAmount = tokensAmount;
		}
		
		public override void OnDoubleClick(Mobile from)
		{
			if ( this.IsChildOf( from.Backpack ) )
			{
				Item[] items = from.Backpack.FindItemsByType( typeof( TokenLedger ) );

				foreach( TokenLedger tl in items )
				{
					if ( tl.Owner == from.Serial )
					{
						if ((tl.Tokens + i_TokensAmount) <= 2000000000 )
						{
							if (!(this.Deleted))
							{
								from.CloseGump( typeof( TokensGump ) );
								tl.Tokens = (tl.Tokens + i_TokensAmount);
								from.SendMessage(1173, "You added {0} Tokens to your ledger using a token check.", i_TokensAmount);
								from.SendGump( new TokensGump( from, tl ) );
								this.Delete();
								break;
							}
							else
							{
								from.PlaySound(1069); //play Hey!! sound
								from.SendMessage(1173, "Hey, don't try to rob the bank!!!");
								from.SendGump( new TokensGump( from, this ) );
							}
						}
						else 
							from.SendMessage(1173, "You have a full token ledger, please make a check and store it in your bank.");
					}
				}
			}
			else
				from.SendMessage(1173, "The check must be in your backpack to be used.");
		}

		public override int LabelNumber{ get{ return 1041361; } } // A bank check

		public override void GetProperties(ObjectPropertyList list)
		{
			base.GetProperties( list );

			list.Add( 1060738, i_TokensAmount.ToString() ); // value: ~1_val~
		}
		
		public LootTokenCheck( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 ); // version

			writer.Write( i_TokensAmount );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			switch (version)
			{
				case 0:
				{
					i_TokensAmount = reader.ReadInt();
					break;
				}
			}
		}
	}

	
	public class Daat99Tokens : Item
	{
		public Daat99Tokens( int min, int max ) : this( Utility.Random( min, max-min ) )
		{
		}

		[Constructable]
		public Daat99Tokens() : this( 1 )
		{
		}

		[Constructable]
		public Daat99Tokens( int amount ) : base( 0xEED )
		{
			Stackable = true;
			Name = "Tokens";
			Hue = 1173;
			Weight = 0;
			Amount = amount;
			LootType = LootType.Blessed;
		}

		public override void OnDoubleClick(Mobile m)
		{
			Item[] items = m.Backpack.FindItemsByType( typeof( TokenLedger ) );

			foreach( TokenLedger tl in items )
			{
				if (tl.Owner == m.Serial && tl.Tokens + Amount <= 2000000000)
				{
					tl.Tokens = (tl.Tokens + Amount); //give the tokens
					Delete();
					m.SendMessage(1173, "You added {0} tokens to your token ledger.", Amount); //send a message to the player that he got tokens
					break;
				}
			}
		}
		
		public Daat99Tokens( Serial serial ) : base( serial )
		{
		}

		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();
		}
	}

	
	public class GiveTokens
	{ 
		public static void CalculateTokens(Mobile m, BaseCreature creature)
		{
			if (creature.IsBonded)
				return;

			double d_Resists = ((creature.PhysicalResistance + creature.FireResistance + creature.ColdResistance + creature.PoisonResistance + creature.EnergyResistance)/50); //set the amount of resists the monster have
			if (d_Resists < 1.0) //if it have less then total on 100 resists set to 1
				d_Resists = 1.0;
			int i_Hits = (creature.HitsMax/10); //set the amount of max hp the creature had.
			double d_TempTokReward = (i_Hits + ((i_Hits * d_Resists)/10) ); //set the temp reward
						
			int i_FameKarma = creature.Fame; //set fame\karma reward bonus
			if (creature.Karma < 0)
				i_FameKarma -= creature.Karma;
			else
				i_FameKarma += creature.Karma;
			i_FameKarma = (i_FameKarma/250);
			if (i_FameKarma < 0)
				i_FameKarma = 0;
			d_TempTokReward += i_FameKarma; //add the fame\karma reward to the temp reward

			if (creature.AI == AIType.AI_Mage) //if it's mage add some tokens, it have spells
			{
				double d_Mage = ((creature.Skills[SkillName.Meditation].Value + creature.Skills[SkillName.Magery].Value + creature.Skills[SkillName.EvalInt].Value)/8);
				d_TempTokReward += d_Mage;
			}
							
			if (creature.HasBreath) //give bonus for creatures that have fire breath
			{
				double d_FireBreath = (creature.HitsMax/25);
				d_TempTokReward += d_FireBreath; //add the firebreath bonus to temp reward
			}	
							
			int i_TokReward = ((int)d_TempTokReward); //set the reward you'll actually get as half then the temp reward.
			i_TokReward = Utility.RandomMinMax((int)(i_TokReward*0.4), (int)(i_TokReward*0.5));
			if (i_TokReward < 1)
				i_TokReward = 1; //set minimum reward to 1
							
			RewardTokens(m, i_TokReward);
		}

		public static void RewardTokens(Mobile m, int amount)
		{
			if (amount < 1)
				return;

			Item[] items = m.Backpack.FindItemsByType( typeof( TokenLedger ) );

			foreach( TokenLedger tl in items )
			{
				if (tl.Owner == m.Serial && tl.Tokens <= 2000000000)
				{
					tl.Tokens = (tl.Tokens + amount); //give the tokens
					m.SendMessage(1173, "You recieved {0} tokens.",amount); //send a message to the player that he got tokens
					break;
				}
			}
		}
	}
}

bu vendor stone.

using System; 
using System.IO;
using System.Collections;
using Server.Items; 
using Server.Network; 
using Server.Gumps; 
using Server.Mobiles; 
using Server.Targeting;
using Server.Targets;

namespace Server.Items
{
	public class VSItem
	{
		private string m_Item = "";
		private string m_Name = "";
		private int m_Price = 0;
		private int m_Amount = 1;
		private bool m_BlessBond;
		private int m_BBPrice;
		private string m_Description = "";

		public string Item{ get{ return m_Item; } set{ m_Item = value; } }
		public string Name{ get{ return m_Name; } set{ m_Name = value; } }
		public int Price{ get{ return m_Price; } set{ m_Price = value; } }
		public int Amount{ get{ return m_Amount; } set{ m_Amount = value; if ( m_Amount < 1 ) m_Amount = 1; } }
		public bool BlessBond{ get{ return m_BlessBond; } set{ m_BlessBond = value; } }
		public int BBPrice{ get{ return m_BBPrice; } set{ m_BBPrice = value; } }
		public string Description{ get{ return m_Description; } set{ m_Description = value; } }

		public VSItem()
		{
		}

		public VSItem( string item, string name, int price, int amount, bool blessbond, int bbprice, string description )
		{
			Item = item;
			Name = name;
			Price = price;
			Amount = amount;
			BlessBond = blessbond;
			BBPrice = bbprice;
			Description = description;
		}

		public Type GetItemType()
		{
			Type type = ScriptCompiler.FindTypeByName( m_Item );
			return type;
		}

		public void Serialize( GenericWriter writer )
		{
			writer.Write( (string) m_Description );
			writer.Write( (bool) m_BlessBond );
			writer.Write( (int) m_BBPrice );
			writer.Write( (string) m_Item );
			writer.Write( (string) m_Name );
			writer.Write( (int) m_Price );
			writer.Write( (int) m_Amount );
		}

		public void Deserialize( GenericReader reader, int version )
		{
			switch( version )
			{
				case 2:
				{
					m_Description = reader.ReadString();

					goto case 1;
				}
				case 1:
				{
					m_BlessBond = reader.ReadBool();
					m_BBPrice = reader.ReadInt();

					goto case 0;
				}
				case 0:
				{
					m_Item = reader.ReadString();
					m_Name = reader.ReadString();
					m_Price = reader.ReadInt();
					m_Amount = reader.ReadInt();

					break;
				}
			}
		}
	}
	public class VSShopper
	{
		private ArrayList m_ItemList = new ArrayList();
		private Mobile m_Owner;
		private VendorStone m_Stone;

		public ArrayList ItemList{ get{ return m_ItemList; } set{ m_ItemList = value; } }
		public Mobile Owner{ get{ return m_Owner; } set{ m_Owner = value; } }
		public VendorStone Stone{ get{ return m_Stone; } set{ m_Stone = value; } }

		public VSShopper( Mobile owner, VendorStone stone )
		{
			m_Owner = owner;
			m_Stone = stone;
		}

		public void AddItem( int itemnumber )
		{
			m_ItemList.Add( itemnumber );
		}

		public int TotalPrice()
		{
			int tp = 0;

			for( int i = 0; i < m_ItemList.Count; ++i )
			{
				int n = (int)ItemList[i];

				VSItem vsi = (VSItem)m_Stone.ItemList[n];
				tp += vsi.Price;
			}

			return tp;
		}
	}
	public class VendorBall : Item
	{
		private VendorStone m_Stone;

		//[CommandProperty( AccessLevel.GameMaster )]
		public VendorStone Stone{ get{ return m_Stone; } set{ m_Stone = value; } }

		[Constructable]
		public VendorBall() : base( 0x1869 )
		{
			Weight = 0.1;
			Hue = 89; 
			Name = "Vendor Ball";
		}

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

		private void ConnectTarget_Callback( Mobile from, object obj ) 
		{ 
			if ( obj is VendorStone && obj is Item ) 
			{ 
				Item item = (Item)obj;
				VendorStone ps = (VendorStone)obj;

				Stone = ps;
				from.SendMessage( "You have connected the ball to the stone." );
			} 
			else 
			{ 
				from.SendMessage( "That is an invalid target!" );
			}
		}

		public override void OnDoubleClick( Mobile from ) 
		{ 
			if ( !IsChildOf( from ) && !Utility.InRange( from.Location, Location, 3 ) )
				from.SendMessage( "You are too far away to use that." );
			else if ( Stone != null && !Stone.Deleted )
			{
				if ( from.AccessLevel >= Stone.AccessLevel )
				{
					from.SendGump( new StaffVendorGump( from, Stone ) );
				}
				else if ( !Stone.EditMode )
				{
					if ( !Stone.EditMode )
						from.SendGump( new VendorGump( new VSShopper( from, m_Stone ), Stone ) );
					else
						from.SendMessage( "This vendor stone is currently in edit mode." );
				}
				else
					from.SendMessage( "This stone is in edit mode." );
			}
			else
			{
				from.BeginTarget( -1, false, TargetFlags.Beneficial, new TargetCallback( ConnectTarget_Callback ) );
				from.SendMessage( "Please target a stone to connect this ball to." );
			}
		}

		public override void OnSingleClick( Mobile from )
		{
			base.OnSingleClick( from );

			if ( Stone != null && !Stone.Deleted )
			{
				if ( Stone.Name != null )
					LabelTo( from, "Stone Ball, Connected to: "+ Stone.Name );
				else
					LabelTo( from, "Stone Ball, Connected to: !SET THE STONE'S NAME!" );
			}
			else
			{
				LabelTo( from, "Stone Ball, Connected to: None" );
			}
		}

		public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties( list );

			if ( Stone != null && !Stone.Deleted )
			{
				if ( Stone.Name != null )
					list.Add( "Stone Ball, Connected to: "+ Stone.Name );
				else
					list.Add( "Stone Ball, Connected to: !SET THE STONE'S NAME!" );
			}
			else
			{
				list.Add( "Stone Ball, Connected to: None" );
			}
		}

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

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

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

			int version = reader.ReadInt();
			m_Stone = reader.ReadItem() as VendorStone;
		}
	}
}

namespace Server.Items
{ 
	public class VendorStone : Item 
	{ 
		private AccessLevel m_AccessLevel = AccessLevel.Owner;
		private bool m_EditMode;
		private string m_Currency;
		private ArrayList m_ItemList = new ArrayList();

		public string Currency{get{return m_Currency;}set{m_Currency = value;}}
		public ArrayList ItemList{get{return m_ItemList;}set{m_ItemList = value;}}
		public AccessLevel AccessLevel{get{return m_AccessLevel;}set{m_AccessLevel = value;}}
		public bool EditMode{get{return m_EditMode;}set{m_EditMode = value;}}

		[Constructable] 
		public VendorStone() : base( 0xEDC ) 
		{ 
			Movable = false; 
			Hue = 89; 
			Name = "Vendor Stone";
		} 

		public override void OnDoubleClick( Mobile from ) 
		{ 
			if ( !Utility.InRange( from.Location, Location, 3 ) )
				from.SendMessage( "You are too far away to use that." );
			else if ( from.AccessLevel >= AccessLevel )
				from.SendGump( new StaffVendorGump( from, this ) );
			else if ( !EditMode )
				from.SendGump( new VendorGump( new VSShopper( from, this ), this ) );
			else
				from.SendMessage( "This stone is in edit mode." );
		}

		public void CloseGumps( Mobile from )
		{
			from.CloseGump( typeof( VendorGump ) );
			from.CloseGump( typeof( VendorStoneBuyGump ) );
			from.CloseGump( typeof( VendorStoneEditGump ) );
			from.CloseGump( typeof( VendorStoneAddItemGump ) );
			from.CloseGump( typeof( StaffVendorGump ) );
		}

		public Type GetCurrency()
		{
			Type type = ScriptCompiler.FindTypeByName( Currency );
			return type;
		}

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

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

			writer.Write( (int) 2 ); // version 
			writer.Write( (int)m_AccessLevel );
			writer.Write( (string)m_Currency );
			writer.Write( (bool)m_EditMode );

			writer.Write( m_ItemList.Count );
			for ( int i = 0; i < m_ItemList.Count; ++i )
				((VSItem)m_ItemList[i]).Serialize( writer );
		}

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

			int version = reader.ReadInt(); 

			if (version == 0)
			{
				bool bNull;
				int iNull;
				bNull = reader.ReadBool(); //custom hues
				bNull = reader.ReadBool(); //m_Blessed
				bNull = reader.ReadBool(); //m_Bonded
				bNull = reader.ReadBool(); //m_Hued
				iNull = reader.ReadInt(); //m_BlessedPrice
				iNull = reader.ReadInt(); //m_BondedPrice
				iNull = reader.ReadInt(); //m_HuedPrice
				m_AccessLevel = (AccessLevel)reader.ReadInt(); 
				m_Currency = reader.ReadString();
				m_EditMode = reader.ReadBool(); 

				int size1 = reader.ReadInt();
				ArrayList alPrice = new ArrayList( size1 );
				for ( int i = 0; i < size1; ++i )
				{
					int price = reader.ReadInt();
					alPrice.Add( price );
				}

				int size4 = reader.ReadInt();
				ArrayList alNull = new ArrayList( size4 );
				for ( int i = 0; i < size4; ++i )
				{
					int hue = reader.ReadInt();
					alNull.Add( hue );
				}

				int size5 = reader.ReadInt();
				ArrayList alAmount = new ArrayList( size5 );
				for ( int i = 0; i < size5; ++i )
				{
					int itemamount = reader.ReadInt();
					alAmount.Add( itemamount );
				}

				int size2 = reader.ReadInt();
				ArrayList alItem = new ArrayList( size2 );
				for ( int i = 0; i < size2; ++i )
				{
					string item = reader.ReadString();
					alItem.Add( item );
				}

				int size3 = reader.ReadInt();
				ArrayList alName = new ArrayList( size3 );
				for ( int i = 0; i < size3; ++i )
				{
					string gumpname = reader.ReadString();
					alName.Add( gumpname );
				}

				int size6 = reader.ReadInt();
				alNull = new ArrayList( size6 );
				for ( int i = 0; i < size6; ++i )
				{
					int hueprices = reader.ReadInt();
					alNull.Add( hueprices );
				}
				//dispose of the not used arrays (bless.. bond...)
				alNull.Clear();
				for( int i = 0; i < alName.Count; i++ )
				{
					VSItem v = new VSItem( alItem[i].ToString(), alName[i].ToString(), (int)alPrice[i], (int)alAmount[i], false, 0, "" );
					ItemList.Add( v );
				}
				//dispose of the "old" arrays
				alItem.Clear();
				alName.Clear();
				alPrice.Clear();
				alAmount.Clear();
			}
			else switch( version )
			{
				case 2:
				case 1:
				case 0:
				{
					m_AccessLevel = (AccessLevel)reader.ReadInt(); 
					m_Currency = reader.ReadString();
					m_EditMode = reader.ReadBool(); 

					int size = reader.ReadInt();
					m_ItemList = new ArrayList( size );
					for ( int i = 0; i < size; ++i )
					{
						VSItem vsi = new VSItem();
						vsi.Deserialize( reader, version );
						m_ItemList.Add( vsi );
					}

					break;
				} 
			} 
		} 
	} 
} 

namespace Server.Gumps
{ 
	public class VendorGump : Gump
	{
                private VendorStone m_Stone;
                private VSShopper m_Shopper;

		private const int AmountPerPage = 20; 

		public string Center( string text )
		{
			return String.Format( "<CENTER>{0}</CENTER>", text );
		}

		public string Color( string text, int color )
		{
			return String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", color, text );
		}

                public VendorGump( VSShopper shopper, VendorStone stone ) : base( 25, 25 )
                {
			m_Stone = stone;
			m_Shopper = shopper;

			m_Stone.CloseGumps( m_Shopper.Owner );

			AddPage( 0 ); 

			AddBackground( 0, 0, 550, 480, 0x2436 );
			AddAlphaRegion( 10, 10, 530, 460 );

			AddImageTiled( 10, 40, 530, 5, 2624 );
			AddImageTiled( 10, 58, 390, 5, 2624 );

			AddImageTiled( 90, 40, 5, 430, 2624 );
			AddImageTiled( 125, 40, 5, 430, 2624 );
			AddImageTiled( 160, 40, 5, 430, 2624 );
			AddImageTiled( 310, 40, 5, 430, 2624 );
			AddImageTiled( 400, 40, 5, 430, 2624 );

			if ( m_Stone.Name != null && m_Stone.Name != "" )
				AddHtml( 10, 10, 510, 20, Color( Center( m_Stone.Name ), 0xFFFFFF ), false, false );
			else
				AddHtml( 10, 10, 510, 20, Color( Center( "Vendor Stone" ), 0xFFFFFF ), false, false );

			AddLabel( 420, 60, 5, "Stone Currency:" );
			if ( m_Stone.Currency != null  )
				AddLabel( 420, 80, 5, m_Stone.Currency );
			else
				AddLabel( 420, 80, 33, "None" );

			AddHtml( 10, 42, 85, 20, Color( Center( "Item Amount" ), 0xFFFFFF ), false, false );
			AddHtml( 95, 42, 30, 20, Color( Center( ((m_Stone.EditMode && shopper.Owner.AccessLevel >= m_Stone.AccessLevel) ? "Edit" : "Buy") ), 0xFFFFFF ), false, false );
			AddHtml( 130, 42, 30, 20, Color( Center( "Des" ), 0xFFFFFF ), false, false );
			AddHtml( 165, 42, 145, 20, Color( Center( "Item" ), 0xFFFFFF ), false, false );
			AddHtml( 315, 42, 85, 20, Color( Center( "Price" ), 0xFFFFFF ), false, false );

			if ( !m_Stone.EditMode )
			{
				AddButton( 420, 120, 1209, 1210, 1, GumpButtonType.Reply, 0 );
				AddLabel( 440, 120, 1152, "Buy Items" );
			}

			AddLabel( 410, 160, 1152, "The (B) beside" );
			AddLabel( 410, 175, 1152, "items and creatures" );
			AddLabel( 410, 190, 1152, "stands for blessing" );
			AddLabel( 410, 205, 1152, "or bonding." );


			AddLabel( 420, 400, 906, "Created By" );
			AddLabel( 420, 420, 906, "~Raelis~" );

			AddButton( 420, 440, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
			AddLabel( 450, 440, 33, "Close" );

			int index = 0;
			int page = 1;

			AddPage( 1 );

			for ( int i = 0; i < m_Stone.ItemList.Count; ++i )
			{
				if ( index >= AmountPerPage )
				{ 
					AddButton( 420, 365, 0x1196, 0x1196, 1152, GumpButtonType.Page, page + 1 );
					AddLabel( 420, 350, 1152, "Next page" ); 

					++page; 
					index = 0; 

					AddPage( page );

					AddButton( 420, 315, 0x119a, 0x119a, 1152, GumpButtonType.Page, page - 1 );
					AddLabel( 420, 300, 1152, "Previous page" ); 
				}

				int price = ((VSItem)m_Stone.ItemList[i]).Price;
				int amount = ((VSItem)m_Stone.ItemList[i]).Amount;
				string gumpname = ((VSItem)m_Stone.ItemList[i]).Name;

				AddLabel( 165, 60 + (index * 20), 1152, gumpname +( ((VSItem)m_Stone.ItemList[i]).BlessBond ? " (B)" : "") );
				AddLabel( 25, 60 + (index * 20), 1152, ""+ amount );
				AddLabel( 320, 60 + (index * 20), 1152, ""+ price );

				AddButton( 100, 65 + (index * 20), 1209, 1210, i+2, GumpButtonType.Reply, 0 );
				if ( ((VSItem)m_Stone.ItemList[i]).Description != null && ((VSItem)m_Stone.ItemList[i]).Description != "" )
					AddButton( 135, 65 + (index * 20), 0x1523, 0x1523, i+m_Stone.ItemList.Count+3, GumpButtonType.Reply, 0 );

				AddImageTiled( 10, 80 + (index * 20), 390, 3, 2624 );

				index++;
			}
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{ 
			Mobile from = state.Mobile;

			if ( m_Stone.Deleted )
				return;

			if ( info.ButtonID == 0 )
			{
				from.SendMessage( "You decide not to buy anything." );
			}

			if ( info.ButtonID == 1 )
			{
				from.SendGump( new VendorStoneBuyGump( m_Shopper, m_Stone ) );
			}

			if ( info.ButtonID-m_Stone.ItemList.Count-2 <= m_Stone.ItemList.Count && info.ButtonID >= 3 && info.ButtonID-2 > m_Stone.ItemList.Count )
			{
				from.SendGump( new VendorGump( m_Shopper, m_Stone ) );
				if ( ((VSItem)m_Stone.ItemList[info.ButtonID-m_Stone.ItemList.Count-3]).Description != null && ((VSItem)m_Stone.ItemList[info.ButtonID-m_Stone.ItemList.Count-3]).Description != "" )
					from.SendGump( new VendorStoneDescriptionGump( from, ((VSItem)m_Stone.ItemList[info.ButtonID-m_Stone.ItemList.Count-3]).Description, ((VSItem)m_Stone.ItemList[info.ButtonID-m_Stone.ItemList.Count-3]).Name ) );
			}
			else if ( info.ButtonID-1 <= m_Stone.ItemList.Count && info.ButtonID >= 2 )
			{
				if ( !m_Stone.EditMode )
				{
					m_Shopper.AddItem( info.ButtonID-2 );
					from.SendMessage( "You add it to your list." );
					from.SendGump( new VendorGump( m_Shopper, m_Stone ) );
				}
				else
				{
					if ( info.ButtonID-2 > m_Stone.ItemList.Count-1 || info.ButtonID-2 < 0 )
						return;

					m_Stone.CloseGumps( from );
					from.SendGump( new VendorStoneEditGump( from, (VSItem)m_Stone.ItemList[info.ButtonID-2], m_Stone ) );
				}
			}
		}
	}
	public class VendorStoneBuyGump : Gump
	{
		private VSShopper m_Shopper;
		private VendorStone m_Stone;

                public VendorStoneBuyGump( VSShopper shopper, VendorStone stone ) : base( 125, 125 )
                {
			m_Shopper = shopper;
			m_Stone = stone;

			m_Stone.CloseGumps( m_Shopper.Owner );

			AddPage( 0 ); 

			AddBackground( 0, 0, 375, 210, 0x2436 );

			AddLabel( 12, 17, 5, "Your Buy List" );
			AddLabel( 110, 22, 5, "Total Purchase: "+m_Shopper.TotalPrice() );

			AddButton( 15, 160, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
			AddLabel( 45, 160, 33, "Back" );
			AddButton( 110, 160, 4005, 4007, 1, GumpButtonType.Reply, 0 ); 
			AddLabel( 140, 160, 1152, "Buy" );

			for ( int i = 0; i < m_Shopper.ItemList.Count; ++i )
			{
				int item = (int)m_Shopper.ItemList[i];

				if ( (i % 5) == 0 )
				{
					if ( i != 0 )
					{
						AddButton( 190, 235, 0x1196, 0x1196, 1152, GumpButtonType.Page, (i / 5) + 1 );
						AddLabel( 190, 220, 1152, "Next page" ); 
					}

					AddPage( (i / 5) + 1 );

					if ( i != 0 )
					{
						AddButton( 10, 235, 0x119a, 0x119a, 1152, GumpButtonType.Page, (i / 5) );
						AddLabel( 10, 220, 1152, "Previous page" ); 
					}
				}

				VSItem vsi = (VSItem)m_Stone.ItemList[item];

				string blessbond = (vsi.BlessBond ? "(B)" : "");

				AddButton( 13, 40 + ((i % 5) * 20), 0x26AF, 0x26B1, i+2, GumpButtonType.Reply, 0 ); 
				AddLabel( 40, 40 + ((i % 5) * 20), 1152, vsi.Amount+" "+vsi.Name+" "+blessbond+" "+vsi.Price+" "+m_Stone.Currency );
			}
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{ 
			Mobile from = state.Mobile;

			if ( from.Backpack == null || from.BankBox == null )
				return;

			if ( info.ButtonID == 0 )
			{
				from.SendGump( new VendorGump( m_Shopper, m_Stone ) );
			}
			if ( info.ButtonID == 1 )
			{
				if ( m_Stone.GetCurrency() == null && m_Shopper.TotalPrice() > 0 )
					from.SendMessage( "There was no set currency to this stone." );
				else if ( m_Shopper.ItemList.Count <= 0 )
				{
					from.SendMessage( "You did not select anything to buy." );
					from.SendGump( new VendorStoneBuyGump( m_Shopper, m_Stone ) );
				}
				else if ( m_Shopper.TotalPrice() == 0 || from.Backpack.ConsumeTotal( m_Stone.GetCurrency(), m_Shopper.TotalPrice(), true ) )
				{
					for( int i = 0; i < m_Shopper.ItemList.Count; ++i )
					{
						int n = (int)m_Shopper.ItemList[i];

						VSItem vsi = (VSItem)m_Stone.ItemList[n];

						Type type = vsi.GetItemType();

						if ( type != null )
						{
							object o = Activator.CreateInstance( type );

							if ( o is Mobile )
							{
								Mobile m = (Mobile)o;

								ArrayList items = new ArrayList();

								m.MoveToWorld( from.Location, from.Map );
								if ( m is BaseCreature )
								{
									BaseCreature c = (BaseCreature)m;
									c.ControlMaster = from;
									c.Controlled = true;
									c.ControlTarget = from;
									c.ControlOrder = OrderType.Follow;

									items.Add( c );
								}
								int total = 0;
								while( vsi.Amount-1 > total )
								{
									object o2 = Activator.CreateInstance( type );
									Mobile m2 = (Mobile)o2;

									m2.MoveToWorld( from.Location, from.Map );
									if ( m2 is BaseCreature )
									{
										BaseCreature c = (BaseCreature)m2;
										c.ControlMaster = from;
										c.Controlled = true;
										c.ControlTarget = from;
										c.ControlOrder = OrderType.Follow;

										items.Add( c );
									}
									total++;
								}

								if ( vsi.BlessBond )
									from.SendGump( new VendorStoneBlessBondGump( from, vsi, m_Stone, items ) );
							}
							if ( o is Item )
							{
								Item item = (Item)o;

								ArrayList items = new ArrayList();

								items.Add( item );

								if ( item.Stackable )
								{
									if ( vsi.Amount > 60000 )
									{
										item.Amount = 60000;

										int aleft = vsi.Amount-60000;

										while( aleft > 0 )
										{
											object o2 = Activator.CreateInstance( type );
											if ( o2 is Item )
											{
												Item item2 = (Item)o2;

												if ( aleft > 60000 )
												{
													item2.Amount = 60000;
													aleft -= 60000;
												}
												else
												{
													item2.Amount = aleft;
													aleft = 0;
												}
												from.AddToBackpack( item2 );
												items.Add( item2 );
											}
										}
									}
									else
										item.Amount = vsi.Amount;
								}
								else
								{
									int total = 0;
									while( vsi.Amount-1 > total )
									{
										object o2 = Activator.CreateInstance( type );
										if ( o2 is Item )
										{
											Item item2 = (Item)o2;
											from.AddToBackpack( item2 );
											items.Add( item2 );
										}
										total++;
									}
								}

								if ( vsi.BlessBond )
									from.SendGump( new VendorStoneBlessBondGump( from, vsi, m_Stone, items ) );
								from.AddToBackpack( item );
							}
						}
					}
					if ( m_Shopper.TotalPrice() == 0 )
						from.SendMessage( "You recieve the item for free." );
					else if ( m_Stone.Currency != null && m_Stone.Currency != "" )
						from.SendMessage( "You buy the items with the "+m_Stone.Currency+" in your backpack." );
					else
						from.SendMessage( "You buy the items with the currency in your backpack." );
				}
				else if ( from.BankBox.ConsumeTotal( m_Stone.GetCurrency(), m_Shopper.TotalPrice(), true ) )
				{
					for( int i = 0; i < m_Shopper.ItemList.Count; ++i )
					{
						int n = (int)m_Shopper.ItemList[i];

						VSItem vsi = (VSItem)m_Stone.ItemList[n];

						Type type = vsi.GetItemType();

						if ( type != null )
						{
							object o = Activator.CreateInstance( type );

							if ( o is Mobile )
							{
								Mobile m = (Mobile)o;

								ArrayList items = new ArrayList();

								m.MoveToWorld( from.Location, from.Map );
								if ( m is BaseCreature )
								{
									BaseCreature c = (BaseCreature)m;
									c.ControlMaster = from;
									c.Controlled = true;
									c.ControlTarget = from;
									c.ControlOrder = OrderType.Follow;

									items.Add( c );

									if ( vsi.BlessBond )
										from.SendGump( new VendorStoneBlessBondGump( from, vsi, m_Stone, items ) );
								}
								int total = 0;
								while( vsi.Amount-1 > total )
								{
									object o2 = Activator.CreateInstance( type );
									Mobile m2 = (Mobile)o2;

									m2.MoveToWorld( from.Location, from.Map );
									if ( m2 is BaseCreature )
									{
										BaseCreature c = (BaseCreature)m2;
										c.ControlMaster = from;
										c.Controlled = true;
										c.ControlTarget = from;
										c.ControlOrder = OrderType.Follow;

										items.Add( c );
									}
									total++;
								}
							}
							if ( o is Item )
							{
								Item item = (Item)o;

								ArrayList items = new ArrayList();

								items.Add( item );

								if ( item.Stackable )
								{
									if ( vsi.Amount > 60000 )
									{
										item.Amount = 60000;

										int aleft = vsi.Amount-60000;

										while( aleft > 0 )
										{
											object o2 = Activator.CreateInstance( type );
											if ( o2 is Item )
											{
												Item item2 = (Item)o2;

												if ( aleft > 60000 )
												{
													item2.Amount = 60000;
													aleft -= 60000;
												}
												else
												{
													item2.Amount = aleft;
													aleft = 0;
												}
												from.AddToBackpack( item2 );
												items.Add( item2 );
											}
										}
									}
									else
										item.Amount = vsi.Amount;
								}
								else
								{
									int total = 0;
									while( vsi.Amount-1 > total )
									{
										object o2 = Activator.CreateInstance( type );
										if ( o2 is Item )
										{
											Item item2 = (Item)o2;
											from.AddToBackpack( item2 );
											items.Add( item2 );
										}
										total++;
									}
								}

								if ( vsi.BlessBond )
									from.SendGump( new VendorStoneBlessBondGump( from, vsi, m_Stone, items ) );
								from.AddToBackpack( item );
							}
						}
					}
					if ( m_Stone.Currency != null && m_Stone.Currency != "" )
						from.SendMessage( "You buy the items with the "+m_Stone.Currency+" in your bank box." );
					else
						from.SendMessage( "You buy the items with the currency in your bank box." );
				}
				else
				{
					from.SendGump( new VendorStoneBuyGump( m_Shopper, m_Stone ) );
					from.SendMessage( "You cannot not afford the items on your list." );
				}
			}
			if ( info.ButtonID >= 2 )
			{
				if ( info.ButtonID-2 > m_Shopper.ItemList.Count-1 || info.ButtonID-2 < 0 )
					return;
				m_Shopper.ItemList.Remove( m_Shopper.ItemList[info.ButtonID-2] );
				from.SendGump( new VendorStoneBuyGump( m_Shopper, m_Stone ) );
			}
		}
	}
	public class StaffVendorGump : Gump
	{
                private VendorStone m_Stone;

                public StaffVendorGump( Mobile from, VendorStone stone ) : base( 125, 125 )
                {
			m_Stone = stone;

			m_Stone.CloseGumps( from );

			AddPage( 0 ); 

			AddBackground( 0, 0, 160, 140, 0x2436 );

			AddButton( 10, 10, 4005, 4007, 1, GumpButtonType.Reply, 0 ); 
			AddLabel( 40, 10, 1152, "Vendor Gump" );
			AddButton( 10, 30, 4005, 4007, 2, GumpButtonType.Reply, 0 ); 
			AddLabel( 40, 30, 1152, "Add Item" );

			if ( from.AccessLevel >= AccessLevel.Owner )
				AddButton( 10, 50, 4005, 4007, 3, GumpButtonType.Reply, 0 ); 
            if ( m_Stone.AccessLevel == AccessLevel.Owner )
				AddLabel( 40, 50, 1302, "Owner" );
            else if ( m_Stone.AccessLevel == AccessLevel.Developer )
				AddLabel( 40, 50, 1302, "Developer" );
			else if ( m_Stone.AccessLevel == AccessLevel.Administrator )
				AddLabel( 40, 50, 1302, "Administrator" );
			else if ( m_Stone.AccessLevel == AccessLevel.Seer )
				AddLabel( 40, 50, 324, "Seer" );
			else if ( m_Stone.AccessLevel == AccessLevel.GameMaster )
				AddLabel( 40, 50, 33, "Game Master" );
			else if ( m_Stone.AccessLevel == AccessLevel.Counselor )
				AddLabel( 40, 50, 2, "Counselor" );
			else if ( m_Stone.AccessLevel == AccessLevel.Player )
				AddLabel( 40, 50, 88, "Player" );

			AddButton( 10, 70, 4005, 4007, 4, GumpButtonType.Reply, 0 ); 
			if ( m_Stone.EditMode )
				AddLabel( 40, 70, 5, "Edit Mode" );
			else
				AddLabel( 40, 70, 33, "Edit Mode" );
			AddLabel( 10, 90, 1152, "Currency:" );
			AddTextEntry( 70, 90, 85, 15, 1152, 0, m_Stone.Currency );

			AddButton( 10, 110, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
			AddLabel( 40, 110, 33, "Close" );
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{ 
			Mobile from = state.Mobile;

			if ( m_Stone.Deleted )
				return;

			string currency = "";
			string[] tr = new string[ 1 ];
			foreach( TextRelay t in info.TextEntries )
				tr[ t.EntryID ] = t.Text;
			if ( tr[ 0 ] != null )
				currency = tr[ 0 ];
			m_Stone.Currency = currency;

			if ( info.ButtonID == 0 )
			{
				from.SendMessage( "Closed." );
			}
			if ( info.ButtonID == 1 )
			{
				from.SendGump( new VendorGump( new VSShopper( from, m_Stone ), m_Stone ) );
			}
			if ( info.ButtonID == 2 )
			{
				from.SendGump( new VendorStoneAddItemGump( from, m_Stone ) );
			}
			if ( info.ButtonID == 3 )
			{
				if ( m_Stone.AccessLevel == AccessLevel.Owner )
					m_Stone.AccessLevel = AccessLevel.Player;
				else if ( m_Stone.AccessLevel == AccessLevel.Developer )
					m_Stone.AccessLevel = AccessLevel.Owner;
				else if ( m_Stone.AccessLevel == AccessLevel.Administrator )
					m_Stone.AccessLevel = AccessLevel.Developer;
				else if ( m_Stone.AccessLevel == AccessLevel.Seer )
					m_Stone.AccessLevel = AccessLevel.Administrator;
				else if ( m_Stone.AccessLevel == AccessLevel.GameMaster )
					m_Stone.AccessLevel = AccessLevel.Seer;
				else if ( m_Stone.AccessLevel == AccessLevel.Counselor )
					m_Stone.AccessLevel = AccessLevel.GameMaster;
				else if ( m_Stone.AccessLevel == AccessLevel.Player )
					m_Stone.AccessLevel = AccessLevel.Counselor;

				from.SendGump( new StaffVendorGump( from, m_Stone ) );
			}
			if ( info.ButtonID == 4 )
			{
				if ( m_Stone.EditMode )
					m_Stone.EditMode = false;
				else
					m_Stone.EditMode = true;

				from.SendGump( new StaffVendorGump( from, m_Stone ) );
			}
		}
	}
	public class VendorStoneAddItemGump : Gump
	{
		private Mobile m_Mobile;
		private VendorStone m_Stone;

		public VendorStoneAddItemGump( Mobile mobile, VendorStone stone ) : base( 25, 50 )
		{
			m_Mobile = mobile;
			m_Stone = stone;

			m_Stone.CloseGumps( m_Mobile );

			AddPage( 0 );

			AddBackground( 25, 10, 420, 430, 0x2436 );

			AddImageTiled( 33, 20, 401, 411, 2624 );
			AddAlphaRegion( 33, 20, 401, 411 );

			AddLabel( 125, 40, 1152, "Vendor Stone" );

			AddLabel( 40, 60, 1152, "Add a Mobile or Item:" );
			AddTextEntry( 40, 80, 225, 15, 5, 0, "Item Here" );
			AddLabel( 40, 100, 1152, "Gump Name:" );
			AddTextEntry( 40, 120, 225, 15, 5, 1, "Name Here" );
			AddLabel( 40, 140, 1152, "Price:" );
			AddTextEntry( 40, 160, 225, 15, 5, 2, "0" );
			AddLabel( 40, 180, 1152, "Item Amount:" );
			AddTextEntry( 40, 200, 225, 15, 5, 3, "1" );

			AddCheck( 40, 220, 0x2342, 0x2343, false, 1 );
			AddLabel( 70, 220, 1152, "Bless/Bond:" );

			AddLabel( 40, 240, 1152, "Bless/Bond Price:" );
			AddTextEntry( 40, 260, 225, 15, 5, 4, "0" );

			AddLabel( 40, 280, 1152, "Description:" );
			AddTextEntry( 40, 300, 360, 75, 5, 5, "Des Here" );

			AddButton( 40, 390, 4005, 4007, 0, GumpButtonType.Reply, 0 );
			AddLabel( 70, 393, 1152, "Back" );
			AddButton( 120, 390, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddLabel( 150, 393, 1152, "Apply" );
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{
			Mobile from = state.Mobile; 

			if ( from == null )
				return;

			if ( info.ButtonID == 0 )
			{
				from.SendGump( new StaffVendorGump( from, m_Stone ) );
			}
			if ( info.ButtonID == 1 )
			{
				string item = "";
				string gumpname = "";
				int price = 0;
				int amount = 0;
				int bbprice = 0;
				bool blessbond = info.IsSwitched( 1 );
				string description = "";

				string[] tr = new string[ 6 ];
				foreach( TextRelay t in info.TextEntries )
				{
					tr[ t.EntryID ] = t.Text;
				}

				try { price = (int) uint.Parse( tr[ 2 ] ); } 
				catch {}
				try { amount = (int) uint.Parse( tr[ 3 ] ); } 
				catch {}
				try { bbprice = (int) uint.Parse( tr[ 4 ] ); } 
				catch {}
				if ( tr[ 0 ] != null )
					item = tr[ 0 ];
				if ( tr[ 1 ] != null )
					gumpname = tr[ 1 ];
				if ( tr[ 5 ] != null )
					description = tr[ 5 ];

				if ( amount <= 0 )
					amount = 1;

				if ( item != "" && gumpname != "" )
				{
					VSItem vsi = new VSItem( item, gumpname, price, amount, blessbond, bbprice, description );
					m_Stone.ItemList.Add( vsi );

					from.SendMessage( "Item Added." );
				}
				else
				{
					from.SendMessage( "You must set a property for each one." );
				}

				from.SendGump( new VendorStoneAddItemGump( from, m_Stone ) );
			}
		}
	}
	public class VendorStoneEditGump : Gump
	{
                private VendorStone m_Stone;
                private VSItem m_VSI;

                public VendorStoneEditGump( Mobile from, VSItem vsi, VendorStone stone ) : base( 125, 125 )
                {
			m_Stone = stone;
			m_VSI = vsi;

			m_Stone.CloseGumps( from );

			AddPage( 0 ); 

			AddBackground( 0, 0, 420, 300, 0x2436 );

			AddLabel( 13, 10, 1152, "Item Type:" );
			AddTextEntry( 83, 10, 100, 15, 1152, 0, m_VSI.Item );

			AddLabel( 13, 30, 1152, "Gump Name:" );
			AddTextEntry( 90, 30, 90, 15, 1152, 1, m_VSI.Name );

			AddLabel( 13, 50, 1152, "Price:" );
			AddTextEntry( 53, 50, 85, 15, 1152, 2, ""+m_VSI.Price );

			AddLabel( 13, 70, 1152, "Amount:" );
			AddTextEntry( 63, 70, 85, 15, 1152, 3, ""+m_VSI.Amount );

			AddCheck( 15, 90, 0x2342, 0x2343, m_VSI.BlessBond, 1 );
			AddLabel( 45, 90, 1152, "Bless/Bond:" );

			AddLabel( 13, 110, 1152, "Bless/Bond Price:" );
			AddTextEntry( 123, 110, 225, 15, 1152, 4, ""+m_VSI.BBPrice );

			AddLabel( 13, 130, 1152, "Description:" );
			AddTextEntry( 13, 150, 387, 75, 1152, 5, m_VSI.Description );

			AddButton( 15, 245, 4005, 4007, 2, GumpButtonType.Reply, 0 ); 
			AddLabel( 45, 245, 33, "Remove" );

			AddButton( 15, 265, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
			AddLabel( 45, 265, 33, "Back" );
			AddButton( 85, 265, 4005, 4007, 1, GumpButtonType.Reply, 0 ); 
			AddLabel( 115, 265, 33, "Apply" );
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{ 
			Mobile from = state.Mobile;

			if ( m_Stone.Deleted )
				return;

			if ( info.ButtonID == 0 )
			{
				from.SendMessage( "Back." );
				from.SendGump( new VendorGump( new VSShopper( from, m_Stone ), m_Stone ) );
			}
			if ( info.ButtonID == 1 )
			{
				string item = "";
				string gumpname = "";
				int price = 0;
				int amount = 0;
				int bbprice = 0;
				bool blessbond = info.IsSwitched( 1 );
				string description = "";

				string[] tr = new string[ 6 ];
				foreach( TextRelay t in info.TextEntries )
				{
					tr[ t.EntryID ] = t.Text;
				}

				try { price = (int) uint.Parse( tr[ 2 ] ); } 
				catch {}
				try { amount = (int) uint.Parse( tr[ 3 ] ); } 
				catch {}
				try { bbprice = (int) uint.Parse( tr[ 4 ] ); } 
				catch {}
				if ( tr[ 0 ] != null )
					item = tr[ 0 ];
				if ( tr[ 0 ] != null )
					gumpname = tr[ 1 ];
				if ( tr[ 5 ] != null )
					description = tr[ 5 ];

				m_VSI.Item = item;
				m_VSI.Name = gumpname;
				m_VSI.Price = price;
				m_VSI.Amount = amount;
				m_VSI.BBPrice = bbprice;
				m_VSI.BlessBond = blessbond;
				m_VSI.Description = description;

				from.SendGump( new VendorGump( new VSShopper( from, m_Stone ), m_Stone ) );
			}
			if ( info.ButtonID == 2 )
			{
				if ( m_Stone.ItemList.Contains( m_VSI ) )
					m_Stone.ItemList.Remove( m_VSI );

				from.SendGump( new VendorGump( new VSShopper( from, m_Stone ), m_Stone ) );
			}
		}
	}
	public class VendorStoneBlessBondGump : Gump
	{
                private VendorStone m_Stone;
                private VSItem m_VSI;
		private ArrayList m_Objects;

                public VendorStoneBlessBondGump( Mobile from, VSItem vsi, VendorStone stone, ArrayList objects ) : base( 125, 125 )
                {
			m_Stone = stone;
			m_VSI = vsi;
			m_Objects = objects;

			m_Stone.CloseGumps( from );

			AddPage( 0 ); 

			AddBackground( 0, 0, 375, 85, 0x2436 );

			if ( objects.Count > 0 && objects[0] is Item )
				AddLabel( 13, 10, 1152, "Would you like to bless this item: '"+ vsi.Name +"'?" );
			else if ( objects.Count > 0 && objects[0] is Mobile )
				AddLabel( 13, 10, 1152, "Would you like to bond this pet: '"+ vsi.Name +"'?" );
			AddLabel( 13, 25, 1152, "Price: "+ vsi.BBPrice );

			AddButton( 15, 50, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
			AddLabel( 45, 50, 33, "No" );
			AddButton( 85, 50, 4005, 4007, 1, GumpButtonType.Reply, 0 ); 
			AddLabel( 115, 50, 33, "Yes" );
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{ 
			Mobile from = state.Mobile;

			if ( m_Stone.Deleted )
				return;

			if ( info.ButtonID == 0 )
			{
				if ( m_Objects.Count > 0 && m_Objects[0] is Item )
					from.SendMessage( "You decide not to bless this item." );
				else if ( m_Objects.Count > 0 && m_Objects[0] is Mobile )
					from.SendMessage( "You decide not to bond this pet." );
			}
			if ( info.ButtonID == 1 )
			{
				if ( from.Backpack.ConsumeTotal( m_Stone.GetCurrency(), m_VSI.BBPrice, true ) || m_VSI.BBPrice == 0 )
				{
					for( int i = 0; i < m_Objects.Count; i++ )
					{
						object o = m_Objects[i];

						if ( o is Item )
							((Item)o).LootType = LootType.Blessed;
						if ( o is Mobile && (Mobile)o is BaseCreature )
							((BaseCreature)o).IsBonded = true;
					}
				}
				else if ( from.BankBox.ConsumeTotal( m_Stone.GetCurrency(), m_VSI.BBPrice, true ) )
				{
					for( int i = 0; i < m_Objects.Count; i++ )
					{
						object o = m_Objects[i];

						if ( o is Item )
							((Item)o).LootType = LootType.Blessed;
						if ( o is Mobile && (Mobile)o is BaseCreature )
							((BaseCreature)o).IsBonded = true;
					}
				}
				else
					from.SendMessage( "You cannot not afford to do this." );
			}
		}
	}
	public class VendorStoneDescriptionGump : Gump
	{
		public string Center( string text )
		{
			return String.Format( "<CENTER>{0}</CENTER>", text );
		}

		public string Color( string text, int color )
		{
			return String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", color, text );
		}

                public VendorStoneDescriptionGump( Mobile from, string description, string name ) : base( 125, 125 )
                {
			from.CloseGump( typeof( VendorStoneDescriptionGump ) );

			AddPage( 0 ); 

			AddBackground( 0, 0, 200, 200, 0x2436 );

			AddHtml( 10, 10, 190, 20, Color( Center( "Description For: '"+name+"'" ), 0xFFFFFF ), false, false );

			AddHtml( 10, 30, 190, 145, Color( Center( description ), 0xFFFFFF ), false, true );
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{ 
			Mobile from = state.Mobile;

			if ( info.ButtonID == 0 )
				from.SendMessage( "Closed." );
		}
	}
}

bu mobile
using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
	[CorpseName( "a balron corpse" )]
	public class Balron : BaseCreature
	{
		[Constructable]
		public Balron () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = NameList.RandomName( "balron" );
			Body = 40;
			BaseSoundID = 357;

			SetStr( 986, 1185 );
			SetDex( 177, 255 );
			SetInt( 151, 250 );

			SetHits( 592, 711 );

			SetDamage( 22, 29 );

			SetDamageType( ResistanceType.Physical, 50 );
			SetDamageType( ResistanceType.Fire, 25 );
			SetDamageType( ResistanceType.Energy, 25 );

			SetResistance( ResistanceType.Physical, 65, 80 );
			SetResistance( ResistanceType.Fire, 60, 80 );
			SetResistance( ResistanceType.Cold, 50, 60 );
			SetResistance( ResistanceType.Poison, 100 );
			SetResistance( ResistanceType.Energy, 40, 50 );

			SetSkill( SkillName.Anatomy, 25.1, 50.0 );
			SetSkill( SkillName.EvalInt, 90.1, 100.0 );
			SetSkill( SkillName.Magery, 95.5, 100.0 );
			SetSkill( SkillName.Meditation, 25.1, 50.0 );
			SetSkill( SkillName.MagicResist, 100.5, 150.0 );
			SetSkill( SkillName.Tactics, 90.1, 100.0 );
			SetSkill( SkillName.Wrestling, 90.1, 100.0 );

			Fame = 24000;
			Karma = -24000;

			VirtualArmor = 90;

			PackItem( new Longsword() );
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.FilthyRich, 2 );
			AddLoot( LootPack.Rich );
			AddLoot( LootPack.MedScrolls, 2 );
		}

		public override bool CanRummageCorpses{ get{ return true; } }
		public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
		public override int TreasureMapLevel{ get{ return 5; } }
		public override int Meat{ get{ return 1; } }

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

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
		}
	}
}

Loot scripti 2 adet loot ve lootpack hangisi ve örnek desart mağaraya giriyorum ama tekrar girdiğim girişten çıkamıyorum meçbur teleport yapmak zorunda kalıyorum.

ve

Bu konu kucukasker tarafından düzenlendi(2009-04-04 04:19, 15 yıl önce)
Merhabalar arkadaşım;

3 sorununuda anladım. Hemen çözelim

1- sahip olduğun script hatalı biri maffetmiş =)

https://www.dosya.tc/1_7565.rar.html

Bu yenisi ve çalışanı resimlerden bakarak yapabilirsin;






2- Buyur senin için yaptım bir tane PackItem eventını kullanman gerekiyor aşşağıdaki örnekte olduğu gibi;

using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
[CorpseName( "a Eques corpse" )]
public class Eques : BaseCreature
{
[Constructable]
public Eques () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = NameList.RandomName( "Eques" );
Body = 40;
BaseSoundID = 357;

SetStr( 986, 1185 );
SetDex( 177, 255 );
SetInt( 151, 250 );

SetHits( 592, 711 );

SetDamage( 22, 29 );

SetDamageType( ResistanceType.Physical, 50 );
SetDamageType( ResistanceType.Fire, 25 );
SetDamageType( ResistanceType.Energy, 25 );

SetResistance( ResistanceType.Physical, 65, 80 );
SetResistance( ResistanceType.Fire, 60, 80 );
SetResistance( ResistanceType.Cold, 50, 60 );
SetResistance( ResistanceType.Poison, 100 );
SetResistance( ResistanceType.Energy, 40, 50 );

SetSkill( SkillName.Anatomy, 25.1, 50.0 );
SetSkill( SkillName.EvalInt, 90.1, 100.0 );
SetSkill( SkillName.Magery, 95.5, 100.0 );
SetSkill( SkillName.Meditation, 25.1, 50.0 );
SetSkill( SkillName.MagicResist, 100.5, 150.0 );
SetSkill( SkillName.Tactics, 90.1, 100.0 );
SetSkill( SkillName.Wrestling, 90.1, 100.0 );

Fame = 24000;
Karma = -24000;

VirtualArmor = 90;

PackItem( new Longsword() );
/* Buraya eklemen gerekiyor */
	PackItem( new Daat99Tokens(850,1500));
}

public override void GenerateLoot()
{
AddLoot( LootPack.FilthyRich, 2 );
AddLoot( LootPack.Rich );
AddLoot( LootPack.MedScrolls, 2 );
}

public override bool CanRummageCorpses{ get{ return true; } }
public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
public override int TreasureMapLevel{ get{ return 5; } }
public override int Meat{ get{ return 1; } }

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

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

Loot a düşüyor;



PackItem ın olduğu yerin üstüne birde yazı yazdım ordan bulabilirsin.

3- [admin > Administer > World Building > Teleporters (tüm teleporterlar yüklenir)



iyi oyunlar

* yenilendi

Bu konu Eques tarafından düzenlendi(2009-04-04 10:58, 15 yıl önce)
https://www.dosya.tc/1_7565.rar.html

using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
[CorpseName( "a Eques corpse" )]
public class Eques : BaseCreature
{
[Constructable]
public Eques () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = NameList.RandomName( "Eques" );
Body = 40;
BaseSoundID = 357;

SetStr( 986, 1185 );
SetDex( 177, 255 );
SetInt( 151, 250 );

SetHits( 592, 711 );

SetDamage( 22, 29 );

SetDamageType( ResistanceType.Physical, 50 );
SetDamageType( ResistanceType.Fire, 25 );
SetDamageType( ResistanceType.Energy, 25 );

SetResistance( ResistanceType.Physical, 65, 80 );
SetResistance( ResistanceType.Fire, 60, 80 );
SetResistance( ResistanceType.Cold, 50, 60 );
SetResistance( ResistanceType.Poison, 100 );
SetResistance( ResistanceType.Energy, 40, 50 );

SetSkill( SkillName.Anatomy, 25.1, 50.0 );
SetSkill( SkillName.EvalInt, 90.1, 100.0 );
SetSkill( SkillName.Magery, 95.5, 100.0 );
SetSkill( SkillName.Meditation, 25.1, 50.0 );
SetSkill( SkillName.MagicResist, 100.5, 150.0 );
SetSkill( SkillName.Tactics, 90.1, 100.0 );
SetSkill( SkillName.Wrestling, 90.1, 100.0 );

Fame = 24000;
Karma = -24000;

VirtualArmor = 90;

PackItem( new Longsword() );
/* Buraya eklemen gerekiyor */
PackItem( new Daat99Tokens(850,1500));
}

public override void GenerateLoot()
{
AddLoot( LootPack.FilthyRich, 2 );
AddLoot( LootPack.Rich );
AddLoot( LootPack.MedScrolls, 2 );
}

public override bool CanRummageCorpses{ get{ return true; } }
public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
public override int TreasureMapLevel{ get{ return 5; } }
public override int Meat{ get{ return 1; } }

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

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

Bu verdiğin 2 scripte aynı farkları yok.
bu arada sorunlu olan daat99'mu yoksa vendorstone'mu.
ameğin için teşekür ederim.
buda diğer sorun hal olmadı giriyorum ama çıkamıyorum dediğini yaptım ama olmadı.
https://img159.imageshack.us/my.php?image=giri.jpg
https://img159.imageshack.us/img159/649/91373062.jpg

Bu konu kucukasker tarafından düzenlendi(2009-04-04 12:30, 15 yıl önce)
Insan aynı anda 9 işi yaparsa böyle sıyırıyor işte :)

Pardon 1.rar ı yollamışım aslı budur vendor stone da sorun vardı;

https://www.dosya.tc/2_9893.rar.html

* staticlerinizde sorun var sanırım, uo yu tekrar yüklemeni tavsiye ederim ama hiçbir sphere serverın clientını indirme arada sırada böyle oluyor
* yada teleporterlarda sorun olabilir. PM ile görüşelim.
Senin vendor dosyası hatta veriyor hatta özeti bu.
RunUO - [www.runuo.com] Version 2.0, Build 2968.26078
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...ScriptCompiler: CS0117: 'Server.Mobiles.BaseCrea
ture' does not contain a definition for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
ScriptCompiler: CS0117: 'Server.Mobiles.BaseCreature' does not contain a definit
ion for 'Controled'
done (0 errors, 7 warnings)
Warnings:
 + benim sicriplerim/Yeni Klasör/LegacyTokenGump.cs:
    CS0105: Line 4: The using directive for 'System' appeared previously in this
 namespace
 + benim sicriplerim/addonlar/yeni adon/BritBankAddonAddon.cs:
    CS0168: Line 149: The variable 'ac' is declared but never used
 + benim sicriplerim/addonlar/yeni adon/OldManJenkinsHutAddon.cs:
    CS0168: Line 392: The variable 'ac' is declared but never used
 + benim sicriplerim/addonlar/WeaponShopAddon.cs:
    CS0168: Line 257: The variable 'ac' is declared but never used
 + benim sicriplerim/addonlar/TheaterAddon.cs:
    CS0168: Line 1576: The variable 'ac' is declared but never used
 + benim sicriplerim/addonlar/RestAreaAddon.cs:
    CS0168: Line 800: The variable 'ac' is declared but never used
 + benim sicriplerim/Yeni Klasör/SoulStoneToken.cs:
    CS0642: Line 79: Possible mistaken empty statement
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
Scripts: Compiling C# scripts...
Runuo 1.0 kullanmanı tavsiye ediyorum. Hata büyük bir ihtimalle ondandır. Yeni başlayanlara göre runuo 1.0 hemde daha az sorunla karşılaşırsın.
burda kurullumu ile ilgili bir bölüm yok ve ben runuo 1.0 ile bağlantı sorunu yaşıyorum
böyle bir sorun hiç bir şey yapmıyor ekran bu şekilde bekliyor.

Novice
-0.500001
Bide Diosunuz Neden Sphere Script Suna bak Bi Vendor stone icin nekdr Urasıorlar..
kucukasker : burda kurullumu ile ilgili bir bölüm yok ve ben runuo 1.0 ile bağlantı sorunu yaşıyorum
böyle bir sorun hiç bir şey yapmıyor ekran bu şekilde bekliyor.



Firewall unuzu kapatın tekrar deneyin.
Yok abisi uo ml komple sildim tekrar yükledim bütün firewall kapatım ama yok aynen devam acılmıyor runuo 1.0 ama 2.0 svn açılıyor.



Üye Ol veya Giriş Yap

Bu forum başlığına mesaj atmak istiyorsanız hemen üye olun veya giriş yapın.