string Cheat_ScrollCharacterName(int charnum)
{
string logmessage;
ref PChar = GetMainCharacter();
if (charnum == 0)
{
logmessage = "player, " + GetMySimpleName(PChar);
}
else
{
if (charnum > 0 && charnum < OFFICER_MAX)
{
logmessage = "officer, " + GetMySimpleName( GetCharacter(GetOfficersIndex (PChar, charnum)) );
}
else
{
logmessage = "companion, " + GetMySimpleName( GetCharacter(GetCompanionIndex(PChar, charnum-OFFICER_MAX+1)) );
}
}
return logmessage;
}
int Cheat_GetCharacterIndex(int charnum)
{
int charIndex;
ref PChar = GetMainCharacter();
if (charnum == 0)
{
charIndex = GetMainCharacterIndex();
}
else
{
if (charnum > 0 && charnum < OFFICER_MAX)
{
charIndex = GetOfficersIndex (PChar, charnum);
}
else
{
charIndex = GetOfficersIndex (PChar, charnum-OFFICER_MAX+1);
}
}
return charIndex;
}