Initial upload

Initial upload.
This commit is contained in:
Jaysyn904
2024-10-09 14:17:22 -04:00
parent a13073fd78
commit e51634d39b
2354 changed files with 658510 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
int StartingConditional()
{
//initialize variables
float fTotalCR = 0.0;
float fPreviousCR = 0.0;
float fCreatureCR = 0.0;
string sDisplayCR;
object oCreature = GetFirstObjectInArea(OBJECT_SELF);
//calculate total CR
while (GetIsObjectValid(oCreature))
{
if (
!GetIsPC(oCreature) &&
!GetIsDM(oCreature) &&
GetObjectType(oCreature) == OBJECT_TYPE_CREATURE
)
{
fCreatureCR = GetChallengeRating(oCreature);
fTotalCR = fCreatureCR + fPreviousCR;
fPreviousCR = fTotalCR;
}
oCreature = GetNextObjectInArea(OBJECT_SELF);
}
//set custom token
if (fTotalCR > 0.0)
{
sDisplayCR = "Total CR = " + GetSubString(FloatToString(fTotalCR), 5, 6);
}
else
sDisplayCR = " ";
SetCustomToken(110, sDisplayCR);
return TRUE;
}