I am wanting to give multiple items to players on a per account basis. So I put this in my "CharacterCreation.cs" script like this:

Code:
using System;
using Server.Accounting;
using Server.Engines.XmlSpawner2;
using Server.Items;
using Server.Mobiles;
using Server.Network;
 
 
 
 
namespace Server.Misc
{
	public class CharacterCreation
	{
		private static readonly CityInfo m_NewHavenInfo = new CityInfo("New Haven", "The Bountiful Harvest Inn", 3503, 2574, 14, Map.Trammel);
		private static Mobile m_Mobile;
		public static void Initialize()
		{
			// Register our event handler
			EventSink.CharacterCreated += new CharacterCreatedEventHandler(EventSink_CharacterCreated);
			EventSink_CharacterCreated.Login += new LoginEventHandler(EventSink_GiveNewPlayerItemsOnLogin);
		}
 
 
 
 
		public static bool VerifyProfession(int profession)
		{
			if (profession < 0)
				return false;
			else if (profession < 4)
				return true;
			else if (Core.AOS && profession < 6)
				return true;
			else if (Core.SE && profession < 8)
				return true;
			else
				return false;
		}
 
 
 
 
		private static void AddBackpack(Mobile m)
		{
			Container pack = m.Backpack;
 
 
 
 
			if (pack == null)
			{
				pack = new Backpack();
				pack.Movable = false;
 
 
 
 
				m.AddItem(pack);
			}
 
 
 
 
//			PackItem(new RedBook("a book", m.Name, 20, true));
//			PackItem(new Gold(1000)); // Starting gold can be customized here
//			PackItem(new Candle());
 
 
 
 
			if (m.Race != Race.Gargoyle)
				PackItem(new Dagger());
			else
				PackItem(new GargishDagger());
		}
		
		 private static void EventSink_GiveNewPlayerItemsOnLogin( LoginEventArgs args )
{
			//ONE ITEM PER ACCOUNT//
	   
			Account acct = args.Mobile.Account as Account;
			if (acct.GetTag("NewPlayerItems") == "Received")
			{
			  // They already got one...
			}
			else
			{
			  PackItem( new BankCheck(50000) );
			  acct.SetTag("NewPlayerItems", "Received");
			}
	   
			//ONE ITEM PER ACCOUNT//
}

Here is the error I am receiving:

Code:
Errors:
 + Misc/CharacterCreation.cs:
	CS0119: Line 18: 'Server.Misc.CharacterCreation.EventSink_CharacterCreated(S
erver.CharacterCreatedEventArgs)' is a 'method', which is not valid in the given
 context
Scripts: One or more scripts failed to compile or no script files were found.
 
Since you are wanting it to be per account and not per character, I would put this item or items in the veteran rewards. ;)
 
You don't need an eventsink accomplish what you are wanting to do. You can either create a method (essentially what you did in the account tag area) and call the method from the method that creates the character, or you can simply put that code directly into the method that the character is created.
 
Back