155 lines
4.2 KiB
Plaintext
155 lines
4.2 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: FileName s_pcl_list
|
|
//:://////////////////////////////////////////////
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Scott Thorne
|
|
//:: Updated On: 08/27/2002
|
|
//-- 10.28 messed around by bloodsong
|
|
/////////////////////////////////////////////////
|
|
//:: Modified by Genisys 6/10/08
|
|
//:: Added: Prestegous Classes
|
|
//:://////////////////////////////////////////////
|
|
|
|
//DECLARE PROTOTYPE
|
|
string GetClassLevels(object oPC);
|
|
|
|
//Main Script
|
|
void main()
|
|
{
|
|
|
|
object oUser = GetPCSpeaker();
|
|
|
|
int iPCTot = 0; /* total PC's */
|
|
int iPCVis = 0; /* total non-anon (visible) PC's */
|
|
string sPCName;
|
|
string sPCArea;
|
|
string sPCLevel;
|
|
string sPCClass;
|
|
string sPCLFG;
|
|
string sPCAFK;
|
|
string sDM;
|
|
string sMessage;
|
|
|
|
object oPC = GetFirstPC();
|
|
|
|
while (oPC != OBJECT_INVALID)
|
|
{
|
|
iPCTot++;
|
|
|
|
/* skip anonymous PC's & DMs! */
|
|
if (GetLocalInt(oPC, "PCL_ANON") != 1 || !GetIsDM(oPC))
|
|
{
|
|
|
|
iPCVis++;
|
|
|
|
sPCName = "<c ¹û>" + GetName(oPC) + " ";
|
|
sPCArea = "<c ¹û>(" + GetName(GetArea(oPC)) + ") ";
|
|
sPCLevel = "<c ¹û>L:" + IntToString(GetHitDice(oPC)) + " ";
|
|
|
|
//-- skip class junk
|
|
if (GetLocalInt(oPC, "PCL_HIDE_CLASS") == 1)
|
|
{
|
|
sPCClass = "";
|
|
}
|
|
else
|
|
{
|
|
sPCClass = GetClassLevels(oPC);
|
|
}
|
|
|
|
// sPCClass = "";
|
|
|
|
if (GetLocalInt(oPC,"PCL_LFG") == 1)
|
|
{
|
|
sPCLFG = "*LFG* ";
|
|
}
|
|
else
|
|
{
|
|
sPCLFG = "";
|
|
}
|
|
|
|
if (GetLocalInt(oPC,"PCL_AFK") == 1)
|
|
{
|
|
sPCAFK = "<AFK> ";
|
|
}
|
|
else
|
|
{
|
|
sPCAFK = "";
|
|
}
|
|
/*
|
|
if (GetIsDM(oPC))
|
|
{
|
|
sDM = "[DM] ";
|
|
} else
|
|
{*/
|
|
sDM = "";
|
|
// }
|
|
|
|
sMessage = sPCName + sPCArea + sPCLevel + " - " + sPCClass; //+ sDM;
|
|
SendMessageToPC(oUser, sMessage);
|
|
|
|
}
|
|
|
|
oPC = GetNextPC();
|
|
}
|
|
|
|
sMessage = "<c ¹û>[ " + IntToString(iPCVis) + " out of " + IntToString(iPCTot) + " PC's displayed ]";
|
|
SendMessageToPC(oUser, sMessage);
|
|
|
|
}
|
|
|
|
|
|
string GetClassLevels(object oPC)
|
|
{
|
|
string sClassLevels = "";
|
|
int iClsIdx;
|
|
int iClsType;
|
|
string sClsName;
|
|
int iClsLvl;
|
|
|
|
for (iClsIdx = 1; iClsIdx <= 3; iClsIdx++) {
|
|
|
|
iClsType = GetClassByPosition(iClsIdx, oPC);
|
|
|
|
if (iClsType != CLASS_TYPE_INVALID) {
|
|
|
|
switch (iClsType)
|
|
{
|
|
case CLASS_TYPE_ARCANE_ARCHER: sClsName = "AA"; break;
|
|
case CLASS_TYPE_ASSASSIN: sClsName = "Asn"; break;
|
|
case CLASS_TYPE_BARBARIAN: sClsName = "Brbn"; break;
|
|
case CLASS_TYPE_BARD: sClsName = "Bard"; break;
|
|
case CLASS_TYPE_BLACKGUARD: sClsName = "BG"; break;
|
|
case CLASS_TYPE_CLERIC: sClsName = "Clr"; break;
|
|
case CLASS_TYPE_DIVINECHAMPION: sClsName = "COT"; break;
|
|
case CLASS_TYPE_DRAGONDISCIPLE: sClsName = "RDD"; break;
|
|
case CLASS_TYPE_DRUID: sClsName = "Drd"; break;
|
|
case CLASS_TYPE_DWARVENDEFENDER: sClsName = "DD"; break;
|
|
case CLASS_TYPE_FIGHTER: sClsName = "Ftr"; break;
|
|
case CLASS_TYPE_HARPER: sClsName = "HS"; break;
|
|
case CLASS_TYPE_MONK: sClsName = "Mnk"; break;
|
|
case CLASS_TYPE_PALADIN: sClsName = "Pld"; break;
|
|
case CLASS_TYPE_PALEMASTER: sClsName = "PM"; break;
|
|
case CLASS_TYPE_RANGER: sClsName = "Rng"; break;
|
|
case CLASS_TYPE_ROGUE: sClsName = "Rog"; break;
|
|
case CLASS_TYPE_SHADOWDANCER: sClsName = "SD"; break;
|
|
case CLASS_TYPE_SHIFTER: sClsName = "Shft"; break;
|
|
case CLASS_TYPE_SORCERER: sClsName = "Sorc"; break;
|
|
case CLASS_TYPE_WEAPON_MASTER: sClsName = "WM"; break;
|
|
case CLASS_TYPE_WIZARD: sClsName = "Wiz"; break;
|
|
default: sClsName = "?" + IntToString(iClsType) + "?";
|
|
}
|
|
|
|
iClsLvl = GetLevelByClass(iClsType, oPC);
|
|
|
|
if (sClassLevels != "") {
|
|
sClassLevels = sClassLevels + "/"; }
|
|
|
|
sClassLevels = sClassLevels + IntToString(iClsLvl) + " " + sClsName;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return sClassLevels + " ";
|
|
}
|