Author Sticky: Post Working Scripts Here
Maalen Posted: Wednesday, 03 July 05:24AM
Script Name: Lower Faction / Tell PC

What it Does: Lowers a PCs faction with any number of faction groups, informs the PC that they have lost "x" amount of faction and finally tells them their total faction score with each group affected.

Notes: I have only included 2 factions in the script but additional factions could be easily added.

NWScript:
//::///////////////////////////////////////////////
//:: Name       Lower Faction
//:: FileName   conv_lowerfact
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By: Lucas Curell
//:: Created On: 7/3/02
//:://////////////////////////////////////////////
#include "nw_i0_generic"
void main()
{
object oPC = GetPCSpeaker();
object oFacMember = GetObjectByTag("Guard");
object oComm = GetObjectByTag("HumanCommoner");
int PCCurrFac;
    // Lower the faction of the PC to the guards.
    AdjustReputation(GetPCSpeaker(), OBJECT_SELF, -1);
    // Tell the PC that his/her faction has been lowered.
    SendMessageToPC(GetPCSpeaker(), "You have lost 1 point of faction with the guards.");
    // Set the value of PCCurrFac to the PCs current faction with the above group.
    PCCurrFac = GetFactionAverageReputation(oFacMember, oPC);
    // Tell the PC his/her current faction with said group.
    SendMessageToPC(GetPCSpeaker(), "Your current faction with the guards is " + IntToString(PCCurrFac) + ".");
    // Lower the faction of the PC to commoners.
    AdjustReputation(GetPCSpeaker(), oComm, -1);
    // Tell the PC that his/her faction has been lowered.
    SendMessageToPC(GetPCSpeaker(), "You have lost 1 point of faction with the commoners.");
    // Set the value of PCCurrFac to teh PCs current faction with the above group.
    PCCurrFac = GetFactionAverageReputation(oComm, oPC);
    // Tell the PC his/her faction with said group.
    SendMessageToPC(GetPCSpeaker(), "Your current faction with the commoners is " + IntToString(PCCurrFac) + ".");

}