Code: Select all
void main()
{
int nXP = GetXP(GetPCSpeaker());
int nObjectType = OBJECT_TYPE_CREATURE;
string strguardm = "amm_guardmale";
string strguardf = "amm_guardfemale";
string strhigrdm = "amm_higrdmale";
string strhigrdf = "amm_higrdfemale";
location locLocation = GetLocation(GetNearestObjectByTag("amm_guardspawn"));
int bUseAppearAnimation = TRUE;
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3),locLocation);
if(0 <= nXP < 10000)
{
CreateObject(nObjectType, strguardm, locLocation, bUseAppearAnimation);
}
if(10000 <= nXP < 45000)
{
CreateObject(nObjectType, strguardm, locLocation, bUseAppearAnimation);
CreateObject(nObjectType, strguardf, locLocation, bUseAppearAnimation);
}
if(45000 <= nXP < 105000)
{
CreateObject(nObjectType, strhigrdm, locLocation, bUseAppearAnimation);
}
else
{
CreateObject(nObjectType, strhigrdm, locLocation, bUseAppearAnimation);
CreateObject(nObjectType, strhigrdf, locLocation, bUseAppearAnimation);
}
}