I added a script, found it online on runuo, and it is supposed to create a skill ball when it is the players first character on their account. I am not sure why it isn't working and was looking for some help with it. Here is the link to the forum post I found the code on.
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);
}
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);
}
bool FirstChar = Convert.ToBoolean( ((Account)m.Account).GetTag("FirstChar") );
if ( FirstChar ) //this part checks to see if the account already has this tag, if it does it will add the following items
{
PackItem(new SkillBall());
}
else
{
PackItem(new RedBook("a book", m.Name, 20, true));
PackItem(new Gold(5000)); // Starting gold can be customized here
PackItem(new Candle());
PackItem(new README());
if (m.Race != Race.Gargoyle)
PackItem(new Dagger());
else
PackItem(new GargishDagger());
}
}