Alangara_PRC8/_module/nss/ke_factionreset.nss
Jaysyn904 86feb9ca6f Initial commit
Initial commit.
2024-06-05 21:21:06 -04:00

32 lines
967 B
Plaintext

void main()
{
object oPC = GetLastUsedBy();
object oTarget;
oTarget = oPC;
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION), GetLocation(oTarget));
// Reset standard factions
if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oPC) <= 10)
{
SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oPC);
}
if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oPC) <= 10)
{
SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oPC);
}
if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oPC) <= 10)
{
SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oPC);
}
FloatingTextStringOnCreature("Your faction status have been reset and you should no longer be hostile to NPCs.", oPC);
}