163 lines
3.5 KiB
Plaintext
163 lines
3.5 KiB
Plaintext
// rank constants
|
|
|
|
const int MN_AIDB_NORANK = 0;
|
|
const int MN_AIDB_ASSOCIATE = 1;
|
|
const int MN_AIDB_CEYAR = 2;
|
|
const int MN_AIDB_CEYAN = 3;
|
|
const int MN_AIDB_HIGHORGANIZER = 4;
|
|
const int MN_AIDB_SHIELD = 5;
|
|
const int MN_AIDB_COMMANDER = 6;
|
|
const int MN_AIDB_SHIELDBEARER = 7;
|
|
const int MN_AIDB_RECRUIT = 8;
|
|
const int MN_AIDB_HAND = 9;
|
|
const int MN_AIDB_AIDGIVER = 10;
|
|
const int MN_AIDB_ADMINISTRATOR = 11;
|
|
const int MN_AIDB_DIPLOMAT = 12;
|
|
const int MN_AIDB_RECRUITER = 13;
|
|
const int MN_AIDB_SCROLL = 14;
|
|
const int MN_AIDB_LOREKEEPER = 15;
|
|
const int MN_AIDB_LOREMASTER = 16;
|
|
const int MN_AIDB_LOREGATHERER = 17;
|
|
|
|
// Rank methods
|
|
|
|
string RankName ( int rank )
|
|
{
|
|
string result = "unknown";
|
|
|
|
switch( rank )
|
|
{
|
|
case MN_AIDB_NORANK:
|
|
result = "non-member";
|
|
break;
|
|
|
|
case MN_AIDB_ASSOCIATE:
|
|
result = "Associate";
|
|
break;
|
|
|
|
case MN_AIDB_CEYAR:
|
|
result = "The Ceyar";
|
|
break;
|
|
|
|
case MN_AIDB_CEYAN:
|
|
result = "The Ceyan";
|
|
break;
|
|
|
|
case MN_AIDB_HIGHORGANIZER:
|
|
result = "The High Organizer";
|
|
break;
|
|
|
|
case MN_AIDB_SHIELD:
|
|
result = "The Shield";
|
|
break;
|
|
|
|
case MN_AIDB_COMMANDER:
|
|
result = "Commander";
|
|
break;
|
|
|
|
case MN_AIDB_SHIELDBEARER:
|
|
result = "Shieldbearer";
|
|
break;
|
|
|
|
case MN_AIDB_RECRUIT:
|
|
result = "Recruit";
|
|
break;
|
|
|
|
case MN_AIDB_HAND:
|
|
result = "The Hand";
|
|
break;
|
|
|
|
case MN_AIDB_AIDGIVER:
|
|
result = "Aidgiver";
|
|
break;
|
|
|
|
case MN_AIDB_ADMINISTRATOR:
|
|
result = "Administrator";
|
|
break;
|
|
|
|
case MN_AIDB_DIPLOMAT:
|
|
result = "Diplomat";
|
|
break;
|
|
|
|
case MN_AIDB_RECRUITER:
|
|
result = "Recruiter";
|
|
break;
|
|
|
|
case MN_AIDB_SCROLL:
|
|
result = "The Scroll";
|
|
break;
|
|
|
|
case MN_AIDB_LOREKEEPER:
|
|
result = "Lore Keeper";
|
|
break;
|
|
|
|
case MN_AIDB_LOREGATHERER:
|
|
result = "Lore Gatherer";
|
|
break;
|
|
|
|
case MN_AIDB_LOREMASTER:
|
|
result = "Lore Master";
|
|
break;
|
|
|
|
default:
|
|
result = "not specified";
|
|
break;
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
int CheckRank( object oPC )
|
|
{
|
|
int iResult = 0; // Default value = non-member
|
|
object token = GetItemPossessedBy( oPC, "MN_AIDB_TOKEN" );
|
|
|
|
if ( GetIsObjectValid( token ) )
|
|
{
|
|
iResult = GetLocalInt( token, "mn_rank" );
|
|
}
|
|
|
|
return iResult;
|
|
}
|
|
|
|
int IsTopRank( object oPC )
|
|
{
|
|
int temprank = CheckRank( oPC );
|
|
int result = ( temprank == MN_AIDB_CEYAR ) || ( temprank == MN_AIDB_CEYAN ) || ( temprank == MN_AIDB_HIGHORGANIZER );
|
|
|
|
return result;
|
|
}
|
|
|
|
int IsEinunLeader( object oPC )
|
|
{
|
|
// Note remember to add last Einun-leader
|
|
int temprank = CheckRank( oPC );
|
|
int result = ( temprank == MN_AIDB_HAND ) || ( temprank == MN_AIDB_SHIELD ) || ( temprank == MN_AIDB_SCROLL );
|
|
|
|
return result;
|
|
}
|
|
|
|
int IsAran( object oPC )
|
|
{
|
|
int temprank = CheckRank( oPC );
|
|
int result = ( temprank == MN_AIDB_SHIELD ) || ( temprank == MN_AIDB_COMMANDER ) || ( temprank == MN_AIDB_SHIELDBEARER ) || ( temprank == MN_AIDB_RECRUIT );
|
|
|
|
return result;
|
|
}
|
|
|
|
int IsBerok( object oPC )
|
|
{
|
|
int temprank = CheckRank( oPC );
|
|
int result = ( temprank == MN_AIDB_HAND ) || ( temprank == MN_AIDB_AIDGIVER ) || ( temprank == MN_AIDB_ADMINISTRATOR ) || ( temprank == MN_AIDB_RECRUITER ) || ( temprank == MN_AIDB_DIPLOMAT );
|
|
|
|
return result;
|
|
}
|
|
|
|
int IsDarrec( object oPC )
|
|
{
|
|
int temprank = CheckRank( oPC );
|
|
int result = ( temprank == MN_AIDB_SCROLL ) || ( temprank == MN_AIDB_LOREKEEPER ) || ( temprank == MN_AIDB_LOREMASTER ) || ( temprank == MN_AIDB_LOREGATHERER );
|
|
|
|
return result;
|
|
}
|