Initial commit

Adding all of the current content for Anphillia Unlimited.
This commit is contained in:
Jaysyn904
2024-01-04 07:49:38 -05:00
parent df18cd54c8
commit 28cdb617b3
12943 changed files with 9727121 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
string FixedInt (int n)
{
string sN = IntToString(n);
if (n < 0)
return "ERROR";
if (n < 10)
return "00" + sN;
if (n < 100)
return "0" + sN;
if (n < 1000)
return sN;
return "ERROR";
}
void CreateDeity(string name)
{
/*
name = GetStringUpperCase(name);
string Temp = GetLocalString(GetModule(), "Deity001");
int n = 1;
while (Temp != "")
{
n++;
Temp = GetLocalString(GetModule(), "Deity" + FixedInt(n));
}
WriteTimestampedLogEntry("Created " + name);
SetLocalString(GetModule(), "Deity" + FixedInt(n), name);
*/
SetLocalString(GetModule(), "LastDeity", name);
}
void Domain(int DomainNum, string name = "LAST_ONE")
{
int n;
if (name == "LAST_ONE")
{
/*
name = GetLocalString(GetModule(), "Deity001");
n = 1;
while (name != "")
{
n++;
name = GetLocalString(GetModule(), "Deity" + FixedInt(n));
}
*/
name = GetLocalString(GetModule(), "LastDeity");
}
name = GetStringUpperCase(name);
int Temp = GetLocalInt(GetModule(), name + "_Domain1");
n = 1;
while (Temp != 0)
{
n++;
Temp = GetLocalInt(GetModule(), name + "_Domain" + IntToString(n));
}
WriteTimestampedLogEntry("Added " + IntToString(n) + " for " + name);
SetLocalInt(GetModule(), name + "_Domain" + IntToString(n), DomainNum);
}
int CheckPlayer(object oPC, string Deity = "DEFAULT_DEITY")
{
if (Deity == "DEFAULT_DEITY")
{
Deity = GetDeity(oPC);
}
Deity = GetStringUpperCase(Deity);
int n = 1;
int Feat = GetLocalInt(GetModule(), Deity + "_Domain" + IntToString(n));
int CorrectDomains = 0;
while (Feat != 0 && CorrectDomains != 2)
{
if (GetHasFeat(Feat, oPC) == TRUE)
CorrectDomains++;
n++;
Feat = GetLocalInt(GetModule(), Deity + "_Domain" + IntToString(n));
}
if (CorrectDomains == 2)
return TRUE;
else
return FALSE;
}