Rune_PRC8/_module/nss/oas_inc.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

46 lines
1.2 KiB
Plaintext

////////////////////////////////////////////////////////////////////////////////
//
// Allegiance System
// oas_inc
// By Don Anderson
// dandersonru@msn.com
//
// Aligns Player with Specified Faction
//
////////////////////////////////////////////////////////////////////////////////
void AlignGood(object oPC)
{
//These are the Possible Allegiances for a Player
object oGood = GetObjectByTag("Good");
object oEvil = GetObjectByTag("Evil");
//Adjust Reputations
AdjustReputation(oPC,oGood,100);
AdjustReputation(oPC,oEvil,0);
}
void AlignEvil(object oPC)
{
//These are the Possible Allegiances for a Player
object oGood = GetObjectByTag("Good");
object oEvil = GetObjectByTag("Evil");
//Adjust Reputations
AdjustReputation(oPC,oGood,0);
AdjustReputation(oPC,oEvil,100);
}
void SetNPCFactionInt(object oNPC)
{
//These are the Possible Allegiances for a Player
object oGood = GetObjectByTag("Good");
object oEvil = GetObjectByTag("Evil");
if(GetFactionEqual(oGood,oNPC) == TRUE) SetLocalInt(oNPC,"FACTION",1);
else if(GetFactionEqual(oEvil,oNPC) == TRUE) SetLocalInt(oNPC,"FACTION",2);
else SetLocalInt(oNPC,"FACTION",0);
}
//void main(){}