}
else
{
newChar.setTitle("");
}
ItemTable itemTable = ItemTable.getInstance();
for(L2Item i : template.getItems())
{
L2ItemInstance item = itemTable.createItem(i.getItemId());
newChar.getInventory().addItem(item);
if(item.getItemId() == 5588) // tutorial book
{
newChar.registerShortCut(new L2ShortCut(11, 0, L2ShortCut.TYPE_ITEM, item.getObjectId(), -1));
}
if(item.isEquipable() && (newChar.getActiveWeaponItem() == null || item.getItem().getType2() != L2Item.TYPE2_WEAPON))
{
newChar.getInventory().equipItem(item, false);
}
}
// Scroll of Escape: Kamael Village
L2ItemInstance item = itemTable.createItem(9716);
item.setCount(5);
newChar.getInventory().addItem(item);
// Adventurer's Scroll of Escape
item = itemTable.createItem(10650);
item.setCount(10);
newChar.getInventory().addItem(item);
for(L2SkillLearn skill : SkillTreeTable.getInstance().getAvailableSkills(newChar, newChar.getClassId()))
{
newChar.addSkill(SkillTable.getInstance().getInfo(skill.id, skill.skillLevel), true);