////////////////////////////////////////////////////////////////////////////////
//
//  Olander's Player Stat's
//  opw_conv_pstat
//  By Don Anderson
//  dandersonru@msn.com
//
//  Some Player Stat Functions Originally By Invisible420...nicely done
//
////////////////////////////////////////////////////////////////////////////////

#include "opw_inc_pstat"

int StartingConditional()
{
    object oPC = GetPCSpeaker();

    //Name of Player Character
    string sPC = GetName(oPC);
    SetCustomToken(42001, BLUISHG+"Stats for: "+BLUISHR+sPC);

    //Player Number of Hours
    string sHour = GetCharacterCreatedHours(oPC);
    SetCustomToken(42002, YELLOW+"Current Session Time: "+GREEN+sHour);

    //Player Character Start Date
    int nYear = NBDE_GetCampaignInt("PLAYERSTATS", "PC_YEAR_START", oPC);
    string sMonth = NBDE_GetCampaignString("PLAYERSTATS", "PC_MONTH_START", oPC);
    int nDay = NBDE_GetCampaignInt("PLAYERSTATS", "PC_DAY_START", oPC);
    string sPrefix;
    if(nDay == 1) sPrefix = "st";
    if(nDay == 2) sPrefix = "nd";
    if(nDay == 3) sPrefix = "rd";
    if(nDay >= 4) sPrefix = "th";
    SetCustomToken(42003, YELLOW+"Character Birthday: "+GREEN+sMonth+" "+IntToString(nDay)+sPrefix+", "+IntToString(nYear));

    //Player Character Number of Times Died
    string sTimesDied = GetTotalDeaths(oPC);
    SetCustomToken(42004, GRAY+"Total Deaths: "+WHITE+sTimesDied);

    //Playaer Character Death Info
    string sLastCreatureKiller = GetCreatureKiller(oPC);
    string sLastPCKiller = GetPCKiller(oPC);
    SetCustomToken(42005, GRAY+"Last Creature Killed By: "+RED+sLastCreatureKiller);
    SetCustomToken(42006, GRAY+"Last PC Killed By: "+RED+sLastPCKiller);

    //Player Character Favorite Weapon
    string sFavWeap = GetFavoriteWeapon(oPC);
    SetCustomToken(42007, GRAY+"Favorite Weapon: "+WHITE+sFavWeap);

    //Player Character Total NPC Kills
    string sNPCKills = GetTotalNPCKills(oPC);
    SetCustomToken(42008, GRAY+"Total Kills: "+WHITE+sNPCKills);

    //Player Character Total PC Kills
    string sPCKills = GetTotalPCKills(oPC);
    SetCustomToken(42009, GRAY+"Total Kills: "+WHITE+sPCKills);

    //Player Character Average Kill CR
    string sCCRating = GetAverageCRofPlayersKills(oPC);
    SetCustomToken(42010, GRAY+"Average Kill CR: "+WHITE+sCCRating);

    //Player Character Strongest Kill
    string sHighestCR = GetHighestCR(oPC);
    string sStrongestC = GetStrongestCreatureName(oPC);
    SetCustomToken(42011, GRAY+"Strongest Kill: "+WHITE+sStrongestC+" CR: "+sHighestCR);

    // Carriage Return
    SetCustomToken(42012, "\n");

    return TRUE;
}